Главная страница | назад





Article #16222: Too many open files when using open() in a Win App

 Question and Answer Database

FAQ1222C.txt   Too many open files when using open() in a Win App
Category   :Windows API
Platform    :Windows 3.1
Product    :   BC++4.5x   BC++5.x   TC++Win4.5

Question:

Why is it when I use 

#include 
#include
int open(const char *path, int access [, unsigned mode]);

and I try to open more than 15 files, I get an error from
the global variable errno, that there are too many open files.

This works fin ein a DOS application, and in a Win32 application.

Answer:

Use UINT SetHandleCount(uint cHandles).  This will open 
up the number of handle counts that the application can have.

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99