Ignore:
Timestamp:
Aug 22, 1999, 1:11:11 PM (26 years ago)
Author:
sandervl
Message:

Exception handler changes

File:
1 edited

Legend:

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

    r506 r617  
    1 /* $Id: winexe.cpp,v 1.9 1999-08-16 13:54:32 sandervl Exp $ */
     1/* $Id: winexe.cpp,v 1.10 1999-08-22 11:11:11 sandervl Exp $ */
    22
    33/*
     
    2727#include <wprocess.h>
    2828#include <pefile.h>
     29#include "exceptions.h"
     30#include "exceptutil.h"
    2931#include "cio.h"
    3032
     
    4446//******************************************************************************
    4547Win32Exe::Win32Exe(char *szFileName) : Win32Image(szFileName), fConsoleApp(FALSE),
    46                    cmdline(NULL), OS2InstanceHandle(-1)
     48                   cmdline(NULL)
    4749{
    4850  fConsoleApp = (oh.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI);
     
    6365Win32Exe::Win32Exe(HINSTANCE hinstance, int NameTableId, int Win32TableId) :
    6466         Win32Image(hinstance, NameTableId, Win32TableId),
    65          fConsoleApp(FALSE), cmdline(NULL), OS2InstanceHandle(-1)
     67         fConsoleApp(FALSE), cmdline(NULL)
    6668{
    6769  if(GET_CONSOLE(Win32TableId) == 1) {//console app
     
    8688ULONG Win32Exe::start()
    8789{
     90 WINEXCEPTION_FRAME exceptFrame;
    8891 ULONG rc;
    8992
     
    99102  tlsAttachThread();    //setup TLS (main thread)
    100103
     104  //Note: The Win32 exception structure references by FS:[0] is the same
     105  //      in OS/2
     106  OS2SetExceptionHandler((void *)&exceptFrame);
     107
    101108  SetWin32TIB();
    102109  rc = ((WIN32EXEENTRY)entryPoint)();
    103110  RestoreOS2TIB();
     111
     112  OS2UnsetExceptionHandler((void *)&exceptFrame);
     113
    104114  return rc;
    105115}
Note: See TracChangeset for help on using the changeset viewer.