"Robert Dufour" <bd*****@sgiims.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
How do you read all the data from an enhanced metafile and put it in a
memory stream?
Myfile.emf is part of my solution but I can't get the trick to read all of
it in a stream.
Thanks for any help,
Bob
Code off top of my head:
Dim bytes As Byte()
Dim fileStream As FileStream = File.OpenRead("C:\myfile.emf")
Try
Dim len As Integer = CInt(fileStream.Length)
fileStream.Read(bytes, 0, len)
Finally
fileStream.Close()
End Try
Dim memStream As MemoryStream = New MemoryStream(bytes)
HTH,
Mythran