ID Number: Q43271
5.10 6.00 6.00a 6.00ax 7.00 | 5.10 6.00 6.00a
MS-DOS | OS/2
Summary:
Microsoft C defaults to making 20 file handles available to an
application. This is the case for both OS/2 and MS-DOS. This number
can be increased by modifying the startup source code provided with
Optimizing C version 5.1 and linking in the resulting OBJs. This is
documented in the README.DOC for version 5.1 (search for _NFILE_).
This is also documented in the README.DOC file that shipped with
Microsoft C version 6.0.
However, it is not possible to bind a program that is linked to these
modified .OBJs. This is because the protected mode startup makes a
call to DOSSETMAXFH after being modified. This function is not FAPI
(dual mode) and is not bindable.
In Microsoft C/C++ version 7.0, OS/2 targets are not supported so
binding is not possible.
To give a program more than 20 file handles under both OS/2 and
MS-DOS, you must create separate .EXEs for each environment.
More Information:
An attempt to bind a program that is linked with modified startup will
produce the following error:
LINK : error L2029: Unresolved externals:
DOSSETMAXFH in file(s):
BV3.OBJ(bindv3)
The startup files that must be modified to increase the number of
available file handles are CRT0DAT.ASM and _FILE.C.
Additional reference words: 6.00 6.0a 6.00a 6.0ax 6.00ax 7.00