Changeset 6015 for trunk/src/kernel32/windllpeldr.cpp
- Timestamp:
- Jun 15, 2001, 11:42:49 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/windllpeldr.cpp
r4523 r6015 1 /* $Id: windllpeldr.cpp,v 1. 8 2000-10-23 13:42:44 sandervlExp $ */1 /* $Id: windllpeldr.cpp,v 1.9 2001-06-15 09:42:48 bird Exp $ */ 2 2 3 3 /* … … 16 16 #define INCL_DOSMISC /* DOS Miscellanous values */ 17 17 #define INCL_WIN 18 #include <os2wrap.h> 18 #include <os2wrap.h> //Odin32 OS/2 api wrappers 19 19 #include <stdio.h> 20 20 #include <string.h> … … 31 31 #include "oslibdos.h" 32 32 33 #define DBG_LOCALLOG 33 #define DBG_LOCALLOG DBG_windllpeldr 34 34 #include "dbglocal.h" 35 35 … … 37 37 //****************************************************************************** 38 38 //****************************************************************************** 39 Win32PeLdrDll::Win32PeLdrDll(char *szDllName, Win32ImageBase *parentImage) 40 : Win32ImageBase(-1), 41 Win32DllBase(-1, 0, parentImage), 39 Win32PeLdrDll::Win32PeLdrDll(char *szDllName, Win32ImageBase *parentImage) 40 : Win32ImageBase(-1), 41 Win32DllBase(-1, 0, parentImage), 42 42 Win32PeLdrImage(szDllName, FALSE) 43 43 { … … 63 63 strupr(szFileName); 64 64 if(!strchr(szFileName, (int)'.')) { 65 65 strcat(szFileName, DLL_EXTENSION); 66 66 } 67 67 dllfile = OSLibDosOpen(szFileName, OSLIB_ACCESS_READONLY|OSLIB_ACCESS_SHAREDENYNONE); 68 68 if(dllfile == NULL) {//search in libpath for dll 69 70 71 72 73 74 75 76 77 69 syspath = getenv("WIN32LIBPATH"); 70 if(syspath) { 71 strcpy(modname, syspath); 72 if(modname[strlen(modname)-1] != '\\') { 73 strcat(modname, "\\"); 74 } 75 strcat(modname, szFileName); 76 strcpy(szFileName, modname); 77 } 78 78 } 79 else 79 else OSLibDosClose(dllfile); 80 80 fRet = Win32PeLdrImage::init(0); 81 81 dllEntryPoint = (WIN32DLLENTRY)entryPoint; 82 82 83 83 if(!(fh.Characteristics & IMAGE_FILE_DLL)) { 84 85 86 84 //executable loaded as dll; don't call entrypoint 85 dprintf(("WARNING: Exe %s loaded as dll; entrypoint not called", szFileName)); 86 dllEntryPoint = NULL; 87 87 } 88 88 return fRet; … … 90 90 //****************************************************************************** 91 91 //****************************************************************************** 92 BOOL Win32PeLdrDll::is LxDll()92 BOOL Win32PeLdrDll::isPe2LxDll() const 93 93 { 94 94 return FALSE; … … 96 96 //****************************************************************************** 97 97 //****************************************************************************** 98 BOOL Win32PeLdrDll::isLxDll() const 99 { 100 return FALSE; 101 } 102 //****************************************************************************** 103 //******************************************************************************
Note:
See TracChangeset
for help on using the changeset viewer.