Ignore:
Timestamp:
Jun 17, 1999, 8:22:43 PM (26 years ago)
Author:
phaller
Message:

Fix: major restructuring of Open32 handle management, HandleManager

File:
1 edited

Legend:

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

    r99 r111  
    1 /* $Id: winexe.cpp,v 1.3 1999-06-10 19:09:04 phaller Exp $ */
     1/* $Id: winexe.cpp,v 1.4 1999-06-17 18:21:43 phaller Exp $ */
    22
    33/*
     
    3030#include "pefile.h"
    3131#include "cio.h"
    32 #include "console2.h"
     32
     33
     34// PH: to soothe the compiler
     35#define BY_HANDLE_FILE_INFORMATION void
     36#define LPFILETIME void*
     37#define OFSTRUCT void
     38
     39#include "console.h"
     40#include "handlemanager.h"
     41
    3342
    3443Win32Exe *WinExe = NULL;
     
    3645//******************************************************************************
    3746//******************************************************************************
    38 Win32Exe::Win32Exe(char *szFileName) : Win32Image(szFileName), fConsoleApp(FALSE), 
    39                                        cmdline(NULL), OS2InstanceHandle(-1)
     47Win32Exe::Win32Exe(char *szFileName) : Win32Image(szFileName), fConsoleApp(FALSE),
     48                   cmdline(NULL), OS2InstanceHandle(-1)
    4049{
    4150  fConsoleApp = (oh.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI);
     
    4554
    4655  HMInitialize();             /* store standard handles within HandleManager */
    47   dprintf(("KERNEL32/WINEXE: HandleManager Initialized.\n")); 
     56  dprintf(("KERNEL32/WINEXE: HandleManager Initialized.\n"));
    4857  if(fConsoleApp) {
    49         dprintf(("Console application!\n"));
     58   dprintf(("Console application!\n"));
    5059
    51         APIRET rc = ConsoleInit();                      /* initialize console subsystem */
    52         if (rc != NO_ERROR)                                  /* check for errors */
    53                 dprintf(("KERNEL32:Win32Image:Init ConsoleInit failed with %u.\n", rc));
     60   APIRET rc = iConsoleInit();                     /* initialize console subsystem */
     61   if (rc != NO_ERROR)                                  /* check for errors */
     62            dprintf(("KERNEL32:Win32Image:Init ConsoleInit failed with %u.\n", rc));
    5463  }
    5564}
     
    5766//******************************************************************************
    5867Win32Exe::Win32Exe(HINSTANCE hinstance, int NameTableId, int Win32TableId) :
    59                         Win32Image(hinstance, NameTableId, Win32TableId),
    60                         fConsoleApp(FALSE), cmdline(NULL), OS2InstanceHandle(-1)
     68         Win32Image(hinstance, NameTableId, Win32TableId),
     69         fConsoleApp(FALSE), cmdline(NULL), OS2InstanceHandle(-1)
    6170{
    6271  HMInitialize();             /* store standard handles within HandleManager */
    63   dprintf(("KERNEL32/WINEXE: HandleManager Initialized.\n")); 
     72  dprintf(("KERNEL32/WINEXE: HandleManager Initialized.\n"));
    6473
    6574  if(GET_CONSOLE(Win32TableId) == 1) {//console app
    66         dprintf(("Console application!\n"));
     75   dprintf(("Console application!\n"));
    6776
    68         fConsoleApp = TRUE;
    69         APIRET rc = ConsoleInit();                      /* initialize console subsystem */
    70         if (rc != NO_ERROR)                                  /* check for errors */
    71                 dprintf(("KERNEL32:Win32Image:Init ConsoleInit failed with %u.\n", rc));
     77   fConsoleApp = TRUE;
     78   APIRET rc = iConsoleInit();                     /* initialize console subsystem */
     79   if (rc != NO_ERROR)                                  /* check for errors */
     80            dprintf(("KERNEL32:Win32Image:Init ConsoleInit failed with %u.\n", rc));
    7281  }
    7382  WinExe = this;
     
    8594{
    8695  if(getenv("WIN32_IOPL2")) {
    87         io_init1();
     96   io_init1();
    8897  }
    8998  dprintf(("Start executable %X\n", WinExe));
Note: See TracChangeset for help on using the changeset viewer.