TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Mario Semo
from: Paul Edwards
date: 1996-10-11 23:37:00
subject: file handles

PE> With a 16-bit MSC 6.0 compiled program, I only appear to be 
PE> able to open 14 files via fopen, even when I use "fh" (a 

MS> yes. 

PE> And can anyone suggest a fix?

MS> just do what MS suggest to do. change the startup code. 

The real objective is to fix the C program called CL!  Which obviously
doesn't come with source code.

MS> In the OS/2 version of CRT0DAT.ASM, the code appears as a
MS> call to DOSSETMAXFH. Under OS/2, you must also enable the
MS> 'extrn DOSSETMAXFH:far' declaration that appears near the
MS> beginning of the file.

Thanks, maybe I can trace where in CL this object code is, and patch the CL.EXE.



Nope, I can't find crt0dat referenced in cl.exe, and I have a suspicion
that even if I did find it, the code wouldn't be there with a number and a
call to DosSetMaxFH, because that code is commented out in the default
crt0dat, which is what I assume CL is using.

MS> NOTE: Under OS/2, you must take into account the fact that each
MS> process has the potential to "own" open files. When
MS> planning how many open files to allow on a system-wide
MS> basis, take this into account.

How do you specify the number of open files to allow on a system-wide
basis?  DosSetMaxFH() is designed to operate on the current process.

MS> PS: i can't remember where you can find _file.c. i have it from MS-C6.0 CRT 
MS> source code. (which was a seperate product).

I have it in source/startup.

BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.