Changeset 1336 for trunk/fm3.c
- Timestamp:
- Dec 13, 2008, 1:01:10 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/fm3.c
r1215 r1336 11 11 05 Jan 08 SHL Sync 12 12 18 Jul 08 SHL Add Fortify support 13 11 Dec 08 SHL Add exception handler support 13 14 14 15 ***********************************************************************/ … … 19 20 #define INCL_WIN 20 21 #define INCL_LONGLONG 22 #define INCL_DOSEXCEPTIONS // XCTP_... 23 #define INCL_DOSERRORS // NO_ERROR 21 24 22 25 #include "dll\fm3dll.h" 23 #include "dll\mainwnd.h" 26 #include "dll\mainwnd.h" // Data declaration(s) 24 27 #include "dll\tools.h" 25 28 #include "dll\version.h" … … 28 31 #include "dll\init.h" // StartFM3 29 32 #include "dll\notebook.h" // Data declaration(s) 33 #include "dll\errutil.h" // Error reporting 34 #include "dll\excputil.h" // Exception handlers 35 36 static PSZ pszSrcFile = __FILE__; 30 37 31 38 int main(int argc, char *argv[]) … … 35 42 QMSG qmsg; 36 43 HWND hwndFrame; 44 APIRET regRet; 45 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL }; 37 46 38 47 strcpy(appname, "FM/3"); 39 48 DosError(FERR_DISABLEHARDERR); 49 50 regRec.ExceptionHandler = HandleException; 51 regRet = DosSetExceptionHandler(®Rec); 52 if (regRet != NO_ERROR) { 53 #if 0 // 10 Dec 08 SHL fixme to report later maybe? 54 Dos_Error(MB_ENTER, regRet, HWND_DESKTOP, pszSrcFile, __LINE__, 55 "DosSetExceptionHandler"); 56 #endif 57 DbgMsg(pszSrcFile, __LINE__, 58 "DosSetExceptionHandler failed with error %u", regRet); 59 } 60 40 61 hab = WinInitialize(0); 41 62 if (hab) { … … 78 99 break; 79 100 } 101 Fortify_DumpAllMemory(); 80 102 # endif 81 103 } … … 86 108 WinTerminate(hab); 87 109 } 110 111 if (regRet == NO_ERROR) { 112 regRet = DosUnsetExceptionHandler(®Rec); 113 if (regRet != NO_ERROR) { 114 DbgMsg(pszSrcFile, __LINE__, 115 "DosUnsetExceptionHandler failed with error %u", regRet); 116 } 117 } 88 118 return 0; 89 119 }
Note:
See TracChangeset
for help on using the changeset viewer.