Changeset 1341 for trunk/fm4.c
- Timestamp:
- Dec 14, 2008, 11:18:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fm4.c
r1215 r1341 10 10 11 11 05 Jan 08 SHL Sync 12 14 Dec 08 SHL Add exception handler support 12 13 13 14 ***********************************************************************/ … … 18 19 #define INCL_WIN 19 20 #define INCL_LONGLONG 21 #define INCL_DOSEXCEPTIONS // XCTP_... 22 #define INCL_DOSERRORS // NO_ERROR 20 23 21 24 #include "dll\fm3dll.h" 22 #include "dll\mainwnd.h" // Data declaration(s)23 #include "dll\notebook.h" // Data declaration(s)25 #include "dll\mainwnd.h" // hwndBubble 26 #include "dll\notebook.h" // appname 24 27 #include "dll\tools.h" 25 28 #include "dll\version.h" 26 29 #include "dll\mainwnd2.h" // StartFM32 27 30 #include "dll\init.h" // InitFM3DLL 31 #include "dll\errutil.h" // Error reporting 32 #include "dll\excputil.h" // Exception handlers 33 34 static PSZ pszSrcFile = __FILE__; 28 35 29 36 int main(int argc, char *argv[]) … … 33 40 QMSG qmsg; 34 41 HWND hwndFrame; 42 APIRET regRet; 43 UINT x; 44 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL }; 35 45 36 46 strcpy(appname, "FM/4"); 37 { 38 INT x; 47 DosError(FERR_DISABLEHARDERR); 39 48 40 for (x = 1; x < argc; x++) { 41 if (*argv[x] == '+' && !argv[x][1]) 42 fLogFile = TRUE; 43 if (*argv[x] == '-') { 44 if (argv[x][1]) 45 strcpy(profile, &argv[x][1]); 46 } 49 regRec.ExceptionHandler = HandleException; 50 regRet = DosSetExceptionHandler(®Rec); 51 if (regRet != NO_ERROR) { 52 DbgMsg(pszSrcFile, __LINE__, 53 "DosSetExceptionHandler failed with error %u", regRet); 54 } 55 56 for (x = 1; x < argc; x++) { 57 if (*argv[x] == '+' && !argv[x][1]) 58 fLogFile = TRUE; 59 if (*argv[x] == '-') { 60 if (argv[x][1]) 61 strcpy(profile, &argv[x][1]); 47 62 } 48 63 } 49 DosError(FERR_DISABLEHARDERR); 64 50 65 hab = WinInitialize(0); 51 66 if (hab) {
Note:
See TracChangeset
for help on using the changeset viewer.