www.delorie.com/djgpp/doc/libc/libc_118.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]



#include <io.h>

int _creat(const char *path, int attrib);


This is a direct connection to the MS-DOS creat function call, int 0x21, %ah = 0x3c, on versions of DOS earlier than 7.0. On DOS version 7.0 or later _creat calls function int 0x21, %ax = 0x6c00

On platforms where the LFN API (see section LFN) is available, _creat calls function 0x716C of Interrupt 21h, to support long file names.

On FAT32 file systems file sizes up to 2^32-2 are supported. Note that WINDOWS 98 has a bug which only lets you create these big files if LFN is enabled. In plain DOS mode it plainly works.

The file is set to binary mode.

This function can be hooked by File System Extensions (see section File System Extensions). If you don't want this, you should use _dos_creat (see section _dos_creat) or _dos_creatnew (see section _dos_creatnew).

Return Value

The new file descriptor, else -1 on error.



  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004