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
Line 
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
12 14 Dec 08 SHL Add exception handler support
13
14***********************************************************************/
15
16#define INCL_WIN
17#define INCL_DOSEXCEPTIONS // XCTP_...
18#define INCL_DOSERRORS // NO_ERROR
19
20#include "dll\fm3dll.h"
21#include "dll\mainwnd.h" // FM3ModHandle
22#include "dll\fm3dlg.h"
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
27
28static PSZ pszSrcFile = __FILE__;
29
30int main(int argc, char *argv[])
31{
32 HAB hab;
33 HMQ hmq;
34 APIRET regRet;
35 EXCEPTIONREGISTRATIONRECORD regRec = { NULL, NULL };
36
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
44 hab = WinInitialize(0);
45 if (hab) {
46 hmq = WinCreateMsgQueue(hab, 256);
47 if (hmq) {
48 if (InitFM3DLL(hab, argc, argv)) {
49 WinDlgBox(HWND_DESKTOP, HWND_DESKTOP,
50 SysInfoDlgProc, FM3ModHandle, SYS_FRAME, NULL);
51 }
52 WinDestroyMsgQueue(hmq);
53 }
54 WinTerminate(hab);
55 }
56 return 0;
57}
Note: See TracBrowser for help on using the repository browser.