source: trunk/sysinfo.c@ 1341

Last change on this file since 1341 was 1341, checked in by Steven Levine, 17 years ago

Ticket 26: add thread 1 exception handler support to applets

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
RevLine 
[907]1
2/***********************************************************************
3
4 $Id: sysinfo.c 1341 2008-12-14 22:18:26Z stevenhl $
5
6 System information applet
7
8 Copyright (c) 1993-98 M. Kimes
9 Copyright (c) 2008 Steven H.Levine
10
11 05 Jan 08 SHL Sync
[1341]12 14 Dec 08 SHL Add exception handler support
[907]13
14***********************************************************************/
15
[2]16#define INCL_WIN
[1341]17#define INCL_DOSEXCEPTIONS // XCTP_...
18#define INCL_DOSERRORS // NO_ERROR
[2]19
[1176]20#include "dll\fm3dll.h"
[1341]21#include "dll\mainwnd.h" // FM3ModHandle
[907]22#include "dll\fm3dlg.h"
[1341]23#include "dll\init.h" // InitFM3DLL
24#include "dll\sysinfo.h" // SysInfoDlgProc
25#include "dll\errutil.h" // Error reporting
26#include "dll\excputil.h" // Exception handlers
[2]27
[1341]28static PSZ pszSrcFile = __FILE__;
29
[551]30int main(int argc, char *argv[])
31{
32 HAB hab;
33 HMQ hmq;
[1341]34 APIRET regRet;
35 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
[2]36
[1341]37 regRec.ExceptionHandler = HandleException;
38 regRet = DosSetExceptionHandler(&regRec);
39 if (regRet != NO_ERROR) {
40 DbgMsg(pszSrcFile, __LINE__,
41 "DosSetExceptionHandler failed with error %u", regRet);
42 }
43
[2]44 hab = WinInitialize(0);
[551]45 if (hab) {
46 hmq = WinCreateMsgQueue(hab, 256);
47 if (hmq) {
48 if (InitFM3DLL(hab, argc, argv)) {
[1341]49 WinDlgBox(HWND_DESKTOP, HWND_DESKTOP,
50 SysInfoDlgProc, FM3ModHandle, SYS_FRAME, NULL);
[2]51 }
52 WinDestroyMsgQueue(hmq);
53 }
54 WinTerminate(hab);
55 }
56 return 0;
57}
Note: See TracBrowser for help on using the repository browser.