Changeset 22053


Ignore:
Timestamp:
Dec 30, 2012, 12:21:31 AM (8 years ago)
Author:
dmik
Message:

kernel32: Initialize console input/output mode for VIO (WINDOWCOMPAT) applications.

This matches the console applications in Windows terms.

File:
1 edited

Legend:

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

    r22010 r22053  
    1414#define INCL_DOSPROCESS          /* DOS Process values       */
    1515#define INCL_DOSMISC             /* DOS Miscellanous values  */
     16#define INCL_DOSMODULEMGR
     17#define INCL_DOSSESMGR
    1618#define INCL_WIN
    1719#include <os2wrap.h>    //Odin32 OS/2 api wrappers
     
    3335#include "exceptions.h"
    3436#include "exceptutil.h"
     37
     38#include "console.h"
    3539
    3640#define DBG_LOCALLOG    DBG_winexelx
     
    9195  dprintf(("Win32LxExe ctor: %s", szModule));
    9296  hinstance = (HINSTANCE)buildHeader(1, 0, IMAGE_SUBSYSTEM_WINDOWS_GUI);
     97
     98  PPIB ppib;
     99  if (DosGetInfoBlocks(NULL, &ppib) == 0)
     100  {
     101    char buf[CCHMAXPATH];
     102    if (DosQueryModuleName(ppib->pib_hmte, sizeof(buf), buf) == 0)
     103    {
     104      ULONG Flags;
     105      if (DosQueryAppType(buf, &Flags) == 0)
     106      {
     107        dprintf(("Win32LxExe ctor: app type %x", Flags));
     108        if ((Flags & 0x2) == FAPPTYP_WINDOWCOMPAT)
     109          iConsoleInit(TRUE);
     110      }
     111    }
     112  }
    93113}
    94114//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.