Can someone tell me what I'm doing wrong here:
byte[] inBytes = File.ReadAllBytes("c:\\temp\\NotesRecording.wav");
IMemoryBlobStream inBlob = new MemoryBlobStreamClass();
inBlob.ImportFromMemory(ref inBytes[0], (uint)inBytes.Length);
MessageBox.Show(inBlob.Size.ToString());
inBlob.SaveToFile("c:\\temp\\blobTest2.wav");
byte[] outBytes = new byte[inBytes.Length];
inBlob.AttachToMemory(ref outBytes[0], inBlob.Size, 0);
The last part is the problem, I'm trying to extract the data in the blob stream class to a byte array. It doesn't work at all though, the array just remain empty afterwards.
I found a work around. The IMemoryBlobStreamVariant interface lets you read and write the blob data to a byte array.