Not enough file handles under nt for a dos program

We have a native DOS program that runs fine under win95.  We also routinely have > 15 files open at once.  Under win95 we just stick FILES=100 in the config.sys along with a watcom 11 run-time library call to _grow_handles(128) and everything works just wonderful.  Under NT I haven't found the equivilant of FILES=100 and the program quickly runs out of file handles.  Aside from porting the program to win32 what can I do?
clwells082798Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jkrConnect With a Mentor Commented:
As the program runs under the 16bit subsystem ob NT, have you tried checking the option 'Run in separate address space' in the settings for this particular DOS app?
0
 
NakedTimeManCommented:
Hi clwells,

I think you are misdiagnosing the problem...  The default number of handles that you can have under a dos window is 256.  If you are opening more than 255 files at the same time... that's another problem, but if you are not (and I'm guessing you are not) you should be fine.

I've actually tryed this out,  I wrote a 15 line program that just opens a bunch of file handles and never closes them in a while(1) loop.  Every iteration I print out the handle and the counter, and it never fails to open any of them until it tries to open file number 256.

Hope this helps you look into the right direction.

P.S.
By the way are you running the program under COMMAND or CMD? they both appear to be the same shell, but in fact they are NOT.   I personally like CMD much better than command, but I guess it depends on what you want to use it for.

Regards
NakedTimeMan

0
 
clwells082798Author Commented:
well I used conklin's and jkr's comments to fix the problem before nakedtimeman ever posted so I am rejecting nakedtimeman's answer and conklin or jkr should post an answer so I can given them credit.
0
Free tool for managing users' photos in Office 365

Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!

 
clwells082798Author Commented:
Never tried "run in different address space" so you get it.
0
 
jkrCommented:
Well, seems that i've been too slow ;-)
0
 
YensidModCommented:
Points to jkr.

Yensidmod
EE Moderator
0
All Courses

From novice to tech pro — start learning today.