|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
#include <dos.h> unsigned int _dos_creat(const char *filename, unsigned short attr, int *handle);
This is a direct connection to the MS-DOS creat function call (%ah = 0x3C). This function creates the given file with the given attribute and puts file handle into handle if creating is successful. If the file already exists it truncates the file to zero length. Meaning of attr parameter is the following:
Normal file (no read/write restrictions)
Read only file
See also _dos_open, _dos_creatnew, _dos_read, _dos_write, and _dos_close.
This function does not support long filenames, even on systems where the LFN API (see section LFN) is available. For LFN-aware functions with similar functionality see _creat, and _creatnew. Also see creat, and open, which are Posix-standard.
Returns 0 if successful or DOS error code on error (and sets
int handle; if ( !_dos_creat("FOO.DAT", _A_ARCH, &handle) ) puts("Creating was successful !");
|webmaster||delorie software privacy|
|Copyright © 2004||Updated Apr 2004|