G
Guest
Hi,
I have following code:
Open strFileName For Binary Access Read Shared As intInputFileHandler
While (Not EOF(intInputFileHandler)
Line Input #intInputFileHandler, strBuff 'Read one line
..................
..................
Wend
It always read over the end of file. The error message is "Input past end of
file"
If I change open mode like this:
Open strFileName For Input Shared As intInputFileHandler
It won't read over the end of file anymore. But the input file isn't 100%
text file, sometime it has binary characters. Thus reading process may stop
before it reach the end of file because it find EOF character inside the file.
So, if the input file has multiple lines, but sometime it can have binary
characters, what is the best way to open and read the whole file line by line
?
Thanks
Quang
I have following code:
Open strFileName For Binary Access Read Shared As intInputFileHandler
While (Not EOF(intInputFileHandler)
Line Input #intInputFileHandler, strBuff 'Read one line
..................
..................
Wend
It always read over the end of file. The error message is "Input past end of
file"
If I change open mode like this:
Open strFileName For Input Shared As intInputFileHandler
It won't read over the end of file anymore. But the input file isn't 100%
text file, sometime it has binary characters. Thus reading process may stop
before it reach the end of file because it find EOF character inside the file.
So, if the input file has multiple lines, but sometime it can have binary
characters, what is the best way to open and read the whole file line by line
?
Thanks
Quang