Ignore:
Timestamp:
Apr 15, 2000, 12:35:29 AM (25 years ago)
Author:
sandervl
Message:

GetFileAttributes, pe loader & command line fixes

File:
1 edited

Legend:

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

    r3259 r3375  
    1 /* $Id: winimagepeldr.cpp,v 1.38 2000-03-28 17:11:50 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.39 2000-04-14 22:35:28 sandervl Exp $ */
    22
    33/*
     
    129129  }
    130130  else {
    131         if(!strchr(szFileName, '.')) {
    132                 strcat(szFileName,".DLL");
    133         }
    134         dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    135         if(dllfile == NULL) {//search in libpath for dll
    136                 strcpy(szModule, kernel32Path);
    137                 strcat(szModule, szFileName);
    138                 strcpy(szFileName, szModule);
    139 
    140                 dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    141                 if(dllfile == NULL) {
    142                         if(!strstr(szFileName, ".DLL")) {
    143                                 strcat(szFileName,".DLL");
    144                                 dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE);
    145                                 if(dllfile == NULL) {
    146                                         strcpy(szModule, kernel32Path);
    147                                         strcat(szModule, szFileName);
    148                                         strcpy(szFileName, szModule);
    149                                 }
    150                                 else    OSLibDosClose(dllfile);
    151                         }
    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);
    159                 }
    160                 else    OSLibDosClose(dllfile);
    161         }
    162         else    OSLibDosClose(dllfile);
     131        findDll(szFileName, szModule, sizeof(szModule));
     132        strcpy(szFileName, szModule);
    163133  }
    164134  strcpy(szModule, OSLibStripPath(szFileName));
Note: See TracChangeset for help on using the changeset viewer.