Xref: utzoo alt.msdos.programmer:1383 comp.lang.c:26876 comp.sys.ibm.pc.programmer:387 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!srhqla!demott!kdq From: kdq@demott.COM (Kevin D. Quitt) Newsgroups: alt.msdos.programmer,comp.lang.c,comp.sys.ibm.pc.programmer Subject: Opening more than 20 files Message-ID: <69@demott.COM> Date: 13 Mar 90 22:59:27 GMT Reply-To: kdq@demott.COM (Kevin D. Quitt) Followup-To: alt.msdos.programmer Organization: DeMott Electronics Co., Van Nuys CA Lines: 49 Apropos previous questions about opening more than 20 files. Using Microsoft C 5.1, the following technique works: Modify CRT0DAT.ASM to increase the number of files that can be "open"ed. _NFILE_ = 40 ; If you want 40 open files. Modify _FILE.C to increase the number of files than can be "fopen"ed #define _NFILE_ 40 /* If you want 40 fopen files */ Note that the number in CRT0DAT.ASM must be greater or equal to the number in _FILE.C. Finally, modify your CONFIG.SYS to reflect the new count: FILES=40 This does not increase the number of files that can be opened by a single process, however. To do this, look in CRT0DAT.ASM for the comment: "Increase file handle count" and uncomment the code immediately following it. ; mov ah,67h ; mov bx,_NFILE_ ; callos Now compile/assemble the modules and either link with them explicitly, or replace them into your libraries. Good Luck! kdq -- Kevin D. Quitt Manager, Software Development DeMott Electronics Co. VOICE (818) 988-4975 14707 Keswick St. FAX (818) 997-1190 Van Nuys, CA 91405-1266 MODEM (818) 997-4496 Telebit PEP last 34 12 N 118 27 W srhqla!demott!kdq kdq@demott.com "Next time, Jack, write a God-damned memo!" - Jack Ryan - Hunt for Red Oct.