EOF marker problem reading file 
Author Message
 EOF marker problem reading file

I am writing some code to encrypt program, data, and help files for
distribution on the Internet.  However, I seem to be hitting an EOF
marker.  For example, I get an error 62 "Input past end of file" when I
try to read the first 1000 bytes of a file.  The input files are all
well over 100,000 bytes.  Any suggestions?

=============================================
William E. Buntain
C&C Software



Tue, 12 Feb 2002 03:00:00 GMT  
 EOF marker problem reading file
Open as Binary.

Quote:
> I am writing some code to encrypt program, data, and help files for
> distribution on the Internet.  However, I seem to be hitting an EOF
> marker.  For example, I get an error 62 "Input past end of file" when I
> try to read the first 1000 bytes of a file.  The input files are all
> well over 100,000 bytes.  Any suggestions?

> =============================================
> William E. Buntain
> C&C Software




Tue, 12 Feb 2002 03:00:00 GMT  
 EOF marker problem reading file
Open your file in Binary mode and get the whole lot in one go. You can then
examine the file at leisure:

Dim b() As Byte
Dim flen As Long
Dim fn As Integer
fn = FreeFile
Open "c:\mybigfile" For Binary As fn
flen = LOF(fn)
ReDim b(1 To flen)
Get fn, 1, b()
Close fn

The file data will now be in the byte array b(1) to b(flen)

Mike


Quote:
> I am writing some code to encrypt program, data, and help files for
> distribution on the Internet.  However, I seem to be hitting an EOF
> marker.  For example, I get an error 62 "Input past end of file" when I
> try to read the first 1000 bytes of a file.  The input files are all
> well over 100,000 bytes.  Any suggestions?

> =============================================
> William E. Buntain
> C&C Software




Wed, 13 Feb 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Sending EOF marker through MSComm.Output

2. MSHFlex.recordset = rs & EOF/BOF markers

3. How to read file that starts w/EOF ?

4. FileSystemObject, reading files, and EOF...

5. EOF encountered when reading a blank line from a text file

6. End of file marker problem

7. Reading an HTML marker using FileSystemObject

8. Need to truncate a file - can I just write some kind of EOF marker where I need it?

9. Reading after EOF

10. Testing text file for EOF (End of File)

11. Testing text file for EOF (End of File)

12. mschart series marker problem

 

 
Powered by phpBB® Forum Software