Subj : Re: Too many open files To : borland.public.cpp.borlandcpp From : "Andy Dransfield" Date : Fri Jul 04 2003 02:08 am Ed, I'm developing database applications in which tables may have a large number of indices which all need to be open concurrently, so some of your suggested solutions are not practical. I've been looking at rebuilding the runtime libraries for a few hours, but can't see the control files that build c0d32.obj, cw32.lib and import32.lib - can you help? I've managed to rebuild codc.obj, codl.obj ...., etc. Regards, Andy Dransfield "Ed Mulroy [TeamB]" wrote in message news:3f048526@newsgroups.borland.com... > If what you need is only a couple of more files then at program startup > close stdin, stdout, stdaux and stdprn. > > If not then you have a few choices: > > -Go back into the your code and design it to not need 50 files at a time. > That should be the easiest way. > > -Use another kind of file handling routine other than the FILE* set of > functions such as the _rtl_open/_rtl_read/_rtl_write/etc or > CreateFile/ReadFile/WriteFile/etc. The latter is the best but only works on > Windows programs. If running under 16 bit Windows (and if so, why?) then > you also have to call SetHandleCount. > > -Rebuild the runtime libraries and DLL's with an _NFILE setting larger than > 50. Typically that will take a few days to get it right. > > . Ed > > > Andy Dransfield wrote in message > > news:3f047083@newsgroups.borland.com... > > > > I can only call open 49 times before I get EMFILE > > (Too many open files) error on a Windows 2000 > > platform. Is there a workaround? > > .