How To Write Data to a File Using WriteFile API (165942)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Standard Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Professional Edition, 32-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 32-bit, for Windows 4.0
This article was previously published under Q165942 SUMMARY
The Win32 API allows binary files to be opened and written using the CreateFile, ReadFile, and WriteFile APIs. These functions offer increased flexibility
to write and read from files. This article demonstrates a technique to
write large amounts of data, in the form of a large array, to a binary
file all at once instead of element by element.
REFERENCES
Microsoft Win32 SDK
Win32 Programmers Reference
ReadFile
CreateFile
WriteFile
FlushFileBuffers
CloseFile
Modification Type: | Minor | Last Reviewed: | 7/15/2004 |
---|
Keywords: | kbAPI kbhowto KB165942 |
---|
|