Changeset 2786 for trunk/src


Ignore:
Timestamp:
Feb 15, 2000, 1:14:28 AM (26 years ago)
Author:
sandervl
Message:

search in path for dlls if not found

Location:
trunk/src/kernel32
Files:
2 edited

Legend:

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

    r1893 r2786  
    1 /* $Id: winimagebase.cpp,v 1.6 1999-11-30 19:40:26 sandervl Exp $ */
     1/* $Id: winimagebase.cpp,v 1.7 2000-02-15 00:14:27 sandervl Exp $ */
    22
    33/*
     
    128128  dllfile = OSLibDosOpen(filename, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    129129  if(dllfile == NULL) {//search in libpath for dll
    130     strcpy(modname, kernel32Path);
    131     strcat(modname, filename);
    132     strcpy(filename, modname);
     130        strcpy(modname, kernel32Path);
     131        strcat(modname, filename);
     132        dllfile = OSLibDosOpen(modname, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
     133        if(dllfile == NULL) {
     134                OSLibDosSearchPath(OSLIB_SEARCHENV, "PATH", filename, filename, sizeof(filename));
     135        }
     136        else {
     137                strcpy(filename, modname);
     138                OSLibDosClose(dllfile);
     139        }
    133140  }
    134141  else  OSLibDosClose(dllfile);
  • trunk/src/kernel32/winimagepeldr.cpp

    r2687 r2786  
    1 /* $Id: winimagepeldr.cpp,v 1.30 2000-02-08 22:29:16 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.31 2000-02-15 00:14:28 sandervl Exp $ */
    22
    33/*
     
    150150                                else    OSLibDosClose(dllfile);
    151151                        }
     152                        dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
     153                        if(dllfile == NULL) {
     154                                strcpy(szFileName, pszFileName);
     155                                strupr(szFileName);
     156                                OSLibDosSearchPath(OSLIB_SEARCHENV, "PATH", szFileName, szFileName, sizeof(szFileName));
     157                        }
     158                        else    OSLibDosClose(dllfile);
    152159                }
    153160                else    OSLibDosClose(dllfile);
Note: See TracChangeset for help on using the changeset viewer.