DosSetMaxFH (OS/2 1.x): Difference between revisions
Appearance
m Ak120 moved page OS2 API:CPI:LEGACY:DosSetMaxFH to DosSetMaxFH (OS/2 1.x) |
mNo edit summary |
||
Line 1: | Line 1: | ||
This call defines the maximum number of file handles for the current process. | This call defines the maximum number of file handles for the current process. | ||
==Syntax== | ==Syntax== | ||
DosSetMaxFH (NumberHandles) | |||
DosSetMaxFH | |||
==Parameters== | ==Parameters== | ||
; | ;NumberHandles (USHORT) - input : Total number of file handles to be provided. | ||
==Return Code== | ==Return Code== | ||
rc (USHORT) - return | rc (USHORT) - return | ||
Return code descriptions are: | Return code descriptions are: | ||
* 0 NO_ERROR | |||
* 0 | * 8 ERROR_NOT_ENOUGH_MEMORY | ||
* 8 | * 87 ERROR_INVALID_PARAMETER | ||
* 87 | |||
==Remarks== | ==Remarks== | ||
Line 30: | Line 24: | ||
USHORT rc = DosSetMaxFH(NumberHandles); | USHORT rc = DosSetMaxFH(NumberHandles); | ||
USHORT | USHORT NumberHandles; /* Number of file handles */ | ||
USHORT rc; /* return code */ | |||
USHORT | |||
</PRE> | </PRE> | ||
Line 45: | Line 38: | ||
Returns WORD | Returns WORD | ||
</PRE> | </PRE> | ||
[[Category: | [[Category:Dos]] |
Revision as of 15:55, 1 March 2017
This call defines the maximum number of file handles for the current process.
Syntax
DosSetMaxFH (NumberHandles)
Parameters
- NumberHandles (USHORT) - input
- Total number of file handles to be provided.
Return Code
rc (USHORT) - return
Return code descriptions are:
- 0 NO_ERROR
- 8 ERROR_NOT_ENOUGH_MEMORY
- 87 ERROR_INVALID_PARAMETER
Remarks
OS/2 initially allots 20 file handles to a process, which is the recommended amount for an application. However, if the system limit has not been reached, this amount can be increased with DosSetMaxFH. When this call is made, all open file handles are preserved.
Example Code
C Binding
#define INCL_DOSFILEMGR USHORT rc = DosSetMaxFH(NumberHandles); USHORT NumberHandles; /* Number of file handles */ USHORT rc; /* return code */
MASM Binding
EXTRN DosSetMaxFH:FAR INCL_DOSFILEMGR EQU 1 PUSH WORD NumberHandles ;Number of file handles CALL DosSetMaxFH Returns WORD