Changeset 1452 for trunk/dll/init.c


Ignore:
Timestamp:
Sep 13, 2009, 1:23:19 AM (16 years ago)
Author:
Gregg Young
Message:

Change protectonly check from command.com to VKBD module loaded (Ticket 392)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/init.c

    r1451 r1452  
    8484  22 Jul 09 GKY Code changes to use semaphores to serialize drive scanning
    8585  22 Jul 09 GKY Fix failure to restore the notebook setting for saving container states or not
     86  12 Sep 09 GKY Change protectonly check to check for VKBD being loaded instead of starting
     87                command.com. Prevents hang (at least until a Dos program is started) on a system
     88                that has a broken MDOS install.
    8689
    8790***********************************************************************/
     
    11731176    // Check to see if we are running protect only
    11741177    if (!xDosQueryAppType(GetCmdSpec(TRUE), &ulAppType)) {
    1175       ret = runemf2(SEPARATE | WINDOWED | BACKGROUND | MINIMIZED,
    1176                     (HWND) 0, pszSrcFile, __LINE__, NULL, NULL,
    1177                     "%s /C exit", GetCmdSpec(TRUE));
    1178       if (ret == ERROR_SMG_INVALID_PROGRAM_TYPE)
    1179         fProtectOnly = TRUE;
     1178      HMODULE hmod;
     1179      APIRET rc;
     1180
     1181      rc = DosQueryModuleHandle("VKBD", &hmod);
     1182      if (rc != NO_ERROR) {
     1183        fProtectOnly = TRUE;
     1184        DbgMsg(pszSrcFile, __LINE__, "DosQModuleHandle VKBD returned %d fProtectOnly=%d", rc, fProtectOnly);
     1185      }
     1186      else {
     1187        rc = DosQueryModuleHandle("VMOUSE", &hmod);
     1188        if (rc != NO_ERROR)
     1189          fProtectOnly = TRUE;
     1190        DbgMsg(pszSrcFile, __LINE__, "DosQModuleHandle VMOUSE returned %d fProtectOnly=%d", rc, fProtectOnly);
     1191      }
    11801192    }
    11811193    else
Note: See TracChangeset for help on using the changeset viewer.