1 | /*
|
---|
2 | * Windows Error Reporting definitions
|
---|
3 | *
|
---|
4 | * Copyright (C) 2010 Louis Lenders
|
---|
5 | *
|
---|
6 | * This library is free software; you can redistribute it and/or
|
---|
7 | * modify it under the terms of the GNU Lesser General Public
|
---|
8 | * License as published by the Free Software Foundation; either
|
---|
9 | * version 2.1 of the License, or (at your option) any later version.
|
---|
10 | *
|
---|
11 | * This library is distributed in the hope that it will be useful,
|
---|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
14 | * Lesser General Public License for more details.
|
---|
15 | *
|
---|
16 | * You should have received a copy of the GNU Lesser General Public
|
---|
17 | * License along with this library; if not, write to the Free Software
|
---|
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
19 | */
|
---|
20 |
|
---|
21 | /*
|
---|
22 | * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
|
---|
23 | * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
|
---|
24 | * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
|
---|
25 | * a choice of LGPL license versions is made available with the language indicating
|
---|
26 | * that LGPLv2 or any later version may be used, or where a choice of which version
|
---|
27 | * of the LGPL is applied is otherwise unspecified.
|
---|
28 | */
|
---|
29 |
|
---|
30 | #ifndef __WINE_WERAPI_H
|
---|
31 | #define __WINE_WERAPI_H
|
---|
32 |
|
---|
33 | #ifdef __cplusplus
|
---|
34 | extern "C" {
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | /* Only 10 parameter are allowed in WerReportSetParameter */
|
---|
38 | #define WER_MAX_PARAM_COUNT 10
|
---|
39 | #define WER_P0 0
|
---|
40 | #define WER_P1 1
|
---|
41 | #define WER_P2 2
|
---|
42 | #define WER_P3 3
|
---|
43 | #define WER_P4 4
|
---|
44 | #define WER_P5 5
|
---|
45 | #define WER_P6 6
|
---|
46 | #define WER_P7 7
|
---|
47 | #define WER_P8 8
|
---|
48 | #define WER_P9 9
|
---|
49 |
|
---|
50 | /* Flags for WerReportSubmit */
|
---|
51 | #define WER_SUBMIT_HONOR_RECOVERY 0x0001
|
---|
52 | #define WER_SUBMIT_HONOR_RESTART 0x0002
|
---|
53 | #define WER_SUBMIT_QUEUE 0x0004
|
---|
54 | #define WER_SUBMIT_SHOW_DEBUG 0x0008
|
---|
55 | #define WER_SUBMIT_ADD_REGISTERED_DATA 0x0010
|
---|
56 | #define WER_SUBMIT_OUTOFPROCESS 0x0020
|
---|
57 | #define WER_SUBMIT_NO_CLOSE_UI 0x0040
|
---|
58 | #define WER_SUBMIT_NO_QUEUE 0x0080
|
---|
59 | #define WER_SUBMIT_NO_ARCHIVE 0x0100
|
---|
60 | #define WER_SUBMIT_START_MINIMIZED 0x0200
|
---|
61 | #define WER_SUBMIT_OUTOFPROCESS_ASYNC 0x0400
|
---|
62 | #define WER_SUBMIT_BYPASS_DATA_THROTTLING 0x0800
|
---|
63 | #define WER_SUBMIT_ARCHIVE_PARAMETERS_ONLY 0x1000
|
---|
64 | #define WER_SUBMIT_REPORT_MACHINE_ID 0x2000
|
---|
65 |
|
---|
66 | #define WER_MAX_PREFERRED_MODULES 128
|
---|
67 | #define WER_MAX_PREFERRED_MODULES_BUFFER 256
|
---|
68 |
|
---|
69 | /* #### */
|
---|
70 |
|
---|
71 | typedef HANDLE HREPORT;
|
---|
72 |
|
---|
73 | typedef enum _WER_CONSENT
|
---|
74 | {
|
---|
75 | WerConsentNotAsked = 1,
|
---|
76 | WerConsentApproved,
|
---|
77 | WerConsentDenied,
|
---|
78 | WerConsentAlwaysPrompt,
|
---|
79 | WerConsentMax
|
---|
80 | } WER_CONSENT;
|
---|
81 |
|
---|
82 | typedef enum _WER_FILE_TYPE
|
---|
83 | {
|
---|
84 | WerFileTypeMicrodump = 1,
|
---|
85 | WerFileTypeMinidump,
|
---|
86 | WerFileTypeHeapdump,
|
---|
87 | WerFileTypeUserDocument,
|
---|
88 | WerFileTypeOther,
|
---|
89 | WerFileTypeMax
|
---|
90 | } WER_FILE_TYPE;
|
---|
91 |
|
---|
92 | typedef enum _WER_REGISTER_FILE_TYPE
|
---|
93 | {
|
---|
94 | WerRegFileTypeUserDocument = 1,
|
---|
95 | WerRegFileTypeOther = 2,
|
---|
96 | WerRegFileTypeMax
|
---|
97 | } WER_REGISTER_FILE_TYPE;
|
---|
98 |
|
---|
99 | typedef struct _WER_REPORT_INFORMATION
|
---|
100 | {
|
---|
101 | DWORD dwSize;
|
---|
102 | HANDLE hProcess;
|
---|
103 | WCHAR wzConsentKey[64];
|
---|
104 | WCHAR wzFriendlyEventName[128];
|
---|
105 | WCHAR wzApplicationName[128];
|
---|
106 | WCHAR wzApplicationPath[MAX_PATH];
|
---|
107 | WCHAR wzDescription[512];
|
---|
108 | HWND hwndParent;
|
---|
109 | } WER_REPORT_INFORMATION, *PWER_REPORT_INFORMATION;
|
---|
110 |
|
---|
111 |
|
---|
112 | typedef enum _WER_REPORT_TYPE
|
---|
113 | {
|
---|
114 | WerReportNonCritical = 0,
|
---|
115 | WerReportCritical,
|
---|
116 | WerReportApplicationCrash,
|
---|
117 | WerReportApplicationHang,
|
---|
118 | WerReportKernel,
|
---|
119 | WerReportInvalid
|
---|
120 | } WER_REPORT_TYPE;
|
---|
121 |
|
---|
122 | typedef enum _WER_SUBMIT_RESULT
|
---|
123 | {
|
---|
124 | WerReportQueued = 1,
|
---|
125 | WerReportUploaded,
|
---|
126 | WerReportDebug,
|
---|
127 | WerReportFailed,
|
---|
128 | WerDisabled,
|
---|
129 | WerReportCancelled,
|
---|
130 | WerDisabledQueue,
|
---|
131 | WerReportAsync,
|
---|
132 | WerCustomAction
|
---|
133 | } WER_SUBMIT_RESULT, *PWER_SUBMIT_RESULT;
|
---|
134 |
|
---|
135 | typedef enum _WER_DUMP_TYPE
|
---|
136 | {
|
---|
137 | WerDumpTypeMicroDump = 1,
|
---|
138 | WerDumpTypeMiniDump,
|
---|
139 | WerDumpTypeHeapDump,
|
---|
140 | WerDumpTypeMax
|
---|
141 | } WER_DUMP_TYPE;
|
---|
142 |
|
---|
143 | typedef enum _WER_REPORT_UI
|
---|
144 | {
|
---|
145 | WerUIAdditionalDataDlgHeader = 1,
|
---|
146 | WerUIIconFilePath = 2,
|
---|
147 | WerUIConsentDlgHeader = 3,
|
---|
148 | WerUIConsentDlgBody = 4,
|
---|
149 | WerUIOnlineSolutionCheckText = 5,
|
---|
150 | WerUIOfflineSolutionCheckText = 6,
|
---|
151 | WerUICloseText = 7,
|
---|
152 | WerUICloseDlgHeader = 8,
|
---|
153 | WerUICloseDlgBody = 9,
|
---|
154 | WerUICloseDlgButtonText = 10,
|
---|
155 | WerUICustomActionButtonText = 11,
|
---|
156 | WerUIMax
|
---|
157 | } WER_REPORT_UI;
|
---|
158 |
|
---|
159 | /* #### */
|
---|
160 |
|
---|
161 | typedef struct _WER_DUMP_CUSTOM_OPTIONS
|
---|
162 | {
|
---|
163 | DWORD dwSize;
|
---|
164 | DWORD dwMask;
|
---|
165 | DWORD dwDumpFlags;
|
---|
166 | BOOL bOnlyThisThread;
|
---|
167 | DWORD dwExceptionThreadFlags;
|
---|
168 | DWORD dwOtherThreadFlags;
|
---|
169 | DWORD dwExceptionThreadExFlags;
|
---|
170 | DWORD dwOtherThreadExFlags;
|
---|
171 | DWORD dwPreferredModuleFlags;
|
---|
172 | DWORD dwOtherModuleFlags;
|
---|
173 | WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER];
|
---|
174 |
|
---|
175 | } WER_DUMP_CUSTOM_OPTIONS, *PWER_DUMP_CUSTOM_OPTIONS;
|
---|
176 |
|
---|
177 | typedef struct _WER_EXCEPTION_INFORMATION
|
---|
178 | {
|
---|
179 | PEXCEPTION_POINTERS pExceptionPointers;
|
---|
180 | BOOL bClientPointers;
|
---|
181 | } WER_EXCEPTION_INFORMATION, *PWER_EXCEPTION_INFORMATION;
|
---|
182 |
|
---|
183 | /* #### */
|
---|
184 |
|
---|
185 | HRESULT WINAPI WerAddExcludedApplication(PCWSTR, BOOL);
|
---|
186 | HRESULT WINAPI WerRegisterFile(PCWSTR file, WER_REGISTER_FILE_TYPE regfiletype, DWORD flags);
|
---|
187 | HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR, BOOL);
|
---|
188 | HRESULT WINAPI WerReportAddFile(HREPORT, PCWSTR, WER_FILE_TYPE, DWORD);
|
---|
189 | HRESULT WINAPI WerReportCloseHandle(HREPORT);
|
---|
190 | HRESULT WINAPI WerReportCreate(PCWSTR, WER_REPORT_TYPE, PWER_REPORT_INFORMATION, HREPORT*);
|
---|
191 | HRESULT WINAPI WerReportSetParameter(HREPORT, DWORD, PCWSTR, PCWSTR);
|
---|
192 | HRESULT WINAPI WerReportSetUIOption(HREPORT, WER_REPORT_UI, PCWSTR);
|
---|
193 | HRESULT WINAPI WerReportSubmit(HREPORT, WER_CONSENT, DWORD, PWER_SUBMIT_RESULT);
|
---|
194 |
|
---|
195 | #ifdef __cplusplus
|
---|
196 | }
|
---|
197 | #endif
|
---|
198 |
|
---|
199 | #endif /* __WINE_WERAPI_H */
|
---|