2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by MehdiAnis
0

Dim fsInput As New FileStream(sInputFilename, _
FileMode.Open, FileAccess.Read)
...
..
.
'Read the file text to the byte array.
Dim bytearrayinput(fsInput.Length - 1) As Byte
fsInput.Read(bytearrayinput, 0, bytearrayinput.Length)

=============
The code is opening and reading a TEXT file. You have to open the file in BINARY mode and read the content from it.

READ BINARY FILE:
bytearrayinput = My.Computer.FileSystem.ReadAllBytes("C:\Test.Doc")

Hope it helps.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.