Function 5Ah Create Temporary File (DOS 3.x)

Creates a file with a unique name, in the current or specified

directory on the default or specified disk drive, and returns a

handle that can be used by the program for subsequent access to

the file. The name generated for the file is also returned in a

buffer specified by the program.

entry AH 5Ah

CX attribute

00h normal

01h read only

02h hidden

04h system

DS:DX segment:offset of ASCIIZ path

return AX handle

DS:DX segment:offset of complete ASCIIZ path and file name

CF set if error

AX error code

note 1) The ASCIIZ path supplied to this function should be followed by at

least 13 additional bytes of buffer space. MS-DOS adds a backslash (\)

to the supplied path, if necessary, then appends a null-terminated

filename that is a function of te current time.

2) Files created with this function are not automatically deleted when the

caling program terminates.

3) The funciton fails if:

a) any element of the pathname does not exist.

b) The file is being created in the root directory and the root

directory is full.

4) If the program is running on a network, the file is created and opened

for read/write access in compatibility sharing mode.

5) See also Int\21f\3C and Int\21f\5B which provide additional

facilities for creating files.