🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #1444

Re: Increasing the number of file handles

#1444
From: Nathan Sidwell
Date: Mon, 13 Aug 1990 12:45
30 lines
1902 bytes
In article <1266@inmos.co.uk> gerry@dialogic.dialogic.com (Gerry Lachac) writes:
>
>Has anyone had any success increasing the number of filehandles for an
>OS/2 protectmode process?  I have tried using the DosSetMaxFH API call
>to set the number of file handles to various numbers between 50 and
>255, but I never seem to have more than 20. DosSetMaxFH does not
>return any errors.
>

I had this problem for ages, and attempted to use DosSetMaxFH to sort it.
The problem is not with OS/2 but with the language libraries. [At least in
my case, MSC 5.0]. The file libraries work by using the file handle
returned by OS/2 (or DOS for that matter) as an index into a table which
contains the file access mode, buffer pointers etc. The size of this table
is fixed by the run time kernel, which is normally taken from the library
linked into your code. There are alternatives called [if memory serves]
CRT255.OBJ, in an appropriate memory model directory. Specifying this as
an additional object module to the linker will replace the standard one.
It performs the call to DOSSETMAXFH at startup for you.

Hope this helps.

You can confirm whether this is the problem, by opening files by directly
calling DosOpen, and seeing when it fails.



Nathan Sidwell, INMOS Ltd, UK         JANET:    nathan@uk.co.inmos
Generic disclaimer applies            UUCP:     ukc!inmos!nathan
My indicision is final (I think)      INTERNET: nathan@inmos.com
Technical Details
Message-ID: <9565@ganymede.inmos.co.uk>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!inmos!nathan@yatton.inmos.co.uk
References: <1266@inmos.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcsun!ukc!inmos!nathan@yatton.inmos.co.uk
From: nathan@yatton.inmos.co.uk (Nathan Sidwell)
Newsgroups: comp.os.os2.programmer
Subject: Re: Increasing the number of file handles
Message-ID: <9565@ganymede.inmos.co.uk>
Date: 13 Aug 90 12:45:41 GMT
References: <1266@inmos.co.uk>
Sender: news@inmos.co.uk
Reply-To: nathan@inmos.co.uk (Nathan Sidwell)
Organization: INMOS Limited, Bristol, UK.
Lines: 30