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

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

_creat

Syntax

 
#include <io.h>

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

Description

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.

Portability

ANSI/ISO C No
POSIX No


  webmaster     delorie software   privacy  
  Copyright © 2004     Updated Apr 2004