Ignore:
Timestamp:
Nov 9, 1999, 3:19:47 PM (26 years ago)
Author:
sandervl
Message:

heapstring fixes + dll renaming support added

File:
1 edited

Legend:

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

    r1618 r1663  
    1 /* $Id: wprocess.cpp,v 1.44 1999-11-05 14:06:44 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.45 1999-11-09 14:19:47 sandervl Exp $ */
    22
    33/*
     
    311311  }
    312312
    313   hDll = O32_LoadLibrary(lpszLibFile);
     313  strcpy(modname, lpszLibFile);
     314  strupr(modname);
     315  //rename dll if necessary (i.e. OLE32 -> OLE32OS2)
     316  Win32DllBase::renameDll(modname);
     317
     318  hDll = O32_LoadLibrary(modname);
    314319  dprintf(("KERNEL32:  iLoadLibraryA %s returned %X (%d)\n",
    315320           lpszLibFile,
     
    321326  }
    322327
    323   strcpy(modname, lpszLibFile);
    324   strupr(modname);
    325328  if(!strstr(modname, ".")) {
    326329        strcat(modname,".DLL");
     
    696699//Retrieve the version
    697700//******************************************************************************
    698 BOOL SYSTEM GetVersionStruct(char *modname, char *verstruct, ULONG bufLength)
     701BOOL SYSTEM GetVersionStruct(char *lpszModName, char *verstruct, ULONG bufLength)
    699702{
    700703 Win32ImageBase *winimage;
    701704 Win32PeLdrRsrcImg *rsrcimg;
    702705
    703   dprintf(("GetVersionStruct"));
    704   if(WinExe && !stricmp(WinExe->getFullPath(), modname)) {
     706  dprintf(("GetVersionStruct of module %s", lpszModName));
     707  if(WinExe && !stricmp(WinExe->getFullPath(), lpszModName)) {
    705708        winimage = (Win32ImageBase *)WinExe;
    706709  }
    707710  else {
    708         winimage = (Win32ImageBase *)Win32DllBase::findModule(modname);
     711        winimage = (Win32ImageBase *)Win32DllBase::findModule(lpszModName);
    709712        if(winimage == NULL)
    710713        {
     714         char modname[CCHMAXPATH];
     715
     716                strcpy(modname, lpszModName);
     717                //rename dll if necessary (i.e. OLE32 -> OLE32OS2)
     718                Win32DllBase::renameDll(modname);
     719               
    711720                if(Win32ImageBase::isPEImage(modname) == FALSE)
    712721                {
     
    744753//******************************************************************************
    745754//******************************************************************************
    746 ULONG SYSTEM GetVersionSize(char *modname)
     755ULONG SYSTEM GetVersionSize(char *lpszModName)
    747756{
    748757 Win32ImageBase *winimage;
    749758 Win32PeLdrRsrcImg *rsrcimg;
    750759
    751   dprintf(("GetVersionSize of %s\n", modname));
    752 
    753   if(WinExe && !stricmp(WinExe->getFullPath(), modname)) {
     760  dprintf(("GetVersionSize of %s\n", lpszModName));
     761
     762  if(WinExe && !stricmp(WinExe->getFullPath(), lpszModName)) {
    754763        winimage = (Win32ImageBase *)WinExe;
    755764  }
    756765  else {
    757         winimage = (Win32ImageBase *)Win32DllBase::findModule(modname);
     766        winimage = (Win32ImageBase *)Win32DllBase::findModule(lpszModName);
    758767        if(winimage == NULL)
    759768        {
     769         char modname[CCHMAXPATH];
     770
     771                strcpy(modname, lpszModName);
     772                //rename dll if necessary (i.e. OLE32 -> OLE32OS2)
     773                Win32DllBase::renameDll(modname);
     774
    760775                if(Win32ImageBase::isPEImage(modname) == FALSE)
    761776                {
Note: See TracChangeset for help on using the changeset viewer.