| 1 |
/** |
| 2 |
* This file has no copyright assigned and is placed in the Public Domain. |
| 3 |
* This file is part of the mingw-w64 runtime package. |
| 4 |
* No warranty is given; refer to the file DISCLAIMER.PD within this package. |
| 5 |
*/ |
| 6 |
#ifndef _INC_WERAPI |
| 7 |
#define _INC_WERAPI |
| 8 |
#if (_WIN32_WINNT >= 0x0600) |
| 9 |
|
| 10 |
#ifdef __cplusplus |
| 11 |
extern "C" { |
| 12 |
#endif |
| 13 |
|
| 14 |
typedef HANDLE HREPORT; |
| 15 |
|
| 16 |
#define WER_FAULT_REPORTING_FLAG_NOHEAP 1 |
| 17 |
#define WER_FAULT_REPORTING_FLAG_QUEUE 2 |
| 18 |
#define WER_FAULT_REPORTING_FLAG_DISABLE_THREAD_SUSPENSION 4 |
| 19 |
#define WER_FAULT_REPORTING_FLAG_QUEUE_UPLOAD 8 |
| 20 |
#define WER_FAULT_REPORTING_ALWAYS_SHOW_UI 16 |
| 21 |
#define WER_FAULT_REPORTING_NO_UI 32 |
| 22 |
#define WER_FAULT_REPORTING_FLAG_NO_HEAP_ON_QUEUE 64 |
| 23 |
#define WER_FAULT_REPORTING_DISABLE_SNAPSHOT_CRASH 128 |
| 24 |
#define WER_FAULT_REPORTING_DISABLE_SNAPSHOT_HANG 256 |
| 25 |
#define WER_FAULT_REPORTING_CRITICAL 512 |
| 26 |
#define WER_FAULT_REPORTING_DURABLE 1024 |
| 27 |
#define WER_MAX_TOTAL_PARAM_LENGTH 1720 |
| 28 |
#define WER_MAX_PREFERRED_MODULES 128 |
| 29 |
#define WER_MAX_PREFERRED_MODULES_BUFFER 256 |
| 30 |
|
| 31 |
#define WER_MAX_MEM_BLOCK_SIZE (64 * 1024) |
| 32 |
|
| 33 |
#define APPCRASH_EVENT L"APPCRASH" |
| 34 |
#define PACKAGED_APPCRASH_EVENT L"MoAppCrash" |
| 35 |
|
| 36 |
#define WER_P0 0 |
| 37 |
#define WER_P1 1 |
| 38 |
#define WER_P2 2 |
| 39 |
#define WER_P3 3 |
| 40 |
#define WER_P4 4 |
| 41 |
#define WER_P5 5 |
| 42 |
#define WER_P6 6 |
| 43 |
#define WER_P7 7 |
| 44 |
#define WER_P8 8 |
| 45 |
#define WER_P9 9 |
| 46 |
|
| 47 |
#define WER_E_INSUFFICIENT_BUFFER (HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER)) |
| 48 |
#define WER_E_NOT_FOUND (HRESULT_FROM_WIN32(ERROR_NOT_FOUND)) |
| 49 |
#define WER_E_LENGTH_EXCEEDED (HRESULT_FROM_WIN32(ERROR_PARAMETER_QUOTA_EXCEEDED)) |
| 50 |
#define WER_E_INVALID_STATE (HRESULT_FROM_WIN32(ERROR_INVALID_STATE)) |
| 51 |
#define WER_E_MISSING_DUMP (HRESULT_FROM_WIN32(ERROR_MISSING_SYSTEMFILE)) |
| 52 |
#define WER_E_CABBING_FAILURE (HRESULT_FROM_WIN32(ERROR_GEN_FAILURE)) |
| 53 |
|
| 54 |
#define WER_FILE_DELETE_WHEN_DONE 1 |
| 55 |
#define WER_FILE_ANONYMOUS_DATA 2 |
| 56 |
#define WER_FILE_COMPRESSED 4 |
| 57 |
|
| 58 |
#define WER_SUBMIT_HONOR_RECOVERY 1 |
| 59 |
#define WER_SUBMIT_HONOR_RESTART 2 |
| 60 |
#define WER_SUBMIT_QUEUE 4 |
| 61 |
#define WER_SUBMIT_SHOW_DEBUG 8 |
| 62 |
#define WER_SUBMIT_ADD_REGISTERED_DATA 16 |
| 63 |
#define WER_SUBMIT_OUTOFPROCESS 32 |
| 64 |
#define WER_SUBMIT_NO_CLOSE_UI 64 |
| 65 |
#define WER_SUBMIT_NO_QUEUE 128 |
| 66 |
#define WER_SUBMIT_NO_ARCHIVE 256 |
| 67 |
#define WER_SUBMIT_START_MINIMIZED 512 |
| 68 |
#define WER_SUBMIT_OUTOFPROCESS_ASYNC 1024 |
| 69 |
#define WER_SUBMIT_BYPASS_DATA_THROTTLING 2048 |
| 70 |
#define WER_SUBMIT_ARCHIVE_PARAMETERS_ONLY 4096 |
| 71 |
#define WER_SUBMIT_REPORT_MACHINE_ID 8192 |
| 72 |
#define WER_SUBMIT_BYPASS_POWER_THROTTLING 16384 |
| 73 |
#define WER_SUBMIT_BYPASS_NETWORK_COST_THROTTLING 32768 |
| 74 |
#define WER_SUBMIT_DISCARD_IF_QUEUED WER_SUBMIT_NO_QUEUE |
| 75 |
|
| 76 |
#define WER_DUMP_MASK_START 1 |
| 77 |
#define WER_DUMP_MASK_DUMPTYPE (WER_DUMP_MASK_START << 0) |
| 78 |
#define WER_DUMP_MASK_ONLY_THISTHREAD (WER_DUMP_MASK_START << 1) |
| 79 |
#define WER_DUMP_MASK_THREADFLAGS (WER_DUMP_MASK_START << 2) |
| 80 |
#define WER_DUMP_MASK_THREADFLAGS_EX (WER_DUMP_MASK_START << 3) |
| 81 |
#define WER_DUMP_MASK_OTHERTHREADFLAGS (WER_DUMP_MASK_START << 4) |
| 82 |
#define WER_DUMP_MASK_OTHERTHREADFLAGS_EX (WER_DUMP_MASK_START << 5) |
| 83 |
#define WER_DUMP_MASK_PREFERRED_MODULESFLAGS (WER_DUMP_MASK_START << 6) |
| 84 |
#define WER_DUMP_MASK_OTHER_MODULESFLAGS (WER_DUMP_MASK_START << 7) |
| 85 |
#define WER_DUMP_MASK_PREFERRED_MODULE_LIST (WER_DUMP_MASK_START << 8) |
| 86 |
|
| 87 |
#define WER_DUMP_NOHEAP_ONQUEUE 1 |
| 88 |
#define WER_DUMP_AUXILIARY 2 |
| 89 |
|
| 90 |
#define WER_MAX_REGISTERED_ENTRIES 512 |
| 91 |
#define WER_MAX_REGISTERED_METADATA 8 |
| 92 |
#define WER_MAX_REGISTERED_DUMPCOLLECTION 4 |
| 93 |
|
| 94 |
#define WER_METADATA_KEY_MAX_LENGTH 64 |
| 95 |
#define WER_METADATA_VALUE_MAX_LENGTH 128 |
| 96 |
|
| 97 |
#define WER_MAX_SIGNATURE_NAME_LENGTH 128 |
| 98 |
#define WER_MAX_EVENT_NAME_LENGTH 64 |
| 99 |
#define WER_MAX_PARAM_LENGTH MAX_PATH |
| 100 |
#define WER_MAX_PARAM_COUNT 10 |
| 101 |
#define WER_MAX_FRIENDLY_EVENT_NAME_LENGTH 128 |
| 102 |
#define WER_MAX_APPLICATION_NAME_LENGTH 128 |
| 103 |
#define WER_MAX_DESCRIPTION_LENGTH 512 |
| 104 |
#define WER_MAX_BUCKET_ID_STRING_LENGTH MAX_PATH |
| 105 |
#define WER_MAX_LOCAL_DUMP_SUBPATH_LENGTH 64 |
| 106 |
|
| 107 |
#define WER_MAX_REGISTERED_RUNTIME_EXCEPTION_MODULES 16 |
| 108 |
|
| 109 |
#define WER_RUNTIME_EXCEPTION_EVENT_FUNCTION "OutOfProcessExceptionEventCallback" |
| 110 |
#define WER_RUNTIME_EXCEPTION_EVENT_SIGNATURE_FUNCTION "OutOfProcessExceptionEventSignatureCallback" |
| 111 |
#define WER_RUNTIME_EXCEPTION_DEBUGGER_LAUNCH "OutOfProcessExceptionEventDebuggerLaunchCallback" |
| 112 |
|
| 113 |
typedef enum _WER_FILE_TYPE { |
| 114 |
WerFileTypeMicrodump = 1, |
| 115 |
WerFileTypeMinidump, |
| 116 |
WerFileTypeHeapdump, |
| 117 |
WerFileTypeUserDocument, |
| 118 |
WerFileTypeOther, |
| 119 |
WerFileTypeTriagedump, |
| 120 |
WerFileTypeCustomDump, |
| 121 |
WerFileTypeAuxiliaryDump, |
| 122 |
WerFileTypeEtlTrace, |
| 123 |
WerFileTypeMax |
| 124 |
} WER_FILE_TYPE; |
| 125 |
|
| 126 |
typedef enum _WER_REGISTER_FILE_TYPE { |
| 127 |
WerRegFileTypeUserDocument = 1, |
| 128 |
WerRegFileTypeOther, |
| 129 |
WerRegFileTypeMax |
| 130 |
} WER_REGISTER_FILE_TYPE; |
| 131 |
|
| 132 |
typedef enum _WER_DUMP_TYPE { |
| 133 |
WerDumpTypeNone = 0, |
| 134 |
WerDumpTypeMicroDump, |
| 135 |
WerDumpTypeMiniDump, |
| 136 |
WerDumpTypeHeapDump, |
| 137 |
WerDumpTypeTriageDump, |
| 138 |
WerDumpTypeMax |
| 139 |
} WER_DUMP_TYPE; |
| 140 |
|
| 141 |
typedef enum _WER_REPORT_UI { |
| 142 |
WerUIAdditionalDataDlgHeader = 1, |
| 143 |
WerUIIconFilePath, |
| 144 |
WerUIConsentDlgHeader, |
| 145 |
WerUIConsentDlgBody, |
| 146 |
WerUIOnlineSolutionCheckText, |
| 147 |
WerUIOfflineSolutionCheckText, |
| 148 |
WerUICloseText, |
| 149 |
WerUICloseDlgHeader, |
| 150 |
WerUICloseDlgBody, |
| 151 |
WerUICloseDlgButtonText, |
| 152 |
WerUICustomActionButtonText, |
| 153 |
WerUIMax |
| 154 |
} WER_REPORT_UI; |
| 155 |
|
| 156 |
typedef enum _WER_CONSENT { |
| 157 |
WerConsentNotAsked = 1, |
| 158 |
WerConsentApproved, |
| 159 |
WerConsentDenied, |
| 160 |
WerConsentAlwaysPrompt, |
| 161 |
WerConsentMax |
| 162 |
} WER_CONSENT; |
| 163 |
|
| 164 |
typedef enum _WER_SUBMIT_RESULT { |
| 165 |
WerReportQueued = 1, |
| 166 |
WerReportUploaded, |
| 167 |
WerReportDebug, |
| 168 |
WerReportFailed, |
| 169 |
WerDisabled, |
| 170 |
WerReportCancelled, |
| 171 |
WerDisabledQueue, |
| 172 |
WerReportAsync, |
| 173 |
WerCustomAction |
| 174 |
#if NTDDI_VERSION >= NTDDI_WIN8 |
| 175 |
, WerThrottled = 10 |
| 176 |
#endif |
| 177 |
#if NTDDI_VERSION >= NTDDI_WIN10 |
| 178 |
, WerReportUploadedCab = 11 |
| 179 |
, WerStorageLocationNotFound = 12 |
| 180 |
#endif |
| 181 |
, WerSubmitResultMax |
| 182 |
} WER_SUBMIT_RESULT, *PWER_SUBMIT_RESULT; |
| 183 |
|
| 184 |
typedef enum _WER_REPORT_TYPE { |
| 185 |
WerReportNonCritical = 0, |
| 186 |
WerReportCritical, |
| 187 |
WerReportApplicationCrash, |
| 188 |
WerReportApplicationHang, |
| 189 |
WerReportKernel, |
| 190 |
WerReportInvalid |
| 191 |
} WER_REPORT_TYPE; |
| 192 |
|
| 193 |
typedef struct _WER_DUMP_CUSTOM_OPTIONS { |
| 194 |
DWORD dwSize; |
| 195 |
DWORD dwMask; |
| 196 |
DWORD dwDumpFlags; |
| 197 |
WINBOOL bOnlyThisThread; |
| 198 |
DWORD dwExceptionThreadFlags; |
| 199 |
DWORD dwOtherThreadFlags; |
| 200 |
DWORD dwExceptionThreadExFlags; |
| 201 |
DWORD dwOtherThreadExFlags; |
| 202 |
DWORD dwPreferredModuleFlags; |
| 203 |
DWORD dwOtherModuleFlags; |
| 204 |
WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER]; |
| 205 |
} WER_DUMP_CUSTOM_OPTIONS, *PWER_DUMP_CUSTOM_OPTIONS; |
| 206 |
|
| 207 |
typedef struct _WER_DUMP_CUSTOM_OPTIONS_V2 { |
| 208 |
DWORD dwSize; |
| 209 |
DWORD dwMask; |
| 210 |
DWORD dwDumpFlags; |
| 211 |
WINBOOL bOnlyThisThread; |
| 212 |
DWORD dwExceptionThreadFlags; |
| 213 |
DWORD dwOtherThreadFlags; |
| 214 |
DWORD dwExceptionThreadExFlags; |
| 215 |
DWORD dwOtherThreadExFlags; |
| 216 |
DWORD dwPreferredModuleFlags; |
| 217 |
DWORD dwOtherModuleFlags; |
| 218 |
WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER]; |
| 219 |
DWORD dwPreferredModuleResetFlags; |
| 220 |
DWORD dwOtherModuleResetFlags; |
| 221 |
} WER_DUMP_CUSTOM_OPTIONS_V2, *PWER_DUMP_CUSTOM_OPTIONS_V2; |
| 222 |
|
| 223 |
#if NTDDI_VERSION >= NTDDI_WINBLUE |
| 224 |
typedef struct _WER_DUMP_CUSTOM_OPTIONS_V3 { |
| 225 |
DWORD dwSize; |
| 226 |
DWORD dwMask; |
| 227 |
DWORD dwDumpFlags; |
| 228 |
WINBOOL bOnlyThisThread; |
| 229 |
DWORD dwExceptionThreadFlags; |
| 230 |
DWORD dwOtherThreadFlags; |
| 231 |
DWORD dwExceptionThreadExFlags; |
| 232 |
DWORD dwOtherThreadExFlags; |
| 233 |
DWORD dwPreferredModuleFlags; |
| 234 |
DWORD dwOtherModuleFlags; |
| 235 |
WCHAR wzPreferredModuleList[WER_MAX_PREFERRED_MODULES_BUFFER]; |
| 236 |
DWORD dwPreferredModuleResetFlags; |
| 237 |
DWORD dwOtherModuleResetFlags; |
| 238 |
PVOID pvDumpKey; |
| 239 |
HANDLE hSnapshot; |
| 240 |
DWORD dwThreadID; |
| 241 |
} WER_DUMP_CUSTOM_OPTIONS_V3, *PWER_DUMP_CUSTOM_OPTIONS_V3; |
| 242 |
|
| 243 |
typedef WER_DUMP_CUSTOM_OPTIONS_V3 const *PCWER_DUMP_CUSTOM_OPTIONS_V3; |
| 244 |
#endif |
| 245 |
|
| 246 |
typedef struct _WER_EXCEPTION_INFORMATION { |
| 247 |
PEXCEPTION_POINTERS pExceptionPointers; |
| 248 |
WINBOOL bClientPointers; |
| 249 |
} WER_EXCEPTION_INFORMATION, *PWER_EXCEPTION_INFORMATION; |
| 250 |
|
| 251 |
typedef struct _WER_REPORT_INFORMATION { |
| 252 |
DWORD dwSize; |
| 253 |
HANDLE hProcess; |
| 254 |
WCHAR wzConsentKey[64]; |
| 255 |
WCHAR wzFriendlyEventName[128]; |
| 256 |
WCHAR wzApplicationName[128]; |
| 257 |
WCHAR wzApplicationPath[MAX_PATH]; |
| 258 |
WCHAR wzDescription[512]; |
| 259 |
HWND hwndParent; |
| 260 |
} WER_REPORT_INFORMATION, *PWER_REPORT_INFORMATION; |
| 261 |
|
| 262 |
#if NTDDI_VERSION >= NTDDI_WIN8 |
| 263 |
typedef struct _WER_REPORT_INFORMATION_V3 { |
| 264 |
DWORD dwSize; |
| 265 |
HANDLE hProcess; |
| 266 |
WCHAR wzConsentKey[64]; |
| 267 |
WCHAR wzFriendlyEventName[128]; |
| 268 |
WCHAR wzApplicationName[128]; |
| 269 |
WCHAR wzApplicationPath[MAX_PATH]; |
| 270 |
WCHAR wzDescription[512]; |
| 271 |
HWND hwndParent; |
| 272 |
WCHAR wzNamespacePartner[64]; |
| 273 |
WCHAR wzNamespaceGroup[64]; |
| 274 |
} WER_REPORT_INFORMATION_V3, *PWER_REPORT_INFORMATION_V3; |
| 275 |
#endif |
| 276 |
|
| 277 |
#if NTDDI_VERSION >= NTDDI_WINBLUE |
| 278 |
typedef struct _WER_REPORT_INFORMATION_V4 { |
| 279 |
DWORD dwSize; |
| 280 |
HANDLE hProcess; |
| 281 |
WCHAR wzConsentKey[64]; |
| 282 |
WCHAR wzFriendlyEventName[128]; |
| 283 |
WCHAR wzApplicationName[128]; |
| 284 |
WCHAR wzApplicationPath[MAX_PATH]; |
| 285 |
WCHAR wzDescription[512]; |
| 286 |
HWND hwndParent; |
| 287 |
WCHAR wzNamespacePartner[64]; |
| 288 |
WCHAR wzNamespaceGroup[64]; |
| 289 |
BYTE rgbApplicationIdentity[16]; |
| 290 |
HANDLE hSnapshot; |
| 291 |
HANDLE hDeleteFilesImpersonationToken; |
| 292 |
} WER_REPORT_INFORMATION_V4, *PWER_REPORT_INFORMATION_V4; |
| 293 |
|
| 294 |
typedef WER_REPORT_INFORMATION_V4 const *PCWER_REPORT_INFORMATION_V4; |
| 295 |
#endif |
| 296 |
|
| 297 |
#if NTDDI_VERSION >= NTDDI_WIN10 |
| 298 |
typedef struct _WER_REPORT_INFORMATION_V5 { |
| 299 |
DWORD dwSize; |
| 300 |
HANDLE hProcess; |
| 301 |
WCHAR wzConsentKey[64]; |
| 302 |
WCHAR wzFriendlyEventName[128]; |
| 303 |
WCHAR wzApplicationName[128]; |
| 304 |
WCHAR wzApplicationPath[MAX_PATH]; |
| 305 |
WCHAR wzDescription[512]; |
| 306 |
HWND hwndParent; |
| 307 |
WCHAR wzNamespacePartner[64]; |
| 308 |
WCHAR wzNamespaceGroup[64]; |
| 309 |
BYTE rgbApplicationIdentity[16]; |
| 310 |
HANDLE hSnapshot; |
| 311 |
HANDLE hDeleteFilesImpersonationToken; |
| 312 |
WER_SUBMIT_RESULT submitResultMax; |
| 313 |
} WER_REPORT_INFORMATION_V5, *PWER_REPORT_INFORMATION_V5; |
| 314 |
|
| 315 |
typedef WER_REPORT_INFORMATION_V5 const *PCWER_REPORT_INFORMATION_V5; |
| 316 |
#endif |
| 317 |
|
| 318 |
HRESULT WINAPI WerAddExcludedApplication(PCWSTR pwzExeName,WINBOOL bAllUsers); |
| 319 |
HRESULT WINAPI WerGetFlags(HANDLE hProcess,PDWORD pdwFlags); |
| 320 |
HRESULT WINAPI WerRegisterFile(PCWSTR pwzFile,WER_REGISTER_FILE_TYPE regFileType,DWORD dwFlags); |
| 321 |
HRESULT WINAPI WerRegisterMemoryBlock(PVOID pvAddress,DWORD dwSize); |
| 322 |
HRESULT WINAPI WerRemoveExcludedApplication(PCWSTR pwzExeName,WINBOOL bAllUsers); |
| 323 |
HRESULT WINAPI WerReportAddDump(HREPORT hReportHandle,HANDLE hProcess,HANDLE hThread,WER_DUMP_TYPE dumpType,PWER_EXCEPTION_INFORMATION pExceptionParam,PWER_DUMP_CUSTOM_OPTIONS pDumpCustomOptions,DWORD dwFlags); |
| 324 |
HRESULT WINAPI WerReportAddFile(HREPORT hReportHandle,PCWSTR pwzPath,WER_FILE_TYPE repFileType,DWORD dwFileFlags); |
| 325 |
HRESULT WINAPI WerReportCloseHandle(HREPORT hReportHandle); |
| 326 |
HRESULT WINAPI WerReportCreate(PCWSTR pwzEventType,WER_REPORT_TYPE repType,PWER_REPORT_INFORMATION pReportInformation,HREPORT *phReportHandle); |
| 327 |
HRESULT WINAPI WerReportHang(HWND hwndHungWindow,PCWSTR wszHungApplicationName); |
| 328 |
HRESULT WINAPI WerReportSetParameter(HREPORT hReportHandle,DWORD dwparamID,PCWSTR pwzName,PCWSTR pwzValue); |
| 329 |
HRESULT WINAPI WerReportSetUIOption(HREPORT hReportHandle,WER_REPORT_UI repUITypeID,PCWSTR pwzValue); |
| 330 |
HRESULT WINAPI WerReportSubmit(HREPORT hReportHandle,WER_CONSENT consent,DWORD dwFlags,PWER_SUBMIT_RESULT pSubmitResult); |
| 331 |
HRESULT WINAPI WerSetFlags(DWORD dwFlags); |
| 332 |
HRESULT WINAPI WerUnregisterFile(PCWSTR pwzFilePath); |
| 333 |
HRESULT WINAPI WerUnregisterMemoryBlock(PVOID pvAddress); |
| 334 |
HRESULT WINAPI WerRegisterExcludedMemoryBlock(const void* address, DWORD size); |
| 335 |
HRESULT WINAPI WerUnregisterExcludedMemoryBlock(const void* address); |
| 336 |
HRESULT WINAPI WerRegisterCustomMetadata(PCWSTR key, PCWSTR value); |
| 337 |
HRESULT WINAPI WerUnregisterCustomMetadata(PCWSTR key); |
| 338 |
HRESULT WINAPI WerRegisterAdditionalProcess(DWORD processId, DWORD captureExtraInfoForThreadId); |
| 339 |
HRESULT WINAPI WerUnregisterAdditionalProcess(DWORD processId); |
| 340 |
HRESULT WINAPI WerRegisterAppLocalDump(PCWSTR localAppDataRelativePath); |
| 341 |
HRESULT WINAPI WerUnregisterAppLocalDump(void); |
| 342 |
HRESULT WINAPI WerSetMaxProcessHoldMilliseconds(DWORD dwMilliseconds); |
| 343 |
|
| 344 |
#if (_WIN32_WINNT >= 0x0601) |
| 345 |
typedef struct _WER_RUNTIME_EXCEPTION_INFORMATION { |
| 346 |
DWORD dwSize; |
| 347 |
HANDLE hProcess; |
| 348 |
HANDLE hThread; |
| 349 |
EXCEPTION_RECORD exceptionRecord; |
| 350 |
CONTEXT context; |
| 351 |
PCWSTR pwszReportId; |
| 352 |
WINBOOL bIsFatal; |
| 353 |
DWORD dwReserved; |
| 354 |
} WER_RUNTIME_EXCEPTION_INFORMATION, *PWER_RUNTIME_EXCEPTION_INFORMATION; |
| 355 |
|
| 356 |
typedef HRESULT (WINAPI *PFN_WER_RUNTIME_EXCEPTION_EVENT)( |
| 357 |
PVOID pContext, |
| 358 |
const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation, |
| 359 |
WINBOOL *pbOwnershipClaimed, |
| 360 |
PWSTR pwszEventName, |
| 361 |
PDWORD pchSize, |
| 362 |
PDWORD pdwSignatureCount |
| 363 |
); |
| 364 |
|
| 365 |
typedef HRESULT (WINAPI *PFN_WER_RUNTIME_EXCEPTION_DEBUGGER_LAUNCH)( |
| 366 |
PVOID pContext, |
| 367 |
const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation, |
| 368 |
PBOOL pbIsCustomDebugger, |
| 369 |
PWSTR pwszDebuggerLaunch, |
| 370 |
PDWORD pchDebuggerLaunch, |
| 371 |
PBOOL pbIsDebuggerAutolaunch |
| 372 |
); |
| 373 |
|
| 374 |
typedef HRESULT (WINAPI *PFN_WER_RUNTIME_EXCEPTION_EVENT_SIGNATURE)( |
| 375 |
PVOID pContext, |
| 376 |
const PWER_RUNTIME_EXCEPTION_INFORMATION pExceptionInformation, |
| 377 |
DWORD dwIndex, |
| 378 |
PWSTR pwszName, |
| 379 |
PDWORD pchName, |
| 380 |
PWSTR pwszValue, |
| 381 |
PDWORD pchValue |
| 382 |
); |
| 383 |
|
| 384 |
HRESULT WINAPI WerRegisterRuntimeExceptionModule( |
| 385 |
PCWSTR pwszOutOfProcessCallbackDll, |
| 386 |
PVOID pContext |
| 387 |
); |
| 388 |
|
| 389 |
HRESULT WINAPI WerUnregisterRuntimeExceptionModule( |
| 390 |
PCWSTR pwszOutOfProcessCallbackDll, |
| 391 |
PVOID pContext |
| 392 |
); |
| 393 |
|
| 394 |
#endif /*(_WIN32_WINNT >= 0x0601)*/ |
| 395 |
|
| 396 |
typedef enum _REPORT_STORE_TYPES { |
| 397 |
E_STORE_USER_ARCHIVE = 0, |
| 398 |
E_STORE_USER_QUEUE, |
| 399 |
E_STORE_MACHINE_ARCHIVE, |
| 400 |
E_STORE_MACHINE_QUEUE, |
| 401 |
E_STORE_INVALID |
| 402 |
} REPORT_STORE_TYPES; |
| 403 |
|
| 404 |
typedef PVOID HREPORTSTORE, *PHREPORTSTORE; |
| 405 |
|
| 406 |
typedef struct _WER_REPORT_PARAMETER { |
| 407 |
WCHAR Name[WER_MAX_SIGNATURE_NAME_LENGTH + 1]; |
| 408 |
WCHAR Value[WER_MAX_PARAM_LENGTH]; |
| 409 |
}WER_REPORT_PARAMETER, PWER_REPORT_PARAMETER; |
| 410 |
|
| 411 |
typedef struct _WER_REPORT_SIGNATURE { |
| 412 |
WCHAR EventName[WER_MAX_EVENT_NAME_LENGTH + 1]; |
| 413 |
WER_REPORT_PARAMETER Parameters[WER_MAX_PARAM_COUNT]; |
| 414 |
} WER_REPORT_SIGNATURE, *PWER_REPORT_SIGNATURE; |
| 415 |
|
| 416 |
typedef struct _WER_REPORT_METADATA_V1 { |
| 417 |
WER_REPORT_SIGNATURE Signature; |
| 418 |
GUID BucketId; |
| 419 |
GUID ReportId; |
| 420 |
FILETIME CreationTime; |
| 421 |
ULONGLONG SizeInBytes; |
| 422 |
} WER_REPORT_METADATA_V1, *PWER_REPORT_METADATA_V1; |
| 423 |
|
| 424 |
typedef struct _WER_REPORT_METADATA_V2 { |
| 425 |
WER_REPORT_SIGNATURE Signature; |
| 426 |
GUID BucketId; |
| 427 |
GUID ReportId; |
| 428 |
FILETIME CreationTime; |
| 429 |
ULONGLONG SizeInBytes; |
| 430 |
WCHAR CabId[MAX_PATH]; |
| 431 |
DWORD ReportStatus; |
| 432 |
GUID ReportIntegratorId; |
| 433 |
DWORD NumberOfFiles; |
| 434 |
DWORD SizeOfFileNames; |
| 435 |
WCHAR *FileNames; |
| 436 |
} WER_REPORT_METADATA_V2, *PWER_REPORT_METADATA_V2; |
| 437 |
|
| 438 |
typedef struct _WER_REPORT_METADATA_V3 { |
| 439 |
WER_REPORT_SIGNATURE Signature; |
| 440 |
GUID BucketId; |
| 441 |
GUID ReportId; |
| 442 |
FILETIME CreationTime; |
| 443 |
ULONGLONG SizeInBytes; |
| 444 |
WCHAR CabId[MAX_PATH]; |
| 445 |
DWORD ReportStatus; |
| 446 |
GUID ReportIntegratorId; |
| 447 |
DWORD NumberOfFiles; |
| 448 |
DWORD SizeOfFileNames; |
| 449 |
WCHAR *FileNames; |
| 450 |
WCHAR FriendlyEventName[WER_MAX_FRIENDLY_EVENT_NAME_LENGTH]; |
| 451 |
WCHAR ApplicationName[WER_MAX_APPLICATION_NAME_LENGTH]; |
| 452 |
WCHAR ApplicationPath[MAX_PATH]; |
| 453 |
WCHAR Description[WER_MAX_DESCRIPTION_LENGTH]; |
| 454 |
WCHAR BucketIdString[WER_MAX_BUCKET_ID_STRING_LENGTH]; |
| 455 |
ULONGLONG LegacyBucketId; |
| 456 |
} WER_REPORT_METADATA_V3, *PWER_REPORT_METADATA_V3; |
| 457 |
|
| 458 |
HRESULT WINAPI WerStoreOpen(REPORT_STORE_TYPES repStoreType, PHREPORTSTORE phReportStore); |
| 459 |
VOID WINAPI WerStoreClose(HREPORTSTORE hReportStore); |
| 460 |
HRESULT WINAPI WerStoreGetFirstReportKey(HREPORTSTORE hReportStore, PCWSTR *ppszReportKey); |
| 461 |
HRESULT WINAPI WerStoreGetNextReportKey(HREPORTSTORE hReportStore, PCWSTR *ppszReportKey); |
| 462 |
HRESULT WINAPI WerStoreQueryReportMetadataV1(HREPORTSTORE hReportStore, PCWSTR pszReportKey, PWER_REPORT_METADATA_V1 pReportMetadata); |
| 463 |
HRESULT WINAPI WerStoreQueryReportMetadataV2(HREPORTSTORE hReportStore, PCWSTR pszReportKey, PWER_REPORT_METADATA_V2 pReportMetadata); |
| 464 |
HRESULT WINAPI WerStoreQueryReportMetadataV3(HREPORTSTORE hReportStore, PCWSTR pszReportKey, PWER_REPORT_METADATA_V3 pReportMetadata); |
| 465 |
VOID WINAPI WerFreeString(PCWSTR pwszStr); |
| 466 |
HRESULT WINAPI WerStorePurge(void); |
| 467 |
HRESULT WINAPI WerStoreGetReportCount(HREPORTSTORE hReportStore, DWORD *pdwReportCount); |
| 468 |
HRESULT WINAPI WerStoreGetSizeOnDisk(HREPORTSTORE hReportStore, ULONGLONG *pqwSizeInBytes); |
| 469 |
HRESULT WINAPI WerStoreUploadReport(HREPORTSTORE hReportStore, PCWSTR pszReportKey, DWORD dwFlags, PWER_SUBMIT_RESULT pSubmitResult); |
| 470 |
|
| 471 |
#ifdef __cplusplus |
| 472 |
} |
| 473 |
#endif |
| 474 |
#endif /*(_WIN32_WINNT >= 0x0600)*/ |
| 475 |
#endif /*_INC_WERAPI*/ |