
Click above to get retro games delivered to your door ever month!
X-Hacker.org- DOS 5.0 Ref. - <b>function 5ah create temporary file dos 3.0+</b>
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 5Ah Create Temporary File DOS 3.0+
Creates a file with a unique name and returns both a handle for
the file and the new filename.
Entry AH = 5Ah
CX = File attributes
DS:DX = Pointer to path ending in \ (ASCIIZ string)
Return AX = File handle
Unique filename appended to path (ASCIIZ string)
or
AX = Error code, if CF is set
| 03h Path not found
| 04h No handle available
| 05h Access denied
------------------------------------------------------------------
Before function 5ah is invoked, DS:DX must point to a string that
specifies the path for the temporary file; the path must end with
a backslash (\) and a zero. The program must reserve the 13 bytes
immediately following the terminating zero to hold the temporary
filename.
The file attributes parameter can be a combination of:
attr_normal, attr_readonly, attr_hidden, attr_system, attr_archive.
When DOS creates a file, it opens it with read-and-write access
and compatibility sharing mode and sets the file pointer to zero.
If the attr_readonly attribute is specified, it takes affect only
after the new file is closed.
DOS does not delete temporary files; programs using temporary
files should delete them when they are no longer in use.
See Also: 3ch 5bh 59h File attributes
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson