Changeset 1341 for trunk/killproc.c
- Timestamp:
- Dec 14, 2008, 11:18:26 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/killproc.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 ***********************************************************************/ … … 15 16 #define INCL_DOS 16 17 #define INCL_WIN 18 #define INCL_DOSEXCEPTIONS // XCTP_... 19 #define INCL_DOSERRORS // NO_ERROR 17 20 18 21 #include "dll\fm3dll.h" 19 #include "dll\mainwnd.h" // Data declaration(s)22 #include "dll\mainwnd.h" // FM3ModHandle 20 23 #include "dll\fm3dlg.h" 21 #include "dll\init.h" // InitFM3DLL 22 #include "dll\killproc.h" // KillDlgProc 24 #include "dll\init.h" // InitFM3DLL 25 #include "dll\killproc.h" // KillDlgProc 26 #include "dll\errutil.h" // Error reporting 27 #include "dll\excputil.h" // Exception handlers 28 29 static PSZ pszSrcFile = __FILE__; 23 30 24 31 int main(int argc, char *argv[]) … … 26 33 HAB hab; 27 34 HMQ hmq; 35 APIRET regRet; 36 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL }; 28 37 29 38 DosError(FERR_DISABLEHARDERR); 39 40 regRec.ExceptionHandler = HandleException; 41 regRet = DosSetExceptionHandler(®Rec); 42 if (regRet != NO_ERROR) { 43 DbgMsg(pszSrcFile, __LINE__, 44 "DosSetExceptionHandler failed with error %u", regRet); 45 } 46 30 47 hab = WinInitialize(0); 31 48 if (hab) { … … 33 50 if (hmq) { 34 51 if (InitFM3DLL(hab, argc, argv)) { 35 36 52 WinDlgBox(HWND_DESKTOP, 53 HWND_DESKTOP, KillDlgProc, FM3ModHandle, KILL_FRAME, NULL); 37 54 } 38 55 DosSleep(250L);
Note:
See TracChangeset
for help on using the changeset viewer.