SUMMARY
The following functions are provided by the Microsoft C Run-time Library
(CRT) and the Windows API to create a file:
Return Type API or Function Category
--------------------------------------------
HFILE OpenFile Windows API
HFILE _lopen/_lcreat Windows API
int _open/_creat CRT
FILE * fopen CRT
These return types (HFILE, int, and FILE *) are not compatible, so they can
not be used in a function which is expecting the other type. The HFILEs are
handles to operating system files (MS-DOS file handles), the ints are CRT
file handles, and the FILE *s are pointers to structures which represent a
CRT stream.
For files opened with OpenFile(), _lopen, and _lcreat, the common file
manipuluation routines that you should use are:
_lclose
_llseek
_lread
_lwrite
For files opened with _open() and _creat(), the common file manipulation
routines that you should use are:
_close
_lseek
_read
_write
For files opened with fopen, the common file manipulation routines that you
should use are:
fclose
fseek
fread
fwrite
For other input and output functions, please check the documentation for
information on whether they are intended for use with MS-DOS handles
(HFILE), streams (FILE *), or low-level I/O (int).