Q43271: C: Cannot Bind Programs with Increased File Handles
Article: Q43271
Product(s): See article
Version(s): 5.10 | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 17-MAY-1989
Microsoft C defaults to making 20 file handles available to an
application. This is the case for both OS/2 and DOS. This number can
be increased by modifying the start-up source code provided with
Optimizing C Version 5.10 and linking in the resulting OBJs. This is
documented in the README.DOC (search for _NFILE_).
However, it is not possible to bind a program that is linked to these
modified OBJs. This is because the protect-mode start up makes a call
to DOSSETMAXFH after being modified. This function is not FAPI (dual
mode) and is not bindable.
To give a program more than 20 file handles under both OS/2 and DOS,
you must create separate EXEs for each environment.
An attempt to bind a program that is linked with modified start up will
produce the following error:
LINK : error L2029: Unresolved externals:
DOSSETMAXFH in file(s):
BV3.OBJ(bindv3)
The start-up files that must be modified to increase the number of
available file handles are CRT0DAT.ASM and _FILE.C.
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.