summaryrefslogtreecommitdiffstats
path: root/vendor/winapi/src/winrt/roerrorapi.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:02:58 +0000
commit698f8c2f01ea549d77d7dc3338a12e04c11057b9 (patch)
tree173a775858bd501c378080a10dca74132f05bc50 /vendor/winapi/src/winrt/roerrorapi.rs
parentInitial commit. (diff)
downloadrustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.tar.xz
rustc-698f8c2f01ea549d77d7dc3338a12e04c11057b9.zip
Adding upstream version 1.64.0+dfsg1.upstream/1.64.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/winapi/src/winrt/roerrorapi.rs')
-rw-r--r--vendor/winapi/src/winrt/roerrorapi.rs103
1 files changed, 103 insertions, 0 deletions
diff --git a/vendor/winapi/src/winrt/roerrorapi.rs b/vendor/winapi/src/winrt/roerrorapi.rs
new file mode 100644
index 000000000..aa9f683a5
--- /dev/null
+++ b/vendor/winapi/src/winrt/roerrorapi.rs
@@ -0,0 +1,103 @@
+// Licensed under the Apache License, Version 2.0
+// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// All files in the project carrying such notice may not be copied, modified, or distributed
+// except according to those terms.
+use shared::basetsd::{UINT32, UINT_PTR};
+use shared::minwindef::{BOOL, BYTE, UINT, USHORT};
+use um::restrictederrorinfo::IRestrictedErrorInfo;
+use um::unknwnbase::IUnknown;
+use um::winnt::{HRESULT, PCWSTR, PVOID, VOID};
+use winrt::hstring::HSTRING;
+ENUM!{enum RO_ERROR_REPORTING_FLAGS {
+ RO_ERROR_REPORTING_NONE = 0x00000000,
+ RO_ERROR_REPORTING_SUPPRESSEXCEPTIONS = 0x00000001,
+ RO_ERROR_REPORTING_FORCEEXCEPTIONS = 0x00000002,
+ RO_ERROR_REPORTING_USESETERRORINFO = 0x00000004,
+ RO_ERROR_REPORTING_SUPPRESSSETERRORINFO = 0x00000008,
+}}
+extern "system" {
+ pub fn RoGetErrorReportingFlags(
+ pflags: *mut UINT32,
+ ) -> HRESULT;
+ pub fn RoSetErrorReportingFlags(
+ flags: UINT32,
+ ) -> HRESULT;
+ pub fn RoResolveRestrictedErrorInfoReference(
+ reference: PCWSTR,
+ ppRestrictedErrorInfo: *mut *mut IRestrictedErrorInfo ,
+ ) -> HRESULT;
+ pub fn SetRestrictedErrorInfo(
+ pRestrictedErrorInfo: *const IRestrictedErrorInfo,
+ ) -> HRESULT;
+ pub fn GetRestrictedErrorInfo(
+ ppRestrictedErrorInfo: *mut *mut IRestrictedErrorInfo,
+ ) -> HRESULT;
+ pub fn RoOriginateErrorW(
+ error: HRESULT,
+ cchMax: UINT,
+ message: PCWSTR,
+ ) -> BOOL;
+ pub fn RoOriginateError(
+ error: HRESULT,
+ message: HSTRING,
+ ) -> BOOL;
+ pub fn RoTransformErrorW(
+ oldError: HRESULT,
+ newError: HRESULT,
+ cchMax: UINT,
+ message: PCWSTR,
+ ) -> BOOL;
+ pub fn RoTransformError(
+ oldError: HRESULT,
+ newError: HRESULT,
+ message: HSTRING,
+ ) -> BOOL;
+ pub fn RoCaptureErrorContext(
+ hr: HRESULT,
+ ) -> HRESULT;
+ pub fn RoFailFastWithErrorContext(
+ hrError: HRESULT,
+ );
+ pub fn RoOriginateLanguageException(
+ error: HRESULT,
+ message: HSTRING,
+ languageException: *const IUnknown,
+ ) -> BOOL;
+ pub fn RoClearError();
+ pub fn RoReportUnhandledError(
+ pRestrictedErrorInfo: *const IRestrictedErrorInfo,
+ ) -> HRESULT;
+}
+FN!{stdcall PINSPECT_MEMORY_CALLBACK(
+ *const VOID,
+ UINT_PTR,
+ UINT32,
+ *mut BYTE,
+) -> HRESULT}
+extern "system" {
+ pub fn RoInspectThreadErrorInfo(
+ targetTebAddress: UINT_PTR,
+ machine: USHORT,
+ readMemoryCallback: PINSPECT_MEMORY_CALLBACK,
+ context: PVOID,
+ targetErrorInfoAddress: *mut UINT_PTR,
+ ) -> HRESULT;
+ pub fn RoInspectCapturedStackBackTrace(
+ targetErrorInfoAddress: UINT_PTR,
+ machine: USHORT,
+ readMemoryCallback: PINSPECT_MEMORY_CALLBACK,
+ context: PVOID,
+ frameCount: *mut UINT32,
+ targetBackTraceAddress: *mut UINT_PTR,
+ ) -> HRESULT;
+ pub fn RoGetMatchingRestrictedErrorInfo(
+ hrIn: HRESULT,
+ ppRestrictedErrorInfo: *mut *mut IRestrictedErrorInfo,
+ ) -> HRESULT;
+ pub fn RoReportFailedDelegate(
+ punkDelegate: *const IUnknown,
+ pRestrictedErrorInfo: *const IRestrictedErrorInfo,
+ ) -> HRESULT;
+ pub fn IsErrorPropagationEnabled() -> BOOL;
+}