Changeset 1341 for trunk/undel.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/undel.c

    r1216 r1341  
    77
    88  Copyright (c) 1993-98 M. Kimes
    9   Copyright (c) 2007 Steven H. Levine
     9  Copyright (c) 2007, 2008 Steven H. Levine
    1010
    1111  23 Sep 07 SHL Sync with standards
    1212  23 Sep 07 SHL Get rid of statics
     13  14 Dec 08 SHL Add exception handler support
    1314
    1415***********************************************************************/
     
    1718
    1819#define INCL_DOS
     20#define INCL_DOSEXCEPTIONS              // XCTP_...
     21#define INCL_DOSERRORS                  // NO_ERROR
    1922
    2023#include "dll\fm3dll.h"
    21 #include "dll\mainwnd.h"                // Data declaration(s)
     24#include "dll\mainwnd.h"                // FM3ModHandle
    2225#include "dll\fm3dlg.h"
    2326#include "dll\undel.h"                  // UndeleteDlgProc
     
    2528#include "dll\valid.h"                  // MakeValidDir
    2629#include "dll\dirs.h"                   // save_dir
     30#include "dll\errutil.h"                // Error reporting
     31#include "dll\excputil.h"               // Exception handlers
     32
     33static PSZ pszSrcFile = __FILE__;
    2734
    2835int main(int argc, char *argv[])
     
    3239  FILESTATUS3 fs;
    3340  CHAR fullname[CCHMAXPATH];
    34   CHAR *thisarg = NULL;
    35   INT x;
     41  PSZ thisarg = NULL;
     42  UINT x;
     43  APIRET regRet;
     44  EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
    3645
    3746  DosError(FERR_DISABLEHARDERR);
     47
     48  regRec.ExceptionHandler = HandleException;
     49  regRet = DosSetExceptionHandler(&regRec);
     50  if (regRet != NO_ERROR) {
     51    DbgMsg(pszSrcFile, __LINE__,
     52           "DosSetExceptionHandler failed with error %u", regRet);
     53  }
     54
    3855  for (x = 1; x < argc; x++) {
    3956    if (!strchr("/;,`\'", *argv[x]) && !thisarg) {
Note: See TracChangeset for help on using the changeset viewer.