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

    r1229 r1341  
    1010
    1111  05 Jan 08 SHL Sync
     12  14 Dec 08 SHL Add exception handler support
    1213
    1314***********************************************************************/
     
    1718#define INCL_DOS
    1819#define INCL_WIN
     20#define INCL_DOSEXCEPTIONS              // XCTP_...
     21#define INCL_DOSERRORS                  // NO_ERROR
    1922
    2023#include "dll\fm3dll.h"
    21 #include "dll\fm3dll2.h"                // #define's for UM_*, control id's, etc.
     24#include "dll\fm3dll2.h"                // IDM_GREP
    2225#include "dll\mainwnd.h"                // Data declaration(s)
    2326#include "dll\notebook.h"               // Data declaration(s)
     
    2528#include "dll\init.h"                   // InitFM3DLL
    2629#include "dll\collect.h"                // StartCollector
     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  QMSG qmsg;
    3340  HWND hwndFrame;
    34   int x;
     41  UINT x;
    3542  BOOL seekandscan = FALSE;
     43  APIRET regRet;
     44  EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
    3645
    3746  strcpy(appname, "VCOLLECT");
    3847  DosError(FERR_DISABLEHARDERR);
     48
     49  regRec.ExceptionHandler = HandleException;
     50  regRet = DosSetExceptionHandler(&regRec);
     51  if (regRet != NO_ERROR) {
     52    DbgMsg(pszSrcFile, __LINE__,
     53           "DosSetExceptionHandler failed with error %u", regRet);
     54  }
     55
    3956  for (x = 1; x < argc; x++) {
    4057    if (*argv[x] == '*' && argv[x][1] == '*') {
     
    4360    }
    4461  }
     62
    4563  hab = WinInitialize(0);
    4664  if (hab) {
Note: See TracChangeset for help on using the changeset viewer.