Jon
Mon Oct 18 16:23:11 CDT 2004
Charles A. Lackman <Charles@CreateItSoftware.net> wrote:
> Hello I am retrieve binary data from a web service and need to write it to
> disk. It will be a setup file or replacement files I have made for
> applications.
>
> This is where I am lost
>
> the memory stream is filled.
>
> ms.Seek(0, SeekOrigin.Begin)
> Dim MyWriter as StreamWriter
> MyWriter = New StreamWriter("C:\Test.Setup")
>
> ms.read
> mywriter.write(ms)
>
> ms.close
> mywriter.close
> This does not work, what am I missing,
One point here, apart from what the others have said: if you've got
binary data, you shouldn't use StreamWriter. Writers and Readers are
for text data. Streams are for binary data. Just use FileStream.
--
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too