Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!att!cbnews!cbema!las From: cbema!las@cbnews.ATT.COM (cbema!las) Newsgroups: comp.sys.ibm.pc Subject: Re: more than 15 files open at a time Keywords: clipper Message-ID: <9526@cbnews.ATT.COM> Date: 13 Sep 89 18:24:39 GMT References: <167@sluga.UUCP> Reply-To: cbema!las@cbnews.ATT.COM (Larry A. Shurr,20650,cb,9a110,6148605851) Organization: AT&T Bell Laboratories, Columbus, OH (actually an AGS consultant) Lines: 50 In article <167@sluga.UUCP> robak@sluga.UUCP (Ted Robak) writes: > Does anyone know why a Clipper-compiled program does not allow me to > open more than 15 files at a time? My config.sys is set up for 25 > files, and I'm using DOS 3.30. Clipper states that DOS 3.30 should > allow me me to open 255 files at a time. I haven't found anything on > Clipper on-line manual which says that any special compiling, linking > or configuration commands are required. I use the Borland Turbolinker, > but even PLINK86+ works no better. Ha haaa!!! DOS strikes again. The config.sys parameter sets the total number of files which can be open in the system, but an individual process is normally only allowed a maximum of 20 open files. You're only able to open 15 because DOS provides 5 open files to every process: STDIN, STDOUT, STDERR, STDAUX, STDPRN. In DOS 3.3, however, you can change the number of open files for a process using the "Set Handle Count" function call. I know nothing about Clipper, but if you can issue an interrupt 21 call, you can change the handle count to any number up to 255. Strange that Clipper makes that statement but doesn't appear to support it themselves by making the required call. BTW, the function code is 67h with the desired handle count in BX. In assembly language: MOV AH,67h MOV BX, INT 21h In Turbo/Microsoft/Lattice C: #include function change_handle_count(count) int count; { struct REGS inregs, outregs; inregs.h.ah = 0x67; inregs.h.bx = count; int86(0x21h, &inregs, &outregs); } Can't help you specifically with Clipper, sorry. regards, Larry -- Signed: Larry A. Shurr (cbema!las@att.ATT.COM or att!cbema!las) Clever signature, Wonderful wit, Outdo the others, Be a big hit! - Burma Shave (With apologies to the real thing. The above represents my views only.) (Please note my mailing address. Mail sent directly to cbnews doesn't make it.)