Changeset 4555 for trunk/src


Ignore:
Timestamp:
Nov 5, 2000, 2:40:47 PM (25 years ago)
Author:
sandervl
Message:

Use DosLoadModule instead of O32_LoadLibrary; changed log strings in exception dump (.dll/.exe)

Location:
trunk/src/kernel32
Files:
5 edited

Legend:

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

    r3528 r4555  
    1 /* $Id: exceptstackdump.cpp,v 1.2 2000-05-13 07:16:11 sandervl Exp $ */
     1/* $Id: exceptstackdump.cpp,v 1.3 2000-11-05 13:40:45 sandervl Exp $ */
    22/*
    33 * Stack dump code
     
    240240//              dprintf(("skiploop %x (rc %x, Attr %x Size %d)\n", *stacktop, rc, Attr, Size));
    241241                if(WinExe && WinExe->insideModule(addr) && WinExe->insideModuleCode(addr)) {
    242                         sprintf(Name, "%s.EXE", WinExe->getModuleName());
     242                        sprintf(Name, "%s", WinExe->getModuleName());
    243243                        dprintf(("%-13s      at 0x%08x\n", Name, addr));
    244244                }
     
    246246                        Win32DllBase *dll = Win32DllBase::findModuleByAddr(addr);
    247247                        if(dll && dll->insideModuleCode(addr)) {
    248                                 sprintf(Name, "%s.DLL", dll->getModuleName());
     248                                sprintf(Name, "%s", dll->getModuleName());
    249249                                dprintf(("%-13s      at 0x%08x\n", Name, addr));
    250250                        }
     
    291291        else {
    292292                if(WinExe && WinExe->insideModule(addr) && WinExe->insideModuleCode(addr)) {
    293                         sprintf(Name, "%s.EXE", WinExe->getModuleName());
     293                        sprintf(Name, "%s", WinExe->getModuleName());
    294294                        dprintf(("%-13s      at 0x%08x\n", Name, addr));
    295295                }
     
    297297                        Win32DllBase *dll = Win32DllBase::findModuleByAddr(addr);
    298298                        if(dll && dll->insideModuleCode(addr)) {
    299                                 sprintf(Name, "%s.DLL", dll->getModuleName());
     299                                sprintf(Name, "%s", dll->getModuleName());
    300300                                dprintf(("%-13s      at 0x%08x\n", Name, addr));
    301301                        }
     
    309309  addr = pCtxRec->ctx_RegEip;   
    310310  if(WinExe && WinExe->insideModule(addr) && WinExe->insideModuleCode(addr)) {
    311      sprintf(Name, "%s.EXE", WinExe->getModuleName());
     311     sprintf(Name, "%s", WinExe->getModuleName());
    312312     dprintf(("%-13s      at 0x%08x\n", Name, addr));
    313313  }
     
    315315     Win32DllBase *dll = Win32DllBase::findModuleByAddr(addr);
    316316     if(dll && dll->insideModuleCode(addr)) {
    317         sprintf(Name, "%s.DLL", dll->getModuleName());
     317        sprintf(Name, "%s", dll->getModuleName());
    318318        dprintf(("%-13s      at 0x%08x\n", Name, addr));
    319319     }
  • trunk/src/kernel32/oslibdos.cpp

    r4474 r4555  
    1 /* $Id: oslibdos.cpp,v 1.49 2000-10-10 17:14:04 sandervl Exp $ */
     1/* $Id: oslibdos.cpp,v 1.50 2000-11-05 13:40:45 sandervl Exp $ */
    22/*
    33 * Wrappers for OS/2 Dos* API
     
    20372037
    20382038
     2039HINSTANCE OSLibDosLoadModule(LPSTR szModName)
     2040{
     2041 APIRET  rc;
     2042 HMODULE hModule = NULLHANDLE;
     2043 char    name[ CCHMAXPATH ];
     2044
     2045  rc = DosLoadModule(name, CCHMAXPATH, szModName, &hModule);
     2046  if(rc) {
     2047      SetLastError(error2WinError(rc,ERROR_FILE_NOT_FOUND));
     2048      return 0;
     2049  }
     2050  SetLastError(ERROR_SUCCESS_W);
     2051  return hModule;
     2052}
     2053
    20392054ULONG OSLibDosQuerySysInfo(ULONG iStart, ULONG iLast, PVOID pBuf, ULONG cbBuf)
    20402055{
  • trunk/src/kernel32/oslibdos.h

    r4473 r4555  
    1 /* $Id: oslibdos.h,v 1.25 2000-10-09 22:51:19 sandervl Exp $ */
     1/* $Id: oslibdos.h,v 1.26 2000-11-05 13:40:46 sandervl Exp $ */
    22
    33/*
     
    285285ULONG OSLibDosQueryModuleName(ULONG hModule, int cchName, char *pszName);
    286286ULONG OSLibDosQueryDir(DWORD length, LPSTR lpszCurDir);
     287
     288HINSTANCE OSLibDosLoadModule(LPSTR szModName);
  • trunk/src/kernel32/winimagepeldr.cpp

    r4523 r4555  
    1 /* $Id: winimagepeldr.cpp,v 1.63 2000-10-23 13:42:45 sandervl Exp $ */
     1/* $Id: winimagepeldr.cpp,v 1.64 2000-11-05 13:40:46 sandervl Exp $ */
    22
    33/*
     
    777777  realBaseAddress = 0;
    778778
    779   //Allocated in peldr.dll
     779  //Allocated in by pe.exe
    780780  if(reservedMem && reservedMem == oh.ImageBase) {
    781781    realBaseAddress = oh.ImageBase;
  • trunk/src/kernel32/wprocess.cpp

    r4523 r4555  
    1 /* $Id: wprocess.cpp,v 1.106 2000-10-23 13:42:47 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.107 2000-11-05 13:40:47 sandervl Exp $ */
    22
    33/*
     
    791791     *  Endif
    792792     */
    793     //only call Open32 if LX binary or win32k process
     793    //only call OS/2 if LX binary or win32k process
    794794    if(!fPeLoader || fPE != ERROR_SUCCESS)
    795795    {
    796         hDll = O32_LoadLibrary(szModname);
     796        hDll = OSLibDosLoadModule(szModname);
    797797        if (hDll)
    798798        {
     
    818818                return hDll; //happens when LoadLibrary is called in kernel32's initterm (nor harmful)
    819819
    820             dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): returns 0x%x. Loaded %s using O32_LoadLibrary.",
     820            dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): returns 0x%x. Loaded %s using DosLoadModule.",
    821821                     lpszLibFile, hFile, dwFlags, hDll, szModname));
    822822            return pModule->getInstanceHandle();
    823823        }
    824         dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): O32_LoadLibrary(%s) failed. LastError=%d",
     824        dprintf(("KERNEL32: LoadLibraryExA(%s, 0x%x, 0x%x): DosLoadModule (%s) failed. LastError=%d",
    825825                 lpszLibFile, hFile, dwFlags, szModname, GetLastError()));
    826826    }
Note: See TracChangeset for help on using the changeset viewer.