Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
DosSetMaxFH (1.2)
◄Function Group► ◄Overview► ◄Changes► ◄Up► ◄Next► ◄Previous►
────────────────────────────────────────────────────────────────────────────
#define INCL_DOSFILEMGR
USHORT DosSetMaxFH(usHandles)
USHORT usHandles; /* number of file handles */
The DosSetMaxFH function sets the maximum number of available file handles
for the current process and any of its child processes. The number of
available handles limits the number of files that can be opened at the same
time.
Parameter Description
────────────────────────────────────────────────────────────────────────────
usHandles Specifies the maximum number of file handles provided to the
calling process. The maximum value for this parameter is 32,768;
the minimum is 20. This number must not be smaller than the
current number of file handles allocated.
Return Value
The return value is zero if the function is successful. Otherwise, it is an
error value, which may be one of the following:
ERROR_INVALID_PARAMETER
ERROR_NOT_ENOUGH_MEMORY
Comments
This function preserves all currently open file handles.
There are three handles in use when a process is started──for standard
input, standard output, and standard error. The number of available handles
set by the DosSetMaxFH function includes these handles. The DosOpenQueue,
KbdOpen, and MouOpen functions also use these handles.
See Also
DosDupHandle, DosOpen, DosOpenQueue, KbdOpen, MouOpen
♦