OS/2 initially allocates 50 file handles to a process. This is the recommended number for an application. However, if the system limit has not been reached, this amount can be increased with DosSetMaxFH. When DosSetMaxFH is issued, all open file handles are preserved.
If an application tries to set the number of file handles using DosSetMaxFH to a value less than the number of file handles set by OS/2 or a parent process it will return an error return code of 87, ERROR_INVALID_PARAMETER. If a higher limit is set, it can be lowered, but not lower than the value inherited from the system or the parent process.
Applications should instead use DosSetRelMaxFH, to query first and then to set, the maximum number of file handles for a process.