Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
microsoft.public.vb.general.discussion
Reading Binary Files
Leo
8/25/2010 12:39:00 PM
I am trying to learn how to read binary files but can not seem to find
much out there. Can someone give me an example. I think for what I am
trying to read, a Byte array is best so if someone can give me a
generic example reading from a binary file into a byte array then that
would be wonderful.
--
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at
http://www.eternal-sep...
2 Answers
Dee Earley
8/25/2010 12:46:00 PM
0
On 25/08/2010 13:39, Leo wrote:
> I am trying to learn how to read binary files but can not seem to find
> much out there. Can someone give me an example. I think for what I am
> trying to read, a Byte array is best so if someone can give me a generic
> example reading from a binary file into a byte array then that would be
> wonderful.
Open, Get, Close
http://www.earlsoft.co.uk/tips/...
--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
iCode Systems
(Replies direct to my email address will be ignored.
Please reply to the group.)
Karl E. Peterson
9/2/2010 11:14:00 PM
0
Leo wrote on 8/25/2010 :
> I am trying to learn how to read binary files but can not seem to find much
> out there. Can someone give me an example. I think for what I am trying to
> read, a Byte array is best so if someone can give me a generic example
> reading from a binary file into a byte array then that would be wonderful.
Private Function ReadFileB(ByVal FileName As String, Data() As Byte) As
Boolean
Dim hFile As Long
On Error GoTo Hell
hFile = FreeFile
Open FileName For Binary As #hFile
ReDim Data(0 To LOF(hFile) - 1) As Byte
Get #hFile, , Data
Close #hFile
Hell:
ReadFileB = Not CBool(Err.Number)
End Function
--
..NET: It's About Trust!
http://vfre...
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Reading Binary Files
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password