BBS: Inland Empire Archive Date: 03-22-93 (10:52) Number: 371 From: JOE NEGRON Refer#: NONE To: CLAUDE SHERMAN Recvd: NO Subj: # of open files Conf: (2) Quik_Bas
CS> In my Qbasic manual it shows the limit for open files is
> 256, but when I try to open more than 15 files at the same
> time, I receive error 75 "file/path not valid". I have
> "files = 99" in my config.sys and "buffers = 17". Any idea
> why I get the error??? Any help would be appreciated.
This will fix it:
============================== Begin code ==============================
DEFINT A-Z
DECLARE FUNCTION SetMaxFiles% (NumFiles%)
'***********************************************************************
'* FUNCTION SetMaxFiles%
'*
'* PURPOSE
'* Uses DOS ISR 21H, Function 67H (Set Maximum Handle Count) to set
'* the maximum number of handles.
'*
'* EXTERNAL ROUTINE(S)
'* QBX.LIB
'* -------
'* SUB Interrupt (IntNum%, IRegs AS RegType, ORegs AS RegType)
'***********************************************************************
FUNCTION SetMaxFiles% (NumFiles%) STATIC
IRegs.ax = &H6700
IRegs.bx = NumFiles%
SetMaxFiles% = 0
Interrupt &H21, IRegs, ORegs
IF (ORegs.Flags AND 1) = 1 THEN
SetMaxFiles% = ORegs.ax 'Error number
END IF
END FUNCTION
=============================== End code ===============================
Unfortunately, I cannot get this to work with 4DOS, though it is a
documented DOS interrupt.
--Joe in Bay Ridge, Brooklyn, NY, Sun, 03-21-1993--
... Man looks into the abyss, and sees himself.
___
X Blue Wave/QWK v2.12 X
--- Maximus 2.01wb
* Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET