1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 //! Function prototypes for Windows Error Reporting (WER)
7 use shared::minwindef::{BOOL, DWORD, PDWORD};
8 use um::winnt::{HANDLE, HRESULT, PCWSTR, PVOID};
9 pub const WER_FAULT_REPORTING_FLAG_NOHEAP: DWORD = 1;
10 pub const WER_FAULT_REPORTING_FLAG_QUEUE: DWORD = 2;
11 pub const WER_FAULT_REPORTING_FLAG_DISABLE_THREAD_SUSPENSION: DWORD = 4;
12 pub const WER_FAULT_REPORTING_FLAG_QUEUE_UPLOAD: DWORD = 8;
13 pub const WER_FAULT_REPORTING_ALWAYS_SHOW_UI: DWORD = 16;
14 pub const WER_FAULT_REPORTING_NO_UI: DWORD = 32;
15 pub const WER_FAULT_REPORTING_FLAG_NO_HEAP_ON_QUEUE: DWORD = 64;
16 pub const WER_FAULT_REPORTING_DISABLE_SNAPSHOT_CRASH: DWORD = 128;
17 pub const WER_FAULT_REPORTING_DISABLE_SNAPSHOT_HANG: DWORD = 256;
18 pub const WER_FAULT_REPORTING_CRITICAL: DWORD = 512;
19 pub const WER_FAULT_REPORTING_DURABLE: DWORD = 1024;
20 ENUM!{enum WER_REGISTER_FILE_TYPE {
21     WerRegFileTypeUserDocument = 1,
22     WerRegFileTypeOther = 2,
23     WerRegFileTypeMax,
24 }}
25 extern "system" {
WerRegisterFile( pwzFile: PCWSTR, regFileType: WER_REGISTER_FILE_TYPE, dwFlags: DWORD, ) -> HRESULT26     pub fn WerRegisterFile(
27         pwzFile: PCWSTR,
28         regFileType: WER_REGISTER_FILE_TYPE,
29         dwFlags: DWORD,
30     ) -> HRESULT;
WerUnregisterFile( pwzFilePath: PCWSTR, ) -> HRESULT31     pub fn WerUnregisterFile(
32         pwzFilePath: PCWSTR,
33     ) -> HRESULT;
WerRegisterMemoryBlock( pvAddress: PVOID, dwSize: DWORD, ) -> HRESULT34     pub fn WerRegisterMemoryBlock(
35         pvAddress: PVOID,
36         dwSize: DWORD,
37     ) -> HRESULT;
WerUnregisterMemoryBlock( pvAddress: PVOID, ) -> HRESULT38     pub fn WerUnregisterMemoryBlock(
39         pvAddress: PVOID,
40     ) -> HRESULT;
WerSetFlags( dwFlags: DWORD, ) -> HRESULT41     pub fn WerSetFlags(
42         dwFlags: DWORD,
43     ) -> HRESULT;
WerGetFlags( hProcess: HANDLE, pdwFlags: PDWORD, ) -> HRESULT44     pub fn WerGetFlags(
45         hProcess: HANDLE,
46         pdwFlags: PDWORD,
47     ) -> HRESULT;
WerAddExcludedApplication( pwzExeName: PCWSTR, bAllUsers: BOOL, ) -> HRESULT48     pub fn WerAddExcludedApplication(
49         pwzExeName: PCWSTR,
50         bAllUsers: BOOL,
51     ) -> HRESULT;
WerRemoveExcludedApplication( pwzExeName: PCWSTR, bAllUsers: BOOL, ) -> HRESULT52     pub fn WerRemoveExcludedApplication(
53         pwzExeName: PCWSTR,
54         bAllUsers: BOOL,
55     ) -> HRESULT;
WerRegisterRuntimeExceptionModule( pwszOutOfProcessCallbackDll: PCWSTR, pContext: PVOID, ) -> HRESULT56     pub fn WerRegisterRuntimeExceptionModule(
57         pwszOutOfProcessCallbackDll: PCWSTR,
58         pContext: PVOID,
59     ) -> HRESULT;
WerUnregisterRuntimeExceptionModule( pwszOutOfProcessCallbackDll: PCWSTR, pContext: PVOID, ) -> HRESULT60     pub fn WerUnregisterRuntimeExceptionModule(
61         pwszOutOfProcessCallbackDll: PCWSTR,
62         pContext: PVOID,
63     ) -> HRESULT;
64 }
65