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 |
|
---|
28 | static PSZ pszSrcFile = __FILE__;
|
---|
29 |
|
---|
30 | int 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(®Rec);
|
---|
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 | }
|
---|