Changeset 5494 for trunk/src


Ignore:
Timestamp:
Apr 10, 2001, 7:09:08 PM (24 years ago)
Author:
sandervl
Message:

Print module name that contributed to the failure of loading kernel32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/peldr/pe.cpp

    r5133 r5494  
    1 /* $Id: pe.cpp,v 1.26 2001-02-14 12:56:55 sandervl Exp $ */
     1/* $Id: pe.cpp,v 1.27 2001-04-10 17:09:08 sandervl Exp $ */
    22
    33/*
     
    4141char szExeErrorMsg[]    = "File isn't an executable";
    4242char szInteralErrorMsg[]= "Internal Error";
    43 char szNoKernel32Msg[]  = "Can't load/find kernel32.dll (rc=%d)";
     43char szNoKernel32Msg[]  = "Can't load/find kernel32.dll (rc=%d, module %s)";
    4444char szDosInfoBlocks[]  = "DosInfoBlocks failed!";
    4545
     
    8383 char   exeName[CCHMAXPATH];
    8484 char   fullpath[CCHMAXPATH];
     85 char   errorMod[CCHMAXPATH];
    8586 APIRET  rc;
    8687 HMODULE hmodPMWin = 0, hmodKernel32 = 0;
     
    194195  }
    195196
    196   rc = DosLoadModule(exeName, sizeof(exeName), "KERNEL32.DLL", &hmodKernel32);
     197  errorMod[0] = 0;
     198  rc = DosLoadModule(errorMod, sizeof(errorMod), "KERNEL32.DLL", &hmodKernel32);
    197199  if(rc) {
    198         sprintf(exeName, szNoKernel32Msg, rc);
    199         MyWinMessageBox(HWND_DESKTOP, NULL, exeName, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);
     200        sprintf(fullpath, szNoKernel32Msg, rc, errorMod);
     201        MyWinMessageBox(HWND_DESKTOP, NULL, fullpath, szErrorTitle, 0, MB_OK | MB_ERROR | MB_MOVEABLE);
    200202        goto fail;
    201203  }
Note: See TracChangeset for help on using the changeset viewer.