2 * PROJECT: ReactOS Event Log Viewer
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: base/applications/mscutils/eventvwr/eventvwr.h
5 * PURPOSE: Event Log Viewer header
6 * PROGRAMMERS: Marc Piulachs (marc.piulachs at codexchange [dot] net)
11 #ifndef _EVENTVWR_PCH_
12 #define _EVENTVWR_PCH_
19 #define WIN32_NO_STATUS
28 #include <ndk/rtlfuncs.h>
30 #define ROUND_DOWN(n, align) (((ULONG)n) & ~((align) - 1l))
31 #define ROUND_UP(n, align) ROUND_DOWN(((ULONG)n) + (align) - 1, (align))
38 /* Missing RichEdit flags in our richedit.h */
39 #define AURL_ENABLEURL 1
40 #define AURL_ENABLEEMAILADDR 2
41 #define AURL_ENABLETELNO 4
42 #define AURL_ENABLEEAURLS 8
43 #define AURL_ENABLEDRIVELETTERS 16
48 * windowsx.h extensions
50 #define EnableDlgItem(hDlg, nID, bEnable) \
51 EnableWindow(GetDlgItem((hDlg), (nID)), (bEnable))
53 #define ProgressBar_SetPos(hwndCtl,pos) \
54 ((int)SNDMSG((hwndCtl),PBM_SETPOS,(WPARAM)(int)(pos),(LPARAM)0))
55 #define ProgressBar_SetRange(hwndCtl,range) \
56 ((int)SNDMSG((hwndCtl),PBM_SETRANGE,(WPARAM)0,(LPARAM)(range)))
57 #define ProgressBar_SetStep(hwndCtl,inc) \
58 ((int)SNDMSG((hwndCtl),PBM_SETSTEP,(WPARAM)(int)(inc),(LPARAM)0))
59 #define ProgressBar_StepIt(hwndCtl) \
60 ((int)SNDMSG((hwndCtl),PBM_STEPIT,(WPARAM)0,(LPARAM)0))
62 #define StatusBar_GetItemRect(hwndCtl,index,lprc) \
63 ((BOOL)SNDMSG((hwndCtl),SB_GETRECT,(WPARAM)(int)(index),(LPARAM)(RECT*)(lprc)))
64 #define StatusBar_SetText(hwndCtl,index,data) \
65 ((BOOL)SNDMSG((hwndCtl),SB_SETTEXT,(WPARAM)(index),(LPARAM)(data)))
73 extern HINSTANCE hInst
;
77 * Structure that caches information about an opened event log.
79 typedef struct _EVENTLOG
83 // HANDLE hEventLog; // At least for user logs, a handle is kept opened (by eventlog service) as long as the event viewer has the focus on this log.
85 PWSTR ComputerName
; // Computer where the log resides
87 /** Cached information **/
88 PWSTR LogName
; // Internal name (from registry, or file path for user logs)
89 PWSTR FileName
; // Cached, for user logs; retrieved once (at startup) from registry for system logs (i.e. may be different from the one opened by the eventlog service)
90 // PWSTR DisplayName; // The default value is the one computed; can be modified by the user for this local session only.
91 // We can use the TreeView' item name for the DisplayName...
92 BOOL Permanent
; // TRUE: system log; FALSE: user log
94 /** Volatile information **/
96 // ULONG MaxSize; // Always retrieved from registry (only valid for system logs)
97 // ULONG Retention; // Always retrieved from registry (only valid for system logs)
98 } EVENTLOG
, *PEVENTLOG
;
100 typedef struct _EVENTLOGFILTER
102 LIST_ENTRY ListEntry
;
106 // HANDLE hEnumEventsThread;
107 // HANDLE hStopEnumEvent;
109 // PWSTR DisplayName; // The default value is the one computed; can be modified by the user for this local session only.
110 // We can use the TreeView' item name for the DisplayName...
122 * The following three string filters are multi-strings that enumerate
123 * the list of sources/users/computers to be shown. If a string points
124 * to an empty string: "\0", it filters for an empty source/user/computer.
125 * If a string points to NULL, it filters for all sources/users/computers.
131 /* List of event logs maintained by this filter */
132 ULONG NumOfEventLogs
;
133 PEVENTLOG EventLogs
[ANYSIZE_ARRAY
];
134 } EVENTLOGFILTER
, *PEVENTLOGFILTER
;
136 #endif /* _EVENTVWR_PCH_ */