On OS/2 this function assumes there is a max of 16K file handles open in the system.
The OS/2 control program doc says the maximum default is 50 for a process.
It can be queried with
APIRET rc = DosSetRelMaxFH(PLONG pcbReqCount, PULONG pcb CurMaxFH);
pcbReqCount is the signed number to be added or subtracted to the current max
file handle count for the process. Use 0 to query.
PULONG is a pointer to a ULONG where the current max for the process is returned.
The max can also be set in an absolute manner using
APIRET rc = DosSetMaxFH(ULONG count);