Article View: alt.msdos.programmer
Article #512Re: Why won't DOS allow more than 20 open files?
From: Tom Almy
Date: Mon, 11 Jun 1990 16:38
Date: Mon, 11 Jun 1990 16:38
33 lines
2041 bytes
2041 bytes
In article <1990Jun10.151538.25462@xrtll.uucp> silver@.UUCP (PUT YOUR NAME HERE) writes: >In article <90160.191651JXS118@psuvm.psu.edu> JXS118@psuvm.psu.edu (Jeff Siegel, Op from Atherton Hall) writes: >$Even though I have the statement FILES = 40 in my config.sys, DOS refuses >$to open more than 20 files at once and returns error code 4 (no handles >$available) if I try to open more. > Yup. Unless you fiddle DOS otherwise (and I forget how to), each process >is only allowed 20 file handles, irrespective of your FILES= statement. The >FILES= statement controls how many files can be open at once, not how many >one process can have open. > The workaround involves using some DOS call that expands the table of >file handles for your process, but I've never done it and I can't recall >how to do it. I'm sure someone else will post it. Well, the INT 21H call is: AH =67H BX = # desired handles It returns carry flag clear if successful. The function is only available in DOS versions >=3.3. *BUT* if you are using a C compiler, and the stdio package, then you have an additional hurdle. Every C compiler library I have seen maintains a static table for FILE, which has 20 entries. The only way I know to expand these tables is to have access to the library source, make the change, and recompile the library. If you use open(), read(), etc. (not stdio), or many other languages, then you are home free. Tom Almy toma@tekgvs.labs.tek.com Standard Disclaimers Apply
Technical Details
Message-ID:
<7642@tekgvs.LABS.TEK.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!tomaReferences:
<90160.191651JXS118@psuvm.psu.edu> <1990Jun10.151538.25462@xrtll.uucp>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!zephyr.ens.tek.com!tekcrl!tekgvs!toma From: toma@tekgvs.LABS.TEK.COM (Tom Almy) Newsgroups: alt.msdos.programmer,comp.sys.ibm.pc.programmer Subject: Re: Why won't DOS allow more than 20 open files? Message-ID: <7642@tekgvs.LABS.TEK.COM> Date: 11 Jun 90 16:38:31 GMT References: <90160.191651JXS118@psuvm.psu.edu> <1990Jun10.151538.25462@xrtll.uucp> Reply-To: toma@tekgvs.LABS.TEK.COM (Tom Almy) Followup-To: alt.msdos.programmer Organization: Tektronix, Inc., Beaverton, OR. Lines: 33