Hi all! I have just discovered this very nice website... Thank you all for all the "tips and tricks" posted! I just wanted to ask a little question... I'm writing a program in DOS, it's like a protocol sniffer for the serial port.. But i have a problem, since DOS can open up to 15 files at a time, and it always show an error, but there shouldn't be errors because I know what opens and what closes... Well, it's a bit tricky to explain... Basically, I need to write another external program that shows me all the files actually open in the system, and what program is accessing them... Is it possible to do this in C? I searched everywhere, but I only found some strange ASM code, and it doesn't work.... Can someone help me please?
Thank you very much!!
Gip

If you are talking about true MS-DOS than it is not possible because MS-DOS is not a multi-tasking operating system. When your program runs there will be no other programs running on the computer.

If your computer is running any version of MS-Windows then you will not be running MS-DOS, but just an emulator which is itself just another MS-Windows program.

>>Basically, I need to write another external program that shows me all the files actually open in the system, and what program is accessing them...

As far as I know it is not possible to do that. The number of files that can be open at any one time is somewhere in the thousands under MS-Windows. The old MS-DOS limit of 15 files has been tossed to the wind several years ago.

This article has been dead for over six months. Start a new discussion instead.