Changeset 2687 for trunk/src


Ignore:
Timestamp:
Feb 8, 2000, 11:29:16 PM (26 years ago)
Author:
sandervl
Message:

Search path for executables when they can't be found in the current directory.

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r2535 r2687  
    1 /* $Id: oslibdos.cpp,v 1.17 2000-01-27 21:51:17 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.18 2000-02-08 22:29:15 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    377377  case OSLIB_SEARCHENV:
    378378  {
    379         if(DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT, path,
    380                          name, full_name, length_fullname) != 0) {
     379   PCSZ envstring;
     380   CHAR szResult[CCHMAXPATH];
     381
     382        if(DosScanEnv(path, &envstring) != 0) {
    381383                return 0;
    382384        }
     385        if(DosSearchPath(SEARCH_IGNORENETERRS, envstring,
     386                         name, szResult, sizeof(szResult)) != 0) {
     387                return 0;
     388        }
     389        strcpy(full_name, szResult);
    383390        return strlen(full_name);
    384391  }
  • trunk/src/kernel32/winimagepeldr.cpp

    r2513 r2687  
    1 /* $Id: winimagepeldr.cpp,v 1.29 2000-01-25 20:27:17 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.30 2000-02-08 22:29:16 sandervl Exp $ */
    22
    33/*
     
    120120                if(!strstr(szFileName, ".EXE")) {
    121121                        strcat(szFileName,".EXE");
     122                }
     123                dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
     124                if(dllfile == NULL) {
     125                        OSLibDosSearchPath(OSLIB_SEARCHENV, "PATH", szFileName, szFileName, sizeof(szFileName));
    122126                }
    123127        }
Note: See TracChangeset for help on using the changeset viewer.