Q59893: Multithreaded Run-Time Libraries Require 40 File Handles
Article: Q59893
Product(s): See article
Version(s): 5.10 6.00
Operating System(s): OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 17-JUL-1990
If you are creating an application that uses the multithreaded version
of the run-time library (LLIBCMT.LIB or CRTLIB.DLL), it is not
possible to set the file-handle count lower than 40. This is by design
and may change in a future release of the run-time library.
The DosSetMaxFH() function allows an application to dynamically set
the number of file handles a program requires. It takes one parameter
(the number of handles) and returns success, or one of the following
two errors:
ERROR_INVALID_PARAMETER
ERROR_NOT_ENOUGH_MEMORY
However, there is a limitation in the function. It will not allow the
program to reduce the number of file handles, only increase them.
In the case of an application that is linked with CRTLIB.DLL or
LLIBCMT.LIB, the library has already set the file-handle count to 40.
In this case, a call to DosSetMaxFH() with a number less than 40
returns an ERROR_INVALID_PARAMETER value.
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.