- Timestamp:
- Apr 15, 2000, 6:32:35 PM (25 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/makefile
r3206 r3390 1 # $Id: makefile,v 1.9 2 2000-03-23 19:23:46sandervl Exp $1 # $Id: makefile,v 1.93 2000-04-15 16:32:35 sandervl Exp $ 2 2 3 3 # … … 23 23 #CFLAGS = $(CFLAGS) -DDEBUG 24 24 #CXXFLAGS = $(CXXFLAGS) /Fa+ 25 25 #LD2FLAGS = /nologo /DE /noe /map /NOD /dbgpack /packcode /packdata /exepack:2 26 #CXXFLAGS = $(CXXFLAGS) /Ti+ 26 27 27 28 # Object files. All objects should be prefixed with $(OBJDIR)! -
trunk/src/kernel32/winimagebase.cpp
r3382 r3390 1 /* $Id: winimagebase.cpp,v 1.1 2 2000-04-15 12:43:31sandervl Exp $ */1 /* $Id: winimagebase.cpp,v 1.13 2000-04-15 16:32:35 sandervl Exp $ */ 2 2 3 3 /* … … 36 36 #include "oslibdos.h" 37 37 #include "initterm.h" 38 #include "directory.h" 38 39 #include <win\virtual.h> 39 40 … … 144 145 strcat(szFullName,".DLL"); 145 146 } 147 146 148 //search order: 147 //1) currentdir148 //2) exedir149 //1) exe dir 150 //2) current dir 149 151 //3) windows system dir (kernel32 path) 150 //4) path 151 dllfile = OSLibDosOpen(szFullName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 152 if(dllfile == NULL) {//search in libpath for dll 153 strcpy(modname, WinExe->getFullPath()); 154 //remove file name from full path 155 imagepath = modname + strlen(modname) - 1; 156 while(*imagepath != '\\') imagepath--; 157 imagepath[1] = 0; 158 strcat(modname, szFileName); 159 dllfile = OSLibDosOpen(modname, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 152 //4) windows dir 153 //5) path 154 strcpy(modname, WinExe->getFullPath()); 155 //remove file name from full path 156 imagepath = modname + strlen(modname) - 1; 157 while(*imagepath != '\\') imagepath--; 158 imagepath[1] = 0; 159 strcat(modname, szFullName); 160 dllfile = OSLibDosOpen(modname, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 161 if(dllfile == NULL) { 162 strcpy(modname, szFullName); 163 dllfile = OSLibDosOpen(szFullName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 160 164 if(dllfile == NULL) { 161 strcpy(modname, kernel32Path); 162 strcat(modname, szFileName); 165 strcpy(modname, InternalGetSystemDirectoryA()); 166 strcat(modname, "\\"); 167 strcat(modname, szFullName); 163 168 dllfile = OSLibDosOpen(modname, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 164 169 if(dllfile == NULL) { 165 OSLibDosSearchPath(OSLIB_SEARCHENV, "PATH", szFullName, szFullName, cchFullFileName); 166 } 167 else { 168 strcpy(szFullName, modname); 169 OSLibDosClose(dllfile); 170 strcpy(modname, InternalGetWindowsDirectoryA()); 171 strcat(modname, "\\"); 172 strcat(modname, szFullName); 173 dllfile = OSLibDosOpen(modname, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 174 if(dllfile == NULL) { 175 OSLibDosSearchPath(OSLIB_SEARCHENV, "PATH", szFullName, modname, sizeof(modname)); 176 } 170 177 } 171 178 } 172 else { 173 strcpy(szFullName, modname); 174 OSLibDosClose(dllfile); 175 } 176 } 177 else OSLibDosClose(dllfile); 179 } 180 strcpy(szFullName, modname); 181 if(dllfile) OSLibDosClose(dllfile); 178 182 } 179 183 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.