Ignore:
Timestamp:
Mar 4, 2000, 8:52:37 PM (25 years ago)
Author:
sandervl
Message:

DosOpen (file handle error) & dll destruction bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/hmdevio.cpp

    r2952 r3005  
    1 /* $Id: hmdevio.cpp,v 1.3 2000-02-29 22:44:02 sandervl Exp $ */
     1/* $Id: hmdevio.cpp,v 1.4 2000-03-04 19:52:36 sandervl Exp $ */
    22
    33/*
     
    114114  }
    115115
     116tryopen:
    116117  rc = DosOpen( szOS2Name,                        /* File path name */
    117118                &hfFileHandle,                  /* File handle */
     
    123124                0L);                            /* No extended attribute */
    124125
     126  if(rc == ERROR_TOO_MANY_OPEN_FILES) {
     127   ULONG CurMaxFH;
     128   LONG  ReqCount = 32;
     129
     130        rc = DosSetRelMaxFH(&ReqCount, &CurMaxFH);
     131        if(rc) {
     132                dprintf(("DosSetRelMaxFH returned %d", rc));
     133                return rc;
     134        }
     135        dprintf(("DosOpen failed -> increased nr open files to %d", CurMaxFH));
     136        goto tryopen;
     137  }
     138
    125139  dprintf(("DosOpen %s returned %d\n", szOS2Name, rc));
    126140
Note: See TracChangeset for help on using the changeset viewer.