mfreadwrite/reader: Use current stream type to set up sample allocator.
[wine/zf.git] / include / werapi.h
blob30ba6cd9505820ef649b9ba353057b08aebcfb9e
1 /*
2 * Windows Error Reporting definitions
4 * Copyright (C) 2010 Louis Lenders
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.
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.
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
21 #ifndef __WINE_WERAPI_H
22 #define __WINE_WERAPI_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 /* Only 10 parameter are allowed in WerReportSetParameter */
29 #define WER_MAX_PARAM_COUNT 10
30 #define WER_P0 0
31 #define WER_P1 1
32 #define WER_P2 2
33 #define WER_P3 3
34 #define WER_P4 4
35 #define WER_P5 5
36 #define WER_P6 6
37 #define WER_P7 7
38 #define WER_P8 8
39 #define WER_P9 9
41 /* Flags for WerReportSubmit */
42 #define WER_SUBMIT_HONOR_RECOVERY 0x0001
43 #define WER_SUBMIT_HONOR_RESTART 0x0002
44 #define WER_SUBMIT_QUEUE 0x0004
45 #define WER_SUBMIT_SHOW_DEBUG 0x0008
46 #define WER_SUBMIT_ADD_REGISTERED_DATA 0x0010
47 #define WER_SUBMIT_OUTOFPROCESS 0x0020
48 #define WER_SUBMIT_NO_CLOSE_UI 0x0040
49 #define WER_SUBMIT_NO_QUEUE 0x0080
50 #define WER_SUBMIT_NO_ARCHIVE 0x0100
51 #define WER_SUBMIT_START_MINIMIZED 0x0200
52 #define WER_SUBMIT_OUTOFPROCESS_ASYNC 0x0400
53 #define WER_SUBMIT_BYPASS_DATA_THROTTLING 0x0800
54 #define WER_SUBMIT_ARCHIVE_PARAMETERS_ONLY 0x1000
55 #define WER_SUBMIT_REPORT_MACHINE_ID 0x2000
57 #define WER_MAX_PREFERRED_MODULES 128
58 #define WER_MAX_PREFERRED_MODULES_BUFFER 256
60 /* #### */
62 typedef HANDLE HREPORT;
64 typedef enum _WER_CONSENT
66 WerConsentNotAsked = 1,
67 WerConsentApproved,
68 WerConsentDenied,
69 WerConsentAlwaysPrompt,
70 WerConsentMax
71 } WER_CONSENT;
73 typedef enum _WER_FILE_TYPE
75 WerFileTypeMicrodump = 1,
76 WerFileTypeMinidump,
77 WerFileTypeHeapdump,
78 WerFileTypeUserDocument,
79 WerFileTypeOther,
80 WerFileTypeMax
81 } WER_FILE_TYPE;
83 typedef enum _WER_REGISTER_FILE_TYPE
85 WerRegFileTypeUserDocument = 1,
86 WerRegFileTypeOther = 2,
87 WerRegFileTypeMax
88 } WER_REGISTER_FILE_TYPE;
90 typedef struct _WER_REPORT_INFORMATION
92 DWORD dwSize;
93 HANDLE hProcess;
94 WCHAR wzConsentKey[64];
95 WCHAR wzFriendlyEventName[128];
96 WCHAR wzApplicationName[128];
97 WCHAR wzApplicationPath[MAX_PATH];
98 WCHAR wzDescription[512];
99 HWND hwndParent;
100 } WER_REPORT_INFORMATION, *PWER_REPORT_INFORMATION;
103 typedef enum _WER_REPORT_TYPE
105 WerReportNonCritical = 0,
106 WerReportCritical,
107 WerReportApplicationCrash,
108 WerReportApplicationHang,
109 WerReportKernel,
110 WerReportInvalid
111 } WER_REPORT_TYPE;
113 typedef enum _WER_SUBMIT_RESULT
115 WerReportQueued = 1,
116 WerReportUploaded,
117 WerReportDebug,
118 WerReportFailed,
119 WerDisabled,
120 WerReportCancelled,
121 WerDisabledQueue,
122 WerReportAsync,
123 WerCustomAction
124 } WER_SUBMIT_RESULT, *PWER_SUBMIT_RESULT;
126 typedef enum _WER_DUMP_TYPE
128 WerDumpTypeMicroDump = 1,
129 WerDumpTypeMiniDump,
130 WerDumpTypeHeapDump,
131 WerDumpTypeMax
132 } WER_DUMP_TYPE;
134 typedef enum _WER_REPORT_UI
136 WerUIAdditionalDataDlgHeader = 1,
137 WerUIIconFilePath = 2,
138 WerUIConsentDlgHeader = 3,
139 WerUIConsentDlgBody = 4,
140 WerUIOnlineSolutionCheckText = 5,
141 WerUIOfflineSolutionCheckText = 6,
142 WerUICloseText = 7,
143 WerUICloseDlgHeader = 8,
144 WerUICloseDlgBody = 9,
145 WerUICloseDlgButtonText = 10,
146 WerUICustomActionButtonText = 11,
147 WerUIMax
148 } WER_REPORT_UI;
150 /* #### */
152 typedef struct _WER_DUMP_CUSTOM_OPTIONS
154 DWORD dwSize;
155 DWORD dwMask;
156 DWORD dwDumpFlags;
157 BOOL bOnlyThisThread;
158 DWORD dwExceptionThreadFlags;
159 DWORD dwOtherThreadFlags;
160 DWORD dwExceptionThreadExFlags;
161 DWORD dwOtherThreadExFlags;
162 DWORD dwPreferredModuleFlags;
163 DWORD dwOtherModuleFlags;
164 WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER];
166 } WER_DUMP_CUSTOM_OPTIONS, *PWER_DUMP_CUSTOM_OPTIONS;
168 typedef struct _WER_EXCEPTION_INFORMATION
170 PEXCEPTION_POINTERS pExceptionPointers;
171 BOOL bClientPointers;
172 } WER_EXCEPTION_INFORMATION, *PWER_EXCEPTION_INFORMATION;
174 /* #### */
176 HRESULT WINAPI WerAddExcludedApplication(PCWSTR, BOOL);
177 HRESULT WINAPI WerGetFlags(HANDLE process, DWORD *flags);
178 HRESULT WINAPI WerRegisterFile(PCWSTR file, WER_REGISTER_FILE_TYPE regfiletype, DWORD flags);
179 HRESULT WINAPI WerRegisterMemoryBlock(void *block, DWORD size);
180 HRESULT WINAPI WerRegisterRuntimeExceptionModule(PCWSTR callbackdll, void *context);
181 HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR, BOOL);
182 HRESULT WINAPI WerReportAddFile(HREPORT, PCWSTR, WER_FILE_TYPE, DWORD);
183 HRESULT WINAPI WerReportCloseHandle(HREPORT);
184 HRESULT WINAPI WerReportCreate(PCWSTR, WER_REPORT_TYPE, PWER_REPORT_INFORMATION, HREPORT*);
185 HRESULT WINAPI WerReportSetParameter(HREPORT, DWORD, PCWSTR, PCWSTR);
186 HRESULT WINAPI WerReportSetUIOption(HREPORT, WER_REPORT_UI, PCWSTR);
187 HRESULT WINAPI WerReportSubmit(HREPORT, WER_CONSENT, DWORD, PWER_SUBMIT_RESULT);
188 HRESULT WINAPI WerSetFlags(DWORD flags);
189 HRESULT WINAPI WerUnregisterFile(PCWSTR file);
190 HRESULT WINAPI WerUnregisterMemoryBlock(void *block);
191 HRESULT WINAPI WerUnregisterRuntimeExceptionModule(PCWSTR callbackdll, void *context);
194 #ifdef __cplusplus
196 #endif
198 #endif /* __WINE_WERAPI_H */