en:docs:fapi:dossetmaxfh

This is part of Family API which allow to create dual-os version of program runs under OS/2 and DOS

Note: This is legacy API call. It is recommended to use 32-bit equivalent

2021/09/17 06:47 · prokushev
2021/08/20 05:18 · prokushev

DosSetMaxFH

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.

Bindings

C

#define INCL_DOSFILEMGR
 
USHORT  rc = DosSetMaxFH(NumberHandles);
 
USHORT  NumberHandles; /* Number of file handles */
USHORT  rc;            /* return code */

MASM

EXTRN  DosSetMaxFH:FAR
INCL_DOSFILEMGR     EQU 1
 
PUSH   WORD    NumberHandles ;Number of file handles
CALL   DosSetMaxFH
 
Returns WORD

en/docs/fapi/dossetmaxfh.txt · Last modified: 2021/11/04 14:29 by prokushev