UINT SetHandleCount(cHandles) | |||||
UINT cHandles; | /* number of file handles needed | */ |
The SetHandleCount function changes the number of file handles available to a task.
cHandles
Specifies the number of file handles the application requires. This count cannot be greater than 255.
The return value is the number of file handles available to the application, if the function is successful. This number may be less than the number of handles specified.
By default, the maximum number of file handles available to a task is 20.
The following example uses the SetHandleCount function to set the number of available file handles to 30:
UINT cHandles;
char szBuf[80];
cHandles = SetHandleCount(30);
sprintf(szBuf, "%d handles available", cHandles);
MessageBox(hwnd, szBuf, "SetHandleCount", MB_OK);