There really isn't a direct way to do this. The only workaround I see
is to call the SaveToFile method on the stream, and then read the bytes from
the file.
You might try and cast the Stream object to an IPersistMemory interface
instance (it is a COM interface, you might have to define it if it isn't
already defined somewhere). If that works, then you can write the contents
directly to a byte array. Either that, or the IStream COM interface (at
which point, you could read characters from the stream, and then write them
to your byte array).
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"bill tie" <bi*****@discussions.microsoft.comwrote in message
news:7A**********************************@microsof t.com...
>
How do I convert ADODB.Stream into an array of bytes?
Thank you.