| www.delorie.com/djgpp/doc/libc-2.01/libc_132.html | search |
#include <dos.h> unsigned int _dos_creatnew(const char *filename, unsigned short attr, int *handle);
This is a direct connection to the MS-DOS create unique function call (%ah = 0x5B). This function creates the given file with the given attribute and puts file handle into handle if creating is successful. This function will fail if the specified file exists. Meaning of attr parameter is the following:
_A_NORMAL (0x00)
_A_RDONLY (0x01)
_A_HIDDEN (0x02)
_A_SYSTEM (0x04)
_A_ARCH (0x20)
See section _dos_open. See section _dos_creat. See section _dos_read. See section _dos_write. See section _dos_close
Returns 0 if successful or DOS error code on error (and sets errno).
int handle;
if ( !_dos_creatnew("FOO.DAT", _A_NORMAL, &handle) )
puts("Creating was successful !");
Go to the first, previous, next, last section, table of contents.
| prev next webmaster | delorie software privacy |
| Copyright © 1997 | Updated Apr 1997 |