BUG: Sequential File I/O Does Not Handle Embedded NullsLast reviewed: January 12, 1996Article ID: Q142246 |
The information in this article applies to:
SYMPTOMSUsing sequential file I/O to read in file that contains embedded null characters (characters with an ANSI value of 0) can cause Visual Basic 4.0 to generate the following error message, "Run-time error '62': Input past end of file".
STATUSMicrosoft has confirmed this to be an issue in the Microsoft products listed at the beginning of this article. Microsoft is researching this issue and will post new information here in the Microsoft Knowledge Base as it becomes available.
WORKAROUNDYou can work around this behavior by opening the sequential file as a binary file and manipulating the sequential file as a binary file using the Get and Put statements to set and retrieve file data.
MORE INFORMATIONThe code sample shown creates a one dimensional byte array with ten elements and fills the array with the number 65 except for the eighth element. This element contains the number 0--a null character. When you run this program, an error message is displayed.
Steps to Reproduce
REFERENCESFor additional information, please see the following article(s) in the Microsoft Knowledge Base:
ARTICLE-ID: Q140354 TITLE : BUG: Input Function Doesn't Ignore EOF |
Additional reference words: 4.00 vb4win vb4all sequential file
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |