Changeset 1341 for trunk/ini.c


Ignore:
Timestamp:
Dec 14, 2008, 11:18:26 PM (17 years ago)
Author:
Steven Levine
Message:

Ticket 26: add thread 1 exception handler support to applets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ini.c

    r1215 r1341  
    1010
    1111  05 Jan 08 SHL Sync
     12  14 Dec 08 SHL Add exception handler support
    1213
    1314***********************************************************************/
     
    1516#define INCL_DOS
    1617#define INCL_WIN
     18#define INCL_DOSEXCEPTIONS              // XCTP_...
     19#define INCL_DOSERRORS                  // NO_ERROR
    1720
    1821#include "dll\fm3dll.h"
    19 #include "dll\notebook.h"               // Data declaration(s)
     22#include "dll\notebook.h"               // hwndHelp
    2023#include "dll\init.h"                   // InitFM3DLL
    2124#include "dll\inis.h"                   // StartIniEditor
     25#include "dll\errutil.h"                // Error reporting
     26#include "dll\excputil.h"               // Exception handlers
     27
     28static PSZ pszSrcFile = __FILE__;
    2229
    2330int main(int argc, char *argv[])
     
    2734  QMSG qmsg;
    2835  HWND hwndFrame;
     36  APIRET regRet;
     37  EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
    2938
    3039  DosError(FERR_DISABLEHARDERR);
     40
     41  regRec.ExceptionHandler = HandleException;
     42  regRet = DosSetExceptionHandler(&regRec);
     43  if (regRet != NO_ERROR) {
     44    DbgMsg(pszSrcFile, __LINE__,
     45           "DosSetExceptionHandler failed with error %u", regRet);
     46  }
     47
    3148  hab = WinInitialize(0);
    3249  if (hab) {
Note: See TracChangeset for help on using the changeset viewer.