Ignore:
Timestamp:
Jun 27, 2011, 2:27:23 AM (14 years ago)
Author:
dmik
Message:

kernel32: Show an error message box if WGSS50.DLL initialization fails too. See also r21651.

File:
1 edited

Legend:

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

    r21653 r21654  
    300300
    301301    if (ulFlag == 0 && rc == 0)
    302     {
    303         static const char msg1[] =
    304             "Failed to initialize the KERNEL32 library while starting \"";
    305 
    306         static const char msg2[] =
    307             "\".\n\r"
    308             "\n\r"
    309             "It is possible that there is not enough memory in the system to "
    310             "run this application. Please close other applications and try "
    311             "again. If the problem persists, please report the details by "
    312             "creating a ticket at http://svn.netlabs.org/odin32/.\n\r";
    313 
    314         char msg[sizeof(msg1) + CCHMAXPATH + sizeof(msg2)];
    315 
    316         strcpy(msg, msg1);
    317 
    318         PPIB ppib;
    319         DosGetInfoBlocks(NULL, &ppib);
    320         if (DosQueryModuleName(ppib->pib_hmte, CCHMAXPATH,
    321                                msg + sizeof(msg1) - 1) != NO_ERROR)
    322             strcat(msg, "<unknown executable>");
    323         strcat(msg, msg2);
    324 
    325         // Initialization has failed. Try to be nice and show an error message
    326         // to the user.
    327         WinMessageBox(HWND_DESKTOP, NULL, msg, "Odin: Fatal Error", 0,
    328                       MB_APPLMODAL | MB_MOVEABLE | MB_ERROR | MB_OK);
    329 
    330         // duplicate the message to the console just in case (PM may be not
    331         // available)
    332         ULONG dummy;
    333         DosWrite((HFILE)1, (PVOID)&msg, strlen(msg), &dummy);
    334     }
     302        ReportFatalDllInitError("KERNEL32");
    335303
    336304    return rc;
Note: See TracChangeset for help on using the changeset viewer.