From 97efa322720a1aa84bbd437bfc84c3c984e978dc Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Tue, 25 Apr 2023 20:32:58 -0500 Subject: [PATCH] Transform `BOOL` and `Win32` return values (#2476) --- crates/libs/metadata/src/reader/mod.rs | 13 + crates/libs/metadata/src/reader/type_name.rs | 2 + .../Windows/Wdk/System/OfflineRegistry/mod.rs | 95 +- .../src/Windows/Win32/Devices/AllJoyn/mod.rs | 20 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 32 +- .../Win32/Devices/Communication/mod.rs | 112 +- .../DeviceAndDriverInstallation/mod.rs | 1078 +++++++++-------- .../src/Windows/Win32/Devices/Display/mod.rs | 24 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 184 +-- .../src/Windows/Win32/Devices/Usb/mod.rs | 124 +- .../src/Windows/Win32/Foundation/mod.rs | 20 +- .../src/Windows/Win32/Globalization/mod.rs | 216 ++-- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 16 +- .../src/Windows/Win32/Graphics/OpenGL/mod.rs | 48 +- .../Windows/Win32/Graphics/Printing/mod.rs | 112 +- .../Win32/NetworkManagement/Dns/mod.rs | 12 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 320 ++--- .../Win32/NetworkManagement/Snmp/mod.rs | 8 +- .../Win32/Networking/Clustering/mod.rs | 36 +- .../src/Windows/Win32/Networking/Ldap/mod.rs | 4 +- .../Windows/Win32/Networking/WinHttp/mod.rs | 92 +- .../Windows/Win32/Networking/WinInet/mod.rs | 492 ++++---- .../Windows/Win32/Security/AppLocker/mod.rs | 36 +- .../Win32/Security/Authorization/UI/mod.rs | 4 +- .../Win32/Security/Authorization/mod.rs | 258 ++-- .../Windows/Win32/Security/Credentials/mod.rs | 132 +- .../Security/Cryptography/Catalog/mod.rs | 28 +- .../Win32/Security/Cryptography/Sip/mod.rs | 40 +- .../Win32/Security/Cryptography/UI/mod.rs | 16 +- .../Win32/Security/Cryptography/mod.rs | 630 +++++----- .../Windows/Win32/Security/Isolation/mod.rs | 4 +- .../Windows/Win32/Security/WinTrust/mod.rs | 12 +- .../windows/src/Windows/Win32/Security/mod.rs | 392 +++--- .../Windows/Win32/Storage/Compression/mod.rs | 48 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 825 ++++++------- .../Win32/Storage/Packaging/Appx/mod.rs | 196 +-- .../src/Windows/Win32/Storage/Vhd/mod.rs | 116 +- .../Windows/Win32/System/Antimalware/mod.rs | 4 +- .../mod.rs | 40 +- .../src/Windows/Win32/System/Console/mod.rs | 240 ++-- .../Windows/Win32/System/DataExchange/mod.rs | 40 +- .../Win32/System/Diagnostics/Debug/mod.rs | 732 +++++------ .../Win32/System/Diagnostics/Etw/mod.rs | 120 +- .../Win32/System/Diagnostics/ToolHelp/mod.rs | 56 +- .../Windows/Win32/System/Environment/mod.rs | 60 +- .../Win32/System/ErrorReporting/mod.rs | 8 +- .../src/Windows/Win32/System/EventLog/mod.rs | 144 +-- .../System/EventNotificationService/mod.rs | 12 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 36 +- .../src/Windows/Win32/System/IO/mod.rs | 40 +- .../Windows/Win32/System/JobObjects/mod.rs | 24 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 92 +- .../src/Windows/Win32/System/Mailslots/mod.rs | 8 +- .../src/Windows/Win32/System/Memory/mod.rs | 144 +-- .../Windows/Win32/System/Performance/mod.rs | 8 +- .../src/Windows/Win32/System/Pipes/mod.rs | 63 +- .../src/Windows/Win32/System/Power/mod.rs | 192 +-- .../Windows/Win32/System/ProcessStatus/mod.rs | 60 +- .../src/Windows/Win32/System/Registry/mod.rs | 322 ++--- .../Windows/Win32/System/RemoteDesktop/mod.rs | 208 ++-- .../src/Windows/Win32/System/Services/mod.rs | 152 +-- .../Win32/System/SetupAndMigration/mod.rs | 12 +- .../src/Windows/Win32/System/Shutdown/mod.rs | 44 +- .../Win32/System/StationsAndDesktops/mod.rs | 56 +- .../Win32/System/SystemInformation/mod.rs | 88 +- .../src/Windows/Win32/System/Threading/mod.rs | 500 ++++---- .../src/Windows/Win32/System/Time/mod.rs | 36 +- .../Win32/System/WindowsProgramming/mod.rs | 120 +- .../src/Windows/Win32/UI/Accessibility/mod.rs | 8 +- .../src/Windows/Win32/UI/Controls/mod.rs | 60 +- .../windows/src/Windows/Win32/UI/HiDpi/mod.rs | 24 +- .../Win32/UI/Input/KeyboardAndMouse/mod.rs | 44 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 104 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 36 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 8 +- .../src/Windows/Win32/UI/Magnification/mod.rs | 4 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 312 ++--- .../Win32/UI/WindowsAndMessaging/mod.rs | 516 ++++---- crates/samples/windows/dcomp/src/main.rs | 11 +- crates/samples/windows/direct2d/src/main.rs | 4 +- crates/samples/windows/direct3d12/src/main.rs | 4 +- .../samples/windows/enum_windows/src/main.rs | 2 +- .../samples/windows/kernel_event/src/main.rs | 12 +- crates/samples/windows/overlapped/src/main.rs | 17 +- crates/samples/windows/privileges/src/main.rs | 11 +- crates/tests/calling_convention/tests/win.rs | 5 +- crates/tests/lib/tests/win.rs | 2 +- crates/tests/reserved/tests/win.rs | 30 +- crates/tests/string_param/tests/pwstr.rs | 2 +- crates/tests/wdk/tests/win.rs | 4 +- crates/tests/win32/tests/win32.rs | 18 +- crates/tests/win32_arrays/tests/fixed.rs | 4 +- docs/readme.md | 6 +- 93 files changed, 5360 insertions(+), 5346 deletions(-) diff --git a/crates/libs/metadata/src/reader/mod.rs b/crates/libs/metadata/src/reader/mod.rs index 5e1074b210..93b1e1f658 100644 --- a/crates/libs/metadata/src/reader/mod.rs +++ b/crates/libs/metadata/src/reader/mod.rs @@ -602,6 +602,13 @@ impl<'a> Reader<'a> { }; self.module_ref_name(self.impl_map_scope(impl_map)).to_lowercase() } + pub fn method_def_last_error(&self, row: MethodDef) -> bool { + if let Some(map) = self.method_def_impl_map(row) { + self.impl_map_flags(map).contains(PInvokeAttributes::LAST_ERROR) + } else { + false + } + } pub fn method_def_signature(&self, row: MethodDef, generics: &[Type]) -> Signature { let mut blob = self.row_blob(row.0, 4); let vararg = blob.read_usize() == 0x05; @@ -1437,6 +1444,12 @@ impl<'a> Reader<'a> { Type::TypeDef((def, _)) if self.type_def_type_name(*def) == TypeName::NTSTATUS => { return SignatureKind::ResultVoid; } + Type::TypeDef((def, _)) if self.type_def_type_name(*def) == TypeName::WIN32_ERROR => { + return SignatureKind::ResultVoid; + } + Type::TypeDef((def, _)) if self.type_def_type_name(*def) == TypeName::BOOL && self.method_def_last_error(signature.def) => { + return SignatureKind::ResultVoid; + } _ if self.type_is_struct(return_type) => { return SignatureKind::ReturnStruct; } diff --git a/crates/libs/metadata/src/reader/type_name.rs b/crates/libs/metadata/src/reader/type_name.rs index 2e7b408087..2f6f96d77d 100644 --- a/crates/libs/metadata/src/reader/type_name.rs +++ b/crates/libs/metadata/src/reader/type_name.rs @@ -37,6 +37,8 @@ impl<'a> TypeName<'a> { pub const HANDLE: Self = Self::from_const("Windows.Win32.Foundation", "HANDLE"); pub const HRESULT: Self = Self::from_const("Windows.Win32.Foundation", "HRESULT"); pub const CHAR: Self = Self::from_const("Windows.Win32.Foundation", "CHAR"); + pub const BOOL: Self = Self::from_const("Windows.Win32.Foundation", "BOOL"); + pub const WIN32_ERROR: Self = Self::from_const("Windows.Win32.Foundation", "WIN32_ERROR"); pub const D2D_MATRIX_3X2_F: Self = Self::from_const("Windows.Win32.Graphics.Direct2D.Common", "D2D_MATRIX_3X2_F"); pub const D3DMATRIX: Self = Self::from_const("Windows.Win32.Graphics.Direct3D", "D3DMATRIX"); diff --git a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs index c29fe690f9..56f5e01a3d 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -1,34 +1,34 @@ #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORCloseHive(handle: P0) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORCloseHive(handle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORCloseHive(handle : ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCloseHive(handle.into_param().abi()) + ORCloseHive(handle.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORCloseKey(keyhandle: P0) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORCloseKey(keyhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORCloseKey(keyhandle : ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCloseKey(keyhandle.into_param().abi()) + ORCloseKey(keyhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORCreateHive(horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { +pub unsafe fn ORCreateHive(horkey: *mut ORHKEY) -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORCreateHive(horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCreateHive(horkey) + ORCreateHive(horkey).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ORCreateKey(keyhandle: P0, lpsubkey: P1, lpclass: P2, dwoptions: u32, psecuritydescriptor: P3, phkresult: *mut ORHKEY, pdwdisposition: ::core::option::Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORCreateKey(keyhandle: P0, lpsubkey: P1, lpclass: P2, dwoptions: u32, psecuritydescriptor: P3, phkresult: *mut ORHKEY, pdwdisposition: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -36,131 +36,131 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORCreateKey(keyhandle : ORHKEY, lpsubkey : ::windows_core::PCWSTR, lpclass : ::windows_core::PCWSTR, dwoptions : u32, psecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, phkresult : *mut ORHKEY, pdwdisposition : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORCreateKey(keyhandle.into_param().abi(), lpsubkey.into_param().abi(), lpclass.into_param().abi(), dwoptions, psecuritydescriptor.into_param().abi(), phkresult, ::core::mem::transmute(pdwdisposition.unwrap_or(::std::ptr::null_mut()))) + ORCreateKey(keyhandle.into_param().abi(), lpsubkey.into_param().abi(), lpclass.into_param().abi(), dwoptions, psecuritydescriptor.into_param().abi(), phkresult, ::core::mem::transmute(pdwdisposition.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORDeleteKey(handle: P0, lpsubkey: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORDeleteKey(handle: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORDeleteKey(handle : ORHKEY, lpsubkey : ::windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORDeleteKey(handle.into_param().abi(), lpsubkey.into_param().abi()) + ORDeleteKey(handle.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORDeleteValue(handle: P0, lpvaluename: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORDeleteValue(handle: P0, lpvaluename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORDeleteValue(handle : ORHKEY, lpvaluename : ::windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORDeleteValue(handle.into_param().abi(), lpvaluename.into_param().abi()) + ORDeleteValue(handle.into_param().abi(), lpvaluename.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OREnumKey(handle: P0, dwindex: u32, lpname: ::windows_core::PWSTR, lpcname: *mut u32, lpclass: ::windows_core::PWSTR, lpcclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OREnumKey(handle: P0, dwindex: u32, lpname: ::windows_core::PWSTR, lpcname: *mut u32, lpclass: ::windows_core::PWSTR, lpcclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn OREnumKey(handle : ORHKEY, dwindex : u32, lpname : ::windows_core::PWSTR, lpcname : *mut u32, lpclass : ::windows_core::PWSTR, lpcclass : *mut u32, lpftlastwritetime : *mut super::super::super::Win32::Foundation:: FILETIME) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OREnumKey(handle.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcname, ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))) + OREnumKey(handle.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcname, ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OREnumValue(handle: P0, dwindex: u32, lpvaluename: ::windows_core::PWSTR, lpcvaluename: *mut u32, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OREnumValue(handle: P0, dwindex: u32, lpvaluename: ::windows_core::PWSTR, lpcvaluename: *mut u32, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn OREnumValue(handle : ORHKEY, dwindex : u32, lpvaluename : ::windows_core::PWSTR, lpcvaluename : *mut u32, lptype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OREnumValue(handle.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcvaluename, ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + OREnumValue(handle.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcvaluename, ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ORGetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORGetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: super::super::super::Win32::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORGetKeySecurity(handle : ORHKEY, securityinformation : u32, psecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetKeySecurity(handle.into_param().abi(), securityinformation, psecuritydescriptor, lpcbsecuritydescriptor) + ORGetKeySecurity(handle.into_param().abi(), securityinformation, psecuritydescriptor, lpcbsecuritydescriptor).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORGetValue(handle: P0, lpsubkey: P1, lpvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORGetValue(handle: P0, lpsubkey: P1, lpvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORGetValue(handle : ORHKEY, lpsubkey : ::windows_core::PCWSTR, lpvalue : ::windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetValue(handle.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + ORGetValue(handle.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { +pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORGetVersion(pdwmajorversion : *mut u32, pdwminorversion : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetVersion(pdwmajorversion, pdwminorversion) + ORGetVersion(pdwmajorversion, pdwminorversion).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORGetVirtualFlags(handle: P0, pdwflags: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORGetVirtualFlags(handle: P0, pdwflags: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORGetVirtualFlags(handle : ORHKEY, pdwflags : *mut u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORGetVirtualFlags(handle.into_param().abi(), pdwflags) + ORGetVirtualFlags(handle.into_param().abi(), pdwflags).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORMergeHives(hivehandles: &[ORHKEY], phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR { +pub unsafe fn ORMergeHives(hivehandles: &[ORHKEY], phkresult: *mut ORHKEY) -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORMergeHives(hivehandles : *const ORHKEY, hivecount : u32, phkresult : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORMergeHives(::core::mem::transmute(hivehandles.as_ptr()), hivehandles.len() as _, phkresult) + ORMergeHives(::core::mem::transmute(hivehandles.as_ptr()), hivehandles.len() as _, phkresult).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OROpenHive(filepath: P0, horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OROpenHive(filepath: P0, horkey: *mut ORHKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn OROpenHive(filepath : ::windows_core::PCWSTR, horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OROpenHive(filepath.into_param().abi(), horkey) + OROpenHive(filepath.into_param().abi(), horkey).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OROpenHiveByHandle(filehandle: P0, horkey: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OROpenHiveByHandle(filehandle: P0, horkey: *mut ORHKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn OROpenHiveByHandle(filehandle : super::super::super::Win32::Foundation:: HANDLE, horkey : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OROpenHiveByHandle(filehandle.into_param().abi(), horkey) + OROpenHiveByHandle(filehandle.into_param().abi(), horkey).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OROpenKey(handle: P0, lpsubkey: P1, phkresult: *mut ORHKEY) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn OROpenKey(handle: P0, lpsubkey: P1, phkresult: *mut ORHKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn OROpenKey(handle : ORHKEY, lpsubkey : ::windows_core::PCWSTR, phkresult : *mut ORHKEY) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - OROpenKey(handle.into_param().abi(), lpsubkey.into_param().abi(), phkresult) + OROpenKey(handle.into_param().abi(), lpsubkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORQueryInfoKey(handle: P0, lpclass: ::windows_core::PWSTR, lpcclass: ::core::option::Option<*mut u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcmaxsubkeylen: ::core::option::Option<*mut u32>, lpcmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORQueryInfoKey(handle: P0, lpclass: ::windows_core::PWSTR, lpcclass: ::core::option::Option<*mut u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcmaxsubkeylen: ::core::option::Option<*mut u32>, lpcmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::super::Win32::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -178,74 +178,75 @@ where ::core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORRenameKey(handle: P0, lpnewname: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORRenameKey(handle: P0, lpnewname: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORRenameKey(handle : ORHKEY, lpnewname : ::windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORRenameKey(handle.into_param().abi(), lpnewname.into_param().abi()) + ORRenameKey(handle.into_param().abi(), lpnewname.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORSaveHive(horkey: P0, hivepath: P1, osmajorversion: u32, osminorversion: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSaveHive(horkey: P0, hivepath: P1, osmajorversion: u32, osminorversion: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORSaveHive(horkey : ORHKEY, hivepath : ::windows_core::PCWSTR, osmajorversion : u32, osminorversion : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSaveHive(horkey.into_param().abi(), hivepath.into_param().abi(), osmajorversion, osminorversion) + ORSaveHive(horkey.into_param().abi(), hivepath.into_param().abi(), osmajorversion, osminorversion).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ORSetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSetKeySecurity(handle: P0, securityinformation: u32, psecuritydescriptor: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORSetKeySecurity(handle : ORHKEY, securityinformation : u32, psecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetKeySecurity(handle.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()) + ORSetKeySecurity(handle.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORSetValue(handle: P0, lpvaluename: P1, dwtype: u32, lpdata: ::core::option::Option<&[u8]>) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSetValue(handle: P0, lpvaluename: P1, dwtype: u32, lpdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("offreg.dll" "system" fn ORSetValue(handle : ORHKEY, lpvaluename : ::windows_core::PCWSTR, dwtype : u32, lpdata : *const u8, cbdata : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetValue(handle.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)) + ORSetValue(handle.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORSetVirtualFlags(handle: P0, dwflags: u32) -> super::super::super::Win32::Foundation::WIN32_ERROR +pub unsafe fn ORSetVirtualFlags(handle: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("offreg.dll" "system" fn ORSetVirtualFlags(handle : ORHKEY, dwflags : u32) -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORSetVirtualFlags(handle.into_param().abi(), dwflags) + ORSetVirtualFlags(handle.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORShutdown() -> super::super::super::Win32::Foundation::WIN32_ERROR { +pub unsafe fn ORShutdown() -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORShutdown() -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORShutdown() + ORShutdown().ok() } #[doc = "*Required features: `\"Wdk_System_OfflineRegistry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ORStart() -> super::super::super::Win32::Foundation::WIN32_ERROR { +pub unsafe fn ORStart() -> ::windows_core::Result<()> { ::windows_targets::link!("offreg.dll" "system" fn ORStart() -> super::super::super::Win32::Foundation:: WIN32_ERROR); - ORStart() + ORStart().ok() } #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq)] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs index affe5fe89d..eacf5401a0 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs @@ -12,12 +12,12 @@ where #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllJoynCloseBusHandle(bushandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn AllJoynCloseBusHandle(bushandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("msajapi.dll" "system" fn AllJoynCloseBusHandle(bushandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AllJoynCloseBusHandle(bushandle.into_param().abi()) + AllJoynCloseBusHandle(bushandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -40,44 +40,44 @@ pub unsafe fn AllJoynCreateBus(outbuffersize: u32, inbuffersize: u32, lpsecurity #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllJoynEnumEvents(connectedbushandle: P0, eventtoreset: P1, eventtypes: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn AllJoynEnumEvents(connectedbushandle: P0, eventtoreset: P1, eventtypes: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("msajapi.dll" "system" fn AllJoynEnumEvents(connectedbushandle : super::super::Foundation:: HANDLE, eventtoreset : super::super::Foundation:: HANDLE, eventtypes : *mut u32) -> super::super::Foundation:: BOOL); - AllJoynEnumEvents(connectedbushandle.into_param().abi(), eventtoreset.into_param().abi(), eventtypes) + AllJoynEnumEvents(connectedbushandle.into_param().abi(), eventtoreset.into_param().abi(), eventtypes).ok() } #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllJoynEventSelect(connectedbushandle: P0, eventhandle: P1, eventtypes: u32) -> super::super::Foundation::BOOL +pub unsafe fn AllJoynEventSelect(connectedbushandle: P0, eventhandle: P1, eventtypes: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("msajapi.dll" "system" fn AllJoynEventSelect(connectedbushandle : super::super::Foundation:: HANDLE, eventhandle : super::super::Foundation:: HANDLE, eventtypes : u32) -> super::super::Foundation:: BOOL); - AllJoynEventSelect(connectedbushandle.into_param().abi(), eventhandle.into_param().abi(), eventtypes) + AllJoynEventSelect(connectedbushandle.into_param().abi(), eventhandle.into_param().abi(), eventtypes).ok() } #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllJoynReceiveFromBus(connectedbushandle: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, bytestoread: u32, bytestransferred: ::core::option::Option<*mut u32>, reserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn AllJoynReceiveFromBus(connectedbushandle: P0, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, bytestoread: u32, bytestransferred: ::core::option::Option<*mut u32>, reserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("msajapi.dll" "system" fn AllJoynReceiveFromBus(connectedbushandle : super::super::Foundation:: HANDLE, buffer : *mut ::core::ffi::c_void, bytestoread : u32, bytestransferred : *mut u32, reserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AllJoynReceiveFromBus(connectedbushandle.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), bytestoread, ::core::mem::transmute(bytestransferred.unwrap_or(::std::ptr::null_mut())), reserved) + AllJoynReceiveFromBus(connectedbushandle.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), bytestoread, ::core::mem::transmute(bytestransferred.unwrap_or(::std::ptr::null_mut())), reserved).ok() } #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllJoynSendToBus(connectedbushandle: P0, buffer: ::core::option::Option<*const ::core::ffi::c_void>, bytestowrite: u32, bytestransferred: ::core::option::Option<*mut u32>, reserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn AllJoynSendToBus(connectedbushandle: P0, buffer: ::core::option::Option<*const ::core::ffi::c_void>, bytestowrite: u32, bytestransferred: ::core::option::Option<*mut u32>, reserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("msajapi.dll" "system" fn AllJoynSendToBus(connectedbushandle : super::super::Foundation:: HANDLE, buffer : *const ::core::ffi::c_void, bytestowrite : u32, bytestransferred : *mut u32, reserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AllJoynSendToBus(connectedbushandle.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null())), bytestowrite, ::core::mem::transmute(bytestransferred.unwrap_or(::std::ptr::null_mut())), reserved) + AllJoynSendToBus(connectedbushandle.into_param().abi(), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null())), bytestowrite, ::core::mem::transmute(bytestransferred.unwrap_or(::std::ptr::null_mut())), reserved).ok() } #[doc = "*Required features: `\"Win32_Devices_AllJoyn\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs index 0cdd278846..28646c845a 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -34,12 +34,12 @@ where #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothDisplayDeviceProperties(hwndparent: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothDisplayDeviceProperties(hwndparent: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bthprops.cpl" "system" fn BluetoothDisplayDeviceProperties(hwndparent : super::super::Foundation:: HWND, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation:: BOOL); - BluetoothDisplayDeviceProperties(hwndparent.into_param().abi(), pbtdi) + BluetoothDisplayDeviceProperties(hwndparent.into_param().abi(), pbtdi).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -76,12 +76,12 @@ where #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothFindDeviceClose(hfind: P0) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothFindDeviceClose(hfind: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindDeviceClose(hfind : HBLUETOOTH_DEVICE_FIND) -> super::super::Foundation:: BOOL); - BluetoothFindDeviceClose(hfind.into_param().abi()) + BluetoothFindDeviceClose(hfind.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -102,32 +102,32 @@ pub unsafe fn BluetoothFindFirstRadio(pbtfrp: *const BLUETOOTH_FIND_RADIO_PARAMS #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothFindNextDevice(hfind: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothFindNextDevice(hfind: P0, pbtdi: *mut BLUETOOTH_DEVICE_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindNextDevice(hfind : HBLUETOOTH_DEVICE_FIND, pbtdi : *mut BLUETOOTH_DEVICE_INFO) -> super::super::Foundation:: BOOL); - BluetoothFindNextDevice(hfind.into_param().abi(), pbtdi) + BluetoothFindNextDevice(hfind.into_param().abi(), pbtdi).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothFindNextRadio(hfind: P0, phradio: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothFindNextRadio(hfind: P0, phradio: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindNextRadio(hfind : HBLUETOOTH_RADIO_FIND, phradio : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - BluetoothFindNextRadio(hfind.into_param().abi(), phradio) + BluetoothFindNextRadio(hfind.into_param().abi(), phradio).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothFindRadioClose(hfind: P0) -> super::super::Foundation::BOOL +pub unsafe fn BluetoothFindRadioClose(hfind: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothFindRadioClose(hfind : HBLUETOOTH_RADIO_FIND) -> super::super::Foundation:: BOOL); - BluetoothFindRadioClose(hfind.into_param().abi()) + BluetoothFindRadioClose(hfind.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -325,9 +325,9 @@ pub unsafe fn BluetoothRemoveDevice(paddress: *const BLUETOOTH_ADDRESS) -> u32 { #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothSdpEnumAttributes(psdpstream: &[u8], pfncallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, pvparam: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn BluetoothSdpEnumAttributes(psdpstream: &[u8], pfncallback: PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, pvparam: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpEnumAttributes(psdpstream : *const u8, cbstreamsize : u32, pfncallback : PFN_BLUETOOTH_ENUM_ATTRIBUTES_CALLBACK, pvparam : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BluetoothSdpEnumAttributes(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len() as _, pfncallback, pvparam) + BluetoothSdpEnumAttributes(::core::mem::transmute(psdpstream.as_ptr()), psdpstream.len() as _, pfncallback, pvparam).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`*"] #[inline] @@ -356,9 +356,9 @@ pub unsafe fn BluetoothSdpGetString(precordstream: &[u8], pstringdata: ::core::o #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothSelectDevices(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> super::super::Foundation::BOOL { +pub unsafe fn BluetoothSelectDevices(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> ::windows_core::Result<()> { ::windows_targets::link!("bthprops.cpl" "system" fn BluetoothSelectDevices(pbtsdp : *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> super::super::Foundation:: BOOL); - BluetoothSelectDevices(pbtsdp) + BluetoothSelectDevices(pbtsdp).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -411,9 +411,9 @@ where #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BluetoothUnregisterAuthentication(hreghandle: isize) -> super::super::Foundation::BOOL { +pub unsafe fn BluetoothUnregisterAuthentication(hreghandle: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothUnregisterAuthentication(hreghandle : isize) -> super::super::Foundation:: BOOL); - BluetoothUnregisterAuthentication(hreghandle) + BluetoothUnregisterAuthentication(hreghandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Bluetooth\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs index de803db8b5..3930063a36 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs @@ -1,124 +1,124 @@ #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildCommDCBA(lpdef: P0, lpdcb: *mut DCB) -> super::super::Foundation::BOOL +pub unsafe fn BuildCommDCBA(lpdef: P0, lpdcb: *mut DCB) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBA(lpdef : ::windows_core::PCSTR, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - BuildCommDCBA(lpdef.into_param().abi(), lpdcb) + BuildCommDCBA(lpdef.into_param().abi(), lpdcb).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildCommDCBAndTimeoutsA(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL +pub unsafe fn BuildCommDCBAndTimeoutsA(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBAndTimeoutsA(lpdef : ::windows_core::PCSTR, lpdcb : *mut DCB, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - BuildCommDCBAndTimeoutsA(lpdef.into_param().abi(), lpdcb, lpcommtimeouts) + BuildCommDCBAndTimeoutsA(lpdef.into_param().abi(), lpdcb, lpcommtimeouts).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildCommDCBAndTimeoutsW(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL +pub unsafe fn BuildCommDCBAndTimeoutsW(lpdef: P0, lpdcb: *mut DCB, lpcommtimeouts: *mut COMMTIMEOUTS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBAndTimeoutsW(lpdef : ::windows_core::PCWSTR, lpdcb : *mut DCB, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - BuildCommDCBAndTimeoutsW(lpdef.into_param().abi(), lpdcb, lpcommtimeouts) + BuildCommDCBAndTimeoutsW(lpdef.into_param().abi(), lpdcb, lpcommtimeouts).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildCommDCBW(lpdef: P0, lpdcb: *mut DCB) -> super::super::Foundation::BOOL +pub unsafe fn BuildCommDCBW(lpdef: P0, lpdcb: *mut DCB) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn BuildCommDCBW(lpdef : ::windows_core::PCWSTR, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - BuildCommDCBW(lpdef.into_param().abi(), lpdcb) + BuildCommDCBW(lpdef.into_param().abi(), lpdcb).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClearCommBreak(hfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn ClearCommBreak(hfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ClearCommBreak(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ClearCommBreak(hfile.into_param().abi()) + ClearCommBreak(hfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClearCommError(hfile: P0, lperrors: ::core::option::Option<*mut CLEAR_COMM_ERROR_FLAGS>, lpstat: ::core::option::Option<*mut COMSTAT>) -> super::super::Foundation::BOOL +pub unsafe fn ClearCommError(hfile: P0, lperrors: ::core::option::Option<*mut CLEAR_COMM_ERROR_FLAGS>, lpstat: ::core::option::Option<*mut COMSTAT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ClearCommError(hfile : super::super::Foundation:: HANDLE, lperrors : *mut CLEAR_COMM_ERROR_FLAGS, lpstat : *mut COMSTAT) -> super::super::Foundation:: BOOL); - ClearCommError(hfile.into_param().abi(), ::core::mem::transmute(lperrors.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpstat.unwrap_or(::std::ptr::null_mut()))) + ClearCommError(hfile.into_param().abi(), ::core::mem::transmute(lperrors.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpstat.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> super::super::Foundation::BOOL +pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CommConfigDialogA(lpszname : ::windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, lpcc : *mut COMMCONFIG) -> super::super::Foundation:: BOOL); - CommConfigDialogA(lpszname.into_param().abi(), hwnd.into_param().abi(), lpcc) + CommConfigDialogA(lpszname.into_param().abi(), hwnd.into_param().abi(), lpcc).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommConfigDialogW(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> super::super::Foundation::BOOL +pub unsafe fn CommConfigDialogW(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CommConfigDialogW(lpszname : ::windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, lpcc : *mut COMMCONFIG) -> super::super::Foundation:: BOOL); - CommConfigDialogW(lpszname.into_param().abi(), hwnd.into_param().abi(), lpcc) + CommConfigDialogW(lpszname.into_param().abi(), hwnd.into_param().abi(), lpcc).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EscapeCommFunction(hfile: P0, dwfunc: ESCAPE_COMM_FUNCTION) -> super::super::Foundation::BOOL +pub unsafe fn EscapeCommFunction(hfile: P0, dwfunc: ESCAPE_COMM_FUNCTION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EscapeCommFunction(hfile : super::super::Foundation:: HANDLE, dwfunc : ESCAPE_COMM_FUNCTION) -> super::super::Foundation:: BOOL); - EscapeCommFunction(hfile.into_param().abi(), dwfunc) + EscapeCommFunction(hfile.into_param().abi(), dwfunc).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommConfig(hcommdev: P0, lpcc: ::core::option::Option<*mut COMMCONFIG>, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetCommConfig(hcommdev: P0, lpcc: ::core::option::Option<*mut COMMCONFIG>, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommConfig(hcommdev : super::super::Foundation:: HANDLE, lpcc : *mut COMMCONFIG, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - GetCommConfig(hcommdev.into_param().abi(), ::core::mem::transmute(lpcc.unwrap_or(::std::ptr::null_mut())), lpdwsize) + GetCommConfig(hcommdev.into_param().abi(), ::core::mem::transmute(lpcc.unwrap_or(::std::ptr::null_mut())), lpdwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommMask(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK) -> super::super::Foundation::BOOL +pub unsafe fn GetCommMask(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommMask(hfile : super::super::Foundation:: HANDLE, lpevtmask : *mut COMM_EVENT_MASK) -> super::super::Foundation:: BOOL); - GetCommMask(hfile.into_param().abi(), lpevtmask) + GetCommMask(hfile.into_param().abi(), lpevtmask).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommModemStatus(hfile: P0, lpmodemstat: *mut MODEM_STATUS_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn GetCommModemStatus(hfile: P0, lpmodemstat: *mut MODEM_STATUS_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommModemStatus(hfile : super::super::Foundation:: HANDLE, lpmodemstat : *mut MODEM_STATUS_FLAGS) -> super::super::Foundation:: BOOL); - GetCommModemStatus(hfile.into_param().abi(), lpmodemstat) + GetCommModemStatus(hfile.into_param().abi(), lpmodemstat).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`*"] #[inline] @@ -129,52 +129,52 @@ pub unsafe fn GetCommPorts(lpportnumbers: &mut [u32], puportnumbersfound: *mut u #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommProperties(hfile: P0, lpcommprop: *mut COMMPROP) -> super::super::Foundation::BOOL +pub unsafe fn GetCommProperties(hfile: P0, lpcommprop: *mut COMMPROP) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommProperties(hfile : super::super::Foundation:: HANDLE, lpcommprop : *mut COMMPROP) -> super::super::Foundation:: BOOL); - GetCommProperties(hfile.into_param().abi(), lpcommprop) + GetCommProperties(hfile.into_param().abi(), lpcommprop).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommState(hfile: P0, lpdcb: *mut DCB) -> super::super::Foundation::BOOL +pub unsafe fn GetCommState(hfile: P0, lpdcb: *mut DCB) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommState(hfile : super::super::Foundation:: HANDLE, lpdcb : *mut DCB) -> super::super::Foundation:: BOOL); - GetCommState(hfile.into_param().abi(), lpdcb) + GetCommState(hfile.into_param().abi(), lpdcb).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCommTimeouts(hfile: P0, lpcommtimeouts: *mut COMMTIMEOUTS) -> super::super::Foundation::BOOL +pub unsafe fn GetCommTimeouts(hfile: P0, lpcommtimeouts: *mut COMMTIMEOUTS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCommTimeouts(hfile : super::super::Foundation:: HANDLE, lpcommtimeouts : *mut COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - GetCommTimeouts(hfile.into_param().abi(), lpcommtimeouts) + GetCommTimeouts(hfile.into_param().abi(), lpcommtimeouts).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDefaultCommConfigA(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetDefaultCommConfigA(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDefaultCommConfigA(lpszname : ::windows_core::PCSTR, lpcc : *mut COMMCONFIG, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultCommConfigA(lpszname.into_param().abi(), lpcc, lpdwsize) + GetDefaultCommConfigA(lpszname.into_param().abi(), lpcc, lpdwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDefaultCommConfigW(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetDefaultCommConfigW(lpszname: P0, lpcc: *mut COMMCONFIG, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDefaultCommConfigW(lpszname : ::windows_core::PCWSTR, lpcc : *mut COMMCONFIG, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultCommConfigW(lpszname.into_param().abi(), lpcc, lpdwsize) + GetDefaultCommConfigW(lpszname.into_param().abi(), lpcc, lpdwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -186,112 +186,112 @@ pub unsafe fn OpenCommPort(uportnumber: u32, dwdesiredaccess: u32, dwflagsandatt #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PurgeComm(hfile: P0, dwflags: PURGE_COMM_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn PurgeComm(hfile: P0, dwflags: PURGE_COMM_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PurgeComm(hfile : super::super::Foundation:: HANDLE, dwflags : PURGE_COMM_FLAGS) -> super::super::Foundation:: BOOL); - PurgeComm(hfile.into_param().abi(), dwflags) + PurgeComm(hfile.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCommBreak(hfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetCommBreak(hfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCommBreak(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetCommBreak(hfile.into_param().abi()) + SetCommBreak(hfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCommConfig(hcommdev: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetCommConfig(hcommdev: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCommConfig(hcommdev : super::super::Foundation:: HANDLE, lpcc : *const COMMCONFIG, dwsize : u32) -> super::super::Foundation:: BOOL); - SetCommConfig(hcommdev.into_param().abi(), lpcc, dwsize) + SetCommConfig(hcommdev.into_param().abi(), lpcc, dwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCommMask(hfile: P0, dwevtmask: COMM_EVENT_MASK) -> super::super::Foundation::BOOL +pub unsafe fn SetCommMask(hfile: P0, dwevtmask: COMM_EVENT_MASK) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCommMask(hfile : super::super::Foundation:: HANDLE, dwevtmask : COMM_EVENT_MASK) -> super::super::Foundation:: BOOL); - SetCommMask(hfile.into_param().abi(), dwevtmask) + SetCommMask(hfile.into_param().abi(), dwevtmask).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCommState(hfile: P0, lpdcb: *const DCB) -> super::super::Foundation::BOOL +pub unsafe fn SetCommState(hfile: P0, lpdcb: *const DCB) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCommState(hfile : super::super::Foundation:: HANDLE, lpdcb : *const DCB) -> super::super::Foundation:: BOOL); - SetCommState(hfile.into_param().abi(), lpdcb) + SetCommState(hfile.into_param().abi(), lpdcb).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCommTimeouts(hfile: P0, lpcommtimeouts: *const COMMTIMEOUTS) -> super::super::Foundation::BOOL +pub unsafe fn SetCommTimeouts(hfile: P0, lpcommtimeouts: *const COMMTIMEOUTS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCommTimeouts(hfile : super::super::Foundation:: HANDLE, lpcommtimeouts : *const COMMTIMEOUTS) -> super::super::Foundation:: BOOL); - SetCommTimeouts(hfile.into_param().abi(), lpcommtimeouts) + SetCommTimeouts(hfile.into_param().abi(), lpcommtimeouts).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDefaultCommConfigA(lpszname: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetDefaultCommConfigA(lpszname: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetDefaultCommConfigA(lpszname : ::windows_core::PCSTR, lpcc : *const COMMCONFIG, dwsize : u32) -> super::super::Foundation:: BOOL); - SetDefaultCommConfigA(lpszname.into_param().abi(), lpcc, dwsize) + SetDefaultCommConfigA(lpszname.into_param().abi(), lpcc, dwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDefaultCommConfigW(lpszname: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetDefaultCommConfigW(lpszname: P0, lpcc: *const COMMCONFIG, dwsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetDefaultCommConfigW(lpszname : ::windows_core::PCWSTR, lpcc : *const COMMCONFIG, dwsize : u32) -> super::super::Foundation:: BOOL); - SetDefaultCommConfigW(lpszname.into_param().abi(), lpcc, dwsize) + SetDefaultCommConfigW(lpszname.into_param().abi(), lpcc, dwsize).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupComm(hfile: P0, dwinqueue: u32, dwoutqueue: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupComm(hfile: P0, dwinqueue: u32, dwoutqueue: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetupComm(hfile : super::super::Foundation:: HANDLE, dwinqueue : u32, dwoutqueue : u32) -> super::super::Foundation:: BOOL); - SetupComm(hfile.into_param().abi(), dwinqueue, dwoutqueue) + SetupComm(hfile.into_param().abi(), dwinqueue, dwoutqueue).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TransmitCommChar(hfile: P0, cchar: u8) -> super::super::Foundation::BOOL +pub unsafe fn TransmitCommChar(hfile: P0, cchar: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn TransmitCommChar(hfile : super::super::Foundation:: HANDLE, cchar : u8) -> super::super::Foundation:: BOOL); - TransmitCommChar(hfile.into_param().abi(), cchar) + TransmitCommChar(hfile.into_param().abi(), cchar).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WaitCommEvent(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WaitCommEvent(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitCommEvent(hfile : super::super::Foundation:: HANDLE, lpevtmask : *mut COMM_EVENT_MASK, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WaitCommEvent(hfile.into_param().abi(), lpevtmask, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + WaitCommEvent(hfile.into_param().abi(), lpevtmask, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Communication\"`*"] pub const MAXLENGTH_NAI: u32 = 72u32; diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs index fadb008acf..ef16b26cba 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -1637,57 +1637,57 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiInstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, driverinfodata: ::core::option::Option<*const SP_DRVINFO_DATA_V2_W>, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiInstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, driverinfodata: ::core::option::Option<*const SP_DRVINFO_DATA_V2_W>, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("newdev.dll" "system" fn DiInstallDevice(hwndparent : super::super::Foundation:: HWND, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_W, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null())), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiInstallDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null())), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiInstallDriverA(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiInstallDriverA(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("newdev.dll" "system" fn DiInstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : ::windows_core::PCSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDriverA(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiInstallDriverA(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiInstallDriverW(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiInstallDriverW(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("newdev.dll" "system" fn DiInstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : ::windows_core::PCWSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDriverW(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiInstallDriverW(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiRollbackDriver(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, hwndparent: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiRollbackDriver(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, hwndparent: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("newdev.dll" "system" fn DiRollbackDriver(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, hwndparent : super::super::Foundation:: HWND, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiRollbackDriver(deviceinfoset.into_param().abi(), deviceinfodata, hwndparent.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiRollbackDriver(deviceinfoset.into_param().abi(), deviceinfodata, hwndparent.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiShowUpdateDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiShowUpdateDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("newdev.dll" "system" fn DiShowUpdateDevice(hwndparent : super::super::Foundation:: HWND, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiShowUpdateDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiShowUpdateDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1703,35 +1703,35 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiUninstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiUninstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("newdev.dll" "system" fn DiUninstallDevice(hwndparent : super::super::Foundation:: HWND, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiUninstallDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiUninstallDevice(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), deviceinfodata, flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiUninstallDriverA(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiUninstallDriverA(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : ::windows_core::PCSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiUninstallDriverA(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiUninstallDriverA(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DiUninstallDriverW(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn DiUninstallDriverW(hwndparent: P0, infpath: P1, flags: u32, needreboot: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : ::windows_core::PCWSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiUninstallDriverW(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))) + DiUninstallDriverW(hwndparent.into_param().abi(), infpath.into_param().abi(), flags, ::core::mem::transmute(needreboot.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1760,102 +1760,102 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddInstallSectionToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddInstallSectionToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddInstallSectionToDiskSpaceListA(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddInstallSectionToDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddInstallSectionToDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddInstallSectionToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddInstallSectionToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddInstallSectionToDiskSpaceListW(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddInstallSectionToDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddInstallSectionToDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddSectionToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddSectionToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddSectionToDiskSpaceListA(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddSectionToDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddSectionToDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddSectionToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddSectionToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddSectionToDiskSpaceListW(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddSectionToDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddSectionToDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddToDiskSpaceListA(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddToDiskSpaceListA(diskspace : *const ::core::ffi::c_void, targetfilespec : ::windows_core::PCSTR, filesize : i64, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddToDiskSpaceListA(diskspace, targetfilespec.into_param().abi(), filesize, operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddToDiskSpaceListA(diskspace, targetfilespec.into_param().abi(), filesize, operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddToDiskSpaceListW(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddToDiskSpaceListW(diskspace : *const ::core::ffi::c_void, targetfilespec : ::windows_core::PCWSTR, filesize : i64, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAddToDiskSpaceListW(diskspace, targetfilespec.into_param().abi(), filesize, operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAddToDiskSpaceListW(diskspace, targetfilespec.into_param().abi(), filesize, operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddToSourceListA(flags: u32, source: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddToSourceListA(flags: u32, source: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddToSourceListA(flags : u32, source : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupAddToSourceListA(flags, source.into_param().abi()) + SetupAddToSourceListA(flags, source.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAddToSourceListW(flags: u32, source: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupAddToSourceListW(flags: u32, source: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAddToSourceListW(flags : u32, source : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupAddToSourceListW(flags, source.into_param().abi()) + SetupAddToSourceListW(flags, source.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAdjustDiskSpaceListA(diskspace: *const ::core::ffi::c_void, driveroot: P0, amount: i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAdjustDiskSpaceListA(diskspace: *const ::core::ffi::c_void, driveroot: P0, amount: i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAdjustDiskSpaceListA(diskspace : *const ::core::ffi::c_void, driveroot : ::windows_core::PCSTR, amount : i64, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAdjustDiskSpaceListA(diskspace, driveroot.into_param().abi(), amount, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAdjustDiskSpaceListA(diskspace, driveroot.into_param().abi(), amount, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupAdjustDiskSpaceListW(diskspace: *const ::core::ffi::c_void, driveroot: P0, amount: i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupAdjustDiskSpaceListW(diskspace: *const ::core::ffi::c_void, driveroot: P0, amount: i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupAdjustDiskSpaceListW(diskspace : *const ::core::ffi::c_void, driveroot : ::windows_core::PCWSTR, amount : i64, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupAdjustDiskSpaceListW(diskspace, driveroot.into_param().abi(), amount, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupAdjustDiskSpaceListW(diskspace, driveroot.into_param().abi(), amount, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1886,9 +1886,9 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupCancelTemporarySourceList() -> super::super::Foundation::BOOL { +pub unsafe fn SetupCancelTemporarySourceList() -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupCancelTemporarySourceList() -> super::super::Foundation:: BOOL); - SetupCancelTemporarySourceList() + SetupCancelTemporarySourceList().ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1912,22 +1912,22 @@ pub unsafe fn SetupCloseLog() { #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupCommitFileQueueA(owner: P0, queuehandle: *const ::core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_A, context: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetupCommitFileQueueA(owner: P0, queuehandle: *const ::core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_A, context: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCommitFileQueueA(owner : super::super::Foundation:: HWND, queuehandle : *const ::core::ffi::c_void, msghandler : PSP_FILE_CALLBACK_A, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupCommitFileQueueA(owner.into_param().abi(), queuehandle, msghandler, context) + SetupCommitFileQueueA(owner.into_param().abi(), queuehandle, msghandler, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupCommitFileQueueW(owner: P0, queuehandle: *const ::core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_W, context: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetupCommitFileQueueW(owner: P0, queuehandle: *const ::core::ffi::c_void, msghandler: PSP_FILE_CALLBACK_W, context: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCommitFileQueueW(owner : super::super::Foundation:: HWND, queuehandle : *const ::core::ffi::c_void, msghandler : PSP_FILE_CALLBACK_W, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupCommitFileQueueW(owner.into_param().abi(), queuehandle, msghandler, context) + SetupCommitFileQueueW(owner.into_param().abi(), queuehandle, msghandler, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1982,24 +1982,24 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupCopyOEMInfA(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: u32, destinationinffilename: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, destinationinffilenamecomponent: ::core::option::Option<*mut ::windows_core::PSTR>) -> super::super::Foundation::BOOL +pub unsafe fn SetupCopyOEMInfA(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: u32, destinationinffilename: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, destinationinffilenamecomponent: ::core::option::Option<*mut ::windows_core::PSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfA(sourceinffilename : ::windows_core::PCSTR, oemsourcemedialocation : ::windows_core::PCSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : u32, destinationinffilename : ::windows_core::PSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfA(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))) + SetupCopyOEMInfA(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupCopyOEMInfW(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: u32, destinationinffilename: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, destinationinffilenamecomponent: ::core::option::Option<*mut ::windows_core::PWSTR>) -> super::super::Foundation::BOOL +pub unsafe fn SetupCopyOEMInfW(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: u32, destinationinffilename: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, destinationinffilenamecomponent: ::core::option::Option<*mut ::windows_core::PWSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfW(sourceinffilename : ::windows_core::PCWSTR, oemsourcemedialocation : ::windows_core::PCWSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : u32, destinationinffilename : ::windows_core::PWSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfW(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))) + SetupCopyOEMInfW(sourceinffilename.into_param().abi(), oemsourcemedialocation.into_param().abi(), oemsourcemediatype, copystyle, ::core::mem::transmute(destinationinffilename.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), destinationinffilename.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(destinationinffilenamecomponent.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -2072,162 +2072,162 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDestroyDiskSpaceList(diskspace: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDestroyDiskSpaceList(diskspace: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDestroyDiskSpaceList(diskspace : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDestroyDiskSpaceList(diskspace) + SetupDestroyDiskSpaceList(diskspace).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiAskForOEMDisk(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiAskForOEMDisk(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiAskForOEMDisk(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiAskForOEMDisk(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))) + SetupDiAskForOEMDisk(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoList(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoList(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize) + SetupDiBuildClassInfoList(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiBuildClassInfoListExA(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiBuildClassInfoListExA(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoListExA(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoListExA(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiBuildClassInfoListExA(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiBuildClassInfoListExW(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiBuildClassInfoListExW(flags: u32, classguidlist: ::core::option::Option<&mut [::windows_core::GUID]>, requiredsize: *mut u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildClassInfoListExW(flags : u32, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiBuildClassInfoListExW(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiBuildClassInfoListExW(flags, ::core::mem::transmute(classguidlist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), classguidlist.as_deref().map_or(0, |slice| slice.len() as _), requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiBuildDriverInfoList(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, drivertype: SETUP_DI_BUILD_DRIVER_DRIVER_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiBuildDriverInfoList(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, drivertype: SETUP_DI_BUILD_DRIVER_DRIVER_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildDriverInfoList(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, drivertype : SETUP_DI_BUILD_DRIVER_DRIVER_TYPE) -> super::super::Foundation:: BOOL); - SetupDiBuildDriverInfoList(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), drivertype) + SetupDiBuildDriverInfoList(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), drivertype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCallClassInstaller(installfunction: u32, deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCallClassInstaller(installfunction: u32, deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCallClassInstaller(installfunction : u32, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCallClassInstaller(installfunction, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))) + SetupDiCallClassInstaller(installfunction, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCancelDriverInfoSearch(deviceinfoset : HDEVINFO) -> super::super::Foundation:: BOOL); - SetupDiCancelDriverInfoSearch(deviceinfoset.into_param().abi()) + SetupDiCancelDriverInfoSearch(deviceinfoset.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiChangeState(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiChangeState(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiChangeState(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiChangeState(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiChangeState(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassGuidsFromNameA(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassGuidsFromNameA(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameA(classname : ::windows_core::PCSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize) + SetupDiClassGuidsFromNameA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassGuidsFromNameExA(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32, machinename: P1, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassGuidsFromNameExA(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32, machinename: P1, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameExA(classname : ::windows_core::PCSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameExA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiClassGuidsFromNameExA(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassGuidsFromNameExW(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32, machinename: P1, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassGuidsFromNameExW(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32, machinename: P1, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameExW(classname : ::windows_core::PCWSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameExW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiClassGuidsFromNameExW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassGuidsFromNameW(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassGuidsFromNameW(classname: P0, classguidlist: &mut [::windows_core::GUID], requiredsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassGuidsFromNameW(classname : ::windows_core::PCWSTR, classguidlist : *mut ::windows_core::GUID, classguidlistsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassGuidsFromNameW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize) + SetupDiClassGuidsFromNameW(classname.into_param().abi(), ::core::mem::transmute(classguidlist.as_ptr()), classguidlist.len() as _, requiredsize).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassNameFromGuidA(classguid: *const ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiClassNameFromGuidA(classguid: *const ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidA(classguid : *const ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiClassNameFromGuidA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassNameFromGuidExA(classguid: *const ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassNameFromGuidExA(classguid: *const ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidExA(classguid : *const ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidExA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiClassNameFromGuidExA(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassNameFromGuidExW(classguid: *const ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiClassNameFromGuidExW(classguid: *const ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidExW(classguid : *const ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidExW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiClassNameFromGuidExW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiClassNameFromGuidW(classguid: *const ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiClassNameFromGuidW(classguid: *const ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiClassNameFromGuidW(classguid : *const ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiClassNameFromGuidW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiClassNameFromGuidW(classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -2256,7 +2256,7 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCreateDeviceInfoA(deviceinfoset: P0, devicename: P1, classguid: *const ::windows_core::GUID, devicedescription: P2, hwndparent: P3, creationflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCreateDeviceInfoA(deviceinfoset: P0, devicename: P1, classguid: *const ::windows_core::GUID, devicedescription: P2, hwndparent: P3, creationflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -2264,7 +2264,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoA(deviceinfoset : HDEVINFO, devicename : ::windows_core::PCSTR, classguid : *const ::windows_core::GUID, devicedescription : ::windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, creationflags : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInfoA(deviceinfoset.into_param().abi(), devicename.into_param().abi(), classguid, devicedescription.into_param().abi(), hwndparent.into_param().abi(), creationflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiCreateDeviceInfoA(deviceinfoset.into_param().abi(), devicename.into_param().abi(), classguid, devicedescription.into_param().abi(), hwndparent.into_param().abi(), creationflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2304,7 +2304,7 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCreateDeviceInfoW(deviceinfoset: P0, devicename: P1, classguid: *const ::windows_core::GUID, devicedescription: P2, hwndparent: P3, creationflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCreateDeviceInfoW(deviceinfoset: P0, devicename: P1, classguid: *const ::windows_core::GUID, devicedescription: P2, hwndparent: P3, creationflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -2312,18 +2312,18 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoW(deviceinfoset : HDEVINFO, devicename : ::windows_core::PCWSTR, classguid : *const ::windows_core::GUID, devicedescription : ::windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, creationflags : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInfoW(deviceinfoset.into_param().abi(), devicename.into_param().abi(), classguid, devicedescription.into_param().abi(), hwndparent.into_param().abi(), creationflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiCreateDeviceInfoW(deviceinfoset.into_param().abi(), devicename.into_param().abi(), classguid, devicedescription.into_param().abi(), hwndparent.into_param().abi(), creationflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const ::windows_core::GUID, referencestring: P1, creationflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCreateDeviceInterfaceA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const ::windows_core::GUID, referencestring: P1, creationflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInterfaceA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, interfaceclassguid : *const ::windows_core::GUID, referencestring : ::windows_core::PCSTR, creationflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInterfaceA(deviceinfoset.into_param().abi(), deviceinfodata, interfaceclassguid, referencestring.into_param().abi(), creationflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))) + SetupDiCreateDeviceInterfaceA(deviceinfoset.into_param().abi(), deviceinfodata, interfaceclassguid, referencestring.into_param().abi(), creationflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -2352,80 +2352,80 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiCreateDeviceInterfaceW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const ::windows_core::GUID, referencestring: P1, creationflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiCreateDeviceInterfaceW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const ::windows_core::GUID, referencestring: P1, creationflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInterfaceW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, interfaceclassguid : *const ::windows_core::GUID, referencestring : ::windows_core::PCWSTR, creationflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInterfaceW(deviceinfoset.into_param().abi(), deviceinfodata, interfaceclassguid, referencestring.into_param().abi(), creationflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))) + SetupDiCreateDeviceInterfaceW(deviceinfoset.into_param().abi(), deviceinfodata, interfaceclassguid, referencestring.into_param().abi(), creationflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDevRegKey(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, scope : u32, hwprofile : u32, keytype : u32) -> super::super::Foundation:: BOOL); - SetupDiDeleteDevRegKey(deviceinfoset.into_param().abi(), deviceinfodata, scope, hwprofile, keytype) + SetupDiDeleteDevRegKey(deviceinfoset.into_param().abi(), deviceinfodata, scope, hwprofile, keytype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDeleteDeviceInfo(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDeleteDeviceInfo(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInfo(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInfo(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiDeleteDeviceInfo(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDeleteDeviceInterfaceData(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDeleteDeviceInterfaceData(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInterfaceData(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInterfaceData(deviceinfoset.into_param().abi(), deviceinterfacedata) + SetupDiDeleteDeviceInterfaceData(deviceinfoset.into_param().abi(), deviceinterfacedata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, reserved : u32) -> super::super::Foundation:: BOOL); - SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset.into_param().abi(), deviceinterfacedata, reserved) + SetupDiDeleteDeviceInterfaceRegKey(deviceinfoset.into_param().abi(), deviceinterfacedata, reserved).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn SetupDiDestroyClassImageList(classimagelistdata: *const SP_CLASSIMAGELIST_DATA) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiDestroyClassImageList(classimagelistdata: *const SP_CLASSIMAGELIST_DATA) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDestroyClassImageList(classimagelistdata : *const SP_CLASSIMAGELIST_DATA) -> super::super::Foundation:: BOOL); - SetupDiDestroyClassImageList(classimagelistdata) + SetupDiDestroyClassImageList(classimagelistdata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDestroyDeviceInfoList(deviceinfoset: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDestroyDeviceInfoList(deviceinfoset: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDestroyDeviceInfoList(deviceinfoset : HDEVINFO) -> super::super::Foundation:: BOOL); - SetupDiDestroyDeviceInfoList(deviceinfoset.into_param().abi()) + SetupDiDestroyDeviceInfoList(deviceinfoset.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiDestroyDriverInfoList(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiDestroyDriverInfoList(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiDestroyDriverInfoList(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : u32) -> super::super::Foundation:: BOOL); - SetupDiDestroyDriverInfoList(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype) + SetupDiDestroyDriverInfoList(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -2440,71 +2440,71 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiEnumDeviceInfo(deviceinfoset: P0, memberindex: u32, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiEnumDeviceInfo(deviceinfoset: P0, memberindex: u32, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDeviceInfo(deviceinfoset : HDEVINFO, memberindex : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiEnumDeviceInfo(deviceinfoset.into_param().abi(), memberindex, deviceinfodata) + SetupDiEnumDeviceInfo(deviceinfoset.into_param().abi(), memberindex, deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiEnumDeviceInterfaces(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, interfaceclassguid: *const ::windows_core::GUID, memberindex: u32, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiEnumDeviceInterfaces(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, interfaceclassguid: *const ::windows_core::GUID, memberindex: u32, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDeviceInterfaces(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, interfaceclassguid : *const ::windows_core::GUID, memberindex : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiEnumDeviceInterfaces(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), interfaceclassguid, memberindex, deviceinterfacedata) + SetupDiEnumDeviceInterfaces(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), interfaceclassguid, memberindex, deviceinterfacedata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiEnumDriverInfoA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiEnumDriverInfoA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDriverInfoA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : u32, memberindex : u32, driverinfodata : *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation:: BOOL); - SetupDiEnumDriverInfoA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype, memberindex, driverinfodata) + SetupDiEnumDriverInfoA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype, memberindex, driverinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiEnumDriverInfoW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiEnumDriverInfoW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, drivertype: u32, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDriverInfoW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : u32, memberindex : u32, driverinfodata : *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation:: BOOL); - SetupDiEnumDriverInfoW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype, memberindex, driverinfodata) + SetupDiEnumDriverInfoW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), drivertype, memberindex, driverinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupDiGetActualModelsSectionA(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetActualModelsSectionA(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualModelsSectionA(context : *const INFCONTEXT, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : ::windows_core::PSTR, infsectionwithextsize : u32, requiredsize : *mut u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetActualModelsSectionA(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetActualModelsSectionA(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupDiGetActualModelsSectionW(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetActualModelsSectionW(context: *const INFCONTEXT, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualModelsSectionW(context : *const INFCONTEXT, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsectionwithext : ::windows_core::PWSTR, infsectionwithextsize : u32, requiredsize : *mut u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetActualModelsSectionW(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetActualModelsSectionW(context, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetActualSectionToInstallA(infhandle: *const ::core::ffi::c_void, infsectionname: P0, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PSTR>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetActualSectionToInstallA(infhandle: *const ::core::ffi::c_void, infsectionname: P0, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallA(infhandle : *const ::core::ffi::c_void, infsectionname : ::windows_core::PCSTR, infsectionwithext : ::windows_core::PSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - SetupDiGetActualSectionToInstallA(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetActualSectionToInstallA(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupDiGetActualSectionToInstallExA(infhandle: *const ::core::ffi::c_void, infsectionname: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PSTR>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetActualSectionToInstallExA(infhandle: *const ::core::ffi::c_void, infsectionname: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PSTR>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { @@ -2519,11 +2519,12 @@ where ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), ) + .ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupDiGetActualSectionToInstallExW(infhandle: *const ::core::ffi::c_void, infsectionname: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PWSTR>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetActualSectionToInstallExW(infhandle: *const ::core::ffi::c_void, infsectionname: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PWSTR>, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { @@ -2538,77 +2539,78 @@ where ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null())), ) + .ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetActualSectionToInstallW(infhandle: *const ::core::ffi::c_void, infsectionname: P0, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PWSTR>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetActualSectionToInstallW(infhandle: *const ::core::ffi::c_void, infsectionname: P0, infsectionwithext: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>, extension: ::core::option::Option<*mut ::windows_core::PWSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetActualSectionToInstallW(infhandle : *const ::core::ffi::c_void, infsectionname : ::windows_core::PCWSTR, infsectionwithext : ::windows_core::PWSTR, infsectionwithextsize : u32, requiredsize : *mut u32, extension : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - SetupDiGetActualSectionToInstallW(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetActualSectionToInstallW(infhandle, infsectionname.into_param().abi(), ::core::mem::transmute(infsectionwithext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), infsectionwithext.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(extension.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassBitmapIndex(classguid: ::core::option::Option<*const ::windows_core::GUID>, miniiconindex: *mut i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassBitmapIndex(classguid: ::core::option::Option<*const ::windows_core::GUID>, miniiconindex: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassBitmapIndex(classguid : *const ::windows_core::GUID, miniiconindex : *mut i32) -> super::super::Foundation:: BOOL); - SetupDiGetClassBitmapIndex(::core::mem::transmute(classguid.unwrap_or(::std::ptr::null())), miniiconindex) + SetupDiGetClassBitmapIndex(::core::mem::transmute(classguid.unwrap_or(::std::ptr::null())), miniiconindex).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassDescriptionA(classguid: *const ::windows_core::GUID, classdescription: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassDescriptionA(classguid: *const ::windows_core::GUID, classdescription: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionA(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PSTR, classdescriptionsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetClassDescriptionA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassDescriptionExA(classguid: *const ::windows_core::GUID, classdescription: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassDescriptionExA(classguid: *const ::windows_core::GUID, classdescription: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionExA(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PSTR, classdescriptionsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionExA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassDescriptionExA(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassDescriptionExW(classguid: *const ::windows_core::GUID, classdescription: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassDescriptionExW(classguid: *const ::windows_core::GUID, classdescription: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionExW(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PWSTR, classdescriptionsize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionExW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassDescriptionExW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassDescriptionW(classguid: *const ::windows_core::GUID, classdescription: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassDescriptionW(classguid: *const ::windows_core::GUID, classdescription: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDescriptionW(classguid : *const ::windows_core::GUID, classdescription : ::windows_core::PWSTR, classdescriptionsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDescriptionW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetClassDescriptionW(classguid, ::core::mem::transmute(classdescription.as_ptr()), classdescription.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiGetClassDevPropertySheetsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERA_V2, propertysheetheaderpagelistsize: u32, requiredsize: ::core::option::Option<*mut u32>, propertysheettype: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassDevPropertySheetsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERA_V2, propertysheetheaderpagelistsize: u32, requiredsize: ::core::option::Option<*mut u32>, propertysheettype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevPropertySheetsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertysheetheader : *const super::super::UI::Controls:: PROPSHEETHEADERA_V2, propertysheetheaderpagelistsize : u32, requiredsize : *mut u32, propertysheettype : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDevPropertySheetsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), propertysheettype) + SetupDiGetClassDevPropertySheetsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), propertysheettype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiGetClassDevPropertySheetsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERW_V2, propertysheetheaderpagelistsize: u32, requiredsize: ::core::option::Option<*mut u32>, propertysheettype: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassDevPropertySheetsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, propertysheetheader: *const super::super::UI::Controls::PROPSHEETHEADERW_V2, propertysheetheaderpagelistsize: u32, requiredsize: ::core::option::Option<*mut u32>, propertysheettype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevPropertySheetsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertysheetheader : *const super::super::UI::Controls:: PROPSHEETHEADERW_V2, propertysheetheaderpagelistsize : u32, requiredsize : *mut u32, propertysheettype : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassDevPropertySheetsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), propertysheettype) + SetupDiGetClassDevPropertySheetsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), propertysheettype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2665,443 +2667,443 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn SetupDiGetClassImageIndex(classimagelistdata: *const SP_CLASSIMAGELIST_DATA, classguid: *const ::windows_core::GUID, imageindex: *mut i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassImageIndex(classimagelistdata: *const SP_CLASSIMAGELIST_DATA, classguid: *const ::windows_core::GUID, imageindex: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageIndex(classimagelistdata : *const SP_CLASSIMAGELIST_DATA, classguid : *const ::windows_core::GUID, imageindex : *mut i32) -> super::super::Foundation:: BOOL); - SetupDiGetClassImageIndex(classimagelistdata, classguid, imageindex) + SetupDiGetClassImageIndex(classimagelistdata, classguid, imageindex).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn SetupDiGetClassImageList(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassImageList(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageList(classimagelistdata : *mut SP_CLASSIMAGELIST_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetClassImageList(classimagelistdata) + SetupDiGetClassImageList(classimagelistdata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn SetupDiGetClassImageListExA(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassImageListExA(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageListExA(classimagelistdata : *mut SP_CLASSIMAGELIST_DATA, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassImageListExA(classimagelistdata, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassImageListExA(classimagelistdata, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn SetupDiGetClassImageListExW(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassImageListExW(classimagelistdata: *mut SP_CLASSIMAGELIST_DATA, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassImageListExW(classimagelistdata : *mut SP_CLASSIMAGELIST_DATA, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassImageListExW(classimagelistdata, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassImageListExW(classimagelistdata, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, classinstallparams : *mut SP_CLASSINSTALL_HEADER, classinstallparamssize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null_mut())), classinstallparamssize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetClassInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null_mut())), classinstallparamssize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, classinstallparams : *mut SP_CLASSINSTALL_HEADER, classinstallparamssize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null_mut())), classinstallparamssize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetClassInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null_mut())), classinstallparamssize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetClassPropertyExW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassPropertyExW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyExW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetClassPropertyKeys(classguid: *const ::windows_core::GUID, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassPropertyKeys(classguid: *const ::windows_core::GUID, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyKeys(classguid : *const ::windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeys(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetClassPropertyKeys(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetClassPropertyKeysExW(classguid: *const ::windows_core::GUID, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassPropertyKeysExW(classguid: *const ::windows_core::GUID, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyKeysExW(classguid : *const ::windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyKeysExW(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassPropertyKeysExW(classguid, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassPropertyW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassRegistryPropertyA(classguid: *const ::windows_core::GUID, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassRegistryPropertyA(classguid: *const ::windows_core::GUID, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassRegistryPropertyA(classguid : *const ::windows_core::GUID, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetClassRegistryPropertyW(classguid: *const ::windows_core::GUID, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetClassRegistryPropertyW(classguid: *const ::windows_core::GUID, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassRegistryPropertyW(classguid : *const ::windows_core::GUID, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetCustomDevicePropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetCustomDevicePropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetCustomDevicePropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, custompropertyname : ::windows_core::PCSTR, flags : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetCustomDevicePropertyA(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetCustomDevicePropertyA(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetCustomDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetCustomDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetCustomDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, custompropertyname : ::windows_core::PCWSTR, flags : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetCustomDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetCustomDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, custompropertyname.into_param().abi(), flags, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInfoListClass(deviceinfoset: P0, classguid: *mut ::windows_core::GUID) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInfoListClass(deviceinfoset: P0, classguid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListClass(deviceinfoset : HDEVINFO, classguid : *mut ::windows_core::GUID) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListClass(deviceinfoset.into_param().abi(), classguid) + SetupDiGetDeviceInfoListClass(deviceinfoset.into_param().abi(), classguid).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInfoListDetailA(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInfoListDetailA(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListDetailA(deviceinfoset : HDEVINFO, deviceinfosetdetaildata : *mut SP_DEVINFO_LIST_DETAIL_DATA_A) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListDetailA(deviceinfoset.into_param().abi(), deviceinfosetdetaildata) + SetupDiGetDeviceInfoListDetailA(deviceinfoset.into_param().abi(), deviceinfosetdetaildata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInfoListDetailW(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInfoListDetailW(deviceinfoset: P0, deviceinfosetdetaildata: *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInfoListDetailW(deviceinfoset : HDEVINFO, deviceinfosetdetaildata : *mut SP_DEVINFO_LIST_DETAIL_DATA_W) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInfoListDetailW(deviceinfoset.into_param().abi(), deviceinfosetdetaildata) + SetupDiGetDeviceInfoListDetailW(deviceinfoset.into_param().abi(), deviceinfosetdetaildata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_A) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_A) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstallparams : *mut SP_DEVINSTALL_PARAMS_A) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams) + SetupDiGetDeviceInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_W) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstallparams : *mut SP_DEVINSTALL_PARAMS_W) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams) + SetupDiGetDeviceInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInstanceIdA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInstanceIdA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstanceIdA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstanceid : ::windows_core::PSTR, deviceinstanceidsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstanceIdA(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceInstanceIdA(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInstanceIdW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInstanceIdW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInstanceIdW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstanceid : ::windows_core::PWSTR, deviceinstanceidsize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInstanceIdW(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceInstanceIdW(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(deviceinstanceid.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), deviceinstanceid.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInterfaceAlias(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, aliasinterfaceclassguid: *const ::windows_core::GUID, aliasdeviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInterfaceAlias(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, aliasinterfaceclassguid: *const ::windows_core::GUID, aliasdeviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfaceAlias(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, aliasinterfaceclassguid : *const ::windows_core::GUID, aliasdeviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfaceAlias(deviceinfoset.into_param().abi(), deviceinterfacedata, aliasinterfaceclassguid, aliasdeviceinterfacedata) + SetupDiGetDeviceInterfaceAlias(deviceinfoset.into_param().abi(), deviceinterfacedata, aliasinterfaceclassguid, aliasdeviceinterfacedata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInterfaceDetailA(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_A>, deviceinterfacedetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInterfaceDetailA(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_A>, deviceinterfacedetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfaceDetailA(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata : *mut SP_DEVICE_INTERFACE_DETAIL_DATA_A, deviceinterfacedetaildatasize : u32, requiredsize : *mut u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfaceDetailA(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(deviceinterfacedetaildata.unwrap_or(::std::ptr::null_mut())), deviceinterfacedetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceInterfaceDetailA(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(deviceinterfacedetaildata.unwrap_or(::std::ptr::null_mut())), deviceinterfacedetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceInterfaceDetailW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_W>, deviceinterfacedetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInterfaceDetailW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_W>, deviceinterfacedetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfaceDetailW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata : *mut SP_DEVICE_INTERFACE_DETAIL_DATA_W, deviceinterfacedetaildatasize : u32, requiredsize : *mut u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfaceDetailW(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(deviceinterfacedetaildata.unwrap_or(::std::ptr::null_mut())), deviceinterfacedetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceInterfaceDetailW(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(deviceinterfacedetaildata.unwrap_or(::std::ptr::null_mut())), deviceinterfacedetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.into_param().abi(), deviceinterfacedata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetDevicePropertyKeys(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDevicePropertyKeys(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykeyarray: ::core::option::Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDevicePropertyKeys(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : u32, requiredpropertykeycount : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyKeys(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetDevicePropertyKeys(deviceinfoset.into_param().abi(), deviceinfodata, ::core::mem::transmute(propertykeyarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertykeyarray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredpropertykeycount.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiGetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiGetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags) + SetupDiGetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: u32, propertyregdatatype: ::core::option::Option<*mut u32>, propertybuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : u32, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertyregdatatype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDriverInfoDetailA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinfodetaildata: ::core::option::Option<*mut SP_DRVINFO_DETAIL_DATA_A>, driverinfodetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDriverInfoDetailA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinfodetaildata: ::core::option::Option<*mut SP_DRVINFO_DETAIL_DATA_A>, driverinfodetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDriverInfoDetailA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_A, driverinfodetaildata : *mut SP_DRVINFO_DETAIL_DATA_A, driverinfodetaildatasize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDriverInfoDetailA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, ::core::mem::transmute(driverinfodetaildata.unwrap_or(::std::ptr::null_mut())), driverinfodetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDriverInfoDetailA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, ::core::mem::transmute(driverinfodetaildata.unwrap_or(::std::ptr::null_mut())), driverinfodetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDriverInfoDetailW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinfodetaildata: ::core::option::Option<*mut SP_DRVINFO_DETAIL_DATA_W>, driverinfodetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDriverInfoDetailW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinfodetaildata: ::core::option::Option<*mut SP_DRVINFO_DETAIL_DATA_W>, driverinfodetaildatasize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDriverInfoDetailW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_W, driverinfodetaildata : *mut SP_DRVINFO_DETAIL_DATA_W, driverinfodetaildatasize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDriverInfoDetailW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, ::core::mem::transmute(driverinfodetaildata.unwrap_or(::std::ptr::null_mut())), driverinfodetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetDriverInfoDetailW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, ::core::mem::transmute(driverinfodetaildata.unwrap_or(::std::ptr::null_mut())), driverinfodetaildatasize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDriverInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_A, driverinstallparams : *mut SP_DRVINSTALL_PARAMS) -> super::super::Foundation:: BOOL); - SetupDiGetDriverInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams) + SetupDiGetDriverInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDriverInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_W, driverinstallparams : *mut SP_DRVINSTALL_PARAMS) -> super::super::Foundation:: BOOL); - SetupDiGetDriverInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams) + SetupDiGetDriverInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileFriendlyNameA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetHwProfileFriendlyNameA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameA(hwprofile : u32, friendlyname : ::windows_core::PSTR, friendlynamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetHwProfileFriendlyNameA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileFriendlyNameExA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetHwProfileFriendlyNameExA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameExA(hwprofile : u32, friendlyname : ::windows_core::PSTR, friendlynamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameExA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetHwProfileFriendlyNameExA(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileFriendlyNameExW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetHwProfileFriendlyNameExW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameExW(hwprofile : u32, friendlyname : ::windows_core::PWSTR, friendlynamesize : u32, requiredsize : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameExW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetHwProfileFriendlyNameExW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileFriendlyNameW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetHwProfileFriendlyNameW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileFriendlyNameW(hwprofile : u32, friendlyname : ::windows_core::PWSTR, friendlynamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileFriendlyNameW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetHwProfileFriendlyNameW(hwprofile, ::core::mem::transmute(friendlyname.as_ptr()), friendlyname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileList(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiGetHwProfileList(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileList(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileList(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetHwProfileList(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileListExA(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetHwProfileListExA(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileListExA(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileListExA(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetHwProfileListExA(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetHwProfileListExW(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetHwProfileListExW(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: ::core::option::Option<*mut u32>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetHwProfileListExW(hwprofilelist : *mut u32, hwprofilelistsize : u32, requiredsize : *mut u32, currentlyactiveindex : *mut u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiGetHwProfileListExW(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiGetHwProfileListExW(::core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len() as _, requiredsize, ::core::mem::transmute(currentlyactiveindex.unwrap_or(::std::ptr::null_mut())), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetINFClassA(infname: P0, classguid: *mut ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetINFClassA(infname: P0, classguid: *mut ::windows_core::GUID, classname: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetINFClassA(infname : ::windows_core::PCSTR, classguid : *mut ::windows_core::GUID, classname : ::windows_core::PSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetINFClassA(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetINFClassA(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetINFClassW(infname: P0, classguid: *mut ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetINFClassW(infname: P0, classguid: *mut ::windows_core::GUID, classname: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetINFClassW(infname : ::windows_core::PCWSTR, classguid : *mut ::windows_core::GUID, classname : ::windows_core::PWSTR, classnamesize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetINFClassW(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupDiGetINFClassW(infname.into_param().abi(), classguid, ::core::mem::transmute(classname.as_ptr()), classname.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetSelectedDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetSelectedDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetSelectedDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiGetSelectedDevice(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiGetSelectedDevice(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetSelectedDriverA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetSelectedDriverA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetSelectedDriverA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation:: BOOL); - SetupDiGetSelectedDriverA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata) + SetupDiGetSelectedDriverA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiGetSelectedDriverW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiGetSelectedDriverW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiGetSelectedDriverW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation:: BOOL); - SetupDiGetSelectedDriverW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata) + SetupDiGetSelectedDriverW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] @@ -3116,93 +3118,93 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallClassA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallClassA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassA(hwndparent : super::super::Foundation:: HWND, inffilename : ::windows_core::PCSTR, flags : u32, filequeue : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiInstallClassA(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null()))) + SetupDiInstallClassA(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallClassExA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>, interfaceclassguid: ::core::option::Option<*const ::windows_core::GUID>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallClassExA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>, interfaceclassguid: ::core::option::Option<*const ::windows_core::GUID>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassExA(hwndparent : super::super::Foundation:: HWND, inffilename : ::windows_core::PCSTR, flags : u32, filequeue : *const ::core::ffi::c_void, interfaceclassguid : *const ::windows_core::GUID, reserved1 : *const ::core::ffi::c_void, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiInstallClassExA(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null())), ::core::mem::transmute(interfaceclassguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupDiInstallClassExA(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null())), ::core::mem::transmute(interfaceclassguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallClassExW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>, interfaceclassguid: ::core::option::Option<*const ::windows_core::GUID>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallClassExW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>, interfaceclassguid: ::core::option::Option<*const ::windows_core::GUID>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassExW(hwndparent : super::super::Foundation:: HWND, inffilename : ::windows_core::PCWSTR, flags : u32, filequeue : *const ::core::ffi::c_void, interfaceclassguid : *const ::windows_core::GUID, reserved1 : *const ::core::ffi::c_void, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiInstallClassExW(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null())), ::core::mem::transmute(interfaceclassguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupDiInstallClassExW(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null())), ::core::mem::transmute(interfaceclassguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallClassW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallClassW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallClassW(hwndparent : super::super::Foundation:: HWND, inffilename : ::windows_core::PCWSTR, flags : u32, filequeue : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiInstallClassW(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null()))) + SetupDiInstallClassW(hwndparent.into_param().abi(), inffilename.into_param().abi(), flags, ::core::mem::transmute(filequeue.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDevice(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiInstallDevice(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallDeviceInterfaces(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallDeviceInterfaces(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDeviceInterfaces(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDeviceInterfaces(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiInstallDeviceInterfaces(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiInstallDriverFiles(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiInstallDriverFiles(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiInstallDriverFiles(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiInstallDriverFiles(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiInstallDriverFiles(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiLoadClassIcon(classguid: *const ::windows_core::GUID, largeicon: ::core::option::Option<*mut super::super::UI::WindowsAndMessaging::HICON>, miniiconindex: ::core::option::Option<*mut i32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiLoadClassIcon(classguid: *const ::windows_core::GUID, largeicon: ::core::option::Option<*mut super::super::UI::WindowsAndMessaging::HICON>, miniiconindex: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiLoadClassIcon(classguid : *const ::windows_core::GUID, largeicon : *mut super::super::UI::WindowsAndMessaging:: HICON, miniiconindex : *mut i32) -> super::super::Foundation:: BOOL); - SetupDiLoadClassIcon(classguid, ::core::mem::transmute(largeicon.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(miniiconindex.unwrap_or(::std::ptr::null_mut()))) + SetupDiLoadClassIcon(classguid, ::core::mem::transmute(largeicon.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(miniiconindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetupDiLoadDeviceIcon(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, cxicon: u32, cyicon: u32, flags: u32, hicon: *mut super::super::UI::WindowsAndMessaging::HICON) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiLoadDeviceIcon(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, cxicon: u32, cyicon: u32, flags: u32, hicon: *mut super::super::UI::WindowsAndMessaging::HICON) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiLoadDeviceIcon(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, cxicon : u32, cyicon : u32, flags : u32, hicon : *mut super::super::UI::WindowsAndMessaging:: HICON) -> super::super::Foundation:: BOOL); - SetupDiLoadDeviceIcon(deviceinfoset.into_param().abi(), deviceinfodata, cxicon, cyicon, flags, hicon) + SetupDiLoadDeviceIcon(deviceinfoset.into_param().abi(), deviceinfodata, cxicon, cyicon, flags, hicon).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -3248,37 +3250,37 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiOpenDeviceInfoA(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiOpenDeviceInfoA(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInfoA(deviceinfoset : HDEVINFO, deviceinstanceid : ::windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, openflags : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiOpenDeviceInfoA(deviceinfoset.into_param().abi(), deviceinstanceid.into_param().abi(), hwndparent.into_param().abi(), openflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiOpenDeviceInfoA(deviceinfoset.into_param().abi(), deviceinstanceid.into_param().abi(), hwndparent.into_param().abi(), openflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInfoW(deviceinfoset : HDEVINFO, deviceinstanceid : ::windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, openflags : u32, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiOpenDeviceInfoW(deviceinfoset.into_param().abi(), deviceinstanceid.into_param().abi(), hwndparent.into_param().abi(), openflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiOpenDeviceInfoW(deviceinfoset.into_param().abi(), deviceinstanceid.into_param().abi(), hwndparent.into_param().abi(), openflags, ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInterfaceA(deviceinfoset : HDEVINFO, devicepath : ::windows_core::PCSTR, openflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiOpenDeviceInterfaceA(deviceinfoset.into_param().abi(), devicepath.into_param().abi(), openflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))) + SetupDiOpenDeviceInterfaceA(deviceinfoset.into_param().abi(), devicepath.into_param().abi(), openflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -3294,33 +3296,33 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiOpenDeviceInterfaceW(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiOpenDeviceInterfaceW(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: ::core::option::Option<*mut SP_DEVICE_INTERFACE_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenDeviceInterfaceW(deviceinfoset : HDEVINFO, devicepath : ::windows_core::PCWSTR, openflags : u32, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiOpenDeviceInterfaceW(deviceinfoset.into_param().abi(), devicepath.into_param().abi(), openflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))) + SetupDiOpenDeviceInterfaceW(deviceinfoset.into_param().abi(), devicepath.into_param().abi(), openflags, ::core::mem::transmute(deviceinterfacedata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiRegisterCoDeviceInstallers(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRegisterCoDeviceInstallers(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiRegisterCoDeviceInstallers(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiRegisterDeviceInfo(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, flags: u32, compareproc: PSP_DETSIG_CMPPROC, comparecontext: ::core::option::Option<*const ::core::ffi::c_void>, dupdeviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiRegisterDeviceInfo(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, flags: u32, compareproc: PSP_DETSIG_CMPPROC, comparecontext: ::core::option::Option<*const ::core::ffi::c_void>, dupdeviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiRegisterDeviceInfo(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, flags : u32, compareproc : PSP_DETSIG_CMPPROC, comparecontext : *const ::core::ffi::c_void, dupdeviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRegisterDeviceInfo(deviceinfoset.into_param().abi(), deviceinfodata, flags, compareproc, ::core::mem::transmute(comparecontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dupdeviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiRegisterDeviceInfo(deviceinfoset.into_param().abi(), deviceinfodata, flags, compareproc, ::core::mem::transmute(comparecontext.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dupdeviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3335,240 +3337,240 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiRemoveDeviceInterface(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiRemoveDeviceInterface(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiRemoveDeviceInterface(deviceinfoset : HDEVINFO, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA) -> super::super::Foundation:: BOOL); - SetupDiRemoveDeviceInterface(deviceinfoset.into_param().abi(), deviceinterfacedata) + SetupDiRemoveDeviceInterface(deviceinfoset.into_param().abi(), deviceinterfacedata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiRestartDevices(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiRestartDevices(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiRestartDevices(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiRestartDevices(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiRestartDevices(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSelectBestCompatDrv(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSelectBestCompatDrv(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSelectBestCompatDrv(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSelectBestCompatDrv(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiSelectBestCompatDrv(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSelectDevice(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSelectDevice(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSelectDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSelectDevice(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiSelectDevice(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSelectOEMDrv(hwndparent: P0, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSelectOEMDrv(hwndparent: P0, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSelectOEMDrv(hwndparent : super::super::Foundation:: HWND, deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSelectOEMDrv(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiSelectOEMDrv(hwndparent.into_param().abi(), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, classinstallparams : *const SP_CLASSINSTALL_HEADER, classinstallparamssize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetClassInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null())), classinstallparamssize) + SetupDiSetClassInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null())), classinstallparamssize).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, classinstallparams: ::core::option::Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, classinstallparams : *const SP_CLASSINSTALL_HEADER, classinstallparamssize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetClassInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null())), classinstallparamssize) + SetupDiSetClassInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(classinstallparams.unwrap_or(::std::ptr::null())), classinstallparamssize).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiSetClassPropertyExW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetClassPropertyExW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassPropertyExW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiSetClassPropertyExW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags, machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiSetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupDiSetClassPropertyW(classguid: *const ::windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassPropertyW(classguid : *const ::windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags) + SetupDiSetClassPropertyW(classguid, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetClassRegistryPropertyA(classguid: *const ::windows_core::GUID, property: u32, propertybuffer: ::core::option::Option<&[u8]>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetClassRegistryPropertyA(classguid: *const ::windows_core::GUID, property: u32, propertybuffer: ::core::option::Option<&[u8]>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassRegistryPropertyA(classguid : *const ::windows_core::GUID, property : u32, propertybuffer : *const u8, propertybuffersize : u32, machinename : ::windows_core::PCSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiSetClassRegistryPropertyA(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetClassRegistryPropertyW(classguid: *const ::windows_core::GUID, property: u32, propertybuffer: ::core::option::Option<&[u8]>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetClassRegistryPropertyW(classguid: *const ::windows_core::GUID, property: u32, propertybuffer: ::core::option::Option<&[u8]>, machinename: P0, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetClassRegistryPropertyW(classguid : *const ::windows_core::GUID, property : u32, propertybuffer : *const u8, propertybuffersize : u32, machinename : ::windows_core::PCWSTR, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiSetClassRegistryPropertyW(classguid, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), machinename.into_param().abi(), ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_A) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_A) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstallparams : *const SP_DEVINSTALL_PARAMS_A) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams) + SetupDiSetDeviceInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_W) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, deviceinstallparams : *const SP_DEVINSTALL_PARAMS_W) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams) + SetupDiSetDeviceInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), deviceinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDeviceInterfaceDefault(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA, flags: u32, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceInterfaceDefault(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA, flags: u32, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInterfaceDefault(deviceinfoset : HDEVINFO, deviceinterfacedata : *mut SP_DEVICE_INTERFACE_DATA, flags : u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInterfaceDefault(deviceinfoset.into_param().abi(), deviceinterfacedata, flags, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupDiSetDeviceInterfaceDefault(deviceinfoset.into_param().abi(), deviceinterfacedata, flags, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceInterfacePropertyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags) + SetupDiSetDeviceInterfacePropertyW(deviceinfoset.into_param().abi(), deviceinterfacedata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Devices_Properties\"`, `\"Win32_Foundation\"`*"] #[cfg(all(feature = "Win32_Devices_Properties", feature = "Win32_Foundation"))] #[inline] -pub unsafe fn SetupDiSetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, propertykey: *const super::Properties::DEVPROPKEY, propertytype: super::Properties::DEVPROPTYPE, propertybuffer: ::core::option::Option<&[u8]>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDevicePropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : super::Properties:: DEVPROPTYPE, propertybuffer : *const u8, propertybuffersize : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags) + SetupDiSetDevicePropertyW(deviceinfoset.into_param().abi(), deviceinfodata, propertykey, propertytype, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: u32, propertybuffer: ::core::option::Option<&[u8]>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: u32, propertybuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : u32, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)) + SetupDiSetDeviceRegistryPropertyA(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: u32, propertybuffer: ::core::option::Option<&[u8]>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA, property: u32, propertybuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, property : u32, propertybuffer : *const u8, propertybuffersize : u32) -> super::super::Foundation:: BOOL); - SetupDiSetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)) + SetupDiSetDeviceRegistryPropertyW(deviceinfoset.into_param().abi(), deviceinfodata, property, ::core::mem::transmute(propertybuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), propertybuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDriverInstallParamsA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_A, driverinstallparams : *const SP_DRVINSTALL_PARAMS) -> super::super::Foundation:: BOOL); - SetupDiSetDriverInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams) + SetupDiSetDriverInstallParamsA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetDriverInstallParamsW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, driverinfodata : *const SP_DRVINFO_DATA_V2_W, driverinstallparams : *const SP_DRVINSTALL_PARAMS) -> super::super::Foundation:: BOOL); - SetupDiSetDriverInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams) + SetupDiSetDriverInstallParamsW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), driverinfodata, driverinstallparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetSelectedDevice(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSetSelectedDevice(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiSetSelectedDevice(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetSelectedDriverA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, driverinfodata: ::core::option::Option<*mut SP_DRVINFO_DATA_V2_A>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetSelectedDriverA(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, driverinfodata: ::core::option::Option<*mut SP_DRVINFO_DATA_V2_A>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetSelectedDriverA(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, driverinfodata : *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation:: BOOL); - SetupDiSetSelectedDriverA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiSetSelectedDriverA(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiSetSelectedDriverW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, driverinfodata: ::core::option::Option<*mut SP_DRVINFO_DATA_V2_W>) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiSetSelectedDriverW(deviceinfoset: P0, deviceinfodata: ::core::option::Option<*mut SP_DEVINFO_DATA>, driverinfodata: ::core::option::Option<*mut SP_DRVINFO_DATA_V2_W>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiSetSelectedDriverW(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, driverinfodata : *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation:: BOOL); - SetupDiSetSelectedDriverW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null_mut()))) + SetupDiSetSelectedDriverW(deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(driverinfodata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupDiUnremoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SetupDiUnremoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupDiUnremoveDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiUnremoveDevice(deviceinfoset.into_param().abi(), deviceinfodata) + SetupDiUnremoveDevice(deviceinfoset.into_param().abi(), deviceinfodata).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -3585,79 +3587,79 @@ pub unsafe fn SetupDuplicateDiskSpaceListW(diskspace: *const ::core::ffi::c_void #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupEnumInfSectionsA(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u8]>, sizeneeded: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupEnumInfSectionsA(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u8]>, sizeneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupEnumInfSectionsA(infhandle : *const ::core::ffi::c_void, index : u32, buffer : ::windows_core::PSTR, size : u32, sizeneeded : *mut u32) -> super::super::Foundation:: BOOL); - SetupEnumInfSectionsA(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))) + SetupEnumInfSectionsA(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupEnumInfSectionsW(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u16]>, sizeneeded: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupEnumInfSectionsW(infhandle: *const ::core::ffi::c_void, index: u32, buffer: ::core::option::Option<&mut [u16]>, sizeneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupEnumInfSectionsW(infhandle : *const ::core::ffi::c_void, index : u32, buffer : ::windows_core::PWSTR, size : u32, sizeneeded : *mut u32) -> super::super::Foundation:: BOOL); - SetupEnumInfSectionsW(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))) + SetupEnumInfSectionsW(infhandle, index, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(sizeneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFindFirstLineA(infhandle: *const ::core::ffi::c_void, section: P0, key: P1, context: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupFindFirstLineA(infhandle: *const ::core::ffi::c_void, section: P0, key: P1, context: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupFindFirstLineA(infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR, key : ::windows_core::PCSTR, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupFindFirstLineA(infhandle, section.into_param().abi(), key.into_param().abi(), context) + SetupFindFirstLineA(infhandle, section.into_param().abi(), key.into_param().abi(), context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFindFirstLineW(infhandle: *const ::core::ffi::c_void, section: P0, key: P1, context: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupFindFirstLineW(infhandle: *const ::core::ffi::c_void, section: P0, key: P1, context: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupFindFirstLineW(infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR, key : ::windows_core::PCWSTR, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupFindFirstLineW(infhandle, section.into_param().abi(), key.into_param().abi(), context) + SetupFindFirstLineW(infhandle, section.into_param().abi(), key.into_param().abi(), context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFindNextLine(contextin: *const INFCONTEXT, contextout: *mut INFCONTEXT) -> super::super::Foundation::BOOL { +pub unsafe fn SetupFindNextLine(contextin: *const INFCONTEXT, contextout: *mut INFCONTEXT) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupFindNextLine(contextin : *const INFCONTEXT, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupFindNextLine(contextin, contextout) + SetupFindNextLine(contextin, contextout).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFindNextMatchLineA(contextin: *const INFCONTEXT, key: P0, contextout: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupFindNextMatchLineA(contextin: *const INFCONTEXT, key: P0, contextout: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupFindNextMatchLineA(contextin : *const INFCONTEXT, key : ::windows_core::PCSTR, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupFindNextMatchLineA(contextin, key.into_param().abi(), contextout) + SetupFindNextMatchLineA(contextin, key.into_param().abi(), contextout).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFindNextMatchLineW(contextin: *const INFCONTEXT, key: P0, contextout: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupFindNextMatchLineW(contextin: *const INFCONTEXT, key: P0, contextout: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupFindNextMatchLineW(contextin : *const INFCONTEXT, key : ::windows_core::PCWSTR, contextout : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupFindNextMatchLineW(contextin, key.into_param().abi(), contextout) + SetupFindNextMatchLineW(contextin, key.into_param().abi(), contextout).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFreeSourceListA(list: &mut [*mut ::windows_core::PCSTR]) -> super::super::Foundation::BOOL { +pub unsafe fn SetupFreeSourceListA(list: &mut [*mut ::windows_core::PCSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupFreeSourceListA(list : *mut *mut ::windows_core::PCSTR, count : u32) -> super::super::Foundation:: BOOL); - SetupFreeSourceListA(::core::mem::transmute(list.as_ptr()), list.len() as _) + SetupFreeSourceListA(::core::mem::transmute(list.as_ptr()), list.len() as _).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupFreeSourceListW(list: &mut [*mut ::windows_core::PCWSTR]) -> super::super::Foundation::BOOL { +pub unsafe fn SetupFreeSourceListW(list: &mut [*mut ::windows_core::PCWSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupFreeSourceListW(list : *mut *mut ::windows_core::PCWSTR, count : u32) -> super::super::Foundation:: BOOL); - SetupFreeSourceListW(::core::mem::transmute(list.as_ptr()), list.len() as _) + SetupFreeSourceListW(::core::mem::transmute(list.as_ptr()), list.len() as _).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3676,9 +3678,9 @@ pub unsafe fn SetupGetBackupInformationW(queuehandle: *const ::core::ffi::c_void #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetBinaryField(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetBinaryField(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetBinaryField(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : *mut u8, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetBinaryField(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetBinaryField(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -3698,22 +3700,22 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetFileCompressionInfoExA(sourcefilename: P0, actualsourcefilenamebuffer: ::core::option::Option<&[u8]>, requiredbufferlen: ::core::option::Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetFileCompressionInfoExA(sourcefilename: P0, actualsourcefilenamebuffer: ::core::option::Option<&[u8]>, requiredbufferlen: ::core::option::Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoExA(sourcefilename : ::windows_core::PCSTR, actualsourcefilenamebuffer : ::windows_core::PCSTR, actualsourcefilenamebufferlen : u32, requiredbufferlen : *mut u32, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExA(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype) + SetupGetFileCompressionInfoExA(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetFileCompressionInfoExW(sourcefilename: P0, actualsourcefilenamebuffer: ::core::option::Option<&[u16]>, requiredbufferlen: ::core::option::Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetFileCompressionInfoExW(sourcefilename: P0, actualsourcefilenamebuffer: ::core::option::Option<&[u16]>, requiredbufferlen: ::core::option::Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileCompressionInfoExW(sourcefilename : ::windows_core::PCWSTR, actualsourcefilenamebuffer : ::windows_core::PCWSTR, actualsourcefilenamebufferlen : u32, requiredbufferlen : *mut u32, sourcefilesize : *mut u32, targetfilesize : *mut u32, compressiontype : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExW(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype) + SetupGetFileCompressionInfoExW(sourcefilename.into_param().abi(), ::core::mem::transmute(actualsourcefilenamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), actualsourcefilenamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredbufferlen.unwrap_or(::std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -3727,119 +3729,119 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetFileQueueCount(filequeue: *const ::core::ffi::c_void, subqueuefileop: u32, numoperations: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetFileQueueCount(filequeue: *const ::core::ffi::c_void, subqueuefileop: u32, numoperations: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileQueueCount(filequeue : *const ::core::ffi::c_void, subqueuefileop : u32, numoperations : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileQueueCount(filequeue, subqueuefileop, numoperations) + SetupGetFileQueueCount(filequeue, subqueuefileop, numoperations).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetFileQueueFlags(filequeue: *const ::core::ffi::c_void, flags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetFileQueueFlags(filequeue: *const ::core::ffi::c_void, flags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetFileQueueFlags(filequeue : *const ::core::ffi::c_void, flags : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetFileQueueFlags(filequeue, flags) + SetupGetFileQueueFlags(filequeue, flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupGetInfDriverStoreLocationA(filename: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, localename: P1, returnbuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfDriverStoreLocationA(filename: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, localename: P1, returnbuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfDriverStoreLocationA(filename : ::windows_core::PCSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, localename : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfDriverStoreLocationA(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfDriverStoreLocationA(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupGetInfDriverStoreLocationW(filename: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, localename: P1, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfDriverStoreLocationW(filename: P0, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, localename: P1, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfDriverStoreLocationW(filename : ::windows_core::PCWSTR, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, localename : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfDriverStoreLocationW(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfDriverStoreLocationW(filename.into_param().abi(), ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), localename.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfFileListA(directorypath: P0, infstyle: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfFileListA(directorypath: P0, infstyle: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListA(directorypath : ::windows_core::PCSTR, infstyle : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListA(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfFileListA(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfFileListW(directorypath: P0, infstyle: u32, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfFileListW(directorypath: P0, infstyle: u32, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListW(directorypath : ::windows_core::PCWSTR, infstyle : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListW(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfFileListW(directorypath.into_param().abi(), infstyle, ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfInformationA(infspec: *const ::core::ffi::c_void, searchcontrol: u32, returnbuffer: ::core::option::Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetInfInformationA(infspec: *const ::core::ffi::c_void, searchcontrol: u32, returnbuffer: ::core::option::Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfInformationA(infspec : *const ::core::ffi::c_void, searchcontrol : u32, returnbuffer : *mut SP_INF_INFORMATION, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfInformationA(infspec, searchcontrol, ::core::mem::transmute(returnbuffer.unwrap_or(::std::ptr::null_mut())), returnbuffersize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfInformationA(infspec, searchcontrol, ::core::mem::transmute(returnbuffer.unwrap_or(::std::ptr::null_mut())), returnbuffersize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfInformationW(infspec: *const ::core::ffi::c_void, searchcontrol: u32, returnbuffer: ::core::option::Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetInfInformationW(infspec: *const ::core::ffi::c_void, searchcontrol: u32, returnbuffer: ::core::option::Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfInformationW(infspec : *const ::core::ffi::c_void, searchcontrol : u32, returnbuffer : *mut SP_INF_INFORMATION, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfInformationW(infspec, searchcontrol, ::core::mem::transmute(returnbuffer.unwrap_or(::std::ptr::null_mut())), returnbuffersize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfInformationW(infspec, searchcontrol, ::core::mem::transmute(returnbuffer.unwrap_or(::std::ptr::null_mut())), returnbuffersize, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfPublishedNameA(driverstorelocation: P0, returnbuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfPublishedNameA(driverstorelocation: P0, returnbuffer: &mut [u8], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfPublishedNameA(driverstorelocation : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfPublishedNameA(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfPublishedNameA(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetInfPublishedNameW(driverstorelocation: P0, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetInfPublishedNameW(driverstorelocation: P0, returnbuffer: &mut [u16], requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetInfPublishedNameW(driverstorelocation : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfPublishedNameW(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetInfPublishedNameW(driverstorelocation.into_param().abi(), ::core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len() as _, ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetIntField(context: *const INFCONTEXT, fieldindex: u32, integervalue: *mut i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetIntField(context: *const INFCONTEXT, fieldindex: u32, integervalue: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetIntField(context : *const INFCONTEXT, fieldindex : u32, integervalue : *mut i32) -> super::super::Foundation:: BOOL); - SetupGetIntField(context, fieldindex, integervalue) + SetupGetIntField(context, fieldindex, integervalue).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetLineByIndexA(infhandle: *const ::core::ffi::c_void, section: P0, index: u32, context: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetLineByIndexA(infhandle: *const ::core::ffi::c_void, section: P0, index: u32, context: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineByIndexA(infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR, index : u32, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupGetLineByIndexA(infhandle, section.into_param().abi(), index, context) + SetupGetLineByIndexA(infhandle, section.into_param().abi(), index, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetLineByIndexW(infhandle: *const ::core::ffi::c_void, section: P0, index: u32, context: *mut INFCONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetLineByIndexW(infhandle: *const ::core::ffi::c_void, section: P0, index: u32, context: *mut INFCONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineByIndexW(infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR, index : u32, context : *mut INFCONTEXT) -> super::super::Foundation:: BOOL); - SetupGetLineByIndexW(infhandle, section.into_param().abi(), index, context) + SetupGetLineByIndexW(infhandle, section.into_param().abi(), index, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -3862,38 +3864,38 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetLineTextA(context: ::core::option::Option<*const INFCONTEXT>, infhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0, key: P1, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetLineTextA(context: ::core::option::Option<*const INFCONTEXT>, infhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0, key: P1, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineTextA(context : *const INFCONTEXT, infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR, key : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetLineTextA(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetLineTextA(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetLineTextW(context: ::core::option::Option<*const INFCONTEXT>, infhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0, key: P1, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetLineTextW(context: ::core::option::Option<*const INFCONTEXT>, infhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0, key: P1, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetLineTextW(context : *const INFCONTEXT, infhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR, key : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetLineTextW(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetLineTextW(::core::mem::transmute(context.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetMultiSzFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetMultiSzFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetMultiSzFieldA(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetMultiSzFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetMultiSzFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetMultiSzFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetMultiSzFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetMultiSzFieldW(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetMultiSzFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetMultiSzFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3905,92 +3907,92 @@ pub unsafe fn SetupGetNonInteractiveMode() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceFileLocationA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, sourceid: *mut u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetSourceFileLocationA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, sourceid: *mut u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileLocationA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCSTR, sourceid : *mut u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileLocationA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetSourceFileLocationA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceFileLocationW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, sourceid: *mut u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetSourceFileLocationW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, sourceid: *mut u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileLocationW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCWSTR, sourceid : *mut u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileLocationW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetSourceFileLocationW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), sourceid, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceFileSizeA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetSourceFileSizeA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileSizeA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCSTR, section : ::windows_core::PCSTR, filesize : *mut u32, roundingfactor : u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileSizeA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), section.into_param().abi(), filesize, roundingfactor) + SetupGetSourceFileSizeA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), section.into_param().abi(), filesize, roundingfactor).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceFileSizeW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetSourceFileSizeW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceFileSizeW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, filename : ::windows_core::PCWSTR, section : ::windows_core::PCWSTR, filesize : *mut u32, roundingfactor : u32) -> super::super::Foundation:: BOOL); - SetupGetSourceFileSizeW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), section.into_param().abi(), filesize, roundingfactor) + SetupGetSourceFileSizeW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), filename.into_param().abi(), section.into_param().abi(), filesize, roundingfactor).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceInfoA(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetSourceInfoA(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceInfoA(infhandle : *const ::core::ffi::c_void, sourceid : u32, infodesired : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceInfoA(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetSourceInfoA(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetSourceInfoW(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetSourceInfoW(infhandle: *const ::core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetSourceInfoW(infhandle : *const ::core::ffi::c_void, sourceid : u32, infodesired : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetSourceInfoW(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetSourceInfoW(infhandle, sourceid, infodesired, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetStringFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetStringFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetStringFieldA(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetStringFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetStringFieldA(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetStringFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupGetStringFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetStringFieldW(context : *const INFCONTEXT, fieldindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetStringFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetStringFieldW(context, fieldindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetTargetPathA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, section: P0, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetTargetPathA(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, section: P0, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetTargetPathA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, section : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetTargetPathA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetTargetPathA(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupGetTargetPathW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, section: P0, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupGetTargetPathW(infhandle: *const ::core::ffi::c_void, infcontext: ::core::option::Option<*const INFCONTEXT>, section: P0, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupGetTargetPathW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, section : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetTargetPathW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupGetTargetPathW(infhandle, ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), section.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -4040,77 +4042,77 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFileA(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFileA(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFileA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, sourcefile : ::windows_core::PCSTR, sourcepathroot : ::windows_core::PCSTR, destinationname : ::windows_core::PCSTR, copystyle : SP_COPY_STYLE, copymsghandler : PSP_FILE_CALLBACK_A, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupInstallFileA(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))) + SetupInstallFileA(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFileExA(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFileExA(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFileExA(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, sourcefile : ::windows_core::PCSTR, sourcepathroot : ::windows_core::PCSTR, destinationname : ::windows_core::PCSTR, copystyle : SP_COPY_STYLE, copymsghandler : PSP_FILE_CALLBACK_A, context : *const ::core::ffi::c_void, filewasinuse : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetupInstallFileExA(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), filewasinuse) + SetupInstallFileExA(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), filewasinuse).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFileExW(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFileExW(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFileExW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, sourcefile : ::windows_core::PCWSTR, sourcepathroot : ::windows_core::PCWSTR, destinationname : ::windows_core::PCWSTR, copystyle : SP_COPY_STYLE, copymsghandler : PSP_FILE_CALLBACK_W, context : *const ::core::ffi::c_void, filewasinuse : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetupInstallFileExW(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), filewasinuse) + SetupInstallFileExW(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), filewasinuse).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFileW(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFileW(infhandle: ::core::option::Option<*const ::core::ffi::c_void>, infcontext: ::core::option::Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFileW(infhandle : *const ::core::ffi::c_void, infcontext : *const INFCONTEXT, sourcefile : ::windows_core::PCWSTR, sourcepathroot : ::windows_core::PCWSTR, destinationname : ::windows_core::PCWSTR, copystyle : SP_COPY_STYLE, copymsghandler : PSP_FILE_CALLBACK_W, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupInstallFileW(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))) + SetupInstallFileW(::core::mem::transmute(infhandle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(infcontext.unwrap_or(::std::ptr::null())), sourcefile.into_param().abi(), sourcepathroot.into_param().abi(), destinationname.into_param().abi(), copystyle, copymsghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFilesFromInfSectionA(infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, filequeue: *const ::core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFilesFromInfSectionA(infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, filequeue: *const ::core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFilesFromInfSectionA(infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, filequeue : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, sourcerootpath : ::windows_core::PCSTR, copyflags : u32) -> super::super::Foundation:: BOOL); - SetupInstallFilesFromInfSectionA(infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), filequeue, sectionname.into_param().abi(), sourcerootpath.into_param().abi(), copyflags) + SetupInstallFilesFromInfSectionA(infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), filequeue, sectionname.into_param().abi(), sourcerootpath.into_param().abi(), copyflags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallFilesFromInfSectionW(infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, filequeue: *const ::core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFilesFromInfSectionW(infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, filequeue: *const ::core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFilesFromInfSectionW(infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, filequeue : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, sourcerootpath : ::windows_core::PCWSTR, copyflags : u32) -> super::super::Foundation:: BOOL); - SetupInstallFilesFromInfSectionW(infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), filequeue, sectionname.into_param().abi(), sourcerootpath.into_param().abi(), copyflags) + SetupInstallFilesFromInfSectionW(infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), filequeue, sectionname.into_param().abi(), sourcerootpath.into_param().abi(), copyflags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SetupInstallFromInfSectionA(owner: P0, infhandle: *const ::core::ffi::c_void, sectionname: P1, flags: u32, relativekeyroot: P2, sourcerootpath: P3, copyflags: u32, msghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>, deviceinfoset: P4, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFromInfSectionA(owner: P0, infhandle: *const ::core::ffi::c_void, sectionname: P1, flags: u32, relativekeyroot: P2, sourcerootpath: P3, copyflags: u32, msghandler: PSP_FILE_CALLBACK_A, context: ::core::option::Option<*const ::core::ffi::c_void>, deviceinfoset: P4, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -4119,12 +4121,12 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFromInfSectionA(owner : super::super::Foundation:: HWND, infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, flags : u32, relativekeyroot : super::super::System::Registry:: HKEY, sourcerootpath : ::windows_core::PCSTR, copyflags : u32, msghandler : PSP_FILE_CALLBACK_A, context : *const ::core::ffi::c_void, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupInstallFromInfSectionA(owner.into_param().abi(), infhandle, sectionname.into_param().abi(), flags, relativekeyroot.into_param().abi(), sourcerootpath.into_param().abi(), copyflags, msghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))) + SetupInstallFromInfSectionA(owner.into_param().abi(), infhandle, sectionname.into_param().abi(), flags, relativekeyroot.into_param().abi(), sourcerootpath.into_param().abi(), copyflags, msghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SetupInstallFromInfSectionW(owner: P0, infhandle: *const ::core::ffi::c_void, sectionname: P1, flags: u32, relativekeyroot: P2, sourcerootpath: P3, copyflags: u32, msghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>, deviceinfoset: P4, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallFromInfSectionW(owner: P0, infhandle: *const ::core::ffi::c_void, sectionname: P1, flags: u32, relativekeyroot: P2, sourcerootpath: P3, copyflags: u32, msghandler: PSP_FILE_CALLBACK_W, context: ::core::option::Option<*const ::core::ffi::c_void>, deviceinfoset: P4, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -4133,94 +4135,94 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallFromInfSectionW(owner : super::super::Foundation:: HWND, infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, flags : u32, relativekeyroot : super::super::System::Registry:: HKEY, sourcerootpath : ::windows_core::PCWSTR, copyflags : u32, msghandler : PSP_FILE_CALLBACK_W, context : *const ::core::ffi::c_void, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupInstallFromInfSectionW(owner.into_param().abi(), infhandle, sectionname.into_param().abi(), flags, relativekeyroot.into_param().abi(), sourcerootpath.into_param().abi(), copyflags, msghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))) + SetupInstallFromInfSectionW(owner.into_param().abi(), infhandle, sectionname.into_param().abi(), flags, relativekeyroot.into_param().abi(), sourcerootpath.into_param().abi(), copyflags, msghandler, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionA(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallServicesFromInfSectionA(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionA(infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, flags : u32) -> super::super::Foundation:: BOOL); - SetupInstallServicesFromInfSectionA(infhandle, sectionname.into_param().abi(), flags) + SetupInstallServicesFromInfSectionA(infhandle, sectionname.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionExA(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallServicesFromInfSectionExA(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExA(infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, flags : u32, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, reserved1 : *const ::core::ffi::c_void, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupInstallServicesFromInfSectionExA(infhandle, sectionname.into_param().abi(), flags, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupInstallServicesFromInfSectionExA(infhandle, sectionname.into_param().abi(), flags, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionExW(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallServicesFromInfSectionExW(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32, deviceinfoset: P1, deviceinfodata: ::core::option::Option<*const SP_DEVINFO_DATA>, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExW(infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, flags : u32, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, reserved1 : *const ::core::ffi::c_void, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupInstallServicesFromInfSectionExW(infhandle, sectionname.into_param().abi(), flags, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupInstallServicesFromInfSectionExW(infhandle, sectionname.into_param().abi(), flags, deviceinfoset.into_param().abi(), ::core::mem::transmute(deviceinfodata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupInstallServicesFromInfSectionW(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupInstallServicesFromInfSectionW(infhandle: *const ::core::ffi::c_void, sectionname: P0, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionW(infhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - SetupInstallServicesFromInfSectionW(infhandle, sectionname.into_param().abi(), flags) + SetupInstallServicesFromInfSectionW(infhandle, sectionname.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupIterateCabinetA(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_A, context: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetupIterateCabinetA(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_A, context: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupIterateCabinetA(cabinetfile : ::windows_core::PCSTR, reserved : u32, msghandler : PSP_FILE_CALLBACK_A, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupIterateCabinetA(cabinetfile.into_param().abi(), reserved, msghandler, context) + SetupIterateCabinetA(cabinetfile.into_param().abi(), reserved, msghandler, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupIterateCabinetW(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_W, context: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetupIterateCabinetW(cabinetfile: P0, reserved: u32, msghandler: PSP_FILE_CALLBACK_W, context: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupIterateCabinetW(cabinetfile : ::windows_core::PCWSTR, reserved : u32, msghandler : PSP_FILE_CALLBACK_W, context : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupIterateCabinetW(cabinetfile.into_param().abi(), reserved, msghandler, context) + SetupIterateCabinetW(cabinetfile.into_param().abi(), reserved, msghandler, context).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupLogErrorA(messagestring: P0, severity: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupLogErrorA(messagestring: P0, severity: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupLogErrorA(messagestring : ::windows_core::PCSTR, severity : u32) -> super::super::Foundation:: BOOL); - SetupLogErrorA(messagestring.into_param().abi(), severity) + SetupLogErrorA(messagestring.into_param().abi(), severity).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupLogErrorW(messagestring: P0, severity: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupLogErrorW(messagestring: P0, severity: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupLogErrorW(messagestring : ::windows_core::PCWSTR, severity : u32) -> super::super::Foundation:: BOOL); - SetupLogErrorW(messagestring.into_param().abi(), severity) + SetupLogErrorW(messagestring.into_param().abi(), severity).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupLogFileA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, sourcefilename: P1, targetfilename: P2, checksum: u32, disktagfile: P3, diskdescription: P4, otherinfo: P5, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupLogFileA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, sourcefilename: P1, targetfilename: P2, checksum: u32, disktagfile: P3, diskdescription: P4, otherinfo: P5, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -4230,12 +4232,12 @@ where P5: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupLogFileA(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCSTR, sourcefilename : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR, checksum : u32, disktagfile : ::windows_core::PCSTR, diskdescription : ::windows_core::PCSTR, otherinfo : ::windows_core::PCSTR, flags : u32) -> super::super::Foundation:: BOOL); - SetupLogFileA(fileloghandle, logsectionname.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), checksum, disktagfile.into_param().abi(), diskdescription.into_param().abi(), otherinfo.into_param().abi(), flags) + SetupLogFileA(fileloghandle, logsectionname.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), checksum, disktagfile.into_param().abi(), diskdescription.into_param().abi(), otherinfo.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupLogFileW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, sourcefilename: P1, targetfilename: P2, checksum: u32, disktagfile: P3, diskdescription: P4, otherinfo: P5, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupLogFileW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, sourcefilename: P1, targetfilename: P2, checksum: u32, disktagfile: P3, diskdescription: P4, otherinfo: P5, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -4245,27 +4247,27 @@ where P5: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupLogFileW(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCWSTR, sourcefilename : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR, checksum : u32, disktagfile : ::windows_core::PCWSTR, diskdescription : ::windows_core::PCWSTR, otherinfo : ::windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - SetupLogFileW(fileloghandle, logsectionname.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), checksum, disktagfile.into_param().abi(), diskdescription.into_param().abi(), otherinfo.into_param().abi(), flags) + SetupLogFileW(fileloghandle, logsectionname.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), checksum, disktagfile.into_param().abi(), diskdescription.into_param().abi(), otherinfo.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupOpenAppendInfFileA(filename: P0, infhandle: *const ::core::ffi::c_void, errorline: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupOpenAppendInfFileA(filename: P0, infhandle: *const ::core::ffi::c_void, errorline: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupOpenAppendInfFileA(filename : ::windows_core::PCSTR, infhandle : *const ::core::ffi::c_void, errorline : *mut u32) -> super::super::Foundation:: BOOL); - SetupOpenAppendInfFileA(filename.into_param().abi(), infhandle, ::core::mem::transmute(errorline.unwrap_or(::std::ptr::null_mut()))) + SetupOpenAppendInfFileA(filename.into_param().abi(), infhandle, ::core::mem::transmute(errorline.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupOpenAppendInfFileW(filename: P0, infhandle: *const ::core::ffi::c_void, errorline: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupOpenAppendInfFileW(filename: P0, infhandle: *const ::core::ffi::c_void, errorline: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupOpenAppendInfFileW(filename : ::windows_core::PCWSTR, infhandle : *const ::core::ffi::c_void, errorline : *mut u32) -> super::super::Foundation:: BOOL); - SetupOpenAppendInfFileW(filename.into_param().abi(), infhandle, ::core::mem::transmute(errorline.unwrap_or(::std::ptr::null_mut()))) + SetupOpenAppendInfFileW(filename.into_param().abi(), infhandle, ::core::mem::transmute(errorline.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -4296,12 +4298,12 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupOpenLog(erase: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupOpenLog(erase: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupOpenLog(erase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetupOpenLog(erase.into_param().abi()) + SetupOpenLog(erase.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -4373,125 +4375,125 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryDrivesInDiskSpaceListA(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryDrivesInDiskSpaceListA(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryDrivesInDiskSpaceListA(diskspace : *const ::core::ffi::c_void, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryDrivesInDiskSpaceListA(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryDrivesInDiskSpaceListA(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryDrivesInDiskSpaceListW(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryDrivesInDiskSpaceListW(diskspace: *const ::core::ffi::c_void, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryDrivesInDiskSpaceListW(diskspace : *const ::core::ffi::c_void, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryDrivesInDiskSpaceListW(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryDrivesInDiskSpaceListW(diskspace, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryFileLogA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueryFileLogA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryFileLogA(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR, desiredinfo : SetupFileLogInfo, dataout : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryFileLogA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryFileLogA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryFileLogW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueryFileLogW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryFileLogW(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR, desiredinfo : SetupFileLogInfo, dataout : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryFileLogW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryFileLogW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi(), desiredinfo, ::core::mem::transmute(dataout.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dataout.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryInfFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryInfFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfFileInformationA(infinformation : *const SP_INF_INFORMATION, infindex : u32, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfFileInformationA(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryInfFileInformationA(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryInfFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryInfFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfFileInformationW(infinformation : *const SP_INF_INFORMATION, infindex : u32, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfFileInformationW(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryInfFileInformationW(infinformation, infindex, ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupQueryInfOriginalFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, originalfileinfo: *mut SP_ORIGINAL_FILE_INFO_A) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryInfOriginalFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, originalfileinfo: *mut SP_ORIGINAL_FILE_INFO_A) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfOriginalFileInformationA(infinformation : *const SP_INF_INFORMATION, infindex : u32, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, originalfileinfo : *mut SP_ORIGINAL_FILE_INFO_A) -> super::super::Foundation:: BOOL); - SetupQueryInfOriginalFileInformationA(infinformation, infindex, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), originalfileinfo) + SetupQueryInfOriginalFileInformationA(infinformation, infindex, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), originalfileinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupQueryInfOriginalFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, originalfileinfo: *mut SP_ORIGINAL_FILE_INFO_W) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueryInfOriginalFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, originalfileinfo: *mut SP_ORIGINAL_FILE_INFO_W) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfOriginalFileInformationW(infinformation : *const SP_INF_INFORMATION, infindex : u32, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, originalfileinfo : *mut SP_ORIGINAL_FILE_INFO_W) -> super::super::Foundation:: BOOL); - SetupQueryInfOriginalFileInformationW(infinformation, infindex, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), originalfileinfo) + SetupQueryInfOriginalFileInformationW(infinformation, infindex, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), originalfileinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryInfVersionInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueryInfVersionInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: ::core::option::Option<&mut [u8]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfVersionInformationA(infinformation : *const SP_INF_INFORMATION, infindex : u32, key : ::windows_core::PCSTR, returnbuffer : ::windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfVersionInformationA(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryInfVersionInformationA(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueryInfVersionInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueryInfVersionInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: ::core::option::Option<&mut [u16]>, requiredsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueryInfVersionInformationW(infinformation : *const SP_INF_INFORMATION, infindex : u32, key : ::windows_core::PCWSTR, returnbuffer : ::windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupQueryInfVersionInformationW(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))) + SetupQueryInfVersionInformationW(infinformation, infindex, key.into_param().abi(), ::core::mem::transmute(returnbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(requiredsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQuerySourceListA(flags: u32, list: *mut *mut ::windows_core::PCSTR, count: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQuerySourceListA(flags: u32, list: *mut *mut ::windows_core::PCSTR, count: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQuerySourceListA(flags : u32, list : *mut *mut ::windows_core::PCSTR, count : *mut u32) -> super::super::Foundation:: BOOL); - SetupQuerySourceListA(flags, list, count) + SetupQuerySourceListA(flags, list, count).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQuerySourceListW(flags: u32, list: *mut *mut ::windows_core::PCWSTR, count: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQuerySourceListW(flags: u32, list: *mut *mut ::windows_core::PCWSTR, count: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQuerySourceListW(flags : u32, list : *mut *mut ::windows_core::PCWSTR, count : *mut u32) -> super::super::Foundation:: BOOL); - SetupQuerySourceListW(flags, list, count) + SetupQuerySourceListW(flags, list, count).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQuerySpaceRequiredOnDriveA(diskspace: *const ::core::ffi::c_void, drivespec: P0, spacerequired: *mut i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQuerySpaceRequiredOnDriveA(diskspace: *const ::core::ffi::c_void, drivespec: P0, spacerequired: *mut i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQuerySpaceRequiredOnDriveA(diskspace : *const ::core::ffi::c_void, drivespec : ::windows_core::PCSTR, spacerequired : *mut i64, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupQuerySpaceRequiredOnDriveA(diskspace, drivespec.into_param().abi(), spacerequired, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupQuerySpaceRequiredOnDriveA(diskspace, drivespec.into_param().abi(), spacerequired, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQuerySpaceRequiredOnDriveW(diskspace: *const ::core::ffi::c_void, drivespec: P0, spacerequired: *mut i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQuerySpaceRequiredOnDriveW(diskspace: *const ::core::ffi::c_void, drivespec: P0, spacerequired: *mut i64, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQuerySpaceRequiredOnDriveW(diskspace : *const ::core::ffi::c_void, drivespec : ::windows_core::PCWSTR, spacerequired : *mut i64, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupQuerySpaceRequiredOnDriveW(diskspace, drivespec.into_param().abi(), spacerequired, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupQuerySpaceRequiredOnDriveW(diskspace, drivespec.into_param().abi(), spacerequired, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopyA(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcepath: P1, sourcefilename: P2, sourcedescription: P3, sourcetagfile: P4, targetdirectory: P5, targetfilename: P6, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueCopyA(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcepath: P1, sourcefilename: P2, sourcedescription: P3, sourcetagfile: P4, targetdirectory: P5, targetfilename: P6, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -4502,48 +4504,48 @@ where P6: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopyA(queuehandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCSTR, sourcepath : ::windows_core::PCSTR, sourcefilename : ::windows_core::PCSTR, sourcedescription : ::windows_core::PCSTR, sourcetagfile : ::windows_core::PCSTR, targetdirectory : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueCopyA(queuehandle, sourcerootpath.into_param().abi(), sourcepath.into_param().abi(), sourcefilename.into_param().abi(), sourcedescription.into_param().abi(), sourcetagfile.into_param().abi(), targetdirectory.into_param().abi(), targetfilename.into_param().abi(), copystyle) + SetupQueueCopyA(queuehandle, sourcerootpath.into_param().abi(), sourcepath.into_param().abi(), sourcefilename.into_param().abi(), sourcedescription.into_param().abi(), sourcetagfile.into_param().abi(), targetdirectory.into_param().abi(), targetfilename.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopyIndirectA(copyparams: *const SP_FILE_COPY_PARAMS_A) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueueCopyIndirectA(copyparams: *const SP_FILE_COPY_PARAMS_A) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopyIndirectA(copyparams : *const SP_FILE_COPY_PARAMS_A) -> super::super::Foundation:: BOOL); - SetupQueueCopyIndirectA(copyparams) + SetupQueueCopyIndirectA(copyparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopyIndirectW(copyparams: *const SP_FILE_COPY_PARAMS_W) -> super::super::Foundation::BOOL { +pub unsafe fn SetupQueueCopyIndirectW(copyparams: *const SP_FILE_COPY_PARAMS_W) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopyIndirectW(copyparams : *const SP_FILE_COPY_PARAMS_W) -> super::super::Foundation:: BOOL); - SetupQueueCopyIndirectW(copyparams) + SetupQueueCopyIndirectW(copyparams).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopySectionA(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P1, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueCopySectionA(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P1, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopySectionA(queuehandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCSTR, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueCopySectionA(queuehandle, sourcerootpath.into_param().abi(), infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), copystyle) + SetupQueueCopySectionA(queuehandle, sourcerootpath.into_param().abi(), infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopySectionW(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P1, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueCopySectionW(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P1, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopySectionW(queuehandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCWSTR, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueCopySectionW(queuehandle, sourcerootpath.into_param().abi(), infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), copystyle) + SetupQueueCopySectionW(queuehandle, sourcerootpath.into_param().abi(), infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueCopyW(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcepath: P1, sourcefilename: P2, sourcedescription: P3, sourcetagfile: P4, targetdirectory: P5, targetfilename: P6, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueCopyW(queuehandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcepath: P1, sourcefilename: P2, sourcedescription: P3, sourcetagfile: P4, targetdirectory: P5, targetfilename: P6, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -4554,78 +4556,78 @@ where P6: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueCopyW(queuehandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCWSTR, sourcepath : ::windows_core::PCWSTR, sourcefilename : ::windows_core::PCWSTR, sourcedescription : ::windows_core::PCWSTR, sourcetagfile : ::windows_core::PCWSTR, targetdirectory : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueCopyW(queuehandle, sourcerootpath.into_param().abi(), sourcepath.into_param().abi(), sourcefilename.into_param().abi(), sourcedescription.into_param().abi(), sourcetagfile.into_param().abi(), targetdirectory.into_param().abi(), targetfilename.into_param().abi(), copystyle) + SetupQueueCopyW(queuehandle, sourcerootpath.into_param().abi(), sourcepath.into_param().abi(), sourcefilename.into_param().abi(), sourcedescription.into_param().abi(), sourcetagfile.into_param().abi(), targetdirectory.into_param().abi(), targetfilename.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDefaultCopyA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcefilename: P1, targetfilename: P2, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDefaultCopyA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcefilename: P1, targetfilename: P2, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDefaultCopyA(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCSTR, sourcefilename : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueDefaultCopyA(queuehandle, infhandle, sourcerootpath.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), copystyle) + SetupQueueDefaultCopyA(queuehandle, infhandle, sourcerootpath.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDefaultCopyW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcefilename: P1, targetfilename: P2, copystyle: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDefaultCopyW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, sourcerootpath: P0, sourcefilename: P1, targetfilename: P2, copystyle: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDefaultCopyW(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, sourcerootpath : ::windows_core::PCWSTR, sourcefilename : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR, copystyle : u32) -> super::super::Foundation:: BOOL); - SetupQueueDefaultCopyW(queuehandle, infhandle, sourcerootpath.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), copystyle) + SetupQueueDefaultCopyW(queuehandle, infhandle, sourcerootpath.into_param().abi(), sourcefilename.into_param().abi(), targetfilename.into_param().abi(), copystyle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDeleteA(queuehandle: *const ::core::ffi::c_void, pathpart1: P0, pathpart2: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDeleteA(queuehandle: *const ::core::ffi::c_void, pathpart1: P0, pathpart2: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDeleteA(queuehandle : *const ::core::ffi::c_void, pathpart1 : ::windows_core::PCSTR, pathpart2 : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupQueueDeleteA(queuehandle, pathpart1.into_param().abi(), pathpart2.into_param().abi()) + SetupQueueDeleteA(queuehandle, pathpart1.into_param().abi(), pathpart2.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDeleteSectionA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDeleteSectionA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDeleteSectionA(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupQueueDeleteSectionA(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()) + SetupQueueDeleteSectionA(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDeleteSectionW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDeleteSectionW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDeleteSectionW(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupQueueDeleteSectionW(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()) + SetupQueueDeleteSectionW(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueDeleteW(queuehandle: *const ::core::ffi::c_void, pathpart1: P0, pathpart2: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueDeleteW(queuehandle: *const ::core::ffi::c_void, pathpart1: P0, pathpart2: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueDeleteW(queuehandle : *const ::core::ffi::c_void, pathpart1 : ::windows_core::PCWSTR, pathpart2 : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupQueueDeleteW(queuehandle, pathpart1.into_param().abi(), pathpart2.into_param().abi()) + SetupQueueDeleteW(queuehandle, pathpart1.into_param().abi(), pathpart2.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueRenameA(queuehandle: *const ::core::ffi::c_void, sourcepath: P0, sourcefilename: P1, targetpath: P2, targetfilename: P3) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueRenameA(queuehandle: *const ::core::ffi::c_void, sourcepath: P0, sourcefilename: P1, targetpath: P2, targetfilename: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -4633,32 +4635,32 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueRenameA(queuehandle : *const ::core::ffi::c_void, sourcepath : ::windows_core::PCSTR, sourcefilename : ::windows_core::PCSTR, targetpath : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupQueueRenameA(queuehandle, sourcepath.into_param().abi(), sourcefilename.into_param().abi(), targetpath.into_param().abi(), targetfilename.into_param().abi()) + SetupQueueRenameA(queuehandle, sourcepath.into_param().abi(), sourcefilename.into_param().abi(), targetpath.into_param().abi(), targetfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueRenameSectionA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueRenameSectionA(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueRenameSectionA(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupQueueRenameSectionA(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()) + SetupQueueRenameSectionA(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueRenameSectionW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueRenameSectionW(queuehandle: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, section: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueRenameSectionW(queuehandle : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, section : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupQueueRenameSectionW(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()) + SetupQueueRenameSectionW(queuehandle, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), section.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupQueueRenameW(queuehandle: *const ::core::ffi::c_void, sourcepath: P0, sourcefilename: P1, targetpath: P2, targetfilename: P3) -> super::super::Foundation::BOOL +pub unsafe fn SetupQueueRenameW(queuehandle: *const ::core::ffi::c_void, sourcepath: P0, sourcefilename: P1, targetpath: P2, targetfilename: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -4666,109 +4668,109 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupQueueRenameW(queuehandle : *const ::core::ffi::c_void, sourcepath : ::windows_core::PCWSTR, sourcefilename : ::windows_core::PCWSTR, targetpath : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupQueueRenameW(queuehandle, sourcepath.into_param().abi(), sourcefilename.into_param().abi(), targetpath.into_param().abi(), targetfilename.into_param().abi()) + SetupQueueRenameW(queuehandle, sourcepath.into_param().abi(), sourcefilename.into_param().abi(), targetpath.into_param().abi(), targetfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFileLogEntryA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFileLogEntryA(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFileLogEntryA(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCSTR, targetfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupRemoveFileLogEntryA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi()) + SetupRemoveFileLogEntryA(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFileLogEntryW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFileLogEntryW(fileloghandle: *const ::core::ffi::c_void, logsectionname: P0, targetfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFileLogEntryW(fileloghandle : *const ::core::ffi::c_void, logsectionname : ::windows_core::PCWSTR, targetfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupRemoveFileLogEntryW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi()) + SetupRemoveFileLogEntryW(fileloghandle, logsectionname.into_param().abi(), targetfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFromDiskSpaceListA(diskspace : *const ::core::ffi::c_void, targetfilespec : ::windows_core::PCSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveFromDiskSpaceListA(diskspace, targetfilespec.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveFromDiskSpaceListA(diskspace, targetfilespec.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, targetfilespec: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFromDiskSpaceListW(diskspace : *const ::core::ffi::c_void, targetfilespec : ::windows_core::PCWSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveFromDiskSpaceListW(diskspace, targetfilespec.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveFromDiskSpaceListW(diskspace, targetfilespec.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFromSourceListA(flags: u32, source: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFromSourceListA(flags: u32, source: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFromSourceListA(flags : u32, source : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupRemoveFromSourceListA(flags, source.into_param().abi()) + SetupRemoveFromSourceListA(flags, source.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveFromSourceListW(flags: u32, source: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveFromSourceListW(flags: u32, source: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveFromSourceListW(flags : u32, source : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupRemoveFromSourceListW(flags, source.into_param().abi()) + SetupRemoveFromSourceListW(flags, source.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveInstallSectionFromDiskSpaceListA(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveInstallSectionFromDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveInstallSectionFromDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, layoutinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveInstallSectionFromDiskSpaceListW(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, layoutinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveInstallSectionFromDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveInstallSectionFromDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(layoutinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveSectionFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveSectionFromDiskSpaceListA(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveSectionFromDiskSpaceListA(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveSectionFromDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveSectionFromDiskSpaceListA(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupRemoveSectionFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupRemoveSectionFromDiskSpaceListW(diskspace: *const ::core::ffi::c_void, infhandle: *const ::core::ffi::c_void, listinfhandle: ::core::option::Option<*const ::core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: ::core::option::Option<*const ::core::ffi::c_void>, reserved2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupRemoveSectionFromDiskSpaceListW(diskspace : *const ::core::ffi::c_void, infhandle : *const ::core::ffi::c_void, listinfhandle : *const ::core::ffi::c_void, sectionname : ::windows_core::PCWSTR, operation : SETUP_FILE_OPERATION, reserved1 : *const ::core::ffi::c_void, reserved2 : u32) -> super::super::Foundation:: BOOL); - SetupRemoveSectionFromDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2) + SetupRemoveSectionFromDiskSpaceListW(diskspace, infhandle, ::core::mem::transmute(listinfhandle.unwrap_or(::std::ptr::null())), sectionname.into_param().abi(), operation, ::core::mem::transmute(reserved1.unwrap_or(::std::ptr::null())), reserved2).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -4799,89 +4801,89 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupScanFileQueueA(filequeue: *const ::core::ffi::c_void, flags: u32, window: P0, callbackroutine: PSP_FILE_CALLBACK_A, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, result: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupScanFileQueueA(filequeue: *const ::core::ffi::c_void, flags: u32, window: P0, callbackroutine: PSP_FILE_CALLBACK_A, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, result: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupScanFileQueueA(filequeue : *const ::core::ffi::c_void, flags : u32, window : super::super::Foundation:: HWND, callbackroutine : PSP_FILE_CALLBACK_A, callbackcontext : *const ::core::ffi::c_void, result : *mut u32) -> super::super::Foundation:: BOOL); - SetupScanFileQueueA(filequeue, flags, window.into_param().abi(), callbackroutine, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), result) + SetupScanFileQueueA(filequeue, flags, window.into_param().abi(), callbackroutine, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), result).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupScanFileQueueW(filequeue: *const ::core::ffi::c_void, flags: u32, window: P0, callbackroutine: PSP_FILE_CALLBACK_W, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, result: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetupScanFileQueueW(filequeue: *const ::core::ffi::c_void, flags: u32, window: P0, callbackroutine: PSP_FILE_CALLBACK_W, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, result: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("setupapi.dll" "system" fn SetupScanFileQueueW(filequeue : *const ::core::ffi::c_void, flags : u32, window : super::super::Foundation:: HWND, callbackroutine : PSP_FILE_CALLBACK_W, callbackcontext : *const ::core::ffi::c_void, result : *mut u32) -> super::super::Foundation:: BOOL); - SetupScanFileQueueW(filequeue, flags, window.into_param().abi(), callbackroutine, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), result) + SetupScanFileQueueW(filequeue, flags, window.into_param().abi(), callbackroutine, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), result).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetDirectoryIdA(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetDirectoryIdA(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetDirectoryIdA(infhandle : *const ::core::ffi::c_void, id : u32, directory : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupSetDirectoryIdA(infhandle, id, directory.into_param().abi()) + SetupSetDirectoryIdA(infhandle, id, directory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetDirectoryIdExA(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0, flags: u32, reserved1: u32, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetDirectoryIdExA(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0, flags: u32, reserved1: u32, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetDirectoryIdExA(infhandle : *const ::core::ffi::c_void, id : u32, directory : ::windows_core::PCSTR, flags : u32, reserved1 : u32, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupSetDirectoryIdExA(infhandle, id, directory.into_param().abi(), flags, reserved1, ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupSetDirectoryIdExA(infhandle, id, directory.into_param().abi(), flags, reserved1, ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetDirectoryIdExW(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0, flags: u32, reserved1: u32, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetDirectoryIdExW(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0, flags: u32, reserved1: u32, reserved2: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetDirectoryIdExW(infhandle : *const ::core::ffi::c_void, id : u32, directory : ::windows_core::PCWSTR, flags : u32, reserved1 : u32, reserved2 : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupSetDirectoryIdExW(infhandle, id, directory.into_param().abi(), flags, reserved1, ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))) + SetupSetDirectoryIdExW(infhandle, id, directory.into_param().abi(), flags, reserved1, ::core::mem::transmute(reserved2.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetDirectoryIdW(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetDirectoryIdW(infhandle: *const ::core::ffi::c_void, id: u32, directory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetDirectoryIdW(infhandle : *const ::core::ffi::c_void, id : u32, directory : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupSetDirectoryIdW(infhandle, id, directory.into_param().abi()) + SetupSetDirectoryIdW(infhandle, id, directory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupSetFileQueueAlternatePlatformA(queuehandle: *const ::core::ffi::c_void, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, alternatedefaultcatalogfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetFileQueueAlternatePlatformA(queuehandle: *const ::core::ffi::c_void, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, alternatedefaultcatalogfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetFileQueueAlternatePlatformA(queuehandle : *const ::core::ffi::c_void, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, alternatedefaultcatalogfile : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupSetFileQueueAlternatePlatformA(queuehandle, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), alternatedefaultcatalogfile.into_param().abi()) + SetupSetFileQueueAlternatePlatformA(queuehandle, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), alternatedefaultcatalogfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug"))] #[inline] -pub unsafe fn SetupSetFileQueueAlternatePlatformW(queuehandle: *const ::core::ffi::c_void, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, alternatedefaultcatalogfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetFileQueueAlternatePlatformW(queuehandle: *const ::core::ffi::c_void, alternateplatforminfo: ::core::option::Option<*const SP_ALTPLATFORM_INFO_V2>, alternatedefaultcatalogfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetFileQueueAlternatePlatformW(queuehandle : *const ::core::ffi::c_void, alternateplatforminfo : *const SP_ALTPLATFORM_INFO_V2, alternatedefaultcatalogfile : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupSetFileQueueAlternatePlatformW(queuehandle, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), alternatedefaultcatalogfile.into_param().abi()) + SetupSetFileQueueAlternatePlatformW(queuehandle, ::core::mem::transmute(alternateplatforminfo.unwrap_or(::std::ptr::null())), alternatedefaultcatalogfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetFileQueueFlags(filequeue: *const ::core::ffi::c_void, flagmask: u32, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetupSetFileQueueFlags(filequeue: *const ::core::ffi::c_void, flagmask: u32, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetFileQueueFlags(filequeue : *const ::core::ffi::c_void, flagmask : u32, flags : u32) -> super::super::Foundation:: BOOL); - SetupSetFileQueueFlags(filequeue, flagmask, flags) + SetupSetFileQueueFlags(filequeue, flagmask, flags).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -4896,36 +4898,36 @@ where #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetPlatformPathOverrideA(r#override: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetPlatformPathOverrideA(r#override: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetPlatformPathOverrideA(r#override : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetupSetPlatformPathOverrideA(r#override.into_param().abi()) + SetupSetPlatformPathOverrideA(r#override.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetPlatformPathOverrideW(r#override: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetupSetPlatformPathOverrideW(r#override: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetPlatformPathOverrideW(r#override : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetupSetPlatformPathOverrideW(r#override.into_param().abi()) + SetupSetPlatformPathOverrideW(r#override.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetSourceListA(flags: u32, sourcelist: &[::windows_core::PCSTR]) -> super::super::Foundation::BOOL { +pub unsafe fn SetupSetSourceListA(flags: u32, sourcelist: &[::windows_core::PCSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetSourceListA(flags : u32, sourcelist : *const ::windows_core::PCSTR, sourcecount : u32) -> super::super::Foundation:: BOOL); - SetupSetSourceListA(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _) + SetupSetSourceListA(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupSetSourceListW(flags: u32, sourcelist: &[::windows_core::PCWSTR]) -> super::super::Foundation::BOOL { +pub unsafe fn SetupSetSourceListW(flags: u32, sourcelist: &[::windows_core::PCWSTR]) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupSetSourceListW(flags : u32, sourcelist : *const ::windows_core::PCWSTR, sourcecount : u32) -> super::super::Foundation:: BOOL); - SetupSetSourceListW(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _) + SetupSetSourceListW(flags, ::core::mem::transmute(sourcelist.as_ptr()), sourcelist.len() as _).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] #[inline] @@ -4942,16 +4944,16 @@ pub unsafe fn SetupTermDefaultQueueCallback(context: *const ::core::ffi::c_void) #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupTerminateFileLog(fileloghandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn SetupTerminateFileLog(fileloghandle: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupTerminateFileLog(fileloghandle : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupTerminateFileLog(fileloghandle) + SetupTerminateFileLog(fileloghandle).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetupUninstallNewlyCopiedInfs(filequeue: *const ::core::ffi::c_void, flags: u32, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SetupUninstallNewlyCopiedInfs(filequeue: *const ::core::ffi::c_void, flags: u32, reserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("setupapi.dll" "system" fn SetupUninstallNewlyCopiedInfs(filequeue : *const ::core::ffi::c_void, flags : u32, reserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupUninstallNewlyCopiedInfs(filequeue, flags, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))) + SetupUninstallNewlyCopiedInfs(filequeue, flags, ::core::mem::transmute(reserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -5020,26 +5022,26 @@ pub unsafe fn SetupWriteTextLogInfLine(logtoken: u64, flags: u32, infhandle: *co #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateDriverForPlugAndPlayDevicesA(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: u32, brebootrequired: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn UpdateDriverForPlugAndPlayDevicesA(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: u32, brebootrequired: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesA(hwndparent : super::super::Foundation:: HWND, hardwareid : ::windows_core::PCSTR, fullinfpath : ::windows_core::PCSTR, installflags : u32, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdateDriverForPlugAndPlayDevicesA(hwndparent.into_param().abi(), hardwareid.into_param().abi(), fullinfpath.into_param().abi(), installflags, ::core::mem::transmute(brebootrequired.unwrap_or(::std::ptr::null_mut()))) + UpdateDriverForPlugAndPlayDevicesA(hwndparent.into_param().abi(), hardwareid.into_param().abi(), fullinfpath.into_param().abi(), installflags, ::core::mem::transmute(brebootrequired.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateDriverForPlugAndPlayDevicesW(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: u32, brebootrequired: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL +pub unsafe fn UpdateDriverForPlugAndPlayDevicesW(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: u32, brebootrequired: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesW(hwndparent : super::super::Foundation:: HWND, hardwareid : ::windows_core::PCWSTR, fullinfpath : ::windows_core::PCWSTR, installflags : u32, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdateDriverForPlugAndPlayDevicesW(hwndparent.into_param().abi(), hardwareid.into_param().abi(), fullinfpath.into_param().abi(), installflags, ::core::mem::transmute(brebootrequired.unwrap_or(::std::ptr::null_mut()))) + UpdateDriverForPlugAndPlayDevicesW(hwndparent.into_param().abi(), hardwareid.into_param().abi(), fullinfpath.into_param().abi(), installflags, ::core::mem::transmute(brebootrequired.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_DeviceAndDriverInstallation\"`*"] pub const ALLOC_LOG_CONF: u32 = 2u32; diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs index 2f38efdac5..8494d80cba 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -70,19 +70,19 @@ where #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyPhysicalMonitor(hmonitor: P0) -> super::super::Foundation::BOOL +pub unsafe fn DestroyPhysicalMonitor(hmonitor: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn DestroyPhysicalMonitor(hmonitor : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DestroyPhysicalMonitor(hmonitor.into_param().abi()) + DestroyPhysicalMonitor(hmonitor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyPhysicalMonitors(pphysicalmonitorarray: &[PHYSICAL_MONITOR]) -> super::super::Foundation::BOOL { +pub unsafe fn DestroyPhysicalMonitors(pphysicalmonitorarray: &[PHYSICAL_MONITOR]) -> ::windows_core::Result<()> { ::windows_targets::link!("dxva2.dll" "system" fn DestroyPhysicalMonitors(dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *const PHYSICAL_MONITOR) -> super::super::Foundation:: BOOL); - DestroyPhysicalMonitors(pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())) + DestroyPhysicalMonitors(pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -546,9 +546,9 @@ pub unsafe fn GetDisplayAutoRotationPreferences(porientation: *mut ORIENTATION_P #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDisplayConfigBufferSizes(flags: QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements: *mut u32, nummodeinfoarrayelements: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetDisplayConfigBufferSizes(flags: QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements: *mut u32, nummodeinfoarrayelements: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetDisplayConfigBufferSizes(flags : QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements : *mut u32, nummodeinfoarrayelements : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetDisplayConfigBufferSizes(flags, numpatharrayelements, nummodeinfoarrayelements) + GetDisplayConfigBufferSizes(flags, numpatharrayelements, nummodeinfoarrayelements).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -643,12 +643,12 @@ where #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor: P0, pdwnumberofphysicalmonitors: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor: P0, pdwnumberofphysicalmonitors: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, pdwnumberofphysicalmonitors : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pdwnumberofphysicalmonitors) + GetNumberOfPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pdwnumberofphysicalmonitors).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Graphics_Direct3D9\"`*"] #[cfg(feature = "Win32_Graphics_Direct3D9")] @@ -664,12 +664,12 @@ where #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetPhysicalMonitorsFromHMONITOR(hmonitor: P0, pphysicalmonitorarray: &mut [PHYSICAL_MONITOR]) -> super::super::Foundation::BOOL +pub unsafe fn GetPhysicalMonitorsFromHMONITOR(hmonitor: P0, pphysicalmonitorarray: &mut [PHYSICAL_MONITOR]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dxva2.dll" "system" fn GetPhysicalMonitorsFromHMONITOR(hmonitor : super::super::Graphics::Gdi:: HMONITOR, dwphysicalmonitorarraysize : u32, pphysicalmonitorarray : *mut PHYSICAL_MONITOR) -> super::super::Foundation:: BOOL); - GetPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())) + GetPhysicalMonitorsFromHMONITOR(hmonitor.into_param().abi(), pphysicalmonitorarray.len() as _, ::core::mem::transmute(pphysicalmonitorarray.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Direct3D9\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Direct3D9"))] @@ -754,9 +754,9 @@ pub unsafe fn PATHOBJ_vGetBounds(ppo: *mut PATHOBJ, prectfx: *mut RECTFX) { #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryDisplayConfig(flags: QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements: *mut u32, patharray: *mut DISPLAYCONFIG_PATH_INFO, nummodeinfoarrayelements: *mut u32, modeinfoarray: *mut DISPLAYCONFIG_MODE_INFO, currenttopologyid: ::core::option::Option<*mut DISPLAYCONFIG_TOPOLOGY_ID>) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn QueryDisplayConfig(flags: QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements: *mut u32, patharray: *mut DISPLAYCONFIG_PATH_INFO, nummodeinfoarrayelements: *mut u32, modeinfoarray: *mut DISPLAYCONFIG_MODE_INFO, currenttopologyid: ::core::option::Option<*mut DISPLAYCONFIG_TOPOLOGY_ID>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn QueryDisplayConfig(flags : QUERY_DISPLAY_CONFIG_FLAGS, numpatharrayelements : *mut u32, patharray : *mut DISPLAYCONFIG_PATH_INFO, nummodeinfoarrayelements : *mut u32, modeinfoarray : *mut DISPLAYCONFIG_MODE_INFO, currenttopologyid : *mut DISPLAYCONFIG_TOPOLOGY_ID) -> super::super::Foundation:: WIN32_ERROR); - QueryDisplayConfig(flags, numpatharrayelements, patharray, nummodeinfoarrayelements, modeinfoarray, ::core::mem::transmute(currenttopologyid.unwrap_or(::std::ptr::null_mut()))) + QueryDisplayConfig(flags, numpatharrayelements, patharray, nummodeinfoarrayelements, modeinfoarray, ::core::mem::transmute(currenttopologyid.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Display\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs index 9a10c0b9fa..5c6e8d535a 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -52,126 +52,126 @@ pub unsafe fn FaxCompleteJobParamsW(jobparams: *mut *mut FAX_JOB_PARAMW, coverpa #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxConnectFaxServerA(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn FaxConnectFaxServerA(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxConnectFaxServerA(machinename : ::windows_core::PCSTR, faxhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FaxConnectFaxServerA(machinename.into_param().abi(), faxhandle) + FaxConnectFaxServerA(machinename.into_param().abi(), faxhandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxConnectFaxServerW(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn FaxConnectFaxServerW(machinename: P0, faxhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxConnectFaxServerW(machinename : ::windows_core::PCWSTR, faxhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FaxConnectFaxServerW(machinename.into_param().abi(), faxhandle) + FaxConnectFaxServerW(machinename.into_param().abi(), faxhandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: P0, routingguid: P1, enabled: P2) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnableRoutingMethodA(faxporthandle: P0, routingguid: P1, enabled: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), enabled.into_param().abi()) + FaxEnableRoutingMethodA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), enabled.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: P0, routingguid: P1, enabled: P2) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnableRoutingMethodW(faxporthandle: P0, routingguid: P1, enabled: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnableRoutingMethodW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCWSTR, enabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - FaxEnableRoutingMethodW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), enabled.into_param().abi()) + FaxEnableRoutingMethodW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), enabled.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumGlobalRoutingInfoA(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumGlobalRoutingInfoA(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumGlobalRoutingInfoA(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *mut *mut FAX_GLOBAL_ROUTING_INFOA, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumGlobalRoutingInfoA(faxhandle.into_param().abi(), routinginfo, methodsreturned) + FaxEnumGlobalRoutingInfoA(faxhandle.into_param().abi(), routinginfo, methodsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumGlobalRoutingInfoW(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumGlobalRoutingInfoW(faxhandle: P0, routinginfo: *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumGlobalRoutingInfoW(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *mut *mut FAX_GLOBAL_ROUTING_INFOW, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumGlobalRoutingInfoW(faxhandle.into_param().abi(), routinginfo, methodsreturned) + FaxEnumGlobalRoutingInfoW(faxhandle.into_param().abi(), routinginfo, methodsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumJobsA(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYA, jobsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumJobsA(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYA, jobsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumJobsA(faxhandle : super::super::Foundation:: HANDLE, jobentry : *mut *mut FAX_JOB_ENTRYA, jobsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumJobsA(faxhandle.into_param().abi(), jobentry, jobsreturned) + FaxEnumJobsA(faxhandle.into_param().abi(), jobentry, jobsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumJobsW(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYW, jobsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumJobsW(faxhandle: P0, jobentry: *mut *mut FAX_JOB_ENTRYW, jobsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumJobsW(faxhandle : super::super::Foundation:: HANDLE, jobentry : *mut *mut FAX_JOB_ENTRYW, jobsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumJobsW(faxhandle.into_param().abi(), jobentry, jobsreturned) + FaxEnumJobsW(faxhandle.into_param().abi(), jobentry, jobsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumPortsA(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOA, portsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumPortsA(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOA, portsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumPortsA(faxhandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOA, portsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumPortsA(faxhandle.into_param().abi(), portinfo, portsreturned) + FaxEnumPortsA(faxhandle.into_param().abi(), portinfo, portsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumPortsW(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOW, portsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumPortsW(faxhandle: P0, portinfo: *mut *mut FAX_PORT_INFOW, portsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumPortsW(faxhandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOW, portsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumPortsW(faxhandle.into_param().abi(), portinfo, portsreturned) + FaxEnumPortsW(faxhandle.into_param().abi(), portinfo, portsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumRoutingMethodsA(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODA, methodsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumRoutingMethodsA(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODA, methodsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumRoutingMethodsA(faxporthandle : super::super::Foundation:: HANDLE, routingmethod : *mut *mut FAX_ROUTING_METHODA, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumRoutingMethodsA(faxporthandle.into_param().abi(), routingmethod, methodsreturned) + FaxEnumRoutingMethodsA(faxporthandle.into_param().abi(), routingmethod, methodsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxEnumRoutingMethodsW(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODW, methodsreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxEnumRoutingMethodsW(faxporthandle: P0, routingmethod: *mut *mut FAX_ROUTING_METHODW, methodsreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxEnumRoutingMethodsW(faxporthandle : super::super::Foundation:: HANDLE, routingmethod : *mut *mut FAX_ROUTING_METHODW, methodsreturned : *mut u32) -> super::super::Foundation:: BOOL); - FaxEnumRoutingMethodsW(faxporthandle.into_param().abi(), routingmethod, methodsreturned) + FaxEnumRoutingMethodsW(faxporthandle.into_param().abi(), routingmethod, methodsreturned).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`*"] #[inline] @@ -182,82 +182,82 @@ pub unsafe fn FaxFreeBuffer(buffer: *mut ::core::ffi::c_void) { #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetConfigurationA(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONA) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetConfigurationA(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetConfigurationA(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *mut *mut FAX_CONFIGURATIONA) -> super::super::Foundation:: BOOL); - FaxGetConfigurationA(faxhandle.into_param().abi(), faxconfig) + FaxGetConfigurationA(faxhandle.into_param().abi(), faxconfig).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetConfigurationW(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONW) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetConfigurationW(faxhandle: P0, faxconfig: *mut *mut FAX_CONFIGURATIONW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetConfigurationW(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *mut *mut FAX_CONFIGURATIONW) -> super::super::Foundation:: BOOL); - FaxGetConfigurationW(faxhandle.into_param().abi(), faxconfig) + FaxGetConfigurationW(faxhandle.into_param().abi(), faxconfig).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetDeviceStatusA(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSA) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetDeviceStatusA(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetDeviceStatusA(faxporthandle : super::super::Foundation:: HANDLE, devicestatus : *mut *mut FAX_DEVICE_STATUSA) -> super::super::Foundation:: BOOL); - FaxGetDeviceStatusA(faxporthandle.into_param().abi(), devicestatus) + FaxGetDeviceStatusA(faxporthandle.into_param().abi(), devicestatus).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetDeviceStatusW(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSW) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetDeviceStatusW(faxporthandle: P0, devicestatus: *mut *mut FAX_DEVICE_STATUSW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetDeviceStatusW(faxporthandle : super::super::Foundation:: HANDLE, devicestatus : *mut *mut FAX_DEVICE_STATUSW) -> super::super::Foundation:: BOOL); - FaxGetDeviceStatusW(faxporthandle.into_param().abi(), devicestatus) + FaxGetDeviceStatusW(faxporthandle.into_param().abi(), devicestatus).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetJobA(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYA) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetJobA(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetJobA(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, jobentry : *mut *mut FAX_JOB_ENTRYA) -> super::super::Foundation:: BOOL); - FaxGetJobA(faxhandle.into_param().abi(), jobid, jobentry) + FaxGetJobA(faxhandle.into_param().abi(), jobid, jobentry).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetJobW(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYW) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetJobW(faxhandle: P0, jobid: u32, jobentry: *mut *mut FAX_JOB_ENTRYW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetJobW(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, jobentry : *mut *mut FAX_JOB_ENTRYW) -> super::super::Foundation:: BOOL); - FaxGetJobW(faxhandle.into_param().abi(), jobid, jobentry) + FaxGetJobW(faxhandle.into_param().abi(), jobid, jobentry).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetLoggingCategoriesA(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYA, numbercategories: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetLoggingCategoriesA(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYA, numbercategories: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetLoggingCategoriesA(faxhandle : super::super::Foundation:: HANDLE, categories : *mut *mut FAX_LOG_CATEGORYA, numbercategories : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetLoggingCategoriesA(faxhandle.into_param().abi(), categories, numbercategories) + FaxGetLoggingCategoriesA(faxhandle.into_param().abi(), categories, numbercategories).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetLoggingCategoriesW(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYW, numbercategories: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetLoggingCategoriesW(faxhandle: P0, categories: *mut *mut FAX_LOG_CATEGORYW, numbercategories: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetLoggingCategoriesW(faxhandle : super::super::Foundation:: HANDLE, categories : *mut *mut FAX_LOG_CATEGORYW, numbercategories : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetLoggingCategoriesW(faxhandle.into_param().abi(), categories, numbercategories) + FaxGetLoggingCategoriesW(faxhandle.into_param().abi(), categories, numbercategories).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -272,44 +272,44 @@ where #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetPortA(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOA) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetPortA(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetPortA(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOA) -> super::super::Foundation:: BOOL); - FaxGetPortA(faxporthandle.into_param().abi(), portinfo) + FaxGetPortA(faxporthandle.into_param().abi(), portinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetPortW(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOW) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetPortW(faxporthandle: P0, portinfo: *mut *mut FAX_PORT_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetPortW(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *mut *mut FAX_PORT_INFOW) -> super::super::Foundation:: BOOL); - FaxGetPortW(faxporthandle.into_param().abi(), portinfo) + FaxGetPortW(faxporthandle.into_param().abi(), portinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetRoutingInfoA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCSTR, routinginfobuffer : *mut *mut u8, routinginfobuffersize : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetRoutingInfoA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize) + FaxGetRoutingInfoA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxGetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxGetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *mut *mut u8, routinginfobuffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxGetRoutingInfoW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCWSTR, routinginfobuffer : *mut *mut u8, routinginfobuffersize : *mut u32) -> super::super::Foundation:: BOOL); - FaxGetRoutingInfoW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize) + FaxGetRoutingInfoW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -336,21 +336,21 @@ where #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn FaxPrintCoverPageA(faxcontextinfo: *const FAX_CONTEXT_INFOA, coverpageinfo: *const FAX_COVERPAGE_INFOA) -> super::super::Foundation::BOOL { +pub unsafe fn FaxPrintCoverPageA(faxcontextinfo: *const FAX_CONTEXT_INFOA, coverpageinfo: *const FAX_COVERPAGE_INFOA) -> ::windows_core::Result<()> { ::windows_targets::link!("winfax.dll" "system" fn FaxPrintCoverPageA(faxcontextinfo : *const FAX_CONTEXT_INFOA, coverpageinfo : *const FAX_COVERPAGE_INFOA) -> super::super::Foundation:: BOOL); - FaxPrintCoverPageA(faxcontextinfo, coverpageinfo) + FaxPrintCoverPageA(faxcontextinfo, coverpageinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn FaxPrintCoverPageW(faxcontextinfo: *const FAX_CONTEXT_INFOW, coverpageinfo: *const FAX_COVERPAGE_INFOW) -> super::super::Foundation::BOOL { +pub unsafe fn FaxPrintCoverPageW(faxcontextinfo: *const FAX_CONTEXT_INFOW, coverpageinfo: *const FAX_COVERPAGE_INFOW) -> ::windows_core::Result<()> { ::windows_targets::link!("winfax.dll" "system" fn FaxPrintCoverPageW(faxcontextinfo : *const FAX_CONTEXT_INFOW, coverpageinfo : *const FAX_COVERPAGE_INFOW) -> super::super::Foundation:: BOOL); - FaxPrintCoverPageW(faxcontextinfo, coverpageinfo) + FaxPrintCoverPageW(faxcontextinfo, coverpageinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxRegisterRoutingExtensionW(faxhandle: P0, extensionname: P1, friendlyname: P2, imagename: P3, callback: PFAX_ROUTING_INSTALLATION_CALLBACKW, context: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn FaxRegisterRoutingExtensionW(faxhandle: P0, extensionname: P1, friendlyname: P2, imagename: P3, callback: PFAX_ROUTING_INSTALLATION_CALLBACKW, context: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -358,12 +358,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxRegisterRoutingExtensionW(faxhandle : super::super::Foundation:: HANDLE, extensionname : ::windows_core::PCWSTR, friendlyname : ::windows_core::PCWSTR, imagename : ::windows_core::PCWSTR, callback : PFAX_ROUTING_INSTALLATION_CALLBACKW, context : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxRegisterRoutingExtensionW(faxhandle.into_param().abi(), extensionname.into_param().abi(), friendlyname.into_param().abi(), imagename.into_param().abi(), callback, context) + FaxRegisterRoutingExtensionW(faxhandle.into_param().abi(), extensionname.into_param().abi(), friendlyname.into_param().abi(), imagename.into_param().abi(), callback, context).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxRegisterServiceProviderW(deviceprovider: P0, friendlyname: P1, imagename: P2, tspname: P3) -> super::super::Foundation::BOOL +pub unsafe fn FaxRegisterServiceProviderW(deviceprovider: P0, friendlyname: P1, imagename: P2, tspname: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -371,193 +371,193 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxRegisterServiceProviderW(deviceprovider : ::windows_core::PCWSTR, friendlyname : ::windows_core::PCWSTR, imagename : ::windows_core::PCWSTR, tspname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FaxRegisterServiceProviderW(deviceprovider.into_param().abi(), friendlyname.into_param().abi(), imagename.into_param().abi(), tspname.into_param().abi()) + FaxRegisterServiceProviderW(deviceprovider.into_param().abi(), friendlyname.into_param().abi(), imagename.into_param().abi(), tspname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSendDocumentA(faxhandle: P0, filename: P1, jobparams: *mut FAX_JOB_PARAMA, coverpageinfo: *const FAX_COVERPAGE_INFOA, faxjobid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSendDocumentA(faxhandle: P0, filename: P1, jobparams: *mut FAX_JOB_PARAMA, coverpageinfo: *const FAX_COVERPAGE_INFOA, faxjobid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentA(faxhandle : super::super::Foundation:: HANDLE, filename : ::windows_core::PCSTR, jobparams : *mut FAX_JOB_PARAMA, coverpageinfo : *const FAX_COVERPAGE_INFOA, faxjobid : *mut u32) -> super::super::Foundation:: BOOL); - FaxSendDocumentA(faxhandle.into_param().abi(), filename.into_param().abi(), jobparams, coverpageinfo, faxjobid) + FaxSendDocumentA(faxhandle.into_param().abi(), filename.into_param().abi(), jobparams, coverpageinfo, faxjobid).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSendDocumentForBroadcastA(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKA, context: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn FaxSendDocumentForBroadcastA(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKA, context: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentForBroadcastA(faxhandle : super::super::Foundation:: HANDLE, filename : ::windows_core::PCSTR, faxjobid : *mut u32, faxrecipientcallback : PFAX_RECIPIENT_CALLBACKA, context : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxSendDocumentForBroadcastA(faxhandle.into_param().abi(), filename.into_param().abi(), faxjobid, faxrecipientcallback, context) + FaxSendDocumentForBroadcastA(faxhandle.into_param().abi(), filename.into_param().abi(), faxjobid, faxrecipientcallback, context).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSendDocumentForBroadcastW(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKW, context: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn FaxSendDocumentForBroadcastW(faxhandle: P0, filename: P1, faxjobid: *mut u32, faxrecipientcallback: PFAX_RECIPIENT_CALLBACKW, context: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentForBroadcastW(faxhandle : super::super::Foundation:: HANDLE, filename : ::windows_core::PCWSTR, faxjobid : *mut u32, faxrecipientcallback : PFAX_RECIPIENT_CALLBACKW, context : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FaxSendDocumentForBroadcastW(faxhandle.into_param().abi(), filename.into_param().abi(), faxjobid, faxrecipientcallback, context) + FaxSendDocumentForBroadcastW(faxhandle.into_param().abi(), filename.into_param().abi(), faxjobid, faxrecipientcallback, context).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSendDocumentW(faxhandle: P0, filename: P1, jobparams: *mut FAX_JOB_PARAMW, coverpageinfo: *const FAX_COVERPAGE_INFOW, faxjobid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSendDocumentW(faxhandle: P0, filename: P1, jobparams: *mut FAX_JOB_PARAMW, coverpageinfo: *const FAX_COVERPAGE_INFOW, faxjobid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSendDocumentW(faxhandle : super::super::Foundation:: HANDLE, filename : ::windows_core::PCWSTR, jobparams : *mut FAX_JOB_PARAMW, coverpageinfo : *const FAX_COVERPAGE_INFOW, faxjobid : *mut u32) -> super::super::Foundation:: BOOL); - FaxSendDocumentW(faxhandle.into_param().abi(), filename.into_param().abi(), jobparams, coverpageinfo, faxjobid) + FaxSendDocumentW(faxhandle.into_param().abi(), filename.into_param().abi(), jobparams, coverpageinfo, faxjobid).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetConfigurationA(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONA) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetConfigurationA(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetConfigurationA(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *const FAX_CONFIGURATIONA) -> super::super::Foundation:: BOOL); - FaxSetConfigurationA(faxhandle.into_param().abi(), faxconfig) + FaxSetConfigurationA(faxhandle.into_param().abi(), faxconfig).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetConfigurationW(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONW) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetConfigurationW(faxhandle: P0, faxconfig: *const FAX_CONFIGURATIONW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetConfigurationW(faxhandle : super::super::Foundation:: HANDLE, faxconfig : *const FAX_CONFIGURATIONW) -> super::super::Foundation:: BOOL); - FaxSetConfigurationW(faxhandle.into_param().abi(), faxconfig) + FaxSetConfigurationW(faxhandle.into_param().abi(), faxconfig).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetGlobalRoutingInfoA(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOA) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetGlobalRoutingInfoA(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetGlobalRoutingInfoA(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *const FAX_GLOBAL_ROUTING_INFOA) -> super::super::Foundation:: BOOL); - FaxSetGlobalRoutingInfoA(faxhandle.into_param().abi(), routinginfo) + FaxSetGlobalRoutingInfoA(faxhandle.into_param().abi(), routinginfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetGlobalRoutingInfoW(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOW) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetGlobalRoutingInfoW(faxhandle: P0, routinginfo: *const FAX_GLOBAL_ROUTING_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetGlobalRoutingInfoW(faxhandle : super::super::Foundation:: HANDLE, routinginfo : *const FAX_GLOBAL_ROUTING_INFOW) -> super::super::Foundation:: BOOL); - FaxSetGlobalRoutingInfoW(faxhandle.into_param().abi(), routinginfo) + FaxSetGlobalRoutingInfoW(faxhandle.into_param().abi(), routinginfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetJobA(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYA) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetJobA(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetJobA(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, command : u32, jobentry : *const FAX_JOB_ENTRYA) -> super::super::Foundation:: BOOL); - FaxSetJobA(faxhandle.into_param().abi(), jobid, command, jobentry) + FaxSetJobA(faxhandle.into_param().abi(), jobid, command, jobentry).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetJobW(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYW) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetJobW(faxhandle: P0, jobid: u32, command: u32, jobentry: *const FAX_JOB_ENTRYW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetJobW(faxhandle : super::super::Foundation:: HANDLE, jobid : u32, command : u32, jobentry : *const FAX_JOB_ENTRYW) -> super::super::Foundation:: BOOL); - FaxSetJobW(faxhandle.into_param().abi(), jobid, command, jobentry) + FaxSetJobW(faxhandle.into_param().abi(), jobid, command, jobentry).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetLoggingCategoriesA(faxhandle: P0, categories: *const FAX_LOG_CATEGORYA, numbercategories: u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetLoggingCategoriesA(faxhandle: P0, categories: *const FAX_LOG_CATEGORYA, numbercategories: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetLoggingCategoriesA(faxhandle : super::super::Foundation:: HANDLE, categories : *const FAX_LOG_CATEGORYA, numbercategories : u32) -> super::super::Foundation:: BOOL); - FaxSetLoggingCategoriesA(faxhandle.into_param().abi(), categories, numbercategories) + FaxSetLoggingCategoriesA(faxhandle.into_param().abi(), categories, numbercategories).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetLoggingCategoriesW(faxhandle: P0, categories: *const FAX_LOG_CATEGORYW, numbercategories: u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetLoggingCategoriesW(faxhandle: P0, categories: *const FAX_LOG_CATEGORYW, numbercategories: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetLoggingCategoriesW(faxhandle : super::super::Foundation:: HANDLE, categories : *const FAX_LOG_CATEGORYW, numbercategories : u32) -> super::super::Foundation:: BOOL); - FaxSetLoggingCategoriesW(faxhandle.into_param().abi(), categories, numbercategories) + FaxSetLoggingCategoriesW(faxhandle.into_param().abi(), categories, numbercategories).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetPortA(faxporthandle: P0, portinfo: *const FAX_PORT_INFOA) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetPortA(faxporthandle: P0, portinfo: *const FAX_PORT_INFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetPortA(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *const FAX_PORT_INFOA) -> super::super::Foundation:: BOOL); - FaxSetPortA(faxporthandle.into_param().abi(), portinfo) + FaxSetPortA(faxporthandle.into_param().abi(), portinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetPortW(faxporthandle: P0, portinfo: *const FAX_PORT_INFOW) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetPortW(faxporthandle: P0, portinfo: *const FAX_PORT_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetPortW(faxporthandle : super::super::Foundation:: HANDLE, portinfo : *const FAX_PORT_INFOW) -> super::super::Foundation:: BOOL); - FaxSetPortW(faxporthandle.into_param().abi(), portinfo) + FaxSetPortW(faxporthandle.into_param().abi(), portinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetRoutingInfoA(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetRoutingInfoA(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCSTR, routinginfobuffer : *const u8, routinginfobuffersize : u32) -> super::super::Foundation:: BOOL); - FaxSetRoutingInfoA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize) + FaxSetRoutingInfoA(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FaxSetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> super::super::Foundation::BOOL +pub unsafe fn FaxSetRoutingInfoW(faxporthandle: P0, routingguid: P1, routinginfobuffer: *const u8, routinginfobuffersize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxSetRoutingInfoW(faxporthandle : super::super::Foundation:: HANDLE, routingguid : ::windows_core::PCWSTR, routinginfobuffer : *const u8, routinginfobuffersize : u32) -> super::super::Foundation:: BOOL); - FaxSetRoutingInfoW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize) + FaxSetRoutingInfoW(faxporthandle.into_param().abi(), routingguid.into_param().abi(), routinginfobuffer, routinginfobuffersize).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn FaxStartPrintJobA(printername: P0, printinfo: *const FAX_PRINT_INFOA, faxjobid: *mut u32, faxcontextinfo: *mut FAX_CONTEXT_INFOA) -> super::super::Foundation::BOOL +pub unsafe fn FaxStartPrintJobA(printername: P0, printinfo: *const FAX_PRINT_INFOA, faxjobid: *mut u32, faxcontextinfo: *mut FAX_CONTEXT_INFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxStartPrintJobA(printername : ::windows_core::PCSTR, printinfo : *const FAX_PRINT_INFOA, faxjobid : *mut u32, faxcontextinfo : *mut FAX_CONTEXT_INFOA) -> super::super::Foundation:: BOOL); - FaxStartPrintJobA(printername.into_param().abi(), printinfo, faxjobid, faxcontextinfo) + FaxStartPrintJobA(printername.into_param().abi(), printinfo, faxjobid, faxcontextinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn FaxStartPrintJobW(printername: P0, printinfo: *const FAX_PRINT_INFOW, faxjobid: *mut u32, faxcontextinfo: *mut FAX_CONTEXT_INFOW) -> super::super::Foundation::BOOL +pub unsafe fn FaxStartPrintJobW(printername: P0, printinfo: *const FAX_PRINT_INFOW, faxjobid: *mut u32, faxcontextinfo: *mut FAX_CONTEXT_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winfax.dll" "system" fn FaxStartPrintJobW(printername : ::windows_core::PCWSTR, printinfo : *const FAX_PRINT_INFOW, faxjobid : *mut u32, faxcontextinfo : *mut FAX_CONTEXT_INFOW) -> super::super::Foundation:: BOOL); - FaxStartPrintJobW(printername.into_param().abi(), printinfo, faxjobid, faxcontextinfo) + FaxStartPrintJobW(printername.into_param().abi(), printinfo, faxjobid, faxcontextinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Fax\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs index 10ba198915..47b884e29b 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -1,32 +1,32 @@ #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_AbortPipe(interfacehandle: P0, pipeid: u8) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_AbortPipe(interfacehandle: P0, pipeid: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_AbortPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_AbortPipe(interfacehandle.into_param().abi(), pipeid) + WinUsb_AbortPipe(interfacehandle.into_param().abi(), pipeid).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_ControlTransfer(interfacehandle: P0, setuppacket: WINUSB_SETUP_PACKET, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_ControlTransfer(interfacehandle: P0, setuppacket: WINUSB_SETUP_PACKET, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ControlTransfer(interfacehandle : WINUSB_INTERFACE_HANDLE, setuppacket : WINUSB_SETUP_PACKET, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ControlTransfer(interfacehandle.into_param().abi(), ::core::mem::transmute(setuppacket), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_ControlTransfer(interfacehandle.into_param().abi(), ::core::mem::transmute(setuppacket), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_FlushPipe(interfacehandle: P0, pipeid: u8) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_FlushPipe(interfacehandle: P0, pipeid: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_FlushPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_FlushPipe(interfacehandle.into_param().abi(), pipeid) + WinUsb_FlushPipe(interfacehandle.into_param().abi(), pipeid).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -41,100 +41,100 @@ where #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> super::super::Foundation::BOOL { +pub unsafe fn WinUsb_GetAdjustedFrameNumber(currentframenumber: *mut u32, timestamp: i64) -> ::windows_core::Result<()> { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetAdjustedFrameNumber(currentframenumber : *mut u32, timestamp : i64) -> super::super::Foundation:: BOOL); - WinUsb_GetAdjustedFrameNumber(currentframenumber, timestamp) + WinUsb_GetAdjustedFrameNumber(currentframenumber, timestamp).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetAssociatedInterface(interfacehandle: P0, associatedinterfaceindex: u8, associatedinterfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetAssociatedInterface(interfacehandle: P0, associatedinterfaceindex: u8, associatedinterfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetAssociatedInterface(interfacehandle : WINUSB_INTERFACE_HANDLE, associatedinterfaceindex : u8, associatedinterfacehandle : *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation:: BOOL); - WinUsb_GetAssociatedInterface(interfacehandle.into_param().abi(), associatedinterfaceindex, associatedinterfacehandle) + WinUsb_GetAssociatedInterface(interfacehandle.into_param().abi(), associatedinterfaceindex, associatedinterfacehandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetCurrentAlternateSetting(interfacehandle: P0, settingnumber: *mut u8) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetCurrentAlternateSetting(interfacehandle: P0, settingnumber: *mut u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentAlternateSetting(interfacehandle : WINUSB_INTERFACE_HANDLE, settingnumber : *mut u8) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentAlternateSetting(interfacehandle.into_param().abi(), settingnumber) + WinUsb_GetCurrentAlternateSetting(interfacehandle.into_param().abi(), settingnumber).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetCurrentFrameNumber(interfacehandle: P0, currentframenumber: *mut u32, timestamp: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetCurrentFrameNumber(interfacehandle: P0, currentframenumber: *mut u32, timestamp: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentFrameNumber(interfacehandle : WINUSB_INTERFACE_HANDLE, currentframenumber : *mut u32, timestamp : *mut i64) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentFrameNumber(interfacehandle.into_param().abi(), currentframenumber, timestamp) + WinUsb_GetCurrentFrameNumber(interfacehandle.into_param().abi(), currentframenumber, timestamp).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: P0, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle: P0, frameqpcinfo: *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle : WINUSB_INTERFACE_HANDLE, frameqpcinfo : *const USB_FRAME_NUMBER_AND_QPC_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle.into_param().abi(), frameqpcinfo) + WinUsb_GetCurrentFrameNumberAndQpc(interfacehandle.into_param().abi(), frameqpcinfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetDescriptor(interfacehandle: P0, descriptortype: u8, index: u8, languageid: u16, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetDescriptor(interfacehandle: P0, descriptortype: u8, index: u8, languageid: u16, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetDescriptor(interfacehandle : WINUSB_INTERFACE_HANDLE, descriptortype : u8, index : u8, languageid : u16, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32) -> super::super::Foundation:: BOOL); - WinUsb_GetDescriptor(interfacehandle.into_param().abi(), descriptortype, index, languageid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), lengthtransferred) + WinUsb_GetDescriptor(interfacehandle.into_param().abi(), descriptortype, index, languageid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), lengthtransferred).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: P0, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetOverlappedResult(interfacehandle: P0, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetOverlappedResult(interfacehandle : WINUSB_INTERFACE_HANDLE, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WinUsb_GetOverlappedResult(interfacehandle.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, bwait.into_param().abi()) + WinUsb_GetOverlappedResult(interfacehandle.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetPipePolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, policytype : WINUSB_PIPE_POLICY, valuelength : *mut u32, value : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_GetPipePolicy(interfacehandle.into_param().abi(), pipeid, policytype, valuelength, value) + WinUsb_GetPipePolicy(interfacehandle.into_param().abi(), pipeid, policytype, valuelength, value).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_GetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_GetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: *mut u32, value: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_GetPowerPolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, policytype : WINUSB_POWER_POLICY, valuelength : *mut u32, value : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_GetPowerPolicy(interfacehandle.into_param().abi(), policytype, valuelength, value) + WinUsb_GetPowerPolicy(interfacehandle.into_param().abi(), policytype, valuelength, value).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_Initialize(devicehandle: P0, interfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_Initialize(devicehandle: P0, interfacehandle: *mut WINUSB_INTERFACE_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_Initialize(devicehandle : super::super::Foundation:: HANDLE, interfacehandle : *mut WINUSB_INTERFACE_HANDLE) -> super::super::Foundation:: BOOL); - WinUsb_Initialize(devicehandle.into_param().abi(), interfacehandle) + WinUsb_Initialize(devicehandle.into_param().abi(), interfacehandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`*"] #[inline] @@ -151,173 +151,173 @@ pub unsafe fn WinUsb_ParseDescriptors(descriptorbuffer: *const ::core::ffi::c_vo #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_QueryDeviceInformation(interfacehandle: P0, informationtype: u32, bufferlength: *mut u32, buffer: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_QueryDeviceInformation(interfacehandle: P0, informationtype: u32, bufferlength: *mut u32, buffer: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryDeviceInformation(interfacehandle : WINUSB_INTERFACE_HANDLE, informationtype : u32, bufferlength : *mut u32, buffer : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_QueryDeviceInformation(interfacehandle.into_param().abi(), informationtype, bufferlength, buffer) + WinUsb_QueryDeviceInformation(interfacehandle.into_param().abi(), informationtype, bufferlength, buffer).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_QueryInterfaceSettings(interfacehandle: P0, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_QueryInterfaceSettings(interfacehandle: P0, alternateinterfacenumber: u8, usbaltinterfacedescriptor: *mut USB_INTERFACE_DESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryInterfaceSettings(interfacehandle : WINUSB_INTERFACE_HANDLE, alternateinterfacenumber : u8, usbaltinterfacedescriptor : *mut USB_INTERFACE_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WinUsb_QueryInterfaceSettings(interfacehandle.into_param().abi(), alternateinterfacenumber, usbaltinterfacedescriptor) + WinUsb_QueryInterfaceSettings(interfacehandle.into_param().abi(), alternateinterfacenumber, usbaltinterfacedescriptor).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_QueryPipe(interfacehandle: P0, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_QueryPipe(interfacehandle: P0, alternateinterfacenumber: u8, pipeindex: u8, pipeinformation: *mut WINUSB_PIPE_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, alternateinterfacenumber : u8, pipeindex : u8, pipeinformation : *mut WINUSB_PIPE_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_QueryPipe(interfacehandle.into_param().abi(), alternateinterfacenumber, pipeindex, pipeinformation) + WinUsb_QueryPipe(interfacehandle.into_param().abi(), alternateinterfacenumber, pipeindex, pipeinformation).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_QueryPipeEx(interfacehandle: P0, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_QueryPipeEx(interfacehandle: P0, alternatesettingnumber: u8, pipeindex: u8, pipeinformationex: *mut WINUSB_PIPE_INFORMATION_EX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_QueryPipeEx(interfacehandle : WINUSB_INTERFACE_HANDLE, alternatesettingnumber : u8, pipeindex : u8, pipeinformationex : *mut WINUSB_PIPE_INFORMATION_EX) -> super::super::Foundation:: BOOL); - WinUsb_QueryPipeEx(interfacehandle.into_param().abi(), alternatesettingnumber, pipeindex, pipeinformationex) + WinUsb_QueryPipeEx(interfacehandle.into_param().abi(), alternatesettingnumber, pipeindex, pipeinformationex).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { +pub unsafe fn WinUsb_ReadIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadIsochPipe(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, framenumber : *mut u32, numberofpackets : u32, isopacketdescriptors : *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber, isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber, isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: P0, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_ReadIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: P0, isopacketdescriptors: &mut [USBD_ISO_PACKET_DESCRIPTOR], overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadIsochPipeAsap(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, continuestream : super::super::Foundation:: BOOL, numberofpackets : u32, isopacketdescriptors : *mut USBD_ISO_PACKET_DESCRIPTOR, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), isopacketdescriptors.len() as _, ::core::mem::transmute(isopacketdescriptors.as_ptr()), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_ReadPipe(interfacehandle: P0, pipeid: u8, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_ReadPipe(interfacehandle: P0, pipeid: u8, buffer: ::core::option::Option<&mut [u8]>, lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ReadPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *mut u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_ReadPipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_ReadPipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: P0, pipeid: u8, buffer: &mut [u8], isochbufferhandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: P0, pipeid: u8, buffer: &mut [u8], isochbufferhandle: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_RegisterIsochBuffer(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *mut u8, bufferlength : u32, isochbufferhandle : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_RegisterIsochBuffer(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, isochbufferhandle) + WinUsb_RegisterIsochBuffer(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, isochbufferhandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_ResetPipe(interfacehandle: P0, pipeid: u8) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_ResetPipe(interfacehandle: P0, pipeid: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_ResetPipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8) -> super::super::Foundation:: BOOL); - WinUsb_ResetPipe(interfacehandle.into_param().abi(), pipeid) + WinUsb_ResetPipe(interfacehandle.into_param().abi(), pipeid).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_SetCurrentAlternateSetting(interfacehandle: P0, settingnumber: u8) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_SetCurrentAlternateSetting(interfacehandle: P0, settingnumber: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_SetCurrentAlternateSetting(interfacehandle : WINUSB_INTERFACE_HANDLE, settingnumber : u8) -> super::super::Foundation:: BOOL); - WinUsb_SetCurrentAlternateSetting(interfacehandle.into_param().abi(), settingnumber) + WinUsb_SetCurrentAlternateSetting(interfacehandle.into_param().abi(), settingnumber).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_SetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_SetPipePolicy(interfacehandle: P0, pipeid: u8, policytype: WINUSB_PIPE_POLICY, valuelength: u32, value: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_SetPipePolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, policytype : WINUSB_PIPE_POLICY, valuelength : u32, value : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_SetPipePolicy(interfacehandle.into_param().abi(), pipeid, policytype, valuelength, value) + WinUsb_SetPipePolicy(interfacehandle.into_param().abi(), pipeid, policytype, valuelength, value).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_SetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: u32, value: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_SetPowerPolicy(interfacehandle: P0, policytype: WINUSB_POWER_POLICY, valuelength: u32, value: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_SetPowerPolicy(interfacehandle : WINUSB_INTERFACE_HANDLE, policytype : WINUSB_POWER_POLICY, valuelength : u32, value : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_SetPowerPolicy(interfacehandle.into_param().abi(), policytype, valuelength, value) + WinUsb_SetPowerPolicy(interfacehandle.into_param().abi(), policytype, valuelength, value).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_StartTrackingForTimeSync(interfacehandle: P0, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_StartTrackingForTimeSync(interfacehandle: P0, starttrackinginfo: *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_StartTrackingForTimeSync(interfacehandle : WINUSB_INTERFACE_HANDLE, starttrackinginfo : *const USB_START_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_StartTrackingForTimeSync(interfacehandle.into_param().abi(), starttrackinginfo) + WinUsb_StartTrackingForTimeSync(interfacehandle.into_param().abi(), starttrackinginfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_StopTrackingForTimeSync(interfacehandle: P0, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_StopTrackingForTimeSync(interfacehandle: P0, stoptrackinginfo: *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_StopTrackingForTimeSync(interfacehandle : WINUSB_INTERFACE_HANDLE, stoptrackinginfo : *const USB_STOP_TRACKING_FOR_TIME_SYNC_INFORMATION) -> super::super::Foundation:: BOOL); - WinUsb_StopTrackingForTimeSync(interfacehandle.into_param().abi(), stoptrackinginfo) + WinUsb_StopTrackingForTimeSync(interfacehandle.into_param().abi(), stoptrackinginfo).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_UnregisterIsochBuffer(isochbufferhandle : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinUsb_UnregisterIsochBuffer(isochbufferhandle) + WinUsb_UnregisterIsochBuffer(isochbufferhandle).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_WriteIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { +pub unsafe fn WinUsb_WriteIsochPipe(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_WriteIsochPipe(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, framenumber : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_WriteIsochPipe(bufferhandle, offset, length, framenumber, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_WriteIsochPipe(bufferhandle, offset, length, framenumber, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: P0, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_WriteIsochPipeAsap(bufferhandle: *const ::core::ffi::c_void, offset: u32, length: u32, continuestream: P0, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_WriteIsochPipeAsap(bufferhandle : *const ::core::ffi::c_void, offset : u32, length : u32, continuestream : super::super::Foundation:: BOOL, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_WriteIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_WriteIsochPipeAsap(bufferhandle, offset, length, continuestream.into_param().abi(), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WinUsb_WritePipe(interfacehandle: P0, pipeid: u8, buffer: &[u8], lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WinUsb_WritePipe(interfacehandle: P0, pipeid: u8, buffer: &[u8], lengthtransferred: ::core::option::Option<*mut u32>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winusb.dll" "system" fn WinUsb_WritePipe(interfacehandle : WINUSB_INTERFACE_HANDLE, pipeid : u8, buffer : *const u8, bufferlength : u32, lengthtransferred : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WinUsb_WritePipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + WinUsb_WritePipe(interfacehandle.into_param().abi(), pipeid, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, ::core::mem::transmute(lengthtransferred.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Devices_Usb\"`*"] pub const BMREQUEST_CLASS: u32 = 1u32; diff --git a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs index 4bc32e2c2a..bab00e13e4 100644 --- a/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Foundation/mod.rs @@ -1,11 +1,11 @@ #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] -pub unsafe fn CloseHandle(hobject: P0) -> BOOL +pub unsafe fn CloseHandle(hobject: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CloseHandle(hobject : HANDLE) -> BOOL); - CloseHandle(hobject.into_param().abi()) + CloseHandle(hobject.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] @@ -19,7 +19,7 @@ where } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] -pub unsafe fn DuplicateHandle(hsourceprocesshandle: P0, hsourcehandle: P1, htargetprocesshandle: P2, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: P3, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> BOOL +pub unsafe fn DuplicateHandle(hsourceprocesshandle: P0, hsourcehandle: P1, htargetprocesshandle: P2, lptargethandle: *mut HANDLE, dwdesiredaccess: u32, binherithandle: P3, dwoptions: DUPLICATE_HANDLE_OPTIONS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -27,22 +27,22 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DuplicateHandle(hsourceprocesshandle : HANDLE, hsourcehandle : HANDLE, htargetprocesshandle : HANDLE, lptargethandle : *mut HANDLE, dwdesiredaccess : u32, binherithandle : BOOL, dwoptions : DUPLICATE_HANDLE_OPTIONS) -> BOOL); - DuplicateHandle(hsourceprocesshandle.into_param().abi(), hsourcehandle.into_param().abi(), htargetprocesshandle.into_param().abi(), lptargethandle, dwdesiredaccess, binherithandle.into_param().abi(), dwoptions) + DuplicateHandle(hsourceprocesshandle.into_param().abi(), hsourcehandle.into_param().abi(), htargetprocesshandle.into_param().abi(), lptargethandle, dwdesiredaccess, binherithandle.into_param().abi(), dwoptions).ok() } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] -pub unsafe fn GetHandleInformation(hobject: P0, lpdwflags: *mut u32) -> BOOL +pub unsafe fn GetHandleInformation(hobject: P0, lpdwflags: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetHandleInformation(hobject : HANDLE, lpdwflags : *mut u32) -> BOOL); - GetHandleInformation(hobject.into_param().abi(), lpdwflags) + GetHandleInformation(hobject.into_param().abi(), lpdwflags).ok() } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] -pub unsafe fn GetLastError() -> WIN32_ERROR { +pub unsafe fn GetLastError() -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetLastError() -> WIN32_ERROR); - GetLastError() + GetLastError().ok() } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] @@ -55,12 +55,12 @@ where } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] -pub unsafe fn SetHandleInformation(hobject: P0, dwmask: u32, dwflags: HANDLE_FLAGS) -> BOOL +pub unsafe fn SetHandleInformation(hobject: P0, dwmask: u32, dwflags: HANDLE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetHandleInformation(hobject : HANDLE, dwmask : u32, dwflags : HANDLE_FLAGS) -> BOOL); - SetHandleInformation(hobject.into_param().abi(), dwmask, dwflags) + SetHandleInformation(hobject.into_param().abi(), dwmask, dwflags).ok() } #[doc = "*Required features: `\"Win32_Foundation\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index 5d5cad2406..71d36e9d61 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -40,203 +40,203 @@ pub unsafe fn ConvertDefaultLocale(locale: u32) -> u32 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumCalendarInfoA(lpcalinfoenumproc: CALINFO_ENUMPROCA, locale: u32, calendar: u32, caltype: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumCalendarInfoA(lpcalinfoenumproc: CALINFO_ENUMPROCA, locale: u32, calendar: u32, caltype: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoA(lpcalinfoenumproc : CALINFO_ENUMPROCA, locale : u32, calendar : u32, caltype : u32) -> super::Foundation:: BOOL); - EnumCalendarInfoA(lpcalinfoenumproc, locale, calendar, caltype) + EnumCalendarInfoA(lpcalinfoenumproc, locale, calendar, caltype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumCalendarInfoExA(lpcalinfoenumprocex: CALINFO_ENUMPROCEXA, locale: u32, calendar: u32, caltype: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumCalendarInfoExA(lpcalinfoenumprocex: CALINFO_ENUMPROCEXA, locale: u32, calendar: u32, caltype: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoExA(lpcalinfoenumprocex : CALINFO_ENUMPROCEXA, locale : u32, calendar : u32, caltype : u32) -> super::Foundation:: BOOL); - EnumCalendarInfoExA(lpcalinfoenumprocex, locale, calendar, caltype) + EnumCalendarInfoExA(lpcalinfoenumprocex, locale, calendar, caltype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumCalendarInfoExEx(pcalinfoenumprocexex: CALINFO_ENUMPROCEXEX, lplocalename: P0, calendar: u32, lpreserved: P1, caltype: u32, lparam: P2) -> super::Foundation::BOOL +pub unsafe fn EnumCalendarInfoExEx(pcalinfoenumprocexex: CALINFO_ENUMPROCEXEX, lplocalename: P0, calendar: u32, lpreserved: P1, caltype: u32, lparam: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoExEx(pcalinfoenumprocexex : CALINFO_ENUMPROCEXEX, lplocalename : ::windows_core::PCWSTR, calendar : u32, lpreserved : ::windows_core::PCWSTR, caltype : u32, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumCalendarInfoExEx(pcalinfoenumprocexex, lplocalename.into_param().abi(), calendar, lpreserved.into_param().abi(), caltype, lparam.into_param().abi()) + EnumCalendarInfoExEx(pcalinfoenumprocexex, lplocalename.into_param().abi(), calendar, lpreserved.into_param().abi(), caltype, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumCalendarInfoExW(lpcalinfoenumprocex: CALINFO_ENUMPROCEXW, locale: u32, calendar: u32, caltype: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumCalendarInfoExW(lpcalinfoenumprocex: CALINFO_ENUMPROCEXW, locale: u32, calendar: u32, caltype: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoExW(lpcalinfoenumprocex : CALINFO_ENUMPROCEXW, locale : u32, calendar : u32, caltype : u32) -> super::Foundation:: BOOL); - EnumCalendarInfoExW(lpcalinfoenumprocex, locale, calendar, caltype) + EnumCalendarInfoExW(lpcalinfoenumprocex, locale, calendar, caltype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumCalendarInfoW(lpcalinfoenumproc: CALINFO_ENUMPROCW, locale: u32, calendar: u32, caltype: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumCalendarInfoW(lpcalinfoenumproc: CALINFO_ENUMPROCW, locale: u32, calendar: u32, caltype: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumCalendarInfoW(lpcalinfoenumproc : CALINFO_ENUMPROCW, locale : u32, calendar : u32, caltype : u32) -> super::Foundation:: BOOL); - EnumCalendarInfoW(lpcalinfoenumproc, locale, calendar, caltype) + EnumCalendarInfoW(lpcalinfoenumproc, locale, calendar, caltype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDateFormatsA(lpdatefmtenumproc: DATEFMT_ENUMPROCA, locale: u32, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumDateFormatsA(lpdatefmtenumproc: DATEFMT_ENUMPROCA, locale: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsA(lpdatefmtenumproc : DATEFMT_ENUMPROCA, locale : u32, dwflags : u32) -> super::Foundation:: BOOL); - EnumDateFormatsA(lpdatefmtenumproc, locale, dwflags) + EnumDateFormatsA(lpdatefmtenumproc, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDateFormatsExA(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXA, locale: u32, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumDateFormatsExA(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXA, locale: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsExA(lpdatefmtenumprocex : DATEFMT_ENUMPROCEXA, locale : u32, dwflags : u32) -> super::Foundation:: BOOL); - EnumDateFormatsExA(lpdatefmtenumprocex, locale, dwflags) + EnumDateFormatsExA(lpdatefmtenumprocex, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDateFormatsExEx(lpdatefmtenumprocexex: DATEFMT_ENUMPROCEXEX, lplocalename: P0, dwflags: ENUM_DATE_FORMATS_FLAGS, lparam: P1) -> super::Foundation::BOOL +pub unsafe fn EnumDateFormatsExEx(lpdatefmtenumprocexex: DATEFMT_ENUMPROCEXEX, lplocalename: P0, dwflags: ENUM_DATE_FORMATS_FLAGS, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsExEx(lpdatefmtenumprocexex : DATEFMT_ENUMPROCEXEX, lplocalename : ::windows_core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumDateFormatsExEx(lpdatefmtenumprocexex, lplocalename.into_param().abi(), dwflags, lparam.into_param().abi()) + EnumDateFormatsExEx(lpdatefmtenumprocexex, lplocalename.into_param().abi(), dwflags, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDateFormatsExW(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXW, locale: u32, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumDateFormatsExW(lpdatefmtenumprocex: DATEFMT_ENUMPROCEXW, locale: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsExW(lpdatefmtenumprocex : DATEFMT_ENUMPROCEXW, locale : u32, dwflags : u32) -> super::Foundation:: BOOL); - EnumDateFormatsExW(lpdatefmtenumprocex, locale, dwflags) + EnumDateFormatsExW(lpdatefmtenumprocex, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDateFormatsW(lpdatefmtenumproc: DATEFMT_ENUMPROCW, locale: u32, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumDateFormatsW(lpdatefmtenumproc: DATEFMT_ENUMPROCW, locale: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumDateFormatsW(lpdatefmtenumproc : DATEFMT_ENUMPROCW, locale : u32, dwflags : u32) -> super::Foundation:: BOOL); - EnumDateFormatsW(lpdatefmtenumproc, locale, dwflags) + EnumDateFormatsW(lpdatefmtenumproc, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc: LANGGROUPLOCALE_ENUMPROCA, languagegroup: u32, dwflags: u32, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc: LANGGROUPLOCALE_ENUMPROCA, languagegroup: u32, dwflags: u32, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc : LANGGROUPLOCALE_ENUMPROCA, languagegroup : u32, dwflags : u32, lparam : isize) -> super::Foundation:: BOOL); - EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc, languagegroup, dwflags, lparam) + EnumLanguageGroupLocalesA(lplanggrouplocaleenumproc, languagegroup, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc: LANGGROUPLOCALE_ENUMPROCW, languagegroup: u32, dwflags: u32, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc: LANGGROUPLOCALE_ENUMPROCW, languagegroup: u32, dwflags: u32, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc : LANGGROUPLOCALE_ENUMPROCW, languagegroup : u32, dwflags : u32, lparam : isize) -> super::Foundation:: BOOL); - EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc, languagegroup, dwflags, lparam) + EnumLanguageGroupLocalesW(lplanggrouplocaleenumproc, languagegroup, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemCodePagesA(lpcodepageenumproc: CODEPAGE_ENUMPROCA, dwflags: ENUM_SYSTEM_CODE_PAGES_FLAGS) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemCodePagesA(lpcodepageenumproc: CODEPAGE_ENUMPROCA, dwflags: ENUM_SYSTEM_CODE_PAGES_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemCodePagesA(lpcodepageenumproc : CODEPAGE_ENUMPROCA, dwflags : ENUM_SYSTEM_CODE_PAGES_FLAGS) -> super::Foundation:: BOOL); - EnumSystemCodePagesA(lpcodepageenumproc, dwflags) + EnumSystemCodePagesA(lpcodepageenumproc, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemCodePagesW(lpcodepageenumproc: CODEPAGE_ENUMPROCW, dwflags: ENUM_SYSTEM_CODE_PAGES_FLAGS) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemCodePagesW(lpcodepageenumproc: CODEPAGE_ENUMPROCW, dwflags: ENUM_SYSTEM_CODE_PAGES_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemCodePagesW(lpcodepageenumproc : CODEPAGE_ENUMPROCW, dwflags : ENUM_SYSTEM_CODE_PAGES_FLAGS) -> super::Foundation:: BOOL); - EnumSystemCodePagesW(lpcodepageenumproc, dwflags) + EnumSystemCodePagesW(lpcodepageenumproc, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemGeoID(geoclass: u32, parentgeoid: i32, lpgeoenumproc: GEO_ENUMPROC) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemGeoID(geoclass: u32, parentgeoid: i32, lpgeoenumproc: GEO_ENUMPROC) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemGeoID(geoclass : u32, parentgeoid : i32, lpgeoenumproc : GEO_ENUMPROC) -> super::Foundation:: BOOL); - EnumSystemGeoID(geoclass, parentgeoid, lpgeoenumproc) + EnumSystemGeoID(geoclass, parentgeoid, lpgeoenumproc).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemGeoNames(geoclass: u32, geoenumproc: GEO_ENUMNAMEPROC, data: P0) -> super::Foundation::BOOL +pub unsafe fn EnumSystemGeoNames(geoclass: u32, geoenumproc: GEO_ENUMNAMEPROC, data: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemGeoNames(geoclass : u32, geoenumproc : GEO_ENUMNAMEPROC, data : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumSystemGeoNames(geoclass, geoenumproc, data.into_param().abi()) + EnumSystemGeoNames(geoclass, geoenumproc, data.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemLanguageGroupsA(lplanguagegroupenumproc: LANGUAGEGROUP_ENUMPROCA, dwflags: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemLanguageGroupsA(lplanguagegroupenumproc: LANGUAGEGROUP_ENUMPROCA, dwflags: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemLanguageGroupsA(lplanguagegroupenumproc : LANGUAGEGROUP_ENUMPROCA, dwflags : ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam : isize) -> super::Foundation:: BOOL); - EnumSystemLanguageGroupsA(lplanguagegroupenumproc, dwflags, lparam) + EnumSystemLanguageGroupsA(lplanguagegroupenumproc, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemLanguageGroupsW(lplanguagegroupenumproc: LANGUAGEGROUP_ENUMPROCW, dwflags: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemLanguageGroupsW(lplanguagegroupenumproc: LANGUAGEGROUP_ENUMPROCW, dwflags: ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemLanguageGroupsW(lplanguagegroupenumproc : LANGUAGEGROUP_ENUMPROCW, dwflags : ENUM_SYSTEM_LANGUAGE_GROUPS_FLAGS, lparam : isize) -> super::Foundation:: BOOL); - EnumSystemLanguageGroupsW(lplanguagegroupenumproc, dwflags, lparam) + EnumSystemLanguageGroupsW(lplanguagegroupenumproc, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemLocalesA(lplocaleenumproc: LOCALE_ENUMPROCA, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemLocalesA(lplocaleenumproc: LOCALE_ENUMPROCA, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemLocalesA(lplocaleenumproc : LOCALE_ENUMPROCA, dwflags : u32) -> super::Foundation:: BOOL); - EnumSystemLocalesA(lplocaleenumproc, dwflags) + EnumSystemLocalesA(lplocaleenumproc, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemLocalesEx(lplocaleenumprocex: LOCALE_ENUMPROCEX, dwflags: u32, lparam: P0, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::Foundation::BOOL +pub unsafe fn EnumSystemLocalesEx(lplocaleenumprocex: LOCALE_ENUMPROCEX, dwflags: u32, lparam: P0, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemLocalesEx(lplocaleenumprocex : LOCALE_ENUMPROCEX, dwflags : u32, lparam : super::Foundation:: LPARAM, lpreserved : *const ::core::ffi::c_void) -> super::Foundation:: BOOL); - EnumSystemLocalesEx(lplocaleenumprocex, dwflags, lparam.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + EnumSystemLocalesEx(lplocaleenumprocex, dwflags, lparam.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumSystemLocalesW(lplocaleenumproc: LOCALE_ENUMPROCW, dwflags: u32) -> super::Foundation::BOOL { +pub unsafe fn EnumSystemLocalesW(lplocaleenumproc: LOCALE_ENUMPROCW, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumSystemLocalesW(lplocaleenumproc : LOCALE_ENUMPROCW, dwflags : u32) -> super::Foundation:: BOOL); - EnumSystemLocalesW(lplocaleenumproc, dwflags) + EnumSystemLocalesW(lplocaleenumproc, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumTimeFormatsA(lptimefmtenumproc: TIMEFMT_ENUMPROCA, locale: u32, dwflags: TIME_FORMAT_FLAGS) -> super::Foundation::BOOL { +pub unsafe fn EnumTimeFormatsA(lptimefmtenumproc: TIMEFMT_ENUMPROCA, locale: u32, dwflags: TIME_FORMAT_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumTimeFormatsA(lptimefmtenumproc : TIMEFMT_ENUMPROCA, locale : u32, dwflags : TIME_FORMAT_FLAGS) -> super::Foundation:: BOOL); - EnumTimeFormatsA(lptimefmtenumproc, locale, dwflags) + EnumTimeFormatsA(lptimefmtenumproc, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumTimeFormatsEx(lptimefmtenumprocex: TIMEFMT_ENUMPROCEX, lplocalename: P0, dwflags: u32, lparam: P1) -> super::Foundation::BOOL +pub unsafe fn EnumTimeFormatsEx(lptimefmtenumprocex: TIMEFMT_ENUMPROCEX, lplocalename: P0, dwflags: u32, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumTimeFormatsEx(lptimefmtenumprocex : TIMEFMT_ENUMPROCEX, lplocalename : ::windows_core::PCWSTR, dwflags : u32, lparam : super::Foundation:: LPARAM) -> super::Foundation:: BOOL); - EnumTimeFormatsEx(lptimefmtenumprocex, lplocalename.into_param().abi(), dwflags, lparam.into_param().abi()) + EnumTimeFormatsEx(lptimefmtenumprocex, lplocalename.into_param().abi(), dwflags, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumTimeFormatsW(lptimefmtenumproc: TIMEFMT_ENUMPROCW, locale: u32, dwflags: TIME_FORMAT_FLAGS) -> super::Foundation::BOOL { +pub unsafe fn EnumTimeFormatsW(lptimefmtenumproc: TIMEFMT_ENUMPROCW, locale: u32, dwflags: TIME_FORMAT_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumTimeFormatsW(lptimefmtenumproc : TIMEFMT_ENUMPROCW, locale : u32, dwflags : TIME_FORMAT_FLAGS) -> super::Foundation:: BOOL); - EnumTimeFormatsW(lptimefmtenumproc, locale, dwflags) + EnumTimeFormatsW(lptimefmtenumproc, locale, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumUILanguagesA(lpuilanguageenumproc: UILANGUAGE_ENUMPROCA, dwflags: u32, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumUILanguagesA(lpuilanguageenumproc: UILANGUAGE_ENUMPROCA, dwflags: u32, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumUILanguagesA(lpuilanguageenumproc : UILANGUAGE_ENUMPROCA, dwflags : u32, lparam : isize) -> super::Foundation:: BOOL); - EnumUILanguagesA(lpuilanguageenumproc, dwflags, lparam) + EnumUILanguagesA(lpuilanguageenumproc, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumUILanguagesW(lpuilanguageenumproc: UILANGUAGE_ENUMPROCW, dwflags: u32, lparam: isize) -> super::Foundation::BOOL { +pub unsafe fn EnumUILanguagesW(lpuilanguageenumproc: UILANGUAGE_ENUMPROCW, dwflags: u32, lparam: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnumUILanguagesW(lpuilanguageenumproc : UILANGUAGE_ENUMPROCW, dwflags : u32, lparam : isize) -> super::Foundation:: BOOL); - EnumUILanguagesW(lpuilanguageenumproc, dwflags, lparam) + EnumUILanguagesW(lpuilanguageenumproc, dwflags, lparam).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -286,23 +286,23 @@ pub unsafe fn GetACP() -> u32 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCPInfo(codepage: u32, lpcpinfo: *mut CPINFO) -> super::Foundation::BOOL { +pub unsafe fn GetCPInfo(codepage: u32, lpcpinfo: *mut CPINFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCPInfo(codepage : u32, lpcpinfo : *mut CPINFO) -> super::Foundation:: BOOL); - GetCPInfo(codepage, lpcpinfo) + GetCPInfo(codepage, lpcpinfo).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCPInfoExA(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXA) -> super::Foundation::BOOL { +pub unsafe fn GetCPInfoExA(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXA) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCPInfoExA(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXA) -> super::Foundation:: BOOL); - GetCPInfoExA(codepage, dwflags, lpcpinfoex) + GetCPInfoExA(codepage, dwflags, lpcpinfoex).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCPInfoExW(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXW) -> super::Foundation::BOOL { +pub unsafe fn GetCPInfoExW(codepage: u32, dwflags: u32, lpcpinfoex: *mut CPINFOEXW) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCPInfoExW(codepage : u32, dwflags : u32, lpcpinfoex : *mut CPINFOEXW) -> super::Foundation:: BOOL); - GetCPInfoExW(codepage, dwflags, lpcpinfoex) + GetCPInfoExW(codepage, dwflags, lpcpinfoex).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -421,22 +421,22 @@ where #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileMUIInfo(dwflags: u32, pcwszfilepath: P0, pfilemuiinfo: ::core::option::Option<*mut FILEMUIINFO>, pcbfilemuiinfo: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetFileMUIInfo(dwflags: u32, pcwszfilepath: P0, pfilemuiinfo: ::core::option::Option<*mut FILEMUIINFO>, pcbfilemuiinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileMUIInfo(dwflags : u32, pcwszfilepath : ::windows_core::PCWSTR, pfilemuiinfo : *mut FILEMUIINFO, pcbfilemuiinfo : *mut u32) -> super::Foundation:: BOOL); - GetFileMUIInfo(dwflags, pcwszfilepath.into_param().abi(), ::core::mem::transmute(pfilemuiinfo.unwrap_or(::std::ptr::null_mut())), pcbfilemuiinfo) + GetFileMUIInfo(dwflags, pcwszfilepath.into_param().abi(), ::core::mem::transmute(pfilemuiinfo.unwrap_or(::std::ptr::null_mut())), pcbfilemuiinfo).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileMUIPath(dwflags: u32, pcwszfilepath: P0, pwszlanguage: ::windows_core::PWSTR, pcchlanguage: *mut u32, pwszfilemuipath: ::windows_core::PWSTR, pcchfilemuipath: *mut u32, pululenumerator: *mut u64) -> super::Foundation::BOOL +pub unsafe fn GetFileMUIPath(dwflags: u32, pcwszfilepath: P0, pwszlanguage: ::windows_core::PWSTR, pcchlanguage: *mut u32, pwszfilemuipath: ::windows_core::PWSTR, pcchfilemuipath: *mut u32, pululenumerator: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileMUIPath(dwflags : u32, pcwszfilepath : ::windows_core::PCWSTR, pwszlanguage : ::windows_core::PWSTR, pcchlanguage : *mut u32, pwszfilemuipath : ::windows_core::PWSTR, pcchfilemuipath : *mut u32, pululenumerator : *mut u64) -> super::Foundation:: BOOL); - GetFileMUIPath(dwflags, pcwszfilepath.into_param().abi(), ::core::mem::transmute(pwszlanguage), pcchlanguage, ::core::mem::transmute(pwszfilemuipath), pcchfilemuipath, pululenumerator) + GetFileMUIPath(dwflags, pcwszfilepath.into_param().abi(), ::core::mem::transmute(pwszlanguage), pcchlanguage, ::core::mem::transmute(pwszfilemuipath), pcchfilemuipath, pululenumerator).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -483,19 +483,19 @@ pub unsafe fn GetLocaleInfoW(locale: u32, lctype: u32, lplcdata: ::core::option: #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNLSVersion(function: u32, locale: u32, lpversioninformation: *mut NLSVERSIONINFO) -> super::Foundation::BOOL { +pub unsafe fn GetNLSVersion(function: u32, locale: u32, lpversioninformation: *mut NLSVERSIONINFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNLSVersion(function : u32, locale : u32, lpversioninformation : *mut NLSVERSIONINFO) -> super::Foundation:: BOOL); - GetNLSVersion(function, locale, lpversioninformation) + GetNLSVersion(function, locale, lpversioninformation).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNLSVersionEx(function: u32, lplocalename: P0, lpversioninformation: *mut NLSVERSIONINFOEX) -> super::Foundation::BOOL +pub unsafe fn GetNLSVersionEx(function: u32, lplocalename: P0, lpversioninformation: *mut NLSVERSIONINFOEX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetNLSVersionEx(function : u32, lplocalename : ::windows_core::PCWSTR, lpversioninformation : *mut NLSVERSIONINFOEX) -> super::Foundation:: BOOL); - GetNLSVersionEx(function, lplocalename.into_param().abi(), lpversioninformation) + GetNLSVersionEx(function, lplocalename.into_param().abi(), lpversioninformation).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -534,9 +534,9 @@ pub unsafe fn GetOEMCP() -> u32 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> super::Foundation::BOOL { +pub unsafe fn GetProcessPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : ::windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetProcessPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer) + GetProcessPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -550,9 +550,9 @@ where #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStringTypeA(locale: u32, dwinfotype: u32, lpsrcstr: &[u8], lpchartype: *mut u16) -> super::Foundation::BOOL { +pub unsafe fn GetStringTypeA(locale: u32, dwinfotype: u32, lpsrcstr: &[u8], lpchartype: *mut u16) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetStringTypeA(locale : u32, dwinfotype : u32, lpsrcstr : ::windows_core::PCSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - GetStringTypeA(locale, dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype) + GetStringTypeA(locale, dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -567,19 +567,19 @@ where #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStringTypeExW(locale: u32, dwinfotype: u32, lpsrcstr: P0, cchsrc: i32, lpchartype: *mut u16) -> super::Foundation::BOOL +pub unsafe fn GetStringTypeExW(locale: u32, dwinfotype: u32, lpsrcstr: P0, cchsrc: i32, lpchartype: *mut u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetStringTypeExW(locale : u32, dwinfotype : u32, lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - GetStringTypeExW(locale, dwinfotype, lpsrcstr.into_param().abi(), cchsrc, lpchartype) + GetStringTypeExW(locale, dwinfotype, lpsrcstr.into_param().abi(), cchsrc, lpchartype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStringTypeW(dwinfotype: u32, lpsrcstr: &[u16], lpchartype: *mut u16) -> super::Foundation::BOOL { +pub unsafe fn GetStringTypeW(dwinfotype: u32, lpsrcstr: &[u16], lpchartype: *mut u16) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetStringTypeW(dwinfotype : u32, lpsrcstr : ::windows_core::PCWSTR, cchsrc : i32, lpchartype : *mut u16) -> super::Foundation:: BOOL); - GetStringTypeW(dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype) + GetStringTypeW(dwinfotype, ::core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len() as _, lpchartype).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -608,9 +608,9 @@ pub unsafe fn GetSystemDefaultUILanguage() -> u16 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> super::Foundation::BOOL { +pub unsafe fn GetSystemPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : ::windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetSystemPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer) + GetSystemPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -641,9 +641,9 @@ pub unsafe fn GetThreadLocale() -> u32 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> super::Foundation::BOOL { +pub unsafe fn GetThreadPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : ::windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetThreadPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer) + GetThreadPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -685,12 +685,12 @@ where #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUILanguageInfo(dwflags: u32, pwmszlanguage: P0, pwszfallbacklanguages: ::windows_core::PWSTR, pcchfallbacklanguages: ::core::option::Option<*mut u32>, pattributes: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetUILanguageInfo(dwflags: u32, pwmszlanguage: P0, pwszfallbacklanguages: ::windows_core::PWSTR, pcchfallbacklanguages: ::core::option::Option<*mut u32>, pattributes: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetUILanguageInfo(dwflags : u32, pwmszlanguage : ::windows_core::PCWSTR, pwszfallbacklanguages : ::windows_core::PWSTR, pcchfallbacklanguages : *mut u32, pattributes : *mut u32) -> super::Foundation:: BOOL); - GetUILanguageInfo(dwflags, pwmszlanguage.into_param().abi(), ::core::mem::transmute(pwszfallbacklanguages), ::core::mem::transmute(pcchfallbacklanguages.unwrap_or(::std::ptr::null_mut())), pattributes) + GetUILanguageInfo(dwflags, pwmszlanguage.into_param().abi(), ::core::mem::transmute(pwszfallbacklanguages), ::core::mem::transmute(pcchfallbacklanguages.unwrap_or(::std::ptr::null_mut())), pattributes).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -731,9 +731,9 @@ pub unsafe fn GetUserGeoID(geoclass: u32) -> i32 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> super::Foundation::BOOL { +pub unsafe fn GetUserPreferredUILanguages(dwflags: u32, pulnumlanguages: *mut u32, pwszlanguagesbuffer: ::windows_core::PWSTR, pcchlanguagesbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetUserPreferredUILanguages(dwflags : u32, pulnumlanguages : *mut u32, pwszlanguagesbuffer : ::windows_core::PWSTR, pcchlanguagesbuffer : *mut u32) -> super::Foundation:: BOOL); - GetUserPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer) + GetUserPreferredUILanguages(dwflags, pulnumlanguages, ::core::mem::transmute(pwszlanguagesbuffer), pcchlanguagesbuffer).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -756,30 +756,30 @@ pub unsafe fn IdnToUnicode(dwflags: u32, lpasciicharstr: &[u16], lpunicodecharst #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsDBCSLeadByte(testchar: u8) -> super::Foundation::BOOL { +pub unsafe fn IsDBCSLeadByte(testchar: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsDBCSLeadByte(testchar : u8) -> super::Foundation:: BOOL); - IsDBCSLeadByte(testchar) + IsDBCSLeadByte(testchar).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsDBCSLeadByteEx(codepage: u32, testchar: u8) -> super::Foundation::BOOL { +pub unsafe fn IsDBCSLeadByteEx(codepage: u32, testchar: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsDBCSLeadByteEx(codepage : u32, testchar : u8) -> super::Foundation:: BOOL); - IsDBCSLeadByteEx(codepage, testchar) + IsDBCSLeadByteEx(codepage, testchar).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsNLSDefinedString(function: u32, dwflags: u32, lpversioninformation: *const NLSVERSIONINFO, lpstring: &[u16]) -> super::Foundation::BOOL { +pub unsafe fn IsNLSDefinedString(function: u32, dwflags: u32, lpversioninformation: *const NLSVERSIONINFO, lpstring: &[u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsNLSDefinedString(function : u32, dwflags : u32, lpversioninformation : *const NLSVERSIONINFO, lpstring : ::windows_core::PCWSTR, cchstr : i32) -> super::Foundation:: BOOL); - IsNLSDefinedString(function, dwflags, lpversioninformation, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + IsNLSDefinedString(function, dwflags, lpversioninformation, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsNormalizedString(normform: NORM_FORM, lpstring: &[u16]) -> super::Foundation::BOOL { +pub unsafe fn IsNormalizedString(normform: NORM_FORM, lpstring: &[u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsNormalizedString(normform : NORM_FORM, lpstring : ::windows_core::PCWSTR, cwlength : i32) -> super::Foundation:: BOOL); - IsNormalizedString(normform, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _) + IsNormalizedString(normform, ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1280,52 +1280,52 @@ pub unsafe fn ScriptXtoCP(ix: i32, cglyphs: i32, pwlogclust: &[u16], psva: *cons #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCalendarInfoA(locale: u32, calendar: u32, caltype: u32, lpcaldata: P0) -> super::Foundation::BOOL +pub unsafe fn SetCalendarInfoA(locale: u32, calendar: u32, caltype: u32, lpcaldata: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetCalendarInfoA(locale : u32, calendar : u32, caltype : u32, lpcaldata : ::windows_core::PCSTR) -> super::Foundation:: BOOL); - SetCalendarInfoA(locale, calendar, caltype, lpcaldata.into_param().abi()) + SetCalendarInfoA(locale, calendar, caltype, lpcaldata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCalendarInfoW(locale: u32, calendar: u32, caltype: u32, lpcaldata: P0) -> super::Foundation::BOOL +pub unsafe fn SetCalendarInfoW(locale: u32, calendar: u32, caltype: u32, lpcaldata: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetCalendarInfoW(locale : u32, calendar : u32, caltype : u32, lpcaldata : ::windows_core::PCWSTR) -> super::Foundation:: BOOL); - SetCalendarInfoW(locale, calendar, caltype, lpcaldata.into_param().abi()) + SetCalendarInfoW(locale, calendar, caltype, lpcaldata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLocaleInfoA(locale: u32, lctype: u32, lplcdata: P0) -> super::Foundation::BOOL +pub unsafe fn SetLocaleInfoA(locale: u32, lctype: u32, lplcdata: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetLocaleInfoA(locale : u32, lctype : u32, lplcdata : ::windows_core::PCSTR) -> super::Foundation:: BOOL); - SetLocaleInfoA(locale, lctype, lplcdata.into_param().abi()) + SetLocaleInfoA(locale, lctype, lplcdata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLocaleInfoW(locale: u32, lctype: u32, lplcdata: P0) -> super::Foundation::BOOL +pub unsafe fn SetLocaleInfoW(locale: u32, lctype: u32, lplcdata: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetLocaleInfoW(locale : u32, lctype : u32, lplcdata : ::windows_core::PCWSTR) -> super::Foundation:: BOOL); - SetLocaleInfoW(locale, lctype, lplcdata.into_param().abi()) + SetLocaleInfoW(locale, lctype, lplcdata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessPreferredUILanguages(dwflags: u32, pwszlanguagesbuffer: P0, pulnumlanguages: ::core::option::Option<*mut u32>) -> super::Foundation::BOOL +pub unsafe fn SetProcessPreferredUILanguages(dwflags: u32, pwszlanguagesbuffer: P0, pulnumlanguages: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : ::windows_core::PCWSTR, pulnumlanguages : *mut u32) -> super::Foundation:: BOOL); - SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.into_param().abi(), ::core::mem::transmute(pulnumlanguages.unwrap_or(::std::ptr::null_mut()))) + SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.into_param().abi(), ::core::mem::transmute(pulnumlanguages.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1363,26 +1363,26 @@ pub unsafe fn SetThreadUILanguage(langid: u16) -> u16 { #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUserGeoID(geoid: i32) -> super::Foundation::BOOL { +pub unsafe fn SetUserGeoID(geoid: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetUserGeoID(geoid : i32) -> super::Foundation:: BOOL); - SetUserGeoID(geoid) + SetUserGeoID(geoid).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUserGeoName(geoname: P0) -> super::Foundation::BOOL +pub unsafe fn SetUserGeoName(geoname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetUserGeoName(geoname : ::windows_core::PCWSTR) -> super::Foundation:: BOOL); - SetUserGeoName(geoname.into_param().abi()) + SetUserGeoName(geoname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TranslateCharsetInfo(lpsrc: *mut u32, lpcs: *mut CHARSETINFO, dwflags: TRANSLATE_CHARSET_INFO_FLAGS) -> super::Foundation::BOOL { +pub unsafe fn TranslateCharsetInfo(lpsrc: *mut u32, lpcs: *mut CHARSETINFO, dwflags: TRANSLATE_CHARSET_INFO_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("gdi32.dll" "system" fn TranslateCharsetInfo(lpsrc : *mut u32, lpcs : *mut CHARSETINFO, dwflags : TRANSLATE_CHARSET_INFO_FLAGS) -> super::Foundation:: BOOL); - TranslateCharsetInfo(lpsrc, lpcs, dwflags) + TranslateCharsetInfo(lpsrc, lpcs, dwflags).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] @@ -1447,13 +1447,13 @@ where #[doc = "*Required features: `\"Win32_Globalization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyScripts(dwflags: u32, lplocalescripts: P0, cchlocalescripts: i32, lptestscripts: P1, cchtestscripts: i32) -> super::Foundation::BOOL +pub unsafe fn VerifyScripts(dwflags: u32, lplocalescripts: P0, cchlocalescripts: i32, lptestscripts: P1, cchtestscripts: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn VerifyScripts(dwflags : u32, lplocalescripts : ::windows_core::PCWSTR, cchlocalescripts : i32, lptestscripts : ::windows_core::PCWSTR, cchtestscripts : i32) -> super::Foundation:: BOOL); - VerifyScripts(dwflags, lplocalescripts.into_param().abi(), cchlocalescripts, lptestscripts.into_param().abi(), cchtestscripts) + VerifyScripts(dwflags, lplocalescripts.into_param().abi(), cchlocalescripts, lptestscripts.into_param().abi(), cchtestscripts).ok() } #[doc = "*Required features: `\"Win32_Globalization\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs index 17ad71fda0..be60b4d58b 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -125,13 +125,13 @@ where #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BitBlt(hdc: P0, x: i32, y: i32, cx: i32, cy: i32, hdcsrc: P1, x1: i32, y1: i32, rop: ROP_CODE) -> super::super::Foundation::BOOL +pub unsafe fn BitBlt(hdc: P0, x: i32, y: i32, cx: i32, cy: i32, hdcsrc: P1, x1: i32, y1: i32, rop: ROP_CODE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn BitBlt(hdc : HDC, x : i32, y : i32, cx : i32, cy : i32, hdcsrc : HDC, x1 : i32, y1 : i32, rop : ROP_CODE) -> super::super::Foundation:: BOOL); - BitBlt(hdc.into_param().abi(), x, y, cx, cy, hdcsrc.into_param().abi(), x1, y1, rop) + BitBlt(hdc.into_param().abi(), x, y, cx, cy, hdcsrc.into_param().abi(), x1, y1, rop).ok() } #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -613,26 +613,26 @@ pub unsafe fn CreateRoundRectRgn(x1: i32, y1: i32, x2: i32, y2: i32, w: i32, h: #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateScalableFontResourceA(fdwhidden: u32, lpszfont: P0, lpszfile: P1, lpszpath: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateScalableFontResourceA(fdwhidden: u32, lpszfont: P0, lpszfile: P1, lpszpath: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("gdi32.dll" "system" fn CreateScalableFontResourceA(fdwhidden : u32, lpszfont : ::windows_core::PCSTR, lpszfile : ::windows_core::PCSTR, lpszpath : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CreateScalableFontResourceA(fdwhidden, lpszfont.into_param().abi(), lpszfile.into_param().abi(), lpszpath.into_param().abi()) + CreateScalableFontResourceA(fdwhidden, lpszfont.into_param().abi(), lpszfile.into_param().abi(), lpszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateScalableFontResourceW(fdwhidden: u32, lpszfont: P0, lpszfile: P1, lpszpath: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateScalableFontResourceW(fdwhidden: u32, lpszfont: P0, lpszfile: P1, lpszpath: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("gdi32.dll" "system" fn CreateScalableFontResourceW(fdwhidden : u32, lpszfont : ::windows_core::PCWSTR, lpszfile : ::windows_core::PCWSTR, lpszpath : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CreateScalableFontResourceW(fdwhidden, lpszfont.into_param().abi(), lpszfile.into_param().abi(), lpszpath.into_param().abi()) + CreateScalableFontResourceW(fdwhidden, lpszfont.into_param().abi(), lpszfile.into_param().abi(), lpszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3373,9 +3373,9 @@ where #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSysColors(celements: i32, lpaelements: *const i32, lpargbvalues: *const super::super::Foundation::COLORREF) -> super::super::Foundation::BOOL { +pub unsafe fn SetSysColors(celements: i32, lpaelements: *const i32, lpargbvalues: *const super::super::Foundation::COLORREF) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetSysColors(celements : i32, lpaelements : *const i32, lpargbvalues : *const super::super::Foundation:: COLORREF) -> super::super::Foundation:: BOOL); - SetSysColors(celements, lpaelements, lpargbvalues) + SetSysColors(celements, lpaelements, lpargbvalues).ok() } #[doc = "*Required features: `\"Win32_Graphics_Gdi\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs index e6fefd5ecf..0de9a59817 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs @@ -41,22 +41,22 @@ where #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SetPixelFormat(hdc: P0, format: i32, ppfd: *const PIXELFORMATDESCRIPTOR) -> super::super::Foundation::BOOL +pub unsafe fn SetPixelFormat(hdc: P0, format: i32, ppfd: *const PIXELFORMATDESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn SetPixelFormat(hdc : super::Gdi:: HDC, format : i32, ppfd : *const PIXELFORMATDESCRIPTOR) -> super::super::Foundation:: BOOL); - SetPixelFormat(hdc.into_param().abi(), format, ppfd) + SetPixelFormat(hdc.into_param().abi(), format, ppfd).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SwapBuffers(param0: P0) -> super::super::Foundation::BOOL +pub unsafe fn SwapBuffers(param0: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("gdi32.dll" "system" fn SwapBuffers(param0 : super::Gdi:: HDC) -> super::super::Foundation:: BOOL); - SwapBuffers(param0.into_param().abi()) + SwapBuffers(param0.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`*"] #[inline] @@ -2389,13 +2389,13 @@ pub unsafe fn gluUnProject(winx: f64, winy: f64, winz: f64, modelmatrix: *const #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn wglCopyContext(param0: P0, param1: P1, param2: u32) -> super::super::Foundation::BOOL +pub unsafe fn wglCopyContext(param0: P0, param1: P1, param2: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglCopyContext(param0 : HGLRC, param1 : HGLRC, param2 : u32) -> super::super::Foundation:: BOOL); - wglCopyContext(param0.into_param().abi(), param1.into_param().abi(), param2) + wglCopyContext(param0.into_param().abi(), param1.into_param().abi(), param2).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(feature = "Win32_Graphics_Gdi")] @@ -2422,12 +2422,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn wglDeleteContext(param0: P0) -> super::super::Foundation::BOOL +pub unsafe fn wglDeleteContext(param0: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglDeleteContext(param0 : HGLRC) -> super::super::Foundation:: BOOL); - wglDeleteContext(param0.into_param().abi()) + wglDeleteContext(param0.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -2475,24 +2475,24 @@ where #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglMakeCurrent(param0: P0, param1: P1) -> super::super::Foundation::BOOL +pub unsafe fn wglMakeCurrent(param0: P0, param1: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglMakeCurrent(param0 : super::Gdi:: HDC, param1 : HGLRC) -> super::super::Foundation:: BOOL); - wglMakeCurrent(param0.into_param().abi(), param1.into_param().abi()) + wglMakeCurrent(param0.into_param().abi(), param1.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglRealizeLayerPalette(param0: P0, param1: i32, param2: P1) -> super::super::Foundation::BOOL +pub unsafe fn wglRealizeLayerPalette(param0: P0, param1: i32, param2: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglRealizeLayerPalette(param0 : super::Gdi:: HDC, param1 : i32, param2 : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - wglRealizeLayerPalette(param0.into_param().abi(), param1, param2.into_param().abi()) + wglRealizeLayerPalette(param0.into_param().abi(), param1, param2.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -2507,63 +2507,63 @@ where #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn wglShareLists(param0: P0, param1: P1) -> super::super::Foundation::BOOL +pub unsafe fn wglShareLists(param0: P0, param1: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglShareLists(param0 : HGLRC, param1 : HGLRC) -> super::super::Foundation:: BOOL); - wglShareLists(param0.into_param().abi(), param1.into_param().abi()) + wglShareLists(param0.into_param().abi(), param1.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglSwapLayerBuffers(param0: P0, param1: u32) -> super::super::Foundation::BOOL +pub unsafe fn wglSwapLayerBuffers(param0: P0, param1: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglSwapLayerBuffers(param0 : super::Gdi:: HDC, param1 : u32) -> super::super::Foundation:: BOOL); - wglSwapLayerBuffers(param0.into_param().abi(), param1) + wglSwapLayerBuffers(param0.into_param().abi(), param1).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglUseFontBitmapsA(param0: P0, param1: u32, param2: u32, param3: u32) -> super::super::Foundation::BOOL +pub unsafe fn wglUseFontBitmapsA(param0: P0, param1: u32, param2: u32, param3: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglUseFontBitmapsA(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32) -> super::super::Foundation:: BOOL); - wglUseFontBitmapsA(param0.into_param().abi(), param1, param2, param3) + wglUseFontBitmapsA(param0.into_param().abi(), param1, param2, param3).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglUseFontBitmapsW(param0: P0, param1: u32, param2: u32, param3: u32) -> super::super::Foundation::BOOL +pub unsafe fn wglUseFontBitmapsW(param0: P0, param1: u32, param2: u32, param3: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglUseFontBitmapsW(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32) -> super::super::Foundation:: BOOL); - wglUseFontBitmapsW(param0.into_param().abi(), param1, param2, param3) + wglUseFontBitmapsW(param0.into_param().abi(), param1, param2, param3).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglUseFontOutlinesA(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> super::super::Foundation::BOOL +pub unsafe fn wglUseFontOutlinesA(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglUseFontOutlinesA(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32, param4 : f32, param5 : f32, param6 : i32, param7 : *mut GLYPHMETRICSFLOAT) -> super::super::Foundation:: BOOL); - wglUseFontOutlinesA(param0.into_param().abi(), param1, param2, param3, param4, param5, param6, param7) + wglUseFontOutlinesA(param0.into_param().abi(), param1, param2, param3, param4, param5, param6, param7).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn wglUseFontOutlinesW(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> super::super::Foundation::BOOL +pub unsafe fn wglUseFontOutlinesW(param0: P0, param1: u32, param2: u32, param3: u32, param4: f32, param5: f32, param6: i32, param7: *mut GLYPHMETRICSFLOAT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("opengl32.dll" "system" fn wglUseFontOutlinesW(param0 : super::Gdi:: HDC, param1 : u32, param2 : u32, param3 : u32, param4 : f32, param5 : f32, param6 : i32, param7 : *mut GLYPHMETRICSFLOAT) -> super::super::Foundation:: BOOL); - wglUseFontOutlinesW(param0.into_param().abi(), param1, param2, param3, param4, param5, param6, param7) + wglUseFontOutlinesW(param0.into_param().abi(), param1, param2, param3, param4, param5, param6, param7).ok() } #[doc = "*Required features: `\"Win32_Graphics_OpenGL\"`*"] pub const GLU_AUTO_LOAD_MATRIX: u32 = 100200u32; diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs index 3a64aed1ba..cc2ff6c626 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -53,46 +53,46 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddMonitorA(pname: P0, level: u32, pmonitors: ::core::option::Option<*const u8>) -> super::super::Foundation::BOOL +pub unsafe fn AddMonitorA(pname: P0, level: u32, pmonitors: ::core::option::Option<*const u8>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddMonitorA(pname : ::windows_core::PCSTR, level : u32, pmonitors : *const u8) -> super::super::Foundation:: BOOL); - AddMonitorA(pname.into_param().abi(), level, ::core::mem::transmute(pmonitors.unwrap_or(::std::ptr::null()))) + AddMonitorA(pname.into_param().abi(), level, ::core::mem::transmute(pmonitors.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddMonitorW(pname: P0, level: u32, pmonitors: ::core::option::Option<*const u8>) -> super::super::Foundation::BOOL +pub unsafe fn AddMonitorW(pname: P0, level: u32, pmonitors: ::core::option::Option<*const u8>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddMonitorW(pname : ::windows_core::PCWSTR, level : u32, pmonitors : *const u8) -> super::super::Foundation:: BOOL); - AddMonitorW(pname.into_param().abi(), level, ::core::mem::transmute(pmonitors.unwrap_or(::std::ptr::null()))) + AddMonitorW(pname.into_param().abi(), level, ::core::mem::transmute(pmonitors.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddPortA(pname: P0, hwnd: P1, pmonitorname: P2) -> super::super::Foundation::BOOL +pub unsafe fn AddPortA(pname: P0, hwnd: P1, pmonitorname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddPortA(pname : ::windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, pmonitorname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AddPortA(pname.into_param().abi(), hwnd.into_param().abi(), pmonitorname.into_param().abi()) + AddPortA(pname.into_param().abi(), hwnd.into_param().abi(), pmonitorname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddPortW(pname: P0, hwnd: P1, pmonitorname: P2) -> super::super::Foundation::BOOL +pub unsafe fn AddPortW(pname: P0, hwnd: P1, pmonitorname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddPortW(pname : ::windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, pmonitorname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AddPortW(pname.into_param().abi(), hwnd.into_param().abi(), pmonitorname.into_param().abi()) + AddPortW(pname.into_param().abi(), hwnd.into_param().abi(), pmonitorname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -207,12 +207,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddPrinterDriverA(pname: P0, level: u32, pdriverinfo: *const u8) -> super::super::Foundation::BOOL +pub unsafe fn AddPrinterDriverA(pname: P0, level: u32, pdriverinfo: *const u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddPrinterDriverA(pname : ::windows_core::PCSTR, level : u32, pdriverinfo : *const u8) -> super::super::Foundation:: BOOL); - AddPrinterDriverA(pname.into_param().abi(), level, pdriverinfo) + AddPrinterDriverA(pname.into_param().abi(), level, pdriverinfo).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -237,12 +237,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddPrinterDriverW(pname: P0, level: u32, pdriverinfo: *const u8) -> super::super::Foundation::BOOL +pub unsafe fn AddPrinterDriverW(pname: P0, level: u32, pdriverinfo: *const u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn AddPrinterDriverW(pname : ::windows_core::PCWSTR, level : u32, pdriverinfo : *const u8) -> super::super::Foundation:: BOOL); - AddPrinterDriverW(pname.into_param().abi(), level, pdriverinfo) + AddPrinterDriverW(pname.into_param().abi(), level, pdriverinfo).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -300,12 +300,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClosePrinter(hprinter: P0) -> super::super::Foundation::BOOL +pub unsafe fn ClosePrinter(hprinter: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn ClosePrinter(hprinter : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ClosePrinter(hprinter.into_param().abi()) + ClosePrinter(hprinter.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -466,50 +466,50 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteMonitorA(pname: P0, penvironment: P1, pmonitorname: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeleteMonitorA(pname: P0, penvironment: P1, pmonitorname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn DeleteMonitorA(pname : ::windows_core::PCSTR, penvironment : ::windows_core::PCSTR, pmonitorname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteMonitorA(pname.into_param().abi(), penvironment.into_param().abi(), pmonitorname.into_param().abi()) + DeleteMonitorA(pname.into_param().abi(), penvironment.into_param().abi(), pmonitorname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteMonitorW(pname: P0, penvironment: P1, pmonitorname: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeleteMonitorW(pname: P0, penvironment: P1, pmonitorname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn DeleteMonitorW(pname : ::windows_core::PCWSTR, penvironment : ::windows_core::PCWSTR, pmonitorname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeleteMonitorW(pname.into_param().abi(), penvironment.into_param().abi(), pmonitorname.into_param().abi()) + DeleteMonitorW(pname.into_param().abi(), penvironment.into_param().abi(), pmonitorname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeletePortA(pname: P0, hwnd: P1, pportname: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeletePortA(pname: P0, hwnd: P1, pportname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn DeletePortA(pname : ::windows_core::PCSTR, hwnd : super::super::Foundation:: HWND, pportname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeletePortA(pname.into_param().abi(), hwnd.into_param().abi(), pportname.into_param().abi()) + DeletePortA(pname.into_param().abi(), hwnd.into_param().abi(), pportname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeletePortW(pname: P0, hwnd: P1, pportname: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeletePortW(pname: P0, hwnd: P1, pportname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn DeletePortW(pname : ::windows_core::PCWSTR, hwnd : super::super::Foundation:: HWND, pportname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeletePortW(pname.into_param().abi(), hwnd.into_param().abi(), pportname.into_param().abi()) + DeletePortW(pname.into_param().abi(), hwnd.into_param().abi(), pportname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -562,12 +562,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeletePrinter(hprinter: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeletePrinter(hprinter: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn DeletePrinter(hprinter : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeletePrinter(hprinter.into_param().abi()) + DeletePrinter(hprinter.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -831,22 +831,22 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumJobsA(hprinter: P0, firstjob: u32, nojobs: u32, level: u32, pjob: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumJobsA(hprinter: P0, firstjob: u32, nojobs: u32, level: u32, pjob: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumJobsA(hprinter : super::super::Foundation:: HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumJobsA(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumJobsA(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumJobsW(hprinter: P0, firstjob: u32, nojobs: u32, level: u32, pjob: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumJobsW(hprinter: P0, firstjob: u32, nojobs: u32, level: u32, pjob: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn EnumJobsW(hprinter : super::super::Foundation:: HANDLE, firstjob : u32, nojobs : u32, level : u32, pjob : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumJobsW(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumJobsW(hprinter.into_param().abi(), firstjob, nojobs, level, ::core::mem::transmute(pjob.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pjob.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -977,24 +977,24 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPrinterDriversA(pname: P0, penvironment: P1, level: u32, pdriverinfo: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumPrinterDriversA(pname: P0, penvironment: P1, level: u32, pdriverinfo: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversA(pname : ::windows_core::PCSTR, penvironment : ::windows_core::PCSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrinterDriversA(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumPrinterDriversA(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPrinterDriversW(pname: P0, penvironment: P1, level: u32, pdriverinfo: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumPrinterDriversW(pname: P0, penvironment: P1, level: u32, pdriverinfo: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrinterDriversW(pname : ::windows_core::PCWSTR, penvironment : ::windows_core::PCWSTR, level : u32, pdriverinfo : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrinterDriversW(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumPrinterDriversW(pname.into_param().abi(), penvironment.into_param().abi(), level, ::core::mem::transmute(pdriverinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdriverinfo.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1021,22 +1021,22 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPrintersA(flags: u32, name: P0, level: u32, pprinterenum: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumPrintersA(flags: u32, name: P0, level: u32, pprinterenum: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrintersA(flags : u32, name : ::windows_core::PCSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrintersA(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumPrintersA(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPrintersW(flags: u32, name: P0, level: u32, pprinterenum: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumPrintersW(flags: u32, name: P0, level: u32, pprinterenum: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn EnumPrintersW(flags : u32, name : ::windows_core::PCWSTR, level : u32, pprinterenum : *mut u8, cbbuf : u32, pcbneeded : *mut u32, pcreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumPrintersW(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned) + EnumPrintersW(flags, name.into_param().abi(), level, ::core::mem::transmute(pprinterenum.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinterenum.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded, pcreturned).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1407,12 +1407,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPrinterA(hprinter: P0, level: u32, pprinter: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetPrinterA(hprinter: P0, level: u32, pprinter: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterA(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1555,12 +1555,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPrinterW(hprinter: P0, level: u32, pprinter: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetPrinterW(hprinter: P0, level: u32, pprinter: ::core::option::Option<&mut [u8]>, pcbneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn GetPrinterW(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *mut u8, cbbuf : u32, pcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded) + GetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pprinter.as_deref().map_or(0, |slice| slice.len() as _), pcbneeded).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1624,42 +1624,42 @@ pub unsafe fn IsValidDevmodeW(pdevmode: ::core::option::Option<*const super::Gdi #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn OpenPrinter2A(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSA>, poptions: ::core::option::Option<*const PRINTER_OPTIONSA>) -> super::super::Foundation::BOOL +pub unsafe fn OpenPrinter2A(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSA>, poptions: ::core::option::Option<*const PRINTER_OPTIONSA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn OpenPrinter2A(pprintername : ::windows_core::PCSTR, phprinter : *mut super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSA, poptions : *const PRINTER_OPTIONSA) -> super::super::Foundation:: BOOL); - OpenPrinter2A(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null())), ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))) + OpenPrinter2A(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null())), ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn OpenPrinter2W(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSW>, poptions: ::core::option::Option<*const PRINTER_OPTIONSW>) -> super::super::Foundation::BOOL +pub unsafe fn OpenPrinter2W(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSW>, poptions: ::core::option::Option<*const PRINTER_OPTIONSW>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn OpenPrinter2W(pprintername : ::windows_core::PCWSTR, phprinter : *mut super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSW, poptions : *const PRINTER_OPTIONSW) -> super::super::Foundation:: BOOL); - OpenPrinter2W(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null())), ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))) + OpenPrinter2W(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null())), ::core::mem::transmute(poptions.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn OpenPrinterA(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSA>) -> super::super::Foundation::BOOL +pub unsafe fn OpenPrinterA(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSA>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn OpenPrinterA(pprintername : ::windows_core::PCSTR, phprinter : *mut super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSA) -> super::super::Foundation:: BOOL); - OpenPrinterA(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null()))) + OpenPrinterA(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn OpenPrinterW(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSW>) -> super::super::Foundation::BOOL +pub unsafe fn OpenPrinterW(pprintername: P0, phprinter: *mut super::super::Foundation::HANDLE, pdefault: ::core::option::Option<*const PRINTER_DEFAULTSW>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn OpenPrinterW(pprintername : ::windows_core::PCWSTR, phprinter : *mut super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSW) -> super::super::Foundation:: BOOL); - OpenPrinterW(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null()))) + OpenPrinterW(pprintername.into_param().abi(), phprinter, ::core::mem::transmute(pdefault.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1962,34 +1962,34 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPortA(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> super::super::Foundation::BOOL +pub unsafe fn SetPortA(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPortA(pname : ::windows_core::PCSTR, pportname : ::windows_core::PCSTR, dwlevel : u32, pportinfo : *const u8) -> super::super::Foundation:: BOOL); - SetPortA(pname.into_param().abi(), pportname.into_param().abi(), dwlevel, pportinfo) + SetPortA(pname.into_param().abi(), pportname.into_param().abi(), dwlevel, pportinfo).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPortW(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> super::super::Foundation::BOOL +pub unsafe fn SetPortW(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winspool.drv" "system" fn SetPortW(pname : ::windows_core::PCWSTR, pportname : ::windows_core::PCWSTR, dwlevel : u32, pportinfo : *const u8) -> super::super::Foundation:: BOOL); - SetPortW(pname.into_param().abi(), pportname.into_param().abi(), dwlevel, pportinfo) + SetPortW(pname.into_param().abi(), pportname.into_param().abi(), dwlevel, pportinfo).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPrinterA(hprinter: P0, level: u32, pprinter: ::core::option::Option<*const u8>, command: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetPrinterA(hprinter: P0, level: u32, pprinter: ::core::option::Option<*const u8>, command: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterA(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.unwrap_or(::std::ptr::null())), command) + SetPrinterA(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.unwrap_or(::std::ptr::null())), command).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2040,12 +2040,12 @@ where #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPrinterW(hprinter: P0, level: u32, pprinter: ::core::option::Option<*const u8>, command: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetPrinterW(hprinter: P0, level: u32, pprinter: ::core::option::Option<*const u8>, command: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("winspool.drv" "system" fn SetPrinterW(hprinter : super::super::Foundation:: HANDLE, level : u32, pprinter : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.unwrap_or(::std::ptr::null())), command) + SetPrinterW(hprinter.into_param().abi(), level, ::core::mem::transmute(pprinter.unwrap_or(::std::ptr::null())), command).ok() } #[doc = "*Required features: `\"Win32_Graphics_Printing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs index 95c2f2def9..92015748d3 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs @@ -232,32 +232,32 @@ pub unsafe fn DnsQueryEx(pqueryrequest: *const DNS_QUERY_REQUEST, pqueryresults: #[doc = "*Required features: `\"Win32_NetworkManagement_Dns\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DnsQuery_A(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DnsQuery_A(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dnsapi.dll" "system" fn DnsQuery_A(pszname : ::windows_core::PCSTR, wtype : DNS_TYPE, options : DNS_QUERY_OPTIONS, pextra : *mut ::core::ffi::c_void, ppqueryresults : *mut *mut DNS_RECORDA, preserved : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - DnsQuery_A(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + DnsQuery_A(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_Dns\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DnsQuery_UTF8(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DnsQuery_UTF8(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dnsapi.dll" "system" fn DnsQuery_UTF8(pszname : ::windows_core::PCSTR, wtype : DNS_TYPE, options : DNS_QUERY_OPTIONS, pextra : *mut ::core::ffi::c_void, ppqueryresults : *mut *mut DNS_RECORDA, preserved : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - DnsQuery_UTF8(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + DnsQuery_UTF8(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_Dns\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DnsQuery_W(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DnsQuery_W(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: ::core::option::Option<*mut ::core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dnsapi.dll" "system" fn DnsQuery_W(pszname : ::windows_core::PCWSTR, wtype : DNS_TYPE, options : DNS_QUERY_OPTIONS, pextra : *mut ::core::ffi::c_void, ppqueryresults : *mut *mut DNS_RECORDA, preserved : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - DnsQuery_W(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + DnsQuery_W(pszname.into_param().abi(), wtype, options, ::core::mem::transmute(pextra.unwrap_or(::std::ptr::null_mut())), ppqueryresults, ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_Dns\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs index 620cac2bc6..978cb8d3d7 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -14,12 +14,12 @@ pub unsafe fn CancelIPChangeNotify(notifyoverlapped: *const super::super::System #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CancelMibChangeNotify2(notificationhandle: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn CancelMibChangeNotify2(notificationhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn CancelMibChangeNotify2(notificationhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - CancelMibChangeNotify2(notificationhandle.into_param().abi()) + CancelMibChangeNotify2(notificationhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(feature = "Win32_NetworkManagement_Ndis")] @@ -31,116 +31,116 @@ pub unsafe fn CaptureInterfaceHardwareCrossTimestamp(interfaceluid: *const super #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertCompartmentGuidToId(compartmentguid: *const ::windows_core::GUID, compartmentid: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertCompartmentGuidToId(compartmentguid: *const ::windows_core::GUID, compartmentid: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertCompartmentGuidToId(compartmentguid : *const ::windows_core::GUID, compartmentid : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - ConvertCompartmentGuidToId(compartmentguid, compartmentid) + ConvertCompartmentGuidToId(compartmentguid, compartmentid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertCompartmentIdToGuid(compartmentid: u32, compartmentguid: *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertCompartmentIdToGuid(compartmentid: u32, compartmentguid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertCompartmentIdToGuid(compartmentid : u32, compartmentguid : *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - ConvertCompartmentIdToGuid(compartmentid, compartmentguid) + ConvertCompartmentIdToGuid(compartmentid, compartmentguid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceAliasToLuid(interfacealias: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ConvertInterfaceAliasToLuid(interfacealias: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceAliasToLuid(interfacealias : ::windows_core::PCWSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceAliasToLuid(interfacealias.into_param().abi(), interfaceluid) + ConvertInterfaceAliasToLuid(interfacealias.into_param().abi(), interfaceluid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceGuidToLuid(interfaceguid: *const ::windows_core::GUID, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceGuidToLuid(interfaceguid: *const ::windows_core::GUID, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceGuidToLuid(interfaceguid : *const ::windows_core::GUID, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceGuidToLuid(interfaceguid, interfaceluid) + ConvertInterfaceGuidToLuid(interfaceguid, interfaceluid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceIndexToLuid(interfaceindex: u32, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceIndexToLuid(interfaceindex: u32, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceIndexToLuid(interfaceindex : u32, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceIndexToLuid(interfaceindex, interfaceluid) + ConvertInterfaceIndexToLuid(interfaceindex, interfaceluid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceLuidToAlias(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacealias: &mut [u16]) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceLuidToAlias(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacealias: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToAlias(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacealias : ::windows_core::PWSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToAlias(interfaceluid, ::core::mem::transmute(interfacealias.as_ptr()), interfacealias.len() as _) + ConvertInterfaceLuidToAlias(interfaceluid, ::core::mem::transmute(interfacealias.as_ptr()), interfacealias.len() as _).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceLuidToGuid(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceguid: *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceLuidToGuid(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceguid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToGuid(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfaceguid : *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToGuid(interfaceluid, interfaceguid) + ConvertInterfaceLuidToGuid(interfaceluid, interfaceguid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceLuidToIndex(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceindex: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceLuidToIndex(interfaceluid: *const super::Ndis::NET_LUID_LH, interfaceindex: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToIndex(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfaceindex : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToIndex(interfaceluid, interfaceindex) + ConvertInterfaceLuidToIndex(interfaceluid, interfaceindex).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceLuidToNameA(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u8]) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceLuidToNameA(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToNameA(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacename : ::windows_core::PSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToNameA(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _) + ConvertInterfaceLuidToNameA(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceLuidToNameW(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u16]) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertInterfaceLuidToNameW(interfaceluid: *const super::Ndis::NET_LUID_LH, interfacename: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceLuidToNameW(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfacename : ::windows_core::PWSTR, length : usize) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceLuidToNameW(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _) + ConvertInterfaceLuidToNameW(interfaceluid, ::core::mem::transmute(interfacename.as_ptr()), interfacename.len() as _).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceNameToLuidA(interfacename: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ConvertInterfaceNameToLuidA(interfacename: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceNameToLuidA(interfacename : ::windows_core::PCSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceNameToLuidA(interfacename.into_param().abi(), interfaceluid) + ConvertInterfaceNameToLuidA(interfacename.into_param().abi(), interfaceluid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn ConvertInterfaceNameToLuidW(interfacename: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ConvertInterfaceNameToLuidW(interfacename: P0, interfaceluid: *mut super::Ndis::NET_LUID_LH) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertInterfaceNameToLuidW(interfacename : ::windows_core::PCWSTR, interfaceluid : *mut super::Ndis:: NET_LUID_LH) -> super::super::Foundation:: WIN32_ERROR); - ConvertInterfaceNameToLuidW(interfacename.into_param().abi(), interfaceluid) + ConvertInterfaceNameToLuidW(interfacename.into_param().abi(), interfaceluid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertIpv4MaskToLength(mask: u32, masklength: *mut u8) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertIpv4MaskToLength(mask: u32, masklength: *mut u8) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertIpv4MaskToLength(mask : u32, masklength : *mut u8) -> super::super::Foundation:: WIN32_ERROR); - ConvertIpv4MaskToLength(mask, masklength) + ConvertIpv4MaskToLength(mask, masklength).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertLengthToIpv4Mask(masklength: u32, mask: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ConvertLengthToIpv4Mask(masklength: u32, mask: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ConvertLengthToIpv4Mask(masklength : u32, mask : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - ConvertLengthToIpv4Mask(masklength, mask) + ConvertLengthToIpv4Mask(masklength, mask).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn CreateAnycastIpAddressEntry(row: *const MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn CreateAnycastIpAddressEntry(row: *const MIB_ANYCASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn CreateAnycastIpAddressEntry(row : *const MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - CreateAnycastIpAddressEntry(row) + CreateAnycastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -152,9 +152,9 @@ pub unsafe fn CreateIpForwardEntry(proute: *const MIB_IPFORWARDROW) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn CreateIpForwardEntry2(row: *const MIB_IPFORWARD_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn CreateIpForwardEntry2(row: *const MIB_IPFORWARD_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn CreateIpForwardEntry2(row : *const MIB_IPFORWARD_ROW2) -> super::super::Foundation:: WIN32_ERROR); - CreateIpForwardEntry2(row) + CreateIpForwardEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -165,9 +165,9 @@ pub unsafe fn CreateIpNetEntry(parpentry: *const MIB_IPNETROW_LH) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn CreateIpNetEntry2(row: *const MIB_IPNET_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn CreateIpNetEntry2(row: *const MIB_IPNET_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn CreateIpNetEntry2(row : *const MIB_IPNET_ROW2) -> super::super::Foundation:: WIN32_ERROR); - CreateIpNetEntry2(row) + CreateIpNetEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -190,23 +190,23 @@ pub unsafe fn CreateProxyArpEntry(dwaddress: u32, dwmask: u32, dwifindex: u32) - #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn CreateSortedAddressPairs(sourceaddresslist: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_IN6>, sourceaddresscount: u32, destinationaddresslist: *const super::super::Networking::WinSock::SOCKADDR_IN6, destinationaddresscount: u32, addresssortoptions: u32, sortedaddresspairlist: *mut *mut super::super::Networking::WinSock::SOCKADDR_IN6_PAIR, sortedaddresspaircount: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn CreateSortedAddressPairs(sourceaddresslist: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_IN6>, sourceaddresscount: u32, destinationaddresslist: *const super::super::Networking::WinSock::SOCKADDR_IN6, destinationaddresscount: u32, addresssortoptions: u32, sortedaddresspairlist: *mut *mut super::super::Networking::WinSock::SOCKADDR_IN6_PAIR, sortedaddresspaircount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn CreateSortedAddressPairs(sourceaddresslist : *const super::super::Networking::WinSock:: SOCKADDR_IN6, sourceaddresscount : u32, destinationaddresslist : *const super::super::Networking::WinSock:: SOCKADDR_IN6, destinationaddresscount : u32, addresssortoptions : u32, sortedaddresspairlist : *mut *mut super::super::Networking::WinSock:: SOCKADDR_IN6_PAIR, sortedaddresspaircount : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - CreateSortedAddressPairs(::core::mem::transmute(sourceaddresslist.unwrap_or(::std::ptr::null())), sourceaddresscount, destinationaddresslist, destinationaddresscount, addresssortoptions, sortedaddresspairlist, sortedaddresspaircount) + CreateSortedAddressPairs(::core::mem::transmute(sourceaddresslist.unwrap_or(::std::ptr::null())), sourceaddresscount, destinationaddresslist, destinationaddresscount, addresssortoptions, sortedaddresspairlist, sortedaddresspaircount).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn CreateUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn CreateUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn CreateUnicastIpAddressEntry(row : *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - CreateUnicastIpAddressEntry(row) + CreateUnicastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn DeleteAnycastIpAddressEntry(row: *const MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn DeleteAnycastIpAddressEntry(row: *const MIB_ANYCASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn DeleteAnycastIpAddressEntry(row : *const MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - DeleteAnycastIpAddressEntry(row) + DeleteAnycastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -224,9 +224,9 @@ pub unsafe fn DeleteIpForwardEntry(proute: *const MIB_IPFORWARDROW) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn DeleteIpForwardEntry2(row: *const MIB_IPFORWARD_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn DeleteIpForwardEntry2(row: *const MIB_IPFORWARD_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn DeleteIpForwardEntry2(row : *const MIB_IPFORWARD_ROW2) -> super::super::Foundation:: WIN32_ERROR); - DeleteIpForwardEntry2(row) + DeleteIpForwardEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -237,9 +237,9 @@ pub unsafe fn DeleteIpNetEntry(parpentry: *const MIB_IPNETROW_LH) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn DeleteIpNetEntry2(row: *const MIB_IPNET_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn DeleteIpNetEntry2(row: *const MIB_IPNET_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn DeleteIpNetEntry2(row : *const MIB_IPNET_ROW2) -> super::super::Foundation:: WIN32_ERROR); - DeleteIpNetEntry2(row) + DeleteIpNetEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -262,9 +262,9 @@ pub unsafe fn DeleteProxyArpEntry(dwaddress: u32, dwmask: u32, dwifindex: u32) - #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn DeleteUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn DeleteUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn DeleteUnicastIpAddressEntry(row : *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - DeleteUnicastIpAddressEntry(row) + DeleteUnicastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -289,16 +289,16 @@ pub unsafe fn FlushIpNetTable(dwifindex: u32) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn FlushIpNetTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, interfaceindex: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn FlushIpNetTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, interfaceindex: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn FlushIpNetTable2(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, interfaceindex : u32) -> super::super::Foundation:: WIN32_ERROR); - FlushIpNetTable2(family, interfaceindex) + FlushIpNetTable2(family, interfaceindex).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn FlushIpPathTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn FlushIpPathTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn FlushIpPathTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY) -> super::super::Foundation:: WIN32_ERROR); - FlushIpPathTable(family) + FlushIpPathTable(family).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -309,16 +309,16 @@ pub unsafe fn FreeDnsSettings(settings: *mut DNS_SETTINGS) { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeInterfaceDnsSettings(settings: *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn FreeInterfaceDnsSettings(settings: *mut DNS_INTERFACE_SETTINGS) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn FreeInterfaceDnsSettings(settings : *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - FreeInterfaceDnsSettings(settings) + FreeInterfaceDnsSettings(settings).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeMibTable(memory: *const ::core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn FreeMibTable(memory: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn FreeMibTable(memory : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - FreeMibTable(memory) + FreeMibTable(memory).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -352,16 +352,16 @@ pub unsafe fn GetAdaptersInfo(adapterinfo: ::core::option::Option<*mut IP_ADAPTE #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetAnycastIpAddressEntry(row: *mut MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetAnycastIpAddressEntry(row: *mut MIB_ANYCASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetAnycastIpAddressEntry(row : *mut MIB_ANYCASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - GetAnycastIpAddressEntry(row) + GetAnycastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetAnycastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_ANYCASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetAnycastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_ANYCASTIPADDRESS_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetAnycastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_ANYCASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetAnycastIpAddressTable(family, table) + GetAnycastIpAddressTable(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -386,16 +386,16 @@ pub unsafe fn GetBestRoute(dwdestaddr: u32, dwsourceaddr: u32, pbestroute: *mut #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetBestRoute2(interfaceluid: ::core::option::Option<*const super::Ndis::NET_LUID_LH>, interfaceindex: u32, sourceaddress: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_INET>, destinationaddress: *const super::super::Networking::WinSock::SOCKADDR_INET, addresssortoptions: u32, bestroute: *mut MIB_IPFORWARD_ROW2, bestsourceaddress: *mut super::super::Networking::WinSock::SOCKADDR_INET) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetBestRoute2(interfaceluid: ::core::option::Option<*const super::Ndis::NET_LUID_LH>, interfaceindex: u32, sourceaddress: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_INET>, destinationaddress: *const super::super::Networking::WinSock::SOCKADDR_INET, addresssortoptions: u32, bestroute: *mut MIB_IPFORWARD_ROW2, bestsourceaddress: *mut super::super::Networking::WinSock::SOCKADDR_INET) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetBestRoute2(interfaceluid : *const super::Ndis:: NET_LUID_LH, interfaceindex : u32, sourceaddress : *const super::super::Networking::WinSock:: SOCKADDR_INET, destinationaddress : *const super::super::Networking::WinSock:: SOCKADDR_INET, addresssortoptions : u32, bestroute : *mut MIB_IPFORWARD_ROW2, bestsourceaddress : *mut super::super::Networking::WinSock:: SOCKADDR_INET) -> super::super::Foundation:: WIN32_ERROR); - GetBestRoute2(::core::mem::transmute(interfaceluid.unwrap_or(::std::ptr::null())), interfaceindex, ::core::mem::transmute(sourceaddress.unwrap_or(::std::ptr::null())), destinationaddress, addresssortoptions, bestroute, bestsourceaddress) + GetBestRoute2(::core::mem::transmute(interfaceluid.unwrap_or(::std::ptr::null())), interfaceindex, ::core::mem::transmute(sourceaddress.unwrap_or(::std::ptr::null())), destinationaddress, addresssortoptions, bestroute, bestsourceaddress).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentThreadCompartmentId() -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentThreadCompartmentId() -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetCurrentThreadCompartmentId() -> super::super::Foundation:: WIN32_ERROR); - GetCurrentThreadCompartmentId() + GetCurrentThreadCompartmentId().ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -406,16 +406,16 @@ pub unsafe fn GetCurrentThreadCompartmentScope(compartmentscope: *mut u32, compa #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDefaultCompartmentId() -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetDefaultCompartmentId() -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetDefaultCompartmentId() -> super::super::Foundation:: WIN32_ERROR); - GetDefaultCompartmentId() + GetDefaultCompartmentId().ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDnsSettings(settings: *mut DNS_SETTINGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetDnsSettings(settings: *mut DNS_SETTINGS) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetDnsSettings(settings : *mut DNS_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - GetDnsSettings(settings) + GetDnsSettings(settings).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -464,23 +464,23 @@ pub unsafe fn GetIfEntry(pifrow: *mut MIB_IFROW) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn GetIfEntry2(row: *mut MIB_IF_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIfEntry2(row: *mut MIB_IF_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIfEntry2(row : *mut MIB_IF_ROW2) -> super::super::Foundation:: WIN32_ERROR); - GetIfEntry2(row) + GetIfEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn GetIfEntry2Ex(level: MIB_IF_ENTRY_LEVEL, row: *mut MIB_IF_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIfEntry2Ex(level: MIB_IF_ENTRY_LEVEL, row: *mut MIB_IF_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIfEntry2Ex(level : MIB_IF_ENTRY_LEVEL, row : *mut MIB_IF_ROW2) -> super::super::Foundation:: WIN32_ERROR); - GetIfEntry2Ex(level, row) + GetIfEntry2Ex(level, row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetIfStackTable(table: *mut *mut MIB_IFSTACK_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIfStackTable(table: *mut *mut MIB_IFSTACK_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIfStackTable(table : *mut *mut MIB_IFSTACK_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetIfStackTable(table) + GetIfStackTable(table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -495,16 +495,16 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn GetIfTable2(table: *mut *mut MIB_IF_TABLE2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIfTable2(table: *mut *mut MIB_IF_TABLE2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable2(table : *mut *mut MIB_IF_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - GetIfTable2(table) + GetIfTable2(table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] #[inline] -pub unsafe fn GetIfTable2Ex(level: MIB_IF_TABLE_LEVEL, table: *mut *mut MIB_IF_TABLE2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIfTable2Ex(level: MIB_IF_TABLE_LEVEL, table: *mut *mut MIB_IF_TABLE2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable2Ex(level : MIB_IF_TABLE_LEVEL, table : *mut *mut MIB_IF_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - GetIfTable2Ex(level, table) + GetIfTable2Ex(level, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis"))] @@ -516,9 +516,9 @@ pub unsafe fn GetInterfaceActiveTimestampCapabilities(interfaceluid: *const supe #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetInterfaceDnsSettings(interface: ::windows_core::GUID, settings: *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetInterfaceDnsSettings(interface: ::windows_core::GUID, settings: *mut DNS_INTERFACE_SETTINGS) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceDnsSettings(interface : ::windows_core::GUID, settings : *mut DNS_INTERFACE_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - GetInterfaceDnsSettings(::core::mem::transmute(interface), settings) + GetInterfaceDnsSettings(::core::mem::transmute(interface), settings).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -536,9 +536,9 @@ pub unsafe fn GetInterfaceSupportedTimestampCapabilities(interfaceluid: *const s #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetInvertedIfStackTable(table: *mut *mut MIB_INVERTEDIFSTACK_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetInvertedIfStackTable(table: *mut *mut MIB_INVERTEDIFSTACK_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetInvertedIfStackTable(table : *mut *mut MIB_INVERTEDIFSTACK_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetInvertedIfStackTable(table) + GetInvertedIfStackTable(table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -559,9 +559,9 @@ pub unsafe fn GetIpErrorString(errorcode: u32, buffer: ::windows_core::PWSTR, si #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpForwardEntry2(row: *mut MIB_IPFORWARD_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpForwardEntry2(row: *mut MIB_IPFORWARD_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardEntry2(row : *mut MIB_IPFORWARD_ROW2) -> super::super::Foundation:: WIN32_ERROR); - GetIpForwardEntry2(row) + GetIpForwardEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] @@ -576,30 +576,30 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpForwardTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPFORWARD_TABLE2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpForwardTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPFORWARD_TABLE2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardTable2(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPFORWARD_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - GetIpForwardTable2(family, table) + GetIpForwardTable2(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpInterfaceEntry(row : *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation:: WIN32_ERROR); - GetIpInterfaceEntry(row) + GetIpInterfaceEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpInterfaceTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPINTERFACE_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpInterfaceTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPINTERFACE_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpInterfaceTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPINTERFACE_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetIpInterfaceTable(family, table) + GetIpInterfaceTable(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpNetEntry2(row: *mut MIB_IPNET_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpNetEntry2(row: *mut MIB_IPNET_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetEntry2(row : *mut MIB_IPNET_ROW2) -> super::super::Foundation:: WIN32_ERROR); - GetIpNetEntry2(row) + GetIpNetEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -614,30 +614,30 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpNetTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPNET_TABLE2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpNetTable2(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPNET_TABLE2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetTable2(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPNET_TABLE2) -> super::super::Foundation:: WIN32_ERROR); - GetIpNetTable2(family, table) + GetIpNetTable2(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpNetworkConnectionBandwidthEstimates(interfaceindex: u32, addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, bandwidthestimates: *mut MIB_IP_NETWORK_CONNECTION_BANDWIDTH_ESTIMATES) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpNetworkConnectionBandwidthEstimates(interfaceindex: u32, addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, bandwidthestimates: *mut MIB_IP_NETWORK_CONNECTION_BANDWIDTH_ESTIMATES) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetworkConnectionBandwidthEstimates(interfaceindex : u32, addressfamily : super::super::Networking::WinSock:: ADDRESS_FAMILY, bandwidthestimates : *mut MIB_IP_NETWORK_CONNECTION_BANDWIDTH_ESTIMATES) -> super::super::Foundation:: WIN32_ERROR); - GetIpNetworkConnectionBandwidthEstimates(interfaceindex, addressfamily, bandwidthestimates) + GetIpNetworkConnectionBandwidthEstimates(interfaceindex, addressfamily, bandwidthestimates).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpPathEntry(row: *mut MIB_IPPATH_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpPathEntry(row: *mut MIB_IPPATH_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpPathEntry(row : *mut MIB_IPPATH_ROW) -> super::super::Foundation:: WIN32_ERROR); - GetIpPathEntry(row) + GetIpPathEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetIpPathTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPPATH_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetIpPathTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_IPPATH_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetIpPathTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_IPPATH_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetIpPathTable(family, table) + GetIpPathTable(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -664,44 +664,44 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetMulticastIpAddressEntry(row: *mut MIB_MULTICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetMulticastIpAddressEntry(row: *mut MIB_MULTICASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetMulticastIpAddressEntry(row : *mut MIB_MULTICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - GetMulticastIpAddressEntry(row) + GetMulticastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetMulticastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_MULTICASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetMulticastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_MULTICASTIPADDRESS_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetMulticastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_MULTICASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetMulticastIpAddressTable(family, table) + GetMulticastIpAddressTable(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetNetworkConnectivityHint(connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetNetworkConnectivityHint(connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkConnectivityHint(connectivityhint : *mut super::super::Networking::WinSock:: NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation:: WIN32_ERROR); - GetNetworkConnectivityHint(connectivityhint) + GetNetworkConnectivityHint(connectivityhint).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetNetworkConnectivityHintForInterface(interfaceindex: u32, connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetNetworkConnectivityHintForInterface(interfaceindex: u32, connectivityhint: *mut super::super::Networking::WinSock::NL_NETWORK_CONNECTIVITY_HINT) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkConnectivityHintForInterface(interfaceindex : u32, connectivityhint : *mut super::super::Networking::WinSock:: NL_NETWORK_CONNECTIVITY_HINT) -> super::super::Foundation:: WIN32_ERROR); - GetNetworkConnectivityHintForInterface(interfaceindex, connectivityhint) + GetNetworkConnectivityHintForInterface(interfaceindex, connectivityhint).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNetworkInformation(networkguid: *const ::windows_core::GUID, compartmentid: *mut u32, siteid: *mut u32, networkname: &mut [u16]) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetNetworkInformation(networkguid: *const ::windows_core::GUID, compartmentid: *mut u32, siteid: *mut u32, networkname: &mut [u16]) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkInformation(networkguid : *const ::windows_core::GUID, compartmentid : *mut u32, siteid : *mut u32, networkname : ::windows_core::PWSTR, length : u32) -> super::super::Foundation:: WIN32_ERROR); - GetNetworkInformation(networkguid, compartmentid, siteid, ::core::mem::transmute(networkname.as_ptr()), networkname.len() as _) + GetNetworkInformation(networkguid, compartmentid, siteid, ::core::mem::transmute(networkname.as_ptr()), networkname.len() as _).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNetworkParams(pfixedinfo: ::core::option::Option<*mut FIXED_INFO_W2KSP1>, poutbuflen: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetNetworkParams(pfixedinfo: ::core::option::Option<*mut FIXED_INFO_W2KSP1>, poutbuflen: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetNetworkParams(pfixedinfo : *mut FIXED_INFO_W2KSP1, poutbuflen : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetNetworkParams(::core::mem::transmute(pfixedinfo.unwrap_or(::std::ptr::null_mut())), poutbuflen) + GetNetworkParams(::core::mem::transmute(pfixedinfo.unwrap_or(::std::ptr::null_mut())), poutbuflen).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -761,16 +761,16 @@ pub unsafe fn GetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: T #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetRTTAndHopCount(destipaddress: u32, hopcount: *mut u32, maxhops: u32, rtt: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetRTTAndHopCount(destipaddress: u32, hopcount: *mut u32, maxhops: u32, rtt: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetRTTAndHopCount(destipaddress : u32, hopcount : *mut u32, maxhops : u32, rtt : *mut u32) -> super::super::Foundation:: BOOL); - GetRTTAndHopCount(destipaddress, hopcount, maxhops, rtt) + GetRTTAndHopCount(destipaddress, hopcount, maxhops, rtt).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSessionCompartmentId(sessionid: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetSessionCompartmentId(sessionid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetSessionCompartmentId(sessionid : u32) -> super::super::Foundation:: WIN32_ERROR); - GetSessionCompartmentId(sessionid) + GetSessionCompartmentId(sessionid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] @@ -833,9 +833,9 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetTeredoPort(port: *mut u16) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetTeredoPort(port : *mut u16) -> super::super::Foundation:: WIN32_ERROR); - GetTeredoPort(port) + GetTeredoPort(port).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] @@ -884,16 +884,16 @@ pub unsafe fn GetUniDirectionalAdapterInfo(pipifinfo: ::core::option::Option<*mu #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetUnicastIpAddressEntry(row: *mut MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetUnicastIpAddressEntry(row: *mut MIB_UNICASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetUnicastIpAddressEntry(row : *mut MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - GetUnicastIpAddressEntry(row) + GetUnicastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn GetUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn GetUnicastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_UNICASTIPADDRESS_TABLE) -> super::super::Foundation:: WIN32_ERROR); - GetUnicastIpAddressTable(family, table) + GetUnicastIpAddressTable(family, table).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -922,12 +922,12 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IcmpCloseHandle(icmphandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn IcmpCloseHandle(icmphandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn IcmpCloseHandle(icmphandle : IcmpHandle) -> super::super::Foundation:: BOOL); - IcmpCloseHandle(icmphandle.into_param().abi()) + IcmpCloseHandle(icmphandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1039,22 +1039,22 @@ pub unsafe fn NotifyAddrChange(handle: *mut super::super::Foundation::HANDLE, ov #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyIpInterfaceChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPINTERFACE_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn NotifyIpInterfaceChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPINTERFACE_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyIpInterfaceChange(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PIPINTERFACE_CHANGE_CALLBACK, callercontext : *const ::core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyIpInterfaceChange(family, callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle) + NotifyIpInterfaceChange(family, callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyNetworkConnectivityHintChange(callback: PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn NotifyNetworkConnectivityHintChange(callback: PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyNetworkConnectivityHintChange(callback : PNETWORK_CONNECTIVITY_HINT_CHANGE_CALLBACK, callercontext : *const ::core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyNetworkConnectivityHintChange(callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle) + NotifyNetworkConnectivityHintChange(callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] @@ -1066,39 +1066,39 @@ pub unsafe fn NotifyRouteChange(handle: *mut super::super::Foundation::HANDLE, o #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyRouteChange2(addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPFORWARD_CHANGE_CALLBACK, callercontext: *const ::core::ffi::c_void, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn NotifyRouteChange2(addressfamily: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PIPFORWARD_CHANGE_CALLBACK, callercontext: *const ::core::ffi::c_void, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyRouteChange2(addressfamily : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PIPFORWARD_CHANGE_CALLBACK, callercontext : *const ::core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyRouteChange2(addressfamily, callback, callercontext, initialnotification.into_param().abi(), notificationhandle) + NotifyRouteChange2(addressfamily, callback, callercontext, initialnotification.into_param().abi(), notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyStableUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE, callercallback: PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK, callercontext: *const ::core::ffi::c_void, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn NotifyStableUnicastIpAddressTable(family: super::super::Networking::WinSock::ADDRESS_FAMILY, table: *mut *mut MIB_UNICASTIPADDRESS_TABLE, callercallback: PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK, callercontext: *const ::core::ffi::c_void, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyStableUnicastIpAddressTable(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, table : *mut *mut MIB_UNICASTIPADDRESS_TABLE, callercallback : PSTABLE_UNICAST_IPADDRESS_TABLE_CALLBACK, callercontext : *const ::core::ffi::c_void, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyStableUnicastIpAddressTable(family, table, callercallback, callercontext, notificationhandle) + NotifyStableUnicastIpAddressTable(family, table, callercallback, callercontext, notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn NotifyTeredoPortChange(callback: PTEREDO_PORT_CHANGE_CALLBACK, callercontext: *const ::core::ffi::c_void, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn NotifyTeredoPortChange(callback: PTEREDO_PORT_CHANGE_CALLBACK, callercontext: *const ::core::ffi::c_void, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyTeredoPortChange(callback : PTEREDO_PORT_CHANGE_CALLBACK, callercontext : *const ::core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyTeredoPortChange(callback, callercontext, initialnotification.into_param().abi(), notificationhandle) + NotifyTeredoPortChange(callback, callercontext, initialnotification.into_param().abi(), notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn NotifyUnicastIpAddressChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn NotifyUnicastIpAddressChange(family: super::super::Networking::WinSock::ADDRESS_FAMILY, callback: PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext: ::core::option::Option<*const ::core::ffi::c_void>, initialnotification: P0, notificationhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn NotifyUnicastIpAddressChange(family : super::super::Networking::WinSock:: ADDRESS_FAMILY, callback : PUNICAST_IPADDRESS_CHANGE_CALLBACK, callercontext : *const ::core::ffi::c_void, initialnotification : super::super::Foundation:: BOOLEAN, notificationhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - NotifyUnicastIpAddressChange(family, callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle) + NotifyUnicastIpAddressChange(family, callback, ::core::mem::transmute(callercontext.unwrap_or(::std::ptr::null())), initialnotification.into_param().abi(), notificationhandle).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1218,9 +1218,9 @@ pub unsafe fn RegisterInterfaceTimestampConfigChange(callback: PINTERFACE_TIMEST #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn ResolveIpNetEntry2(row: *mut MIB_IPNET_ROW2, sourceaddress: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_INET>) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn ResolveIpNetEntry2(row: *mut MIB_IPNET_ROW2, sourceaddress: ::core::option::Option<*const super::super::Networking::WinSock::SOCKADDR_INET>) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn ResolveIpNetEntry2(row : *mut MIB_IPNET_ROW2, sourceaddress : *const super::super::Networking::WinSock:: SOCKADDR_INET) -> super::super::Foundation:: WIN32_ERROR); - ResolveIpNetEntry2(row, ::core::mem::transmute(sourceaddress.unwrap_or(::std::ptr::null()))) + ResolveIpNetEntry2(row, ::core::mem::transmute(sourceaddress.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -1245,23 +1245,23 @@ pub unsafe fn SendARP(destip: u32, srcip: u32, pmacaddr: *mut ::core::ffi::c_voi #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCurrentThreadCompartmentId(compartmentid: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetCurrentThreadCompartmentId(compartmentid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetCurrentThreadCompartmentId(compartmentid : u32) -> super::super::Foundation:: WIN32_ERROR); - SetCurrentThreadCompartmentId(compartmentid) + SetCurrentThreadCompartmentId(compartmentid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCurrentThreadCompartmentScope(compartmentscope: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetCurrentThreadCompartmentScope(compartmentscope: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetCurrentThreadCompartmentScope(compartmentscope : u32) -> super::super::Foundation:: WIN32_ERROR); - SetCurrentThreadCompartmentScope(compartmentscope) + SetCurrentThreadCompartmentScope(compartmentscope).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDnsSettings(settings: *const DNS_SETTINGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetDnsSettings(settings: *const DNS_SETTINGS) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetDnsSettings(settings : *const DNS_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - SetDnsSettings(settings) + SetDnsSettings(settings).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1272,9 +1272,9 @@ pub unsafe fn SetIfEntry(pifrow: *const MIB_IFROW) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetInterfaceDnsSettings(interface: ::windows_core::GUID, settings: *const DNS_INTERFACE_SETTINGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetInterfaceDnsSettings(interface: ::windows_core::GUID, settings: *const DNS_INTERFACE_SETTINGS) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetInterfaceDnsSettings(interface : ::windows_core::GUID, settings : *const DNS_INTERFACE_SETTINGS) -> super::super::Foundation:: WIN32_ERROR); - SetInterfaceDnsSettings(::core::mem::transmute(interface), settings) + SetInterfaceDnsSettings(::core::mem::transmute(interface), settings).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -1286,16 +1286,16 @@ pub unsafe fn SetIpForwardEntry(proute: *const MIB_IPFORWARDROW) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn SetIpForwardEntry2(route: *const MIB_IPFORWARD_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetIpForwardEntry2(route: *const MIB_IPFORWARD_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetIpForwardEntry2(route : *const MIB_IPFORWARD_ROW2) -> super::super::Foundation:: WIN32_ERROR); - SetIpForwardEntry2(route) + SetIpForwardEntry2(route).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn SetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetIpInterfaceEntry(row: *mut MIB_IPINTERFACE_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetIpInterfaceEntry(row : *mut MIB_IPINTERFACE_ROW) -> super::super::Foundation:: WIN32_ERROR); - SetIpInterfaceEntry(row) + SetIpInterfaceEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1306,9 +1306,9 @@ pub unsafe fn SetIpNetEntry(parpentry: *const MIB_IPNETROW_LH) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn SetIpNetEntry2(row: *const MIB_IPNET_ROW2) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetIpNetEntry2(row: *const MIB_IPNET_ROW2) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetIpNetEntry2(row : *const MIB_IPNET_ROW2) -> super::super::Foundation:: WIN32_ERROR); - SetIpNetEntry2(row) + SetIpNetEntry2(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1331,22 +1331,22 @@ pub unsafe fn SetIpTTL(nttl: u32) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetJobCompartmentId(jobhandle: P0, compartmentid: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetJobCompartmentId(jobhandle: P0, compartmentid: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("iphlpapi.dll" "system" fn SetJobCompartmentId(jobhandle : super::super::Foundation:: HANDLE, compartmentid : u32) -> super::super::Foundation:: WIN32_ERROR); - SetJobCompartmentId(jobhandle.into_param().abi(), compartmentid) + SetJobCompartmentId(jobhandle.into_param().abi(), compartmentid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetNetworkInformation(networkguid: *const ::windows_core::GUID, compartmentid: u32, networkname: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNetworkInformation(networkguid: *const ::windows_core::GUID, compartmentid: u32, networkname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("iphlpapi.dll" "system" fn SetNetworkInformation(networkguid : *const ::windows_core::GUID, compartmentid : u32, networkname : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SetNetworkInformation(networkguid, compartmentid, networkname.into_param().abi()) + SetNetworkInformation(networkguid, compartmentid, networkname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(feature = "Win32_Networking_WinSock")] @@ -1364,9 +1364,9 @@ pub unsafe fn SetPerTcpConnectionEStats(row: *const MIB_TCPROW_LH, estatstype: T #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSessionCompartmentId(sessionid: u32, compartmentid: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetSessionCompartmentId(sessionid: u32, compartmentid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetSessionCompartmentId(sessionid : u32, compartmentid : u32) -> super::super::Foundation:: WIN32_ERROR); - SetSessionCompartmentId(sessionid, compartmentid) + SetSessionCompartmentId(sessionid, compartmentid).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`*"] #[inline] @@ -1377,9 +1377,9 @@ pub unsafe fn SetTcpEntry(ptcprow: *const MIB_TCPROW_LH) -> u32 { #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_NetworkManagement_Ndis\"`, `\"Win32_Networking_WinSock\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] -pub unsafe fn SetUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> ::windows_core::Result<()> { ::windows_targets::link!("iphlpapi.dll" "system" fn SetUnicastIpAddressEntry(row : *const MIB_UNICASTIPADDRESS_ROW) -> super::super::Foundation:: WIN32_ERROR); - SetUnicastIpAddressEntry(row) + SetUnicastIpAddressEntry(row).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_IpHelper\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs index e981976fcb..f74232b79f 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs @@ -192,9 +192,9 @@ pub unsafe fn SnmpMgrClose(session: *mut ::core::ffi::c_void) -> super::super::F #[doc = "*Required features: `\"Win32_NetworkManagement_Snmp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SnmpMgrCtl(session: *mut ::core::ffi::c_void, dwctlcode: u32, lpvinbuffer: *mut ::core::ffi::c_void, cbinbuffer: u32, lpvoutbuffer: *mut ::core::ffi::c_void, cboutbuffer: u32, lpcbbytesreturned: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SnmpMgrCtl(session: *mut ::core::ffi::c_void, dwctlcode: u32, lpvinbuffer: *mut ::core::ffi::c_void, cbinbuffer: u32, lpvoutbuffer: *mut ::core::ffi::c_void, cboutbuffer: u32, lpcbbytesreturned: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrCtl(session : *mut ::core::ffi::c_void, dwctlcode : u32, lpvinbuffer : *mut ::core::ffi::c_void, cbinbuffer : u32, lpvoutbuffer : *mut ::core::ffi::c_void, cboutbuffer : u32, lpcbbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - SnmpMgrCtl(session, dwctlcode, lpvinbuffer, cbinbuffer, lpvoutbuffer, cboutbuffer, lpcbbytesreturned) + SnmpMgrCtl(session, dwctlcode, lpvinbuffer, cbinbuffer, lpvoutbuffer, cboutbuffer, lpcbbytesreturned).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_Snmp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -247,9 +247,9 @@ where #[doc = "*Required features: `\"Win32_NetworkManagement_Snmp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SnmpMgrTrapListen(phtrapavailable: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn SnmpMgrTrapListen(phtrapavailable: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrTrapListen(phtrapavailable : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SnmpMgrTrapListen(phtrapavailable) + SnmpMgrTrapListen(phtrapavailable).ok() } #[doc = "*Required features: `\"Win32_NetworkManagement_Snmp\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs index 69747b0e1a..19df562141 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -126,37 +126,37 @@ pub unsafe fn CloseClusterCryptProvider(hcluscryptprovider: *const _HCLUSCRYPTPR #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterGroup(hgroup: *const _HGROUP) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterGroup(hgroup: *const _HGROUP) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterGroup(hgroup : *const _HGROUP) -> super::super::Foundation:: BOOL); - CloseClusterGroup(hgroup) + CloseClusterGroup(hgroup).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterGroupSet(hgroupset: *const _HGROUPSET) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterGroupSet(hgroupset: *const _HGROUPSET) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterGroupSet(hgroupset : *const _HGROUPSET) -> super::super::Foundation:: BOOL); - CloseClusterGroupSet(hgroupset) + CloseClusterGroupSet(hgroupset).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterNetInterface(hnetinterface: *const _HNETINTERFACE) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterNetInterface(hnetinterface: *const _HNETINTERFACE) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterNetInterface(hnetinterface : *const _HNETINTERFACE) -> super::super::Foundation:: BOOL); - CloseClusterNetInterface(hnetinterface) + CloseClusterNetInterface(hnetinterface).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterNetwork(hnetwork: *const _HNETWORK) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterNetwork(hnetwork: *const _HNETWORK) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterNetwork(hnetwork : *const _HNETWORK) -> super::super::Foundation:: BOOL); - CloseClusterNetwork(hnetwork) + CloseClusterNetwork(hnetwork).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterNode(hnode: *const _HNODE) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterNode(hnode: *const _HNODE) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterNode(hnode : *const _HNODE) -> super::super::Foundation:: BOOL); - CloseClusterNode(hnode) + CloseClusterNode(hnode).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -168,9 +168,9 @@ pub unsafe fn CloseClusterNotifyPort(hchange: *const _HCHANGE) -> super::super:: #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClusterResource(hresource: *const _HRESOURCE) -> super::super::Foundation::BOOL { +pub unsafe fn CloseClusterResource(hresource: *const _HRESOURCE) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn CloseClusterResource(hresource : *const _HRESOURCE) -> super::super::Foundation:: BOOL); - CloseClusterResource(hresource) + CloseClusterResource(hresource).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"] #[inline] @@ -339,22 +339,22 @@ pub unsafe fn ClusterGetEnumCountEx(hclusterenum: *const _HCLUSENUMEX) -> u32 { #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint: P0, lpszvolumename: ::windows_core::PWSTR, cchbufferlength: u32) -> super::super::Foundation::BOOL +pub unsafe fn ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint: P0, lpszvolumename: ::windows_core::PWSTR, cchbufferlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("resutils.dll" "system" fn ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint : ::windows_core::PCWSTR, lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename), cchbufferlength) + ClusterGetVolumeNameForVolumeMountPoint(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename), cchbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClusterGetVolumePathName(lpszfilename: P0, lpszvolumepathname: ::windows_core::PWSTR, cchbufferlength: u32) -> super::super::Foundation::BOOL +pub unsafe fn ClusterGetVolumePathName(lpszfilename: P0, lpszvolumepathname: ::windows_core::PWSTR, cchbufferlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("resutils.dll" "system" fn ClusterGetVolumePathName(lpszfilename : ::windows_core::PCWSTR, lpszvolumepathname : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - ClusterGetVolumePathName(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname), cchbufferlength) + ClusterGetVolumePathName(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname), cchbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"] #[inline] @@ -1363,9 +1363,9 @@ pub unsafe fn GetClusterResourceKey(hresource: *const _HRESOURCE, samdesired: u3 #[doc = "*Required features: `\"Win32_Networking_Clustering\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetClusterResourceNetworkName(hresource: *const _HRESOURCE, lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetClusterResourceNetworkName(hresource: *const _HRESOURCE, lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceNetworkName(hresource : *const _HRESOURCE, lpbuffer : ::windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetClusterResourceNetworkName(hresource, ::core::mem::transmute(lpbuffer), nsize) + GetClusterResourceNetworkName(hresource, ::core::mem::transmute(lpbuffer), nsize).ok() } #[doc = "*Required features: `\"Win32_Networking_Clustering\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs index 4b8049560b..e553760877 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -7,9 +7,9 @@ pub unsafe fn LdapGetLastError() -> u32 { #[doc = "*Required features: `\"Win32_Networking_Ldap\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LdapMapErrorToWin32(ldaperror: LDAP_RETCODE) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn LdapMapErrorToWin32(ldaperror: LDAP_RETCODE) -> ::windows_core::Result<()> { ::windows_targets::link!("wldap32.dll" "cdecl" fn LdapMapErrorToWin32(ldaperror : LDAP_RETCODE) -> super::super::Foundation:: WIN32_ERROR); - LdapMapErrorToWin32(ldaperror) + LdapMapErrorToWin32(ldaperror).ok() } #[doc = "*Required features: `\"Win32_Networking_Ldap\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs index 028df6b5e8..37f858f5d4 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -1,9 +1,9 @@ #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpAddRequestHeaders(hrequest: *mut ::core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpAddRequestHeaders(hrequest: *mut ::core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpAddRequestHeaders(hrequest : *mut ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, dwmodifiers : u32) -> super::super::Foundation:: BOOL); - WinHttpAddRequestHeaders(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers) + WinHttpAddRequestHeaders(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -14,16 +14,16 @@ pub unsafe fn WinHttpAddRequestHeadersEx(hrequest: *mut ::core::ffi::c_void, dwm #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpCheckPlatform() -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpCheckPlatform() -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpCheckPlatform() -> super::super::Foundation:: BOOL); - WinHttpCheckPlatform() + WinHttpCheckPlatform().ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpCloseHandle(hinternet: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpCloseHandle(hinternet: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpCloseHandle(hinternet : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinHttpCloseHandle(hinternet) + WinHttpCloseHandle(hinternet).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -37,9 +37,9 @@ where #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpCrackUrl(pwszurl: &[u16], dwflags: u32, lpurlcomponents: *mut URL_COMPONENTS) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpCrackUrl(pwszurl: &[u16], dwflags: u32, lpurlcomponents: *mut URL_COMPONENTS) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpCrackUrl(pwszurl : ::windows_core::PCWSTR, dwurllength : u32, dwflags : u32, lpurlcomponents : *mut URL_COMPONENTS) -> super::super::Foundation:: BOOL); - WinHttpCrackUrl(::core::mem::transmute(pwszurl.as_ptr()), pwszurl.len() as _, dwflags, lpurlcomponents) + WinHttpCrackUrl(::core::mem::transmute(pwszurl.as_ptr()), pwszurl.len() as _, dwflags, lpurlcomponents).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -50,16 +50,16 @@ pub unsafe fn WinHttpCreateProxyResolver(hsession: *const ::core::ffi::c_void, p #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpCreateUrl(lpurlcomponents: *const URL_COMPONENTS, dwflags: WIN_HTTP_CREATE_URL_FLAGS, pwszurl: ::windows_core::PWSTR, pdwurllength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpCreateUrl(lpurlcomponents: *const URL_COMPONENTS, dwflags: WIN_HTTP_CREATE_URL_FLAGS, pwszurl: ::windows_core::PWSTR, pdwurllength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpCreateUrl(lpurlcomponents : *const URL_COMPONENTS, dwflags : WIN_HTTP_CREATE_URL_FLAGS, pwszurl : ::windows_core::PWSTR, pdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpCreateUrl(lpurlcomponents, dwflags, ::core::mem::transmute(pwszurl), pdwurllength) + WinHttpCreateUrl(lpurlcomponents, dwflags, ::core::mem::transmute(pwszurl), pdwurllength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags: u32, ppwstrautoconfigurl: *mut ::windows_core::PWSTR) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags: u32, ppwstrautoconfigurl: *mut ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpDetectAutoProxyConfigUrl(dwautodetectflags : u32, ppwstrautoconfigurl : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - WinHttpDetectAutoProxyConfigUrl(dwautodetectflags, ppwstrautoconfigurl) + WinHttpDetectAutoProxyConfigUrl(dwautodetectflags, ppwstrautoconfigurl).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -91,26 +91,26 @@ pub unsafe fn WinHttpFreeQueryConnectionGroupResult(presult: *mut WINHTTP_QUERY_ #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpGetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpGetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpGetDefaultProxyConfiguration(pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - WinHttpGetDefaultProxyConfiguration(pproxyinfo) + WinHttpGetDefaultProxyConfiguration(pproxyinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig: *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig: *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig : *mut WINHTTP_CURRENT_USER_IE_PROXY_CONFIG) -> super::super::Foundation:: BOOL); - WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig) + WinHttpGetIEProxyConfigForCurrentUser(pproxyconfig).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpGetProxyForUrl(hsession: *mut ::core::ffi::c_void, lpcwszurl: P0, pautoproxyoptions: *mut WINHTTP_AUTOPROXY_OPTIONS, pproxyinfo: *mut WINHTTP_PROXY_INFO) -> super::super::Foundation::BOOL +pub unsafe fn WinHttpGetProxyForUrl(hsession: *mut ::core::ffi::c_void, lpcwszurl: P0, pautoproxyoptions: *mut WINHTTP_AUTOPROXY_OPTIONS, pproxyinfo: *mut WINHTTP_PROXY_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxyForUrl(hsession : *mut ::core::ffi::c_void, lpcwszurl : ::windows_core::PCWSTR, pautoproxyoptions : *mut WINHTTP_AUTOPROXY_OPTIONS, pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - WinHttpGetProxyForUrl(hsession, lpcwszurl.into_param().abi(), pautoproxyoptions, pproxyinfo) + WinHttpGetProxyForUrl(hsession, lpcwszurl.into_param().abi(), pautoproxyoptions, pproxyinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -178,9 +178,9 @@ where #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpQueryAuthSchemes(hrequest: *mut ::core::ffi::c_void, lpdwsupportedschemes: *mut u32, lpdwfirstscheme: *mut u32, pdwauthtarget: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpQueryAuthSchemes(hrequest: *mut ::core::ffi::c_void, lpdwsupportedschemes: *mut u32, lpdwfirstscheme: *mut u32, pdwauthtarget: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryAuthSchemes(hrequest : *mut ::core::ffi::c_void, lpdwsupportedschemes : *mut u32, lpdwfirstscheme : *mut u32, pdwauthtarget : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpQueryAuthSchemes(hrequest, lpdwsupportedschemes, lpdwfirstscheme, pdwauthtarget) + WinHttpQueryAuthSchemes(hrequest, lpdwsupportedschemes, lpdwfirstscheme, pdwauthtarget).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -191,19 +191,19 @@ pub unsafe fn WinHttpQueryConnectionGroup(hinternet: *const ::core::ffi::c_void, #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpQueryDataAvailable(hrequest: *mut ::core::ffi::c_void, lpdwnumberofbytesavailable: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpQueryDataAvailable(hrequest: *mut ::core::ffi::c_void, lpdwnumberofbytesavailable: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryDataAvailable(hrequest : *mut ::core::ffi::c_void, lpdwnumberofbytesavailable : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpQueryDataAvailable(hrequest, lpdwnumberofbytesavailable) + WinHttpQueryDataAvailable(hrequest, lpdwnumberofbytesavailable).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpQueryHeaders(hrequest: *mut ::core::ffi::c_void, dwinfolevel: u32, pwszname: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WinHttpQueryHeaders(hrequest: *mut ::core::ffi::c_void, dwinfolevel: u32, pwszname: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryHeaders(hrequest : *mut ::core::ffi::c_void, dwinfolevel : u32, pwszname : ::windows_core::PCWSTR, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32, lpdwindex : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpQueryHeaders(hrequest, dwinfolevel, pwszname.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, lpdwindex) + WinHttpQueryHeaders(hrequest, dwinfolevel, pwszname.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, lpdwindex).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -214,16 +214,16 @@ pub unsafe fn WinHttpQueryHeadersEx(hrequest: *const ::core::ffi::c_void, dwinfo #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpQueryOption(hinternet: *mut ::core::ffi::c_void, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpQueryOption(hinternet: *mut ::core::ffi::c_void, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryOption(hinternet : *mut ::core::ffi::c_void, dwoption : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpQueryOption(hinternet, dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength) + WinHttpQueryOption(hinternet, dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpReadData(hrequest: *mut ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpReadData(hrequest: *mut ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpReadData(hrequest : *mut ::core::ffi::c_void, lpbuffer : *mut ::core::ffi::c_void, dwnumberofbytestoread : u32, lpdwnumberofbytesread : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpReadData(hrequest, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread) + WinHttpReadData(hrequest, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -246,9 +246,9 @@ where #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpReceiveResponse(hrequest: *mut ::core::ffi::c_void, lpreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpReceiveResponse(hrequest: *mut ::core::ffi::c_void, lpreserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpReceiveResponse(hrequest : *mut ::core::ffi::c_void, lpreserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinHttpReceiveResponse(hrequest, lpreserved) + WinHttpReceiveResponse(hrequest, lpreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -259,34 +259,34 @@ pub unsafe fn WinHttpResetAutoProxy(hsession: *const ::core::ffi::c_void, dwflag #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpSendRequest(hrequest: *mut ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32, dwtotallength: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpSendRequest(hrequest: *mut ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32, dwtotallength: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSendRequest(hrequest : *mut ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32, dwtotallength : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - WinHttpSendRequest(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength, dwtotallength, dwcontext) + WinHttpSendRequest(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength, dwtotallength, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpSetCredentials(hrequest: *mut ::core::ffi::c_void, authtargets: u32, authscheme: u32, pwszusername: P0, pwszpassword: P1, pauthparams: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn WinHttpSetCredentials(hrequest: *mut ::core::ffi::c_void, authtargets: u32, authscheme: u32, pwszusername: P0, pwszpassword: P1, pauthparams: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSetCredentials(hrequest : *mut ::core::ffi::c_void, authtargets : u32, authscheme : u32, pwszusername : ::windows_core::PCWSTR, pwszpassword : ::windows_core::PCWSTR, pauthparams : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WinHttpSetCredentials(hrequest, authtargets, authscheme, pwszusername.into_param().abi(), pwszpassword.into_param().abi(), pauthparams) + WinHttpSetCredentials(hrequest, authtargets, authscheme, pwszusername.into_param().abi(), pwszpassword.into_param().abi(), pauthparams).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpSetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpSetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSetDefaultProxyConfiguration(pproxyinfo : *mut WINHTTP_PROXY_INFO) -> super::super::Foundation:: BOOL); - WinHttpSetDefaultProxyConfiguration(pproxyinfo) + WinHttpSetDefaultProxyConfiguration(pproxyinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpSetOption(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<&[u8]>) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpSetOption(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSetOption(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *const ::core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - WinHttpSetOption(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)) + WinHttpSetOption(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -307,26 +307,26 @@ pub unsafe fn WinHttpSetStatusCallback(hinternet: *mut ::core::ffi::c_void, lpfn #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpSetTimeouts(hinternet: *mut ::core::ffi::c_void, nresolvetimeout: i32, nconnecttimeout: i32, nsendtimeout: i32, nreceivetimeout: i32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpSetTimeouts(hinternet: *mut ::core::ffi::c_void, nresolvetimeout: i32, nconnecttimeout: i32, nsendtimeout: i32, nreceivetimeout: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpSetTimeouts(hinternet : *mut ::core::ffi::c_void, nresolvetimeout : i32, nconnecttimeout : i32, nsendtimeout : i32, nreceivetimeout : i32) -> super::super::Foundation:: BOOL); - WinHttpSetTimeouts(hinternet, nresolvetimeout, nconnecttimeout, nsendtimeout, nreceivetimeout) + WinHttpSetTimeouts(hinternet, nresolvetimeout, nconnecttimeout, nsendtimeout, nreceivetimeout).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, pwsztime: &mut [u16; 62]) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, pwsztime: &mut [u16; 62]) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpTimeFromSystemTime(pst : *const super::super::Foundation:: SYSTEMTIME, pwsztime : ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - WinHttpTimeFromSystemTime(pst, ::core::mem::transmute(pwsztime.as_ptr())) + WinHttpTimeFromSystemTime(pst, ::core::mem::transmute(pwsztime.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpTimeToSystemTime(pwsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL +pub unsafe fn WinHttpTimeToSystemTime(pwsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpTimeToSystemTime(pwsztime : ::windows_core::PCWSTR, pst : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - WinHttpTimeToSystemTime(pwsztime.into_param().abi(), pst) + WinHttpTimeToSystemTime(pwsztime.into_param().abi(), pst).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`*"] #[inline] @@ -367,9 +367,9 @@ pub unsafe fn WinHttpWebSocketShutdown(hwebsocket: *const ::core::ffi::c_void, u #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHttpWriteData(hrequest: *mut ::core::ffi::c_void, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwnumberofbytestowrite: u32, lpdwnumberofbyteswritten: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn WinHttpWriteData(hrequest: *mut ::core::ffi::c_void, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwnumberofbytestowrite: u32, lpdwnumberofbyteswritten: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("winhttp.dll" "system" fn WinHttpWriteData(hrequest : *mut ::core::ffi::c_void, lpbuffer : *const ::core::ffi::c_void, dwnumberofbytestowrite : u32, lpdwnumberofbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - WinHttpWriteData(hrequest, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwnumberofbytestowrite, lpdwnumberofbyteswritten) + WinHttpWriteData(hrequest, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwnumberofbytestowrite, lpdwnumberofbyteswritten).ok() } #[doc = "*Required features: `\"Win32_Networking_WinHttp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs index 424b7e2e9a..a20c74010c 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs @@ -135,7 +135,7 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitUrlCacheEntryA(lpszurlname: P0, lpszlocalfilename: P1, expiretime: super::super::Foundation::FILETIME, lastmodifiedtime: super::super::Foundation::FILETIME, cacheentrytype: u32, lpheaderinfo: ::core::option::Option<&[u8]>, lpszfileextension: P2, lpszoriginalurl: P3) -> super::super::Foundation::BOOL +pub unsafe fn CommitUrlCacheEntryA(lpszurlname: P0, lpszlocalfilename: P1, expiretime: super::super::Foundation::FILETIME, lastmodifiedtime: super::super::Foundation::FILETIME, cacheentrytype: u32, lpheaderinfo: ::core::option::Option<&[u8]>, lpszfileextension: P2, lpszoriginalurl: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -143,7 +143,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CommitUrlCacheEntryA(lpszurlname : ::windows_core::PCSTR, lpszlocalfilename : ::windows_core::PCSTR, expiretime : super::super::Foundation:: FILETIME, lastmodifiedtime : super::super::Foundation:: FILETIME, cacheentrytype : u32, lpheaderinfo : *const u8, cchheaderinfo : u32, lpszfileextension : ::windows_core::PCSTR, lpszoriginalurl : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CommitUrlCacheEntryA(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()) + CommitUrlCacheEntryA(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -158,7 +158,7 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitUrlCacheEntryW(lpszurlname: P0, lpszlocalfilename: P1, expiretime: super::super::Foundation::FILETIME, lastmodifiedtime: super::super::Foundation::FILETIME, cacheentrytype: u32, lpszheaderinfo: ::core::option::Option<&[u16]>, lpszfileextension: P2, lpszoriginalurl: P3) -> super::super::Foundation::BOOL +pub unsafe fn CommitUrlCacheEntryW(lpszurlname: P0, lpszlocalfilename: P1, expiretime: super::super::Foundation::FILETIME, lastmodifiedtime: super::super::Foundation::FILETIME, cacheentrytype: u32, lpszheaderinfo: ::core::option::Option<&[u16]>, lpszfileextension: P2, lpszoriginalurl: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -166,7 +166,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CommitUrlCacheEntryW(lpszurlname : ::windows_core::PCWSTR, lpszlocalfilename : ::windows_core::PCWSTR, expiretime : super::super::Foundation:: FILETIME, lastmodifiedtime : super::super::Foundation:: FILETIME, cacheentrytype : u32, lpszheaderinfo : ::windows_core::PCWSTR, cchheaderinfo : u32, lpszfileextension : ::windows_core::PCWSTR, lpszoriginalurl : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CommitUrlCacheEntryW(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpszheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()) + CommitUrlCacheEntryW(lpszurlname.into_param().abi(), lpszlocalfilename.into_param().abi(), ::core::mem::transmute(expiretime), ::core::mem::transmute(lastmodifiedtime), cacheentrytype, ::core::mem::transmute(lpszheaderinfo.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaderinfo.as_deref().map_or(0, |slice| slice.len() as _), lpszfileextension.into_param().abi(), lpszoriginalurl.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -183,37 +183,37 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUrlCacheContainerA(name: P0, lpcacheprefix: P1, lpszcachepath: P2, kbcachelimit: u32, dwcontainertype: u32, dwoptions: u32, pvbuffer: ::core::option::Option<*const ::core::ffi::c_void>, cbbuffer: ::core::option::Option<*const u32>) -> super::super::Foundation::BOOL +pub unsafe fn CreateUrlCacheContainerA(name: P0, lpcacheprefix: P1, lpszcachepath: P2, kbcachelimit: u32, dwcontainertype: u32, dwoptions: u32, pvbuffer: ::core::option::Option<*const ::core::ffi::c_void>, cbbuffer: ::core::option::Option<*const u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheContainerA(name : ::windows_core::PCSTR, lpcacheprefix : ::windows_core::PCSTR, lpszcachepath : ::windows_core::PCSTR, kbcachelimit : u32, dwcontainertype : u32, dwoptions : u32, pvbuffer : *const ::core::ffi::c_void, cbbuffer : *const u32) -> super::super::Foundation:: BOOL); - CreateUrlCacheContainerA(name.into_param().abi(), lpcacheprefix.into_param().abi(), lpszcachepath.into_param().abi(), kbcachelimit, dwcontainertype, dwoptions, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(cbbuffer.unwrap_or(::std::ptr::null()))) + CreateUrlCacheContainerA(name.into_param().abi(), lpcacheprefix.into_param().abi(), lpszcachepath.into_param().abi(), kbcachelimit, dwcontainertype, dwoptions, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(cbbuffer.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUrlCacheContainerW(name: P0, lpcacheprefix: P1, lpszcachepath: P2, kbcachelimit: u32, dwcontainertype: u32, dwoptions: u32, pvbuffer: ::core::option::Option<*const ::core::ffi::c_void>, cbbuffer: ::core::option::Option<*const u32>) -> super::super::Foundation::BOOL +pub unsafe fn CreateUrlCacheContainerW(name: P0, lpcacheprefix: P1, lpszcachepath: P2, kbcachelimit: u32, dwcontainertype: u32, dwoptions: u32, pvbuffer: ::core::option::Option<*const ::core::ffi::c_void>, cbbuffer: ::core::option::Option<*const u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheContainerW(name : ::windows_core::PCWSTR, lpcacheprefix : ::windows_core::PCWSTR, lpszcachepath : ::windows_core::PCWSTR, kbcachelimit : u32, dwcontainertype : u32, dwoptions : u32, pvbuffer : *const ::core::ffi::c_void, cbbuffer : *const u32) -> super::super::Foundation:: BOOL); - CreateUrlCacheContainerW(name.into_param().abi(), lpcacheprefix.into_param().abi(), lpszcachepath.into_param().abi(), kbcachelimit, dwcontainertype, dwoptions, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(cbbuffer.unwrap_or(::std::ptr::null()))) + CreateUrlCacheContainerW(name.into_param().abi(), lpcacheprefix.into_param().abi(), lpszcachepath.into_param().abi(), kbcachelimit, dwcontainertype, dwoptions, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(cbbuffer.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUrlCacheEntryA(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P1, lpszfilename: &mut [u8; 260], dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn CreateUrlCacheEntryA(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P1, lpszfilename: &mut [u8; 260], dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheEntryA(lpszurlname : ::windows_core::PCSTR, dwexpectedfilesize : u32, lpszfileextension : ::windows_core::PCSTR, lpszfilename : ::windows_core::PSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - CreateUrlCacheEntryA(lpszurlname.into_param().abi(), dwexpectedfilesize, lpszfileextension.into_param().abi(), ::core::mem::transmute(lpszfilename.as_ptr()), dwreserved) + CreateUrlCacheEntryA(lpszurlname.into_param().abi(), dwexpectedfilesize, lpszfileextension.into_param().abi(), ::core::mem::transmute(lpszfilename.as_ptr()), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -230,13 +230,13 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUrlCacheEntryW(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P1, lpszfilename: &mut [u16; 260], dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn CreateUrlCacheEntryW(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P1, lpszfilename: &mut [u16; 260], dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheEntryW(lpszurlname : ::windows_core::PCWSTR, dwexpectedfilesize : u32, lpszfileextension : ::windows_core::PCWSTR, lpszfilename : ::windows_core::PWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - CreateUrlCacheEntryW(lpszurlname.into_param().abi(), dwexpectedfilesize, lpszfileextension.into_param().abi(), ::core::mem::transmute(lpszfilename.as_ptr()), dwreserved) + CreateUrlCacheEntryW(lpszurlname.into_param().abi(), dwexpectedfilesize, lpszfileextension.into_param().abi(), ::core::mem::transmute(lpszfilename.as_ptr()), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -259,59 +259,59 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheContainerA(name: P0, dwoptions: u32) -> super::super::Foundation::BOOL +pub unsafe fn DeleteUrlCacheContainerA(name: P0, dwoptions: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheContainerA(name : ::windows_core::PCSTR, dwoptions : u32) -> super::super::Foundation:: BOOL); - DeleteUrlCacheContainerA(name.into_param().abi(), dwoptions) + DeleteUrlCacheContainerA(name.into_param().abi(), dwoptions).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheContainerW(name: P0, dwoptions: u32) -> super::super::Foundation::BOOL +pub unsafe fn DeleteUrlCacheContainerW(name: P0, dwoptions: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheContainerW(name : ::windows_core::PCWSTR, dwoptions : u32) -> super::super::Foundation:: BOOL); - DeleteUrlCacheContainerW(name.into_param().abi(), dwoptions) + DeleteUrlCacheContainerW(name.into_param().abi(), dwoptions).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheEntry(lpszurlname: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteUrlCacheEntry(lpszurlname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheEntry(lpszurlname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteUrlCacheEntry(lpszurlname.into_param().abi()) + DeleteUrlCacheEntry(lpszurlname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheEntryA(lpszurlname: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteUrlCacheEntryA(lpszurlname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheEntryA(lpszurlname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteUrlCacheEntryA(lpszurlname.into_param().abi()) + DeleteUrlCacheEntryA(lpszurlname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheEntryW(lpszurlname: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteUrlCacheEntryW(lpszurlname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheEntryW(lpszurlname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeleteUrlCacheEntryW(lpszurlname.into_param().abi()) + DeleteUrlCacheEntryW(lpszurlname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUrlCacheGroup(groupid: i64, dwflags: u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn DeleteUrlCacheGroup(groupid: i64, dwflags: u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn DeleteUrlCacheGroup(groupid : i64, dwflags : u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteUrlCacheGroup(groupid, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + DeleteUrlCacheGroup(groupid, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -323,9 +323,9 @@ pub unsafe fn DeleteWpadCacheForNetworks(param0: WPAD_CACHE_DELETE) -> super::su #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DetectAutoProxyUrl(pszautoproxyurl: &mut [u8], dwdetectflags: PROXY_AUTO_DETECT_TYPE) -> super::super::Foundation::BOOL { +pub unsafe fn DetectAutoProxyUrl(pszautoproxyurl: &mut [u8], dwdetectflags: PROXY_AUTO_DETECT_TYPE) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn DetectAutoProxyUrl(pszautoproxyurl : ::windows_core::PSTR, cchautoproxyurl : u32, dwdetectflags : PROXY_AUTO_DETECT_TYPE) -> super::super::Foundation:: BOOL); - DetectAutoProxyUrl(::core::mem::transmute(pszautoproxyurl.as_ptr()), pszautoproxyurl.len() as _, dwdetectflags) + DetectAutoProxyUrl(::core::mem::transmute(pszautoproxyurl.as_ptr()), pszautoproxyurl.len() as _, dwdetectflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -359,12 +359,12 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindCloseUrlCache(henumhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindCloseUrlCache(henumhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindCloseUrlCache(henumhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FindCloseUrlCache(henumhandle.into_param().abi()) + FindCloseUrlCache(henumhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -455,52 +455,52 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextUrlCacheEntryA(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FindNextUrlCacheEntryA(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheEntryA(henumhandle : super::super::Foundation:: HANDLE, lpnextcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: BOOL); - FindNextUrlCacheEntryA(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo) + FindNextUrlCacheEntryA(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextUrlCacheEntryExA(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: ::core::option::Option<*const ::core::ffi::c_void>, lpcbgroupattributes: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn FindNextUrlCacheEntryExA(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: ::core::option::Option<*const ::core::ffi::c_void>, lpcbgroupattributes: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheEntryExA(henumhandle : super::super::Foundation:: HANDLE, lpnextcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, lpgroupattributes : *const ::core::ffi::c_void, lpcbgroupattributes : *const u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextUrlCacheEntryExA(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, ::core::mem::transmute(lpgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcbgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + FindNextUrlCacheEntryExA(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, ::core::mem::transmute(lpgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcbgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextUrlCacheEntryExW(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: ::core::option::Option<*const ::core::ffi::c_void>, lpcbgroupattributes: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn FindNextUrlCacheEntryExW(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: ::core::option::Option<*const ::core::ffi::c_void>, lpcbgroupattributes: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheEntryExW(henumhandle : super::super::Foundation:: HANDLE, lpnextcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, lpgroupattributes : *const ::core::ffi::c_void, lpcbgroupattributes : *const u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextUrlCacheEntryExW(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, ::core::mem::transmute(lpgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcbgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + FindNextUrlCacheEntryExW(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, ::core::mem::transmute(lpgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcbgroupattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextUrlCacheEntryW(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FindNextUrlCacheEntryW(henumhandle: P0, lpnextcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheEntryW(henumhandle : super::super::Foundation:: HANDLE, lpnextcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: BOOL); - FindNextUrlCacheEntryW(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo) + FindNextUrlCacheEntryW(henumhandle.into_param().abi(), ::core::mem::transmute(lpnextcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextUrlCacheGroup(hfind: P0, lpgroupid: *mut i64, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn FindNextUrlCacheGroup(hfind: P0, lpgroupid: *mut i64, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FindNextUrlCacheGroup(hfind : super::super::Foundation:: HANDLE, lpgroupid : *mut i64, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextUrlCacheGroup(hfind.into_param().abi(), lpgroupid, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + FindNextUrlCacheGroup(hfind.into_param().abi(), lpgroupid, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -514,84 +514,84 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeUrlCacheSpaceA(lpszcachepath: P0, dwsize: u32, dwfilter: u32) -> super::super::Foundation::BOOL +pub unsafe fn FreeUrlCacheSpaceA(lpszcachepath: P0, dwsize: u32, dwfilter: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FreeUrlCacheSpaceA(lpszcachepath : ::windows_core::PCSTR, dwsize : u32, dwfilter : u32) -> super::super::Foundation:: BOOL); - FreeUrlCacheSpaceA(lpszcachepath.into_param().abi(), dwsize, dwfilter) + FreeUrlCacheSpaceA(lpszcachepath.into_param().abi(), dwsize, dwfilter).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeUrlCacheSpaceW(lpszcachepath: P0, dwsize: u32, dwfilter: u32) -> super::super::Foundation::BOOL +pub unsafe fn FreeUrlCacheSpaceW(lpszcachepath: P0, dwsize: u32, dwfilter: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FreeUrlCacheSpaceW(lpszcachepath : ::windows_core::PCWSTR, dwsize : u32, dwfilter : u32) -> super::super::Foundation:: BOOL); - FreeUrlCacheSpaceW(lpszcachepath.into_param().abi(), dwsize, dwfilter) + FreeUrlCacheSpaceW(lpszcachepath.into_param().abi(), dwsize, dwfilter).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpCommandA(hconnect: *const ::core::ffi::c_void, fexpectresponse: P0, dwflags: FTP_FLAGS, lpszcommand: P1, dwcontext: usize, phftpcommand: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn FtpCommandA(hconnect: *const ::core::ffi::c_void, fexpectresponse: P0, dwflags: FTP_FLAGS, lpszcommand: P1, dwcontext: usize, phftpcommand: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpCommandA(hconnect : *const ::core::ffi::c_void, fexpectresponse : super::super::Foundation:: BOOL, dwflags : FTP_FLAGS, lpszcommand : ::windows_core::PCSTR, dwcontext : usize, phftpcommand : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FtpCommandA(hconnect, fexpectresponse.into_param().abi(), dwflags, lpszcommand.into_param().abi(), dwcontext, ::core::mem::transmute(phftpcommand.unwrap_or(::std::ptr::null_mut()))) + FtpCommandA(hconnect, fexpectresponse.into_param().abi(), dwflags, lpszcommand.into_param().abi(), dwcontext, ::core::mem::transmute(phftpcommand.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpCommandW(hconnect: *const ::core::ffi::c_void, fexpectresponse: P0, dwflags: FTP_FLAGS, lpszcommand: P1, dwcontext: usize, phftpcommand: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn FtpCommandW(hconnect: *const ::core::ffi::c_void, fexpectresponse: P0, dwflags: FTP_FLAGS, lpszcommand: P1, dwcontext: usize, phftpcommand: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpCommandW(hconnect : *const ::core::ffi::c_void, fexpectresponse : super::super::Foundation:: BOOL, dwflags : FTP_FLAGS, lpszcommand : ::windows_core::PCWSTR, dwcontext : usize, phftpcommand : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FtpCommandW(hconnect, fexpectresponse.into_param().abi(), dwflags, lpszcommand.into_param().abi(), dwcontext, ::core::mem::transmute(phftpcommand.unwrap_or(::std::ptr::null_mut()))) + FtpCommandW(hconnect, fexpectresponse.into_param().abi(), dwflags, lpszcommand.into_param().abi(), dwcontext, ::core::mem::transmute(phftpcommand.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpCreateDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpCreateDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpCreateDirectoryA(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FtpCreateDirectoryA(hconnect, lpszdirectory.into_param().abi()) + FtpCreateDirectoryA(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpCreateDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpCreateDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpCreateDirectoryW(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FtpCreateDirectoryW(hconnect, lpszdirectory.into_param().abi()) + FtpCreateDirectoryW(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpDeleteFileA(hconnect: *const ::core::ffi::c_void, lpszfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpDeleteFileA(hconnect: *const ::core::ffi::c_void, lpszfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpDeleteFileA(hconnect : *const ::core::ffi::c_void, lpszfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FtpDeleteFileA(hconnect, lpszfilename.into_param().abi()) + FtpDeleteFileA(hconnect, lpszfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpDeleteFileW(hconnect: *const ::core::ffi::c_void, lpszfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpDeleteFileW(hconnect: *const ::core::ffi::c_void, lpszfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpDeleteFileW(hconnect : *const ::core::ffi::c_void, lpszfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FtpDeleteFileW(hconnect, lpszfilename.into_param().abi()) + FtpDeleteFileW(hconnect, lpszfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_FileSystem"))] @@ -616,28 +616,28 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpGetCurrentDirectoryA(hconnect: *const ::core::ffi::c_void, lpszcurrentdirectory: ::windows_core::PSTR, lpdwcurrentdirectory: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn FtpGetCurrentDirectoryA(hconnect: *const ::core::ffi::c_void, lpszcurrentdirectory: ::windows_core::PSTR, lpdwcurrentdirectory: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn FtpGetCurrentDirectoryA(hconnect : *const ::core::ffi::c_void, lpszcurrentdirectory : ::windows_core::PSTR, lpdwcurrentdirectory : *mut u32) -> super::super::Foundation:: BOOL); - FtpGetCurrentDirectoryA(hconnect, ::core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory) + FtpGetCurrentDirectoryA(hconnect, ::core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpGetCurrentDirectoryW(hconnect: *const ::core::ffi::c_void, lpszcurrentdirectory: ::windows_core::PWSTR, lpdwcurrentdirectory: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn FtpGetCurrentDirectoryW(hconnect: *const ::core::ffi::c_void, lpszcurrentdirectory: ::windows_core::PWSTR, lpdwcurrentdirectory: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn FtpGetCurrentDirectoryW(hconnect : *const ::core::ffi::c_void, lpszcurrentdirectory : ::windows_core::PWSTR, lpdwcurrentdirectory : *mut u32) -> super::super::Foundation:: BOOL); - FtpGetCurrentDirectoryW(hconnect, ::core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory) + FtpGetCurrentDirectoryW(hconnect, ::core::mem::transmute(lpszcurrentdirectory), lpdwcurrentdirectory).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpGetFileA(hconnect: *const ::core::ffi::c_void, lpszremotefile: P0, lpsznewfile: P1, ffailifexists: P2, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpGetFileA(hconnect: *const ::core::ffi::c_void, lpszremotefile: P0, lpsznewfile: P1, ffailifexists: P2, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FtpGetFileA(hconnect : *const ::core::ffi::c_void, lpszremotefile : ::windows_core::PCSTR, lpsznewfile : ::windows_core::PCSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileA(hconnect, lpszremotefile.into_param().abi(), lpsznewfile.into_param().abi(), ffailifexists.into_param().abi(), dwflagsandattributes, dwflags, dwcontext) + FtpGetFileA(hconnect, lpszremotefile.into_param().abi(), lpsznewfile.into_param().abi(), ffailifexists.into_param().abi(), dwflagsandattributes, dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -660,14 +660,14 @@ pub unsafe fn FtpGetFileSize(hfile: *const ::core::ffi::c_void, lpdwfilesizehigh #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpGetFileW(hconnect: *const ::core::ffi::c_void, lpszremotefile: P0, lpsznewfile: P1, ffailifexists: P2, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpGetFileW(hconnect: *const ::core::ffi::c_void, lpszremotefile: P0, lpsznewfile: P1, ffailifexists: P2, dwflagsandattributes: u32, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn FtpGetFileW(hconnect : *const ::core::ffi::c_void, lpszremotefile : ::windows_core::PCWSTR, lpsznewfile : ::windows_core::PCWSTR, ffailifexists : super::super::Foundation:: BOOL, dwflagsandattributes : u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpGetFileW(hconnect, lpszremotefile.into_param().abi(), lpsznewfile.into_param().abi(), ffailifexists.into_param().abi(), dwflagsandattributes, dwflags, dwcontext) + FtpGetFileW(hconnect, lpszremotefile.into_param().abi(), lpsznewfile.into_param().abi(), ffailifexists.into_param().abi(), dwflagsandattributes, dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -690,13 +690,13 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpPutFileA(hconnect: *const ::core::ffi::c_void, lpszlocalfile: P0, lpsznewremotefile: P1, dwflags: FTP_FLAGS, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpPutFileA(hconnect: *const ::core::ffi::c_void, lpszlocalfile: P0, lpsznewremotefile: P1, dwflags: FTP_FLAGS, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpPutFileA(hconnect : *const ::core::ffi::c_void, lpszlocalfile : ::windows_core::PCSTR, lpsznewremotefile : ::windows_core::PCSTR, dwflags : FTP_FLAGS, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpPutFileA(hconnect, lpszlocalfile.into_param().abi(), lpsznewremotefile.into_param().abi(), dwflags, dwcontext) + FtpPutFileA(hconnect, lpszlocalfile.into_param().abi(), lpsznewremotefile.into_param().abi(), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -712,75 +712,75 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpPutFileW(hconnect: *const ::core::ffi::c_void, lpszlocalfile: P0, lpsznewremotefile: P1, dwflags: FTP_FLAGS, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn FtpPutFileW(hconnect: *const ::core::ffi::c_void, lpszlocalfile: P0, lpsznewremotefile: P1, dwflags: FTP_FLAGS, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpPutFileW(hconnect : *const ::core::ffi::c_void, lpszlocalfile : ::windows_core::PCWSTR, lpsznewremotefile : ::windows_core::PCWSTR, dwflags : FTP_FLAGS, dwcontext : usize) -> super::super::Foundation:: BOOL); - FtpPutFileW(hconnect, lpszlocalfile.into_param().abi(), lpsznewremotefile.into_param().abi(), dwflags, dwcontext) + FtpPutFileW(hconnect, lpszlocalfile.into_param().abi(), lpsznewremotefile.into_param().abi(), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpRemoveDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpRemoveDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpRemoveDirectoryA(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FtpRemoveDirectoryA(hconnect, lpszdirectory.into_param().abi()) + FtpRemoveDirectoryA(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpRemoveDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpRemoveDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpRemoveDirectoryW(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FtpRemoveDirectoryW(hconnect, lpszdirectory.into_param().abi()) + FtpRemoveDirectoryW(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpRenameFileA(hconnect: *const ::core::ffi::c_void, lpszexisting: P0, lpsznew: P1) -> super::super::Foundation::BOOL +pub unsafe fn FtpRenameFileA(hconnect: *const ::core::ffi::c_void, lpszexisting: P0, lpsznew: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpRenameFileA(hconnect : *const ::core::ffi::c_void, lpszexisting : ::windows_core::PCSTR, lpsznew : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FtpRenameFileA(hconnect, lpszexisting.into_param().abi(), lpsznew.into_param().abi()) + FtpRenameFileA(hconnect, lpszexisting.into_param().abi(), lpsznew.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpRenameFileW(hconnect: *const ::core::ffi::c_void, lpszexisting: P0, lpsznew: P1) -> super::super::Foundation::BOOL +pub unsafe fn FtpRenameFileW(hconnect: *const ::core::ffi::c_void, lpszexisting: P0, lpsznew: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpRenameFileW(hconnect : *const ::core::ffi::c_void, lpszexisting : ::windows_core::PCWSTR, lpsznew : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FtpRenameFileW(hconnect, lpszexisting.into_param().abi(), lpsznew.into_param().abi()) + FtpRenameFileW(hconnect, lpszexisting.into_param().abi(), lpsznew.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpSetCurrentDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpSetCurrentDirectoryA(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpSetCurrentDirectoryA(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FtpSetCurrentDirectoryA(hconnect, lpszdirectory.into_param().abi()) + FtpSetCurrentDirectoryA(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FtpSetCurrentDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> super::super::Foundation::BOOL +pub unsafe fn FtpSetCurrentDirectoryW(hconnect: *const ::core::ffi::c_void, lpszdirectory: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn FtpSetCurrentDirectoryW(hconnect : *const ::core::ffi::c_void, lpszdirectory : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FtpSetCurrentDirectoryW(hconnect, lpszdirectory.into_param().abi()) + FtpSetCurrentDirectoryW(hconnect, lpszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -795,16 +795,16 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheConfigInfoA(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOA, lpcbcacheconfiginfo: ::core::option::Option<*const u32>, dwfieldcontrol: CACHE_CONFIG) -> super::super::Foundation::BOOL { +pub unsafe fn GetUrlCacheConfigInfoA(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOA, lpcbcacheconfiginfo: ::core::option::Option<*const u32>, dwfieldcontrol: CACHE_CONFIG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheConfigInfoA(lpcacheconfiginfo : *mut INTERNET_CACHE_CONFIG_INFOA, lpcbcacheconfiginfo : *const u32, dwfieldcontrol : CACHE_CONFIG) -> super::super::Foundation:: BOOL); - GetUrlCacheConfigInfoA(lpcacheconfiginfo, ::core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(::std::ptr::null())), dwfieldcontrol) + GetUrlCacheConfigInfoA(lpcacheconfiginfo, ::core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(::std::ptr::null())), dwfieldcontrol).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheConfigInfoW(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOW, lpcbcacheconfiginfo: ::core::option::Option<*const u32>, dwfieldcontrol: CACHE_CONFIG) -> super::super::Foundation::BOOL { +pub unsafe fn GetUrlCacheConfigInfoW(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOW, lpcbcacheconfiginfo: ::core::option::Option<*const u32>, dwfieldcontrol: CACHE_CONFIG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheConfigInfoW(lpcacheconfiginfo : *mut INTERNET_CACHE_CONFIG_INFOW, lpcbcacheconfiginfo : *const u32, dwfieldcontrol : CACHE_CONFIG) -> super::super::Foundation:: BOOL); - GetUrlCacheConfigInfoW(lpcacheconfiginfo, ::core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(::std::ptr::null())), dwfieldcontrol) + GetUrlCacheConfigInfoW(lpcacheconfiginfo, ::core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(::std::ptr::null())), dwfieldcontrol).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -819,58 +819,58 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheEntryInfoA(lpszurlname : ::windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: BOOL); - GetUrlCacheEntryInfoA(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut()))) + GetUrlCacheEntryInfoA(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheEntryInfoExA(lpszurl: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetUrlCacheEntryInfoExA(lpszurl: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheEntryInfoExA(lpszurl : ::windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, lpszredirecturl : ::windows_core::PCSTR, lpcbredirecturl : *const u32, lpreserved : *const ::core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - GetUrlCacheEntryInfoExA(lpszurl.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpszredirecturl.into_param().abi(), ::core::mem::transmute(lpcbredirecturl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), dwflags) + GetUrlCacheEntryInfoExA(lpszurl.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpszredirecturl.into_param().abi(), ::core::mem::transmute(lpcbredirecturl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheEntryInfoExW(lpszurl: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetUrlCacheEntryInfoExW(lpszurl: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: ::core::option::Option<*const u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheEntryInfoExW(lpszurl : ::windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, lpszredirecturl : ::windows_core::PCWSTR, lpcbredirecturl : *const u32, lpreserved : *const ::core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - GetUrlCacheEntryInfoExW(lpszurl.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpszredirecturl.into_param().abi(), ::core::mem::transmute(lpcbredirecturl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), dwflags) + GetUrlCacheEntryInfoExW(lpszurl.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpszredirecturl.into_param().abi(), ::core::mem::transmute(lpcbredirecturl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheEntryInfoW(lpszurlname : ::windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: BOOL); - GetUrlCacheEntryInfoW(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut()))) + GetUrlCacheEntryInfoW(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbcacheentryinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOA, lpcbgroupinfo: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn GetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOA, lpcbgroupinfo: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheGroupAttributeA(gid : i64, dwflags : u32, dwattributes : u32, lpgroupinfo : *mut INTERNET_CACHE_GROUP_INFOA, lpcbgroupinfo : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + GetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOW, lpcbgroupinfo: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn GetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOW, lpcbgroupinfo: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn GetUrlCacheGroupAttributeW(gid : i64, dwflags : u32, dwattributes : u32, lpgroupinfo : *mut INTERNET_CACHE_GROUP_INFOW, lpcbgroupinfo : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + GetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -882,26 +882,26 @@ pub unsafe fn GetUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::sup #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherCreateLocatorA(lpszhost: P0, nserverport: u16, lpszdisplaystring: P1, lpszselectorstring: P2, dwgophertype: u32, lpszlocator: ::windows_core::PSTR, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GopherCreateLocatorA(lpszhost: P0, nserverport: u16, lpszdisplaystring: P1, lpszselectorstring: P2, dwgophertype: u32, lpszlocator: ::windows_core::PSTR, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherCreateLocatorA(lpszhost : ::windows_core::PCSTR, nserverport : u16, lpszdisplaystring : ::windows_core::PCSTR, lpszselectorstring : ::windows_core::PCSTR, dwgophertype : u32, lpszlocator : ::windows_core::PSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - GopherCreateLocatorA(lpszhost.into_param().abi(), nserverport, lpszdisplaystring.into_param().abi(), lpszselectorstring.into_param().abi(), dwgophertype, ::core::mem::transmute(lpszlocator), lpdwbufferlength) + GopherCreateLocatorA(lpszhost.into_param().abi(), nserverport, lpszdisplaystring.into_param().abi(), lpszselectorstring.into_param().abi(), dwgophertype, ::core::mem::transmute(lpszlocator), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherCreateLocatorW(lpszhost: P0, nserverport: u16, lpszdisplaystring: P1, lpszselectorstring: P2, dwgophertype: u32, lpszlocator: ::windows_core::PWSTR, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GopherCreateLocatorW(lpszhost: P0, nserverport: u16, lpszdisplaystring: P1, lpszselectorstring: P2, dwgophertype: u32, lpszlocator: ::windows_core::PWSTR, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherCreateLocatorW(lpszhost : ::windows_core::PCWSTR, nserverport : u16, lpszdisplaystring : ::windows_core::PCWSTR, lpszselectorstring : ::windows_core::PCWSTR, dwgophertype : u32, lpszlocator : ::windows_core::PWSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - GopherCreateLocatorW(lpszhost.into_param().abi(), nserverport, lpszdisplaystring.into_param().abi(), lpszselectorstring.into_param().abi(), dwgophertype, ::core::mem::transmute(lpszlocator), lpdwbufferlength) + GopherCreateLocatorW(lpszhost.into_param().abi(), nserverport, lpszdisplaystring.into_param().abi(), lpszselectorstring.into_param().abi(), dwgophertype, ::core::mem::transmute(lpszlocator), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -928,44 +928,44 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherGetAttributeA(hconnect: *const ::core::ffi::c_void, lpszlocator: P0, lpszattributename: P1, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn GopherGetAttributeA(hconnect: *const ::core::ffi::c_void, lpszlocator: P0, lpszattributename: P1, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeA(hconnect : *const ::core::ffi::c_void, lpszlocator : ::windows_core::PCSTR, lpszattributename : ::windows_core::PCSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeA(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext) + GopherGetAttributeA(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherGetAttributeW(hconnect: *const ::core::ffi::c_void, lpszlocator: P0, lpszattributename: P1, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> super::super::Foundation::BOOL +pub unsafe fn GopherGetAttributeW(hconnect: *const ::core::ffi::c_void, lpszlocator: P0, lpszattributename: P1, lpbuffer: &mut [u8], lpdwcharactersreturned: *mut u32, lpfnenumerator: GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetAttributeW(hconnect : *const ::core::ffi::c_void, lpszlocator : ::windows_core::PCWSTR, lpszattributename : ::windows_core::PCWSTR, lpbuffer : *mut u8, dwbufferlength : u32, lpdwcharactersreturned : *mut u32, lpfnenumerator : GOPHER_ATTRIBUTE_ENUMERATOR, dwcontext : usize) -> super::super::Foundation:: BOOL); - GopherGetAttributeW(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext) + GopherGetAttributeW(hconnect, lpszlocator.into_param().abi(), lpszattributename.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpdwcharactersreturned, lpfnenumerator, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherGetLocatorTypeA(lpszlocator: P0, lpdwgophertype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GopherGetLocatorTypeA(lpszlocator: P0, lpdwgophertype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetLocatorTypeA(lpszlocator : ::windows_core::PCSTR, lpdwgophertype : *mut u32) -> super::super::Foundation:: BOOL); - GopherGetLocatorTypeA(lpszlocator.into_param().abi(), lpdwgophertype) + GopherGetLocatorTypeA(lpszlocator.into_param().abi(), lpdwgophertype).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GopherGetLocatorTypeW(lpszlocator: P0, lpdwgophertype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GopherGetLocatorTypeW(lpszlocator: P0, lpdwgophertype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn GopherGetLocatorTypeW(lpszlocator : ::windows_core::PCWSTR, lpdwgophertype : *mut u32) -> super::super::Foundation:: BOOL); - GopherGetLocatorTypeW(lpszlocator.into_param().abi(), lpdwgophertype) + GopherGetLocatorTypeW(lpszlocator.into_param().abi(), lpdwgophertype).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -990,16 +990,16 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpAddRequestHeadersA(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u8], dwmodifiers: HTTP_ADDREQ_FLAG) -> super::super::Foundation::BOOL { +pub unsafe fn HttpAddRequestHeadersA(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u8], dwmodifiers: HTTP_ADDREQ_FLAG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpAddRequestHeadersA(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCSTR, dwheaderslength : u32, dwmodifiers : HTTP_ADDREQ_FLAG) -> super::super::Foundation:: BOOL); - HttpAddRequestHeadersA(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers) + HttpAddRequestHeadersA(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpAddRequestHeadersW(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: HTTP_ADDREQ_FLAG) -> super::super::Foundation::BOOL { +pub unsafe fn HttpAddRequestHeadersW(hrequest: *const ::core::ffi::c_void, lpszheaders: &[u16], dwmodifiers: HTTP_ADDREQ_FLAG) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpAddRequestHeadersW(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, dwmodifiers : HTTP_ADDREQ_FLAG) -> super::super::Foundation:: BOOL); - HttpAddRequestHeadersW(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers) + HttpAddRequestHeadersW(hrequest, ::core::mem::transmute(lpszheaders.as_ptr()), lpszheaders.len() as _, dwmodifiers).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1040,16 +1040,16 @@ pub unsafe fn HttpDuplicateDependencyHandle(hdependencyhandle: *const ::core::ff #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpEndRequestA(hrequest: *const ::core::ffi::c_void, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn HttpEndRequestA(hrequest: *const ::core::ffi::c_void, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpEndRequestA(hrequest : *const ::core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSA, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - HttpEndRequestA(hrequest, ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext) + HttpEndRequestA(hrequest, ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpEndRequestW(hrequest: *const ::core::ffi::c_void, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn HttpEndRequestW(hrequest: *const ::core::ffi::c_void, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpEndRequestW(hrequest : *const ::core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSW, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - HttpEndRequestW(hrequest, ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext) + HttpEndRequestW(hrequest, ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -1138,44 +1138,44 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpQueryInfoA(hrequest: *const ::core::ffi::c_void, dwinfolevel: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn HttpQueryInfoA(hrequest: *const ::core::ffi::c_void, dwinfolevel: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpQueryInfoA(hrequest : *const ::core::ffi::c_void, dwinfolevel : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32, lpdwindex : *mut u32) -> super::super::Foundation:: BOOL); - HttpQueryInfoA(hrequest, dwinfolevel, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, ::core::mem::transmute(lpdwindex.unwrap_or(::std::ptr::null_mut()))) + HttpQueryInfoA(hrequest, dwinfolevel, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, ::core::mem::transmute(lpdwindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpQueryInfoW(hrequest: *const ::core::ffi::c_void, dwinfolevel: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn HttpQueryInfoW(hrequest: *const ::core::ffi::c_void, dwinfolevel: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpQueryInfoW(hrequest : *const ::core::ffi::c_void, dwinfolevel : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32, lpdwindex : *mut u32) -> super::super::Foundation:: BOOL); - HttpQueryInfoW(hrequest, dwinfolevel, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, ::core::mem::transmute(lpdwindex.unwrap_or(::std::ptr::null_mut()))) + HttpQueryInfoW(hrequest, dwinfolevel, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength, ::core::mem::transmute(lpdwindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpSendRequestA(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u8]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> super::super::Foundation::BOOL { +pub unsafe fn HttpSendRequestA(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u8]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestA(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32) -> super::super::Foundation:: BOOL); - HttpSendRequestA(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength) + HttpSendRequestA(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpSendRequestExA(hrequest: *const ::core::ffi::c_void, lpbuffersin: ::core::option::Option<*const INTERNET_BUFFERSA>, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn HttpSendRequestExA(hrequest: *const ::core::ffi::c_void, lpbuffersin: ::core::option::Option<*const INTERNET_BUFFERSA>, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSA>, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestExA(hrequest : *const ::core::ffi::c_void, lpbuffersin : *const INTERNET_BUFFERSA, lpbuffersout : *mut INTERNET_BUFFERSA, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - HttpSendRequestExA(hrequest, ::core::mem::transmute(lpbuffersin.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext) + HttpSendRequestExA(hrequest, ::core::mem::transmute(lpbuffersin.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpSendRequestExW(hrequest: *const ::core::ffi::c_void, lpbuffersin: ::core::option::Option<*const INTERNET_BUFFERSW>, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn HttpSendRequestExW(hrequest: *const ::core::ffi::c_void, lpbuffersin: ::core::option::Option<*const INTERNET_BUFFERSW>, lpbuffersout: ::core::option::Option<*mut INTERNET_BUFFERSW>, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestExW(hrequest : *const ::core::ffi::c_void, lpbuffersin : *const INTERNET_BUFFERSW, lpbuffersout : *mut INTERNET_BUFFERSW, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - HttpSendRequestExW(hrequest, ::core::mem::transmute(lpbuffersin.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext) + HttpSendRequestExW(hrequest, ::core::mem::transmute(lpbuffersin.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpbuffersout.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HttpSendRequestW(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> super::super::Foundation::BOOL { +pub unsafe fn HttpSendRequestW(hrequest: *const ::core::ffi::c_void, lpszheaders: ::core::option::Option<&[u16]>, lpoptional: ::core::option::Option<*const ::core::ffi::c_void>, dwoptionallength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn HttpSendRequestW(hrequest : *const ::core::ffi::c_void, lpszheaders : ::windows_core::PCWSTR, dwheaderslength : u32, lpoptional : *const ::core::ffi::c_void, dwoptionallength : u32) -> super::super::Foundation:: BOOL); - HttpSendRequestW(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength) + HttpSendRequestW(hrequest, ::core::mem::transmute(lpszheaders.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszheaders.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpoptional.unwrap_or(::std::ptr::null())), dwoptionallength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1277,59 +1277,59 @@ pub unsafe fn InternetAttemptConnect(dwreserved: u32) -> u32 { #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetAutodial(dwflags: INTERNET_AUTODIAL, hwndparent: P0) -> super::super::Foundation::BOOL +pub unsafe fn InternetAutodial(dwflags: INTERNET_AUTODIAL, hwndparent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn InternetAutodial(dwflags : INTERNET_AUTODIAL, hwndparent : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - InternetAutodial(dwflags, hwndparent.into_param().abi()) + InternetAutodial(dwflags, hwndparent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetAutodialHangup(dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetAutodialHangup(dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetAutodialHangup(dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetAutodialHangup(dwreserved) + InternetAutodialHangup(dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCanonicalizeUrlA(lpszurl: P0, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCanonicalizeUrlA(lpszurl: P0, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCanonicalizeUrlA(lpszurl : ::windows_core::PCSTR, lpszbuffer : ::windows_core::PSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetCanonicalizeUrlA(lpszurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags) + InternetCanonicalizeUrlA(lpszurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCanonicalizeUrlW(lpszurl: P0, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCanonicalizeUrlW(lpszurl: P0, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCanonicalizeUrlW(lpszurl : ::windows_core::PCWSTR, lpszbuffer : ::windows_core::PWSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetCanonicalizeUrlW(lpszurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags) + InternetCanonicalizeUrlW(lpszurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCheckConnectionA(lpszurl: P0, dwflags: u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCheckConnectionA(lpszurl: P0, dwflags: u32, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCheckConnectionA(lpszurl : ::windows_core::PCSTR, dwflags : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetCheckConnectionA(lpszurl.into_param().abi(), dwflags, dwreserved) + InternetCheckConnectionA(lpszurl.into_param().abi(), dwflags, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCheckConnectionW(lpszurl: P0, dwflags: u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCheckConnectionW(lpszurl: P0, dwflags: u32, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCheckConnectionW(lpszurl : ::windows_core::PCWSTR, dwflags : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetCheckConnectionW(lpszurl.into_param().abi(), dwflags, dwreserved) + InternetCheckConnectionW(lpszurl.into_param().abi(), dwflags, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1341,31 +1341,31 @@ pub unsafe fn InternetClearAllPerSiteCookieDecisions() -> super::super::Foundati #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCloseHandle(hinternet: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn InternetCloseHandle(hinternet: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCloseHandle(hinternet : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InternetCloseHandle(hinternet) + InternetCloseHandle(hinternet).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCombineUrlA(lpszbaseurl: P0, lpszrelativeurl: P1, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCombineUrlA(lpszbaseurl: P0, lpszrelativeurl: P1, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCombineUrlA(lpszbaseurl : ::windows_core::PCSTR, lpszrelativeurl : ::windows_core::PCSTR, lpszbuffer : ::windows_core::PSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetCombineUrlA(lpszbaseurl.into_param().abi(), lpszrelativeurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags) + InternetCombineUrlA(lpszbaseurl.into_param().abi(), lpszrelativeurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCombineUrlW(lpszbaseurl: P0, lpszrelativeurl: P1, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetCombineUrlW(lpszbaseurl: P0, lpszrelativeurl: P1, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetCombineUrlW(lpszbaseurl : ::windows_core::PCWSTR, lpszrelativeurl : ::windows_core::PCWSTR, lpszbuffer : ::windows_core::PWSTR, lpdwbufferlength : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetCombineUrlW(lpszbaseurl.into_param().abi(), lpszrelativeurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags) + InternetCombineUrlW(lpszbaseurl.into_param().abi(), lpszrelativeurl.into_param().abi(), ::core::mem::transmute(lpszbuffer), lpdwbufferlength, dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1442,30 +1442,30 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinHttp\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinHttp"))] #[inline] -pub unsafe fn InternetCrackUrlA(lpszurl: &[u8], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSA) -> super::super::Foundation::BOOL { +pub unsafe fn InternetCrackUrlA(lpszurl: &[u8], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSA) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlA(lpszurl : ::windows_core::PCSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSA) -> super::super::Foundation:: BOOL); - InternetCrackUrlA(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents) + InternetCrackUrlA(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`, `\"Win32_Networking_WinHttp\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Networking_WinHttp"))] #[inline] -pub unsafe fn InternetCrackUrlW(lpszurl: &[u16], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSW) -> super::super::Foundation::BOOL { +pub unsafe fn InternetCrackUrlW(lpszurl: &[u16], dwflags: super::WinHttp::WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents: *mut URL_COMPONENTSW) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCrackUrlW(lpszurl : ::windows_core::PCWSTR, dwurllength : u32, dwflags : super::WinHttp:: WIN_HTTP_CREATE_URL_FLAGS, lpurlcomponents : *mut URL_COMPONENTSW) -> super::super::Foundation:: BOOL); - InternetCrackUrlW(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents) + InternetCrackUrlW(::core::mem::transmute(lpszurl.as_ptr()), lpszurl.len() as _, dwflags, lpurlcomponents).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCreateUrlA(lpurlcomponents: *const URL_COMPONENTSA, dwflags: u32, lpszurl: ::windows_core::PSTR, lpdwurllength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetCreateUrlA(lpurlcomponents: *const URL_COMPONENTSA, dwflags: u32, lpszurl: ::windows_core::PSTR, lpdwurllength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCreateUrlA(lpurlcomponents : *const URL_COMPONENTSA, dwflags : u32, lpszurl : ::windows_core::PSTR, lpdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - InternetCreateUrlA(lpurlcomponents, dwflags, ::core::mem::transmute(lpszurl), lpdwurllength) + InternetCreateUrlA(lpurlcomponents, dwflags, ::core::mem::transmute(lpszurl), lpdwurllength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetCreateUrlW(lpurlcomponents: *const URL_COMPONENTSW, dwflags: u32, lpszurl: ::windows_core::PWSTR, lpdwurllength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetCreateUrlW(lpurlcomponents: *const URL_COMPONENTSW, dwflags: u32, lpszurl: ::windows_core::PWSTR, lpdwurllength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetCreateUrlW(lpurlcomponents : *const URL_COMPONENTSW, dwflags : u32, lpszurl : ::windows_core::PWSTR, lpdwurllength : *mut u32) -> super::super::Foundation:: BOOL); - InternetCreateUrlW(lpurlcomponents, dwflags, ::core::mem::transmute(lpszurl), lpdwurllength) + InternetCreateUrlW(lpurlcomponents, dwflags, ::core::mem::transmute(lpszurl), lpdwurllength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1527,16 +1527,16 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetFindNextFileA(hfind: *const ::core::ffi::c_void, lpvfinddata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn InternetFindNextFileA(hfind: *const ::core::ffi::c_void, lpvfinddata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetFindNextFileA(hfind : *const ::core::ffi::c_void, lpvfinddata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InternetFindNextFileA(hfind, lpvfinddata) + InternetFindNextFileA(hfind, lpvfinddata).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetFindNextFileW(hfind: *const ::core::ffi::c_void, lpvfinddata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn InternetFindNextFileW(hfind: *const ::core::ffi::c_void, lpvfinddata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetFindNextFileW(hfind : *const ::core::ffi::c_void, lpvfinddata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InternetFindNextFileW(hfind, lpvfinddata) + InternetFindNextFileW(hfind, lpvfinddata).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1565,41 +1565,41 @@ pub unsafe fn InternetFreeProxyInfoList(pproxyinfolist: *mut WININET_PROXY_INFO_ #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetConnectedState(lpdwflags: *mut INTERNET_CONNECTION, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetConnectedState(lpdwflags: *mut INTERNET_CONNECTION, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedState(lpdwflags : *mut INTERNET_CONNECTION, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedState(lpdwflags, dwreserved) + InternetGetConnectedState(lpdwflags, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateEx(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PSTR, dwnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateEx(lpdwflags, ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved) + InternetGetConnectedStateEx(lpdwflags, ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetConnectedStateExA(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetConnectedStateExA(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u8]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateExA(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PSTR, cchnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateExA(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved) + InternetGetConnectedStateExA(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetConnectedStateExW(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u16]>, dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetConnectedStateExW(lpdwflags: ::core::option::Option<*mut INTERNET_CONNECTION>, lpszconnectionname: ::core::option::Option<&mut [u16]>, dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetConnectedStateExW(lpdwflags : *mut INTERNET_CONNECTION, lpszconnectionname : ::windows_core::PWSTR, cchnamelen : u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetGetConnectedStateExW(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved) + InternetGetConnectedStateExW(::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpszconnectionname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszconnectionname.as_deref().map_or(0, |slice| slice.len() as _), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: ::windows_core::PSTR, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: ::windows_core::PSTR, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetGetCookieA(lpszurl : ::windows_core::PCSTR, lpszcookiename : ::windows_core::PCSTR, lpszcookiedata : ::windows_core::PSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetCookieA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), ::core::mem::transmute(lpszcookiedata), lpdwsize) + InternetGetCookieA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), ::core::mem::transmute(lpszcookiedata), lpdwsize).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1615,51 +1615,51 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn InternetGetCookieExA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetGetCookieExA(lpszurl : ::windows_core::PCSTR, lpszcookiename : ::windows_core::PCSTR, lpszcookiedata : ::windows_core::PCSTR, lpdwsize : *mut u32, dwflags : INTERNET_COOKIE_FLAGS, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InternetGetCookieExA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi(), lpdwsize, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + InternetGetCookieExA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi(), lpdwsize, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn InternetGetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetGetCookieExW(lpszurl : ::windows_core::PCWSTR, lpszcookiename : ::windows_core::PCWSTR, lpszcookiedata : ::windows_core::PCWSTR, lpdwsize : *mut u32, dwflags : INTERNET_COOKIE_FLAGS, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InternetGetCookieExW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi(), lpdwsize, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + InternetGetCookieExW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi(), lpdwsize, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: ::windows_core::PWSTR, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: ::windows_core::PWSTR, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetGetCookieW(lpszurl : ::windows_core::PCWSTR, lpszcookiename : ::windows_core::PCWSTR, lpszcookiedata : ::windows_core::PWSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetCookieW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), ::core::mem::transmute(lpszcookiedata), lpdwsize) + InternetGetCookieW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), ::core::mem::transmute(lpszcookiedata), lpdwsize).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetLastResponseInfoA(lpdwerror: *mut u32, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetLastResponseInfoA(lpdwerror: *mut u32, lpszbuffer: ::windows_core::PSTR, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetLastResponseInfoA(lpdwerror : *mut u32, lpszbuffer : ::windows_core::PSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetLastResponseInfoA(lpdwerror, ::core::mem::transmute(lpszbuffer), lpdwbufferlength) + InternetGetLastResponseInfoA(lpdwerror, ::core::mem::transmute(lpszbuffer), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGetLastResponseInfoW(lpdwerror: *mut u32, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetGetLastResponseInfoW(lpdwerror: *mut u32, lpszbuffer: ::windows_core::PWSTR, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetGetLastResponseInfoW(lpdwerror : *mut u32, lpszbuffer : ::windows_core::PWSTR, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetGetLastResponseInfoW(lpdwerror, ::core::mem::transmute(lpszbuffer), lpdwbufferlength) + InternetGetLastResponseInfoW(lpdwerror, ::core::mem::transmute(lpszbuffer), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1724,35 +1724,35 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGoOnline(lpszurl: P0, hwndparent: P1, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetGoOnline(lpszurl: P0, hwndparent: P1, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn InternetGoOnline(lpszurl : ::windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnline(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags) + InternetGoOnline(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGoOnlineA(lpszurl: P0, hwndparent: P1, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetGoOnlineA(lpszurl: P0, hwndparent: P1, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn InternetGoOnlineA(lpszurl : ::windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnlineA(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags) + InternetGoOnlineA(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetGoOnlineW(lpszurl: P0, hwndparent: P1, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetGoOnlineW(lpszurl: P0, hwndparent: P1, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn InternetGoOnlineW(lpszurl : ::windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetGoOnlineW(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags) + InternetGoOnlineW(lpszurl.into_param().abi(), hwndparent.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -1763,16 +1763,16 @@ pub unsafe fn InternetHangUp(dwconnection: usize, dwreserved: u32) -> u32 { #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetInitializeAutoProxyDll(dwreserved: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetInitializeAutoProxyDll(dwreserved: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetInitializeAutoProxyDll(dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetInitializeAutoProxyDll(dwreserved) + InternetInitializeAutoProxyDll(dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetLockRequestFile(hinternet: *const ::core::ffi::c_void, lphlockrequestinfo: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn InternetLockRequestFile(hinternet: *const ::core::ffi::c_void, lphlockrequestinfo: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetLockRequestFile(hinternet : *const ::core::ffi::c_void, lphlockrequestinfo : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InternetLockRequestFile(hinternet, lphlockrequestinfo) + InternetLockRequestFile(hinternet, lphlockrequestinfo).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`*"] #[inline] @@ -1817,9 +1817,9 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetQueryDataAvailable(hfile: *const ::core::ffi::c_void, lpdwnumberofbytesavailable: ::core::option::Option<*mut u32>, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetQueryDataAvailable(hfile: *const ::core::ffi::c_void, lpdwnumberofbytesavailable: ::core::option::Option<*mut u32>, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetQueryDataAvailable(hfile : *const ::core::ffi::c_void, lpdwnumberofbytesavailable : *mut u32, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetQueryDataAvailable(hfile, ::core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext) + InternetQueryDataAvailable(hfile, ::core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(::std::ptr::null_mut())), dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1831,37 +1831,37 @@ pub unsafe fn InternetQueryFortezzaStatus(pdwstatus: *mut u32, dwreserved: usize #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetQueryOptionA(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetQueryOptionA(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetQueryOptionA(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetQueryOptionA(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength) + InternetQueryOptionA(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetQueryOptionW(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetQueryOptionW(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetQueryOptionW(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwbufferlength : *mut u32) -> super::super::Foundation:: BOOL); - InternetQueryOptionW(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength) + InternetQueryOptionW(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetReadFile(hfile: *const ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetReadFile(hfile: *const ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetReadFile(hfile : *const ::core::ffi::c_void, lpbuffer : *mut ::core::ffi::c_void, dwnumberofbytestoread : u32, lpdwnumberofbytesread : *mut u32) -> super::super::Foundation:: BOOL); - InternetReadFile(hfile, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread) + InternetReadFile(hfile, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetReadFileExA(hfile: *const ::core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSA, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetReadFileExA(hfile: *const ::core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSA, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetReadFileExA(hfile : *const ::core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSA, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetReadFileExA(hfile, lpbuffersout, dwflags, dwcontext) + InternetReadFileExA(hfile, lpbuffersout, dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetReadFileExW(hfile: *const ::core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSW, dwflags: u32, dwcontext: usize) -> super::super::Foundation::BOOL { +pub unsafe fn InternetReadFileExW(hfile: *const ::core::ffi::c_void, lpbuffersout: *mut INTERNET_BUFFERSW, dwflags: u32, dwcontext: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetReadFileExW(hfile : *const ::core::ffi::c_void, lpbuffersout : *mut INTERNET_BUFFERSW, dwflags : u32, dwcontext : usize) -> super::super::Foundation:: BOOL); - InternetReadFileExW(hfile, lpbuffersout, dwflags, dwcontext) + InternetReadFileExW(hfile, lpbuffersout, dwflags, dwcontext).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1880,14 +1880,14 @@ pub unsafe fn InternetSecurityProtocolToStringW(dwprotocol: u32, lpstr: ::window #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetSetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> super::super::Foundation::BOOL +pub unsafe fn InternetSetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetSetCookieA(lpszurl : ::windows_core::PCSTR, lpszcookiename : ::windows_core::PCSTR, lpszcookiedata : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - InternetSetCookieA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi()) + InternetSetCookieA(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1925,14 +1925,14 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetSetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> super::super::Foundation::BOOL +pub unsafe fn InternetSetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetSetCookieW(lpszurl : ::windows_core::PCWSTR, lpszcookiename : ::windows_core::PCWSTR, lpszcookiedata : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - InternetSetCookieW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi()) + InternetSetCookieW(lpszurl.into_param().abi(), lpszcookiename.into_param().abi(), lpszcookiedata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1973,9 +1973,9 @@ pub unsafe fn InternetSetFilePointer(hfile: *const ::core::ffi::c_void, ldistanc #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetSetOptionA(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwbufferlength: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetSetOptionA(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwbufferlength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetSetOptionA(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *const ::core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - InternetSetOptionA(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwbufferlength) + InternetSetOptionA(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1994,9 +1994,9 @@ pub unsafe fn InternetSetOptionExW(hinternet: ::core::option::Option<*const ::co #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetSetOptionW(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwbufferlength: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetSetOptionW(hinternet: ::core::option::Option<*const ::core::ffi::c_void>, dwoption: u32, lpbuffer: ::core::option::Option<*const ::core::ffi::c_void>, dwbufferlength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetSetOptionW(hinternet : *const ::core::ffi::c_void, dwoption : u32, lpbuffer : *const ::core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - InternetSetOptionW(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwbufferlength) + InternetSetOptionW(::core::mem::transmute(hinternet.unwrap_or(::std::ptr::null())), dwoption, ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null())), dwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2072,70 +2072,70 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> super::super::Foundation::BOOL { +pub unsafe fn InternetTimeFromSystemTime(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeFromSystemTime(pst : *const super::super::Foundation:: SYSTEMTIME, dwrfc : u32, lpsztime : ::windows_core::PSTR, cbtime : u32) -> super::super::Foundation:: BOOL); - InternetTimeFromSystemTime(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _) + InternetTimeFromSystemTime(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeFromSystemTimeA(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> super::super::Foundation::BOOL { +pub unsafe fn InternetTimeFromSystemTimeA(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeFromSystemTimeA(pst : *const super::super::Foundation:: SYSTEMTIME, dwrfc : u32, lpsztime : ::windows_core::PSTR, cbtime : u32) -> super::super::Foundation:: BOOL); - InternetTimeFromSystemTimeA(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _) + InternetTimeFromSystemTimeA(pst, dwrfc, ::core::mem::transmute(lpsztime.as_ptr()), lpsztime.len() as _).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeFromSystemTimeW(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: ::windows_core::PWSTR, cbtime: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetTimeFromSystemTimeW(pst: *const super::super::Foundation::SYSTEMTIME, dwrfc: u32, lpsztime: ::windows_core::PWSTR, cbtime: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeFromSystemTimeW(pst : *const super::super::Foundation:: SYSTEMTIME, dwrfc : u32, lpsztime : ::windows_core::PWSTR, cbtime : u32) -> super::super::Foundation:: BOOL); - InternetTimeFromSystemTimeW(pst, dwrfc, ::core::mem::transmute(lpsztime), cbtime) + InternetTimeFromSystemTimeW(pst, dwrfc, ::core::mem::transmute(lpsztime), cbtime).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeToSystemTime(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetTimeToSystemTime(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTime(lpsztime : ::windows_core::PCSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTime(lpsztime.into_param().abi(), pst, dwreserved) + InternetTimeToSystemTime(lpsztime.into_param().abi(), pst, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeToSystemTimeA(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetTimeToSystemTimeA(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTimeA(lpsztime : ::windows_core::PCSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTimeA(lpsztime.into_param().abi(), pst, dwreserved) + InternetTimeToSystemTimeA(lpsztime.into_param().abi(), pst, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetTimeToSystemTimeW(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn InternetTimeToSystemTimeW(lpsztime: P0, pst: *mut super::super::Foundation::SYSTEMTIME, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn InternetTimeToSystemTimeW(lpsztime : ::windows_core::PCWSTR, pst : *mut super::super::Foundation:: SYSTEMTIME, dwreserved : u32) -> super::super::Foundation:: BOOL); - InternetTimeToSystemTimeW(lpsztime.into_param().abi(), pst, dwreserved) + InternetTimeToSystemTimeW(lpsztime.into_param().abi(), pst, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetUnlockRequestFile(hlockrequestinfo: P0) -> super::super::Foundation::BOOL +pub unsafe fn InternetUnlockRequestFile(hlockrequestinfo: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn InternetUnlockRequestFile(hlockrequestinfo : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InternetUnlockRequestFile(hlockrequestinfo.into_param().abi()) + InternetUnlockRequestFile(hlockrequestinfo.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InternetWriteFile(hfile: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, dwnumberofbytestowrite: u32, lpdwnumberofbyteswritten: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn InternetWriteFile(hfile: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, dwnumberofbytestowrite: u32, lpdwnumberofbyteswritten: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn InternetWriteFile(hfile : *const ::core::ffi::c_void, lpbuffer : *const ::core::ffi::c_void, dwnumberofbytestowrite : u32, lpdwnumberofbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - InternetWriteFile(hfile, lpbuffer, dwnumberofbytestowrite, lpdwnumberofbyteswritten) + InternetWriteFile(hfile, lpbuffer, dwnumberofbytestowrite, lpdwnumberofbyteswritten).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2255,12 +2255,12 @@ pub unsafe fn ReadGuidsForConnectedNetworks(pcnetworks: ::core::option::Option<* #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadUrlCacheEntryStream(hurlcachestream: P0, dwlocation: u32, lpbuffer: *mut ::core::ffi::c_void, lpdwlen: *mut u32, reserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadUrlCacheEntryStream(hurlcachestream: P0, dwlocation: u32, lpbuffer: *mut ::core::ffi::c_void, lpdwlen: *mut u32, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn ReadUrlCacheEntryStream(hurlcachestream : super::super::Foundation:: HANDLE, dwlocation : u32, lpbuffer : *mut ::core::ffi::c_void, lpdwlen : *mut u32, reserved : u32) -> super::super::Foundation:: BOOL); - ReadUrlCacheEntryStream(hurlcachestream.into_param().abi(), dwlocation, lpbuffer, lpdwlen, reserved) + ReadUrlCacheEntryStream(hurlcachestream.into_param().abi(), dwlocation, lpbuffer, lpdwlen, reserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2285,29 +2285,29 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ResumeSuspendedDownload(hrequest: *const ::core::ffi::c_void, dwresultcode: u32) -> super::super::Foundation::BOOL { +pub unsafe fn ResumeSuspendedDownload(hrequest: *const ::core::ffi::c_void, dwresultcode: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn ResumeSuspendedDownload(hrequest : *const ::core::ffi::c_void, dwresultcode : u32) -> super::super::Foundation:: BOOL); - ResumeSuspendedDownload(hrequest, dwresultcode) + ResumeSuspendedDownload(hrequest, dwresultcode).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RetrieveUrlCacheEntryFileA(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn RetrieveUrlCacheEntryFileA(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryFileA(lpszurlname : ::windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - RetrieveUrlCacheEntryFileA(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved) + RetrieveUrlCacheEntryFileA(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: ::core::option::Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryFileW(lpszurlname : ::windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, dwreserved : u32) -> super::super::Foundation:: BOOL); - RetrieveUrlCacheEntryFileW(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved) + RetrieveUrlCacheEntryFileW(lpszurlname.into_param().abi(), ::core::mem::transmute(lpcacheentryinfo.unwrap_or(::std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2392,36 +2392,36 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryInfoA(lpszurlname : ::windows_core::PCSTR, lpcacheentryinfo : *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol : u32) -> super::super::Foundation:: BOOL); - SetUrlCacheEntryInfoA(lpszurlname.into_param().abi(), lpcacheentryinfo, dwfieldcontrol) + SetUrlCacheEntryInfoA(lpszurlname.into_param().abi(), lpcacheentryinfo, dwfieldcontrol).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOW, dwfieldcontrol: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOW, dwfieldcontrol: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryInfoW(lpszurlname : ::windows_core::PCWSTR, lpcacheentryinfo : *const INTERNET_CACHE_ENTRY_INFOW, dwfieldcontrol : u32) -> super::super::Foundation:: BOOL); - SetUrlCacheEntryInfoW(lpszurlname.into_param().abi(), lpcacheentryinfo, dwfieldcontrol) + SetUrlCacheEntryInfoW(lpszurlname.into_param().abi(), lpcacheentryinfo, dwfieldcontrol).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOA, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOA, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn SetUrlCacheGroupAttributeA(gid : i64, dwflags : u32, dwattributes : u32, lpgroupinfo : *const INTERNET_CACHE_GROUP_INFOA, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOW, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOW, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("wininet.dll" "system" fn SetUrlCacheGroupAttributeW(gid : i64, dwflags : u32, dwattributes : u32, lpgroupinfo : *const INTERNET_CACHE_GROUP_INFOW, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2463,42 +2463,42 @@ where #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockUrlCacheEntryFile(lpszurlname: P0, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn UnlockUrlCacheEntryFile(lpszurlname: P0, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFile(lpszurlname : ::windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFile(lpszurlname.into_param().abi(), dwreserved) + UnlockUrlCacheEntryFile(lpszurlname.into_param().abi(), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockUrlCacheEntryFileA(lpszurlname: P0, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn UnlockUrlCacheEntryFileA(lpszurlname: P0, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileA(lpszurlname : ::windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFileA(lpszurlname.into_param().abi(), dwreserved) + UnlockUrlCacheEntryFileA(lpszurlname.into_param().abi(), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockUrlCacheEntryFileW(lpszurlname: P0, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn UnlockUrlCacheEntryFileW(lpszurlname: P0, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryFileW(lpszurlname : ::windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryFileW(lpszurlname.into_param().abi(), dwreserved) + UnlockUrlCacheEntryFileW(lpszurlname.into_param().abi(), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockUrlCacheEntryStream(hurlcachestream: P0, reserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn UnlockUrlCacheEntryStream(hurlcachestream: P0, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wininet.dll" "system" fn UnlockUrlCacheEntryStream(hurlcachestream : super::super::Foundation:: HANDLE, reserved : u32) -> super::super::Foundation:: BOOL); - UnlockUrlCacheEntryStream(hurlcachestream.into_param().abi(), reserved) + UnlockUrlCacheEntryStream(hurlcachestream.into_param().abi(), reserved).ok() } #[doc = "*Required features: `\"Win32_Networking_WinInet\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs index 9ff81ba471..e1b536af64 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs @@ -1,82 +1,82 @@ #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferCloseLevel(hlevelhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn SaferCloseLevel(hlevelhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SaferCloseLevel(hlevelhandle : super:: SAFER_LEVEL_HANDLE) -> super::super::Foundation:: BOOL); - SaferCloseLevel(hlevelhandle.into_param().abi()) + SaferCloseLevel(hlevelhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferComputeTokenFromLevel(levelhandle: P0, inaccesstoken: P1, outaccesstoken: *mut super::super::Foundation::HANDLE, dwflags: SAFER_COMPUTE_TOKEN_FROM_LEVEL_FLAGS, lpreserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SaferComputeTokenFromLevel(levelhandle: P0, inaccesstoken: P1, outaccesstoken: *mut super::super::Foundation::HANDLE, dwflags: SAFER_COMPUTE_TOKEN_FROM_LEVEL_FLAGS, lpreserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SaferComputeTokenFromLevel(levelhandle : super:: SAFER_LEVEL_HANDLE, inaccesstoken : super::super::Foundation:: HANDLE, outaccesstoken : *mut super::super::Foundation:: HANDLE, dwflags : SAFER_COMPUTE_TOKEN_FROM_LEVEL_FLAGS, lpreserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferComputeTokenFromLevel(levelhandle.into_param().abi(), inaccesstoken.into_param().abi(), outaccesstoken, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null_mut()))) + SaferComputeTokenFromLevel(levelhandle.into_param().abi(), inaccesstoken.into_param().abi(), outaccesstoken, dwflags, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferCreateLevel(dwscopeid: u32, dwlevelid: u32, openflags: u32, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SaferCreateLevel(dwscopeid: u32, dwlevelid: u32, openflags: u32, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SaferCreateLevel(dwscopeid : u32, dwlevelid : u32, openflags : u32, plevelhandle : *mut super:: SAFER_LEVEL_HANDLE, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferCreateLevel(dwscopeid, dwlevelid, openflags, plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SaferCreateLevel(dwscopeid, dwlevelid, openflags, plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferGetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: ::core::option::Option<*mut ::core::ffi::c_void>, dwinbuffersize: u32, lpdwoutbuffersize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SaferGetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: ::core::option::Option<*mut ::core::ffi::c_void>, dwinbuffersize: u32, lpdwoutbuffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SaferGetLevelInformation(levelhandle : super:: SAFER_LEVEL_HANDLE, dwinfotype : SAFER_OBJECT_INFO_CLASS, lpquerybuffer : *mut ::core::ffi::c_void, dwinbuffersize : u32, lpdwoutbuffersize : *mut u32) -> super::super::Foundation:: BOOL); - SaferGetLevelInformation(levelhandle.into_param().abi(), dwinfotype, ::core::mem::transmute(lpquerybuffer.unwrap_or(::std::ptr::null_mut())), dwinbuffersize, lpdwoutbuffersize) + SaferGetLevelInformation(levelhandle.into_param().abi(), dwinfotype, ::core::mem::transmute(lpquerybuffer.unwrap_or(::std::ptr::null_mut())), dwinbuffersize, lpdwoutbuffersize).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferGetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *mut ::core::ffi::c_void, infobufferretsize: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SaferGetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *mut ::core::ffi::c_void, infobufferretsize: *mut u32, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SaferGetPolicyInformation(dwscopeid : u32, saferpolicyinfoclass : SAFER_POLICY_INFO_CLASS, infobuffersize : u32, infobuffer : *mut ::core::ffi::c_void, infobufferretsize : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferGetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, infobufferretsize, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SaferGetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, infobufferretsize, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferIdentifyLevel(pcodeproperties: ::core::option::Option<&[SAFER_CODE_PROPERTIES_V2]>, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SaferIdentifyLevel(pcodeproperties: ::core::option::Option<&[SAFER_CODE_PROPERTIES_V2]>, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SaferIdentifyLevel(dwnumproperties : u32, pcodeproperties : *const SAFER_CODE_PROPERTIES_V2, plevelhandle : *mut super:: SAFER_LEVEL_HANDLE, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcodeproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcodeproperties.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), plevelhandle, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferRecordEventLogEntry(hlevel: P0, sztargetpath: P1, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn SaferRecordEventLogEntry(hlevel: P0, sztargetpath: P1, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn SaferRecordEventLogEntry(hlevel : super:: SAFER_LEVEL_HANDLE, sztargetpath : ::windows_core::PCWSTR, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferRecordEventLogEntry(hlevel.into_param().abi(), sztargetpath.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SaferRecordEventLogEntry(hlevel.into_param().abi(), sztargetpath.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferSetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: *const ::core::ffi::c_void, dwinbuffersize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SaferSetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: *const ::core::ffi::c_void, dwinbuffersize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SaferSetLevelInformation(levelhandle : super:: SAFER_LEVEL_HANDLE, dwinfotype : SAFER_OBJECT_INFO_CLASS, lpquerybuffer : *const ::core::ffi::c_void, dwinbuffersize : u32) -> super::super::Foundation:: BOOL); - SaferSetLevelInformation(levelhandle.into_param().abi(), dwinfotype, lpquerybuffer, dwinbuffersize) + SaferSetLevelInformation(levelhandle.into_param().abi(), dwinfotype, lpquerybuffer, dwinbuffersize).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SaferSetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *const ::core::ffi::c_void, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn SaferSetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *const ::core::ffi::c_void, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SaferSetPolicyInformation(dwscopeid : u32, saferpolicyinfoclass : SAFER_POLICY_INFO_CLASS, infobuffersize : u32, infobuffer : *const ::core::ffi::c_void, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SaferSetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + SaferSetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_AppLocker\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs index 7cdda5ddd0..b08484c403 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/UI/mod.rs @@ -12,13 +12,13 @@ where #[doc = "*Required features: `\"Win32_Security_Authorization_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EditSecurity(hwndowner: P0, psi: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn EditSecurity(hwndowner: P0, psi: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("aclui.dll" "system" fn EditSecurity(hwndowner : super::super::super::Foundation:: HWND, psi : * mut::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EditSecurity(hwndowner.into_param().abi(), psi.into_param().abi()) + EditSecurity(hwndowner.into_param().abi(), psi.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs index 98eecf5cce..5a8d693af0 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -3,42 +3,42 @@ pub mod UI; #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzAccessCheck(flags: AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, psecuritydescriptor: P2, optionalsecuritydescriptorarray: ::core::option::Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults: ::core::option::Option<*mut isize>) -> super::super::Foundation::BOOL +pub unsafe fn AuthzAccessCheck(flags: AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, psecuritydescriptor: P2, optionalsecuritydescriptorarray: ::core::option::Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults: ::core::option::Option<*mut isize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzAccessCheck(flags : AUTHZ_ACCESS_CHECK_FLAGS, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor : super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray : *const super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorcount : u32, preply : *mut AUTHZ_ACCESS_REPLY, phaccesscheckresults : *mut isize) -> super::super::Foundation:: BOOL); - AuthzAccessCheck(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply, ::core::mem::transmute(phaccesscheckresults.unwrap_or(::std::ptr::null_mut()))) + AuthzAccessCheck(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply, ::core::mem::transmute(phaccesscheckresults.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzAddSidsToContext(hauthzclientcontext: P0, sids: ::core::option::Option<*const super::SID_AND_ATTRIBUTES>, sidcount: u32, restrictedsids: ::core::option::Option<*const super::SID_AND_ATTRIBUTES>, restrictedsidcount: u32, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzAddSidsToContext(hauthzclientcontext: P0, sids: ::core::option::Option<*const super::SID_AND_ATTRIBUTES>, sidcount: u32, restrictedsids: ::core::option::Option<*const super::SID_AND_ATTRIBUTES>, restrictedsidcount: u32, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzAddSidsToContext(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, sids : *const super:: SID_AND_ATTRIBUTES, sidcount : u32, restrictedsids : *const super:: SID_AND_ATTRIBUTES, restrictedsidcount : u32, phnewauthzclientcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzAddSidsToContext(hauthzclientcontext.into_param().abi(), ::core::mem::transmute(sids.unwrap_or(::std::ptr::null())), sidcount, ::core::mem::transmute(restrictedsids.unwrap_or(::std::ptr::null())), restrictedsidcount, phnewauthzclientcontext) + AuthzAddSidsToContext(hauthzclientcontext.into_param().abi(), ::core::mem::transmute(sids.unwrap_or(::std::ptr::null())), sidcount, ::core::mem::transmute(restrictedsids.unwrap_or(::std::ptr::null())), restrictedsidcount, phnewauthzclientcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzCachedAccessCheck(flags: u32, haccesscheckresults: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, preply: *mut AUTHZ_ACCESS_REPLY) -> super::super::Foundation::BOOL +pub unsafe fn AuthzCachedAccessCheck(flags: u32, haccesscheckresults: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, preply: *mut AUTHZ_ACCESS_REPLY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzCachedAccessCheck(flags : u32, haccesscheckresults : AUTHZ_ACCESS_CHECK_RESULTS_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, preply : *mut AUTHZ_ACCESS_REPLY) -> super::super::Foundation:: BOOL); - AuthzCachedAccessCheck(flags, haccesscheckresults.into_param().abi(), prequest, hauditevent.into_param().abi(), preply) + AuthzCachedAccessCheck(flags, haccesscheckresults.into_param().abi(), prequest, hauditevent.into_param().abi(), preply).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount: *mut u32, pdwlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzEnumerateSecurityEventSources(dwflags: u32, buffer: *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount: *mut u32, pdwlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzEnumerateSecurityEventSources(dwflags : u32, buffer : *mut AUTHZ_SOURCE_SCHEMA_REGISTRATION, pdwcount : *mut u32, pdwlength : *mut u32) -> super::super::Foundation:: BOOL); - AuthzEnumerateSecurityEventSources(dwflags, buffer, pdwcount, pdwlength) + AuthzEnumerateSecurityEventSources(dwflags, buffer, pdwcount, pdwlength).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -54,107 +54,107 @@ where #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzFreeAuditEvent(hauditevent: P0) -> super::super::Foundation::BOOL +pub unsafe fn AuthzFreeAuditEvent(hauditevent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzFreeAuditEvent(hauditevent : AUTHZ_AUDIT_EVENT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeAuditEvent(hauditevent.into_param().abi()) + AuthzFreeAuditEvent(hauditevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzFreeCentralAccessPolicyCache() -> super::super::Foundation::BOOL { +pub unsafe fn AuthzFreeCentralAccessPolicyCache() -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzFreeCentralAccessPolicyCache() -> super::super::Foundation:: BOOL); - AuthzFreeCentralAccessPolicyCache() + AuthzFreeCentralAccessPolicyCache().ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzFreeContext(hauthzclientcontext: P0) -> super::super::Foundation::BOOL +pub unsafe fn AuthzFreeContext(hauthzclientcontext: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzFreeContext(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeContext(hauthzclientcontext.into_param().abi()) + AuthzFreeContext(hauthzclientcontext.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzFreeHandle(haccesscheckresults: P0) -> super::super::Foundation::BOOL +pub unsafe fn AuthzFreeHandle(haccesscheckresults: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzFreeHandle(haccesscheckresults : AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeHandle(haccesscheckresults.into_param().abi()) + AuthzFreeHandle(haccesscheckresults.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: P0) -> super::super::Foundation::BOOL +pub unsafe fn AuthzFreeResourceManager(hauthzresourcemanager: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzFreeResourceManager(hauthzresourcemanager : AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzFreeResourceManager(hauthzresourcemanager.into_param().abi()) + AuthzFreeResourceManager(hauthzresourcemanager.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzGetInformationFromContext(hauthzclientcontext: P0, infoclass: AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize: u32, psizerequired: *mut u32, buffer: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn AuthzGetInformationFromContext(hauthzclientcontext: P0, infoclass: AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize: u32, psizerequired: *mut u32, buffer: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzGetInformationFromContext(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, infoclass : AUTHZ_CONTEXT_INFORMATION_CLASS, buffersize : u32, psizerequired : *mut u32, buffer : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AuthzGetInformationFromContext(hauthzclientcontext.into_param().abi(), infoclass, buffersize, psizerequired, buffer) + AuthzGetInformationFromContext(hauthzclientcontext.into_param().abi(), infoclass, buffersize, psizerequired, buffer).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeCompoundContext(usercontext: P0, devicecontext: P1, phcompoundcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeCompoundContext(usercontext: P0, devicecontext: P1, phcompoundcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeCompoundContext(usercontext : AUTHZ_CLIENT_CONTEXT_HANDLE, devicecontext : AUTHZ_CLIENT_CONTEXT_HANDLE, phcompoundcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeCompoundContext(usercontext.into_param().abi(), devicecontext.into_param().abi(), phcompoundcontext) + AuthzInitializeCompoundContext(usercontext.into_param().abi(), devicecontext.into_param().abi(), phcompoundcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeContextFromAuthzContext(flags: u32, hauthzclientcontext: P0, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: *const ::core::ffi::c_void, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeContextFromAuthzContext(flags: u32, hauthzclientcontext: P0, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: *const ::core::ffi::c_void, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeContextFromAuthzContext(flags : u32, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, pexpirationtime : *const i64, identifier : super::super::Foundation:: LUID, dynamicgroupargs : *const ::core::ffi::c_void, phnewauthzclientcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeContextFromAuthzContext(flags, hauthzclientcontext.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), dynamicgroupargs, phnewauthzclientcontext) + AuthzInitializeContextFromAuthzContext(flags, hauthzclientcontext.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), dynamicgroupargs, phnewauthzclientcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeContextFromSid(flags: u32, usersid: P0, hauthzresourcemanager: P1, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: ::core::option::Option<*const ::core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeContextFromSid(flags: u32, usersid: P0, hauthzresourcemanager: P1, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: ::core::option::Option<*const ::core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeContextFromSid(flags : u32, usersid : super::super::Foundation:: PSID, hauthzresourcemanager : AUTHZ_RESOURCE_MANAGER_HANDLE, pexpirationtime : *const i64, identifier : super::super::Foundation:: LUID, dynamicgroupargs : *const ::core::ffi::c_void, phauthzclientcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeContextFromSid(flags, usersid.into_param().abi(), hauthzresourcemanager.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), ::core::mem::transmute(dynamicgroupargs.unwrap_or(::std::ptr::null())), phauthzclientcontext) + AuthzInitializeContextFromSid(flags, usersid.into_param().abi(), hauthzresourcemanager.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), ::core::mem::transmute(dynamicgroupargs.unwrap_or(::std::ptr::null())), phauthzclientcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeContextFromToken(flags: u32, tokenhandle: P0, hauthzresourcemanager: P1, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: ::core::option::Option<*const ::core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeContextFromToken(flags: u32, tokenhandle: P0, hauthzresourcemanager: P1, pexpirationtime: ::core::option::Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: ::core::option::Option<*const ::core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeContextFromToken(flags : u32, tokenhandle : super::super::Foundation:: HANDLE, hauthzresourcemanager : AUTHZ_RESOURCE_MANAGER_HANDLE, pexpirationtime : *const i64, identifier : super::super::Foundation:: LUID, dynamicgroupargs : *const ::core::ffi::c_void, phauthzclientcontext : *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeContextFromToken(flags, tokenhandle.into_param().abi(), hauthzresourcemanager.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), ::core::mem::transmute(dynamicgroupargs.unwrap_or(::std::ptr::null())), phauthzclientcontext) + AuthzInitializeContextFromToken(flags, tokenhandle.into_param().abi(), hauthzresourcemanager.into_param().abi(), ::core::mem::transmute(pexpirationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(identifier), ::core::mem::transmute(dynamicgroupargs.unwrap_or(::std::ptr::null())), phauthzclientcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeObjectAccessAuditEvent(flags: AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype: P0, szoperationtype: P1, szobjecttype: P2, szobjectname: P3, szadditionalinfo: P4, phauditevent: *mut isize, dwadditionalparametercount: u32) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeObjectAccessAuditEvent(flags: AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype: P0, szoperationtype: P1, szobjecttype: P2, szobjectname: P3, szadditionalinfo: P4, phauditevent: *mut isize, dwadditionalparametercount: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -163,12 +163,12 @@ where P4: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("authz.dll" "cdecl" fn AuthzInitializeObjectAccessAuditEvent(flags : AUTHZ_INITIALIZE_OBJECT_ACCESS_AUDIT_EVENT_FLAGS, hauditeventtype : AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype : ::windows_core::PCWSTR, szobjecttype : ::windows_core::PCWSTR, szobjectname : ::windows_core::PCWSTR, szadditionalinfo : ::windows_core::PCWSTR, phauditevent : *mut isize, dwadditionalparametercount : u32) -> super::super::Foundation:: BOOL); - AuthzInitializeObjectAccessAuditEvent(flags, hauditeventtype.into_param().abi(), szoperationtype.into_param().abi(), szobjecttype.into_param().abi(), szobjectname.into_param().abi(), szadditionalinfo.into_param().abi(), phauditevent, dwadditionalparametercount) + AuthzInitializeObjectAccessAuditEvent(flags, hauditeventtype.into_param().abi(), szoperationtype.into_param().abi(), szobjecttype.into_param().abi(), szobjectname.into_param().abi(), szadditionalinfo.into_param().abi(), phauditevent, dwadditionalparametercount).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeObjectAccessAuditEvent2(flags: u32, hauditeventtype: P0, szoperationtype: P1, szobjecttype: P2, szobjectname: P3, szadditionalinfo: P4, szadditionalinfo2: P5, phauditevent: *mut isize, dwadditionalparametercount: u32) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeObjectAccessAuditEvent2(flags: u32, hauditeventtype: P0, szoperationtype: P1, szobjecttype: P2, szobjectname: P3, szadditionalinfo: P4, szadditionalinfo2: P5, phauditevent: *mut isize, dwadditionalparametercount: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -178,154 +178,154 @@ where P5: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("authz.dll" "cdecl" fn AuthzInitializeObjectAccessAuditEvent2(flags : u32, hauditeventtype : AUTHZ_AUDIT_EVENT_TYPE_HANDLE, szoperationtype : ::windows_core::PCWSTR, szobjecttype : ::windows_core::PCWSTR, szobjectname : ::windows_core::PCWSTR, szadditionalinfo : ::windows_core::PCWSTR, szadditionalinfo2 : ::windows_core::PCWSTR, phauditevent : *mut isize, dwadditionalparametercount : u32) -> super::super::Foundation:: BOOL); - AuthzInitializeObjectAccessAuditEvent2(flags, hauditeventtype.into_param().abi(), szoperationtype.into_param().abi(), szobjecttype.into_param().abi(), szobjectname.into_param().abi(), szadditionalinfo.into_param().abi(), szadditionalinfo2.into_param().abi(), phauditevent, dwadditionalparametercount) + AuthzInitializeObjectAccessAuditEvent2(flags, hauditeventtype.into_param().abi(), szoperationtype.into_param().abi(), szobjecttype.into_param().abi(), szobjectname.into_param().abi(), szadditionalinfo.into_param().abi(), szadditionalinfo2.into_param().abi(), phauditevent, dwadditionalparametercount).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeRemoteResourceManager(prpcinitinfo: *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzInitializeRemoteResourceManager(prpcinitinfo: *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeRemoteResourceManager(prpcinitinfo : *const AUTHZ_RPC_INIT_INFO_CLIENT, phauthzresourcemanager : *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeRemoteResourceManager(prpcinitinfo, phauthzresourcemanager) + AuthzInitializeRemoteResourceManager(prpcinitinfo, phauthzresourcemanager).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeResourceManager(flags: u32, pfndynamicaccesscheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK, pfncomputedynamicgroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS, pfnfreedynamicgroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS, szresourcemanagername: P0, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn AuthzInitializeResourceManager(flags: u32, pfndynamicaccesscheck: PFN_AUTHZ_DYNAMIC_ACCESS_CHECK, pfncomputedynamicgroups: PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS, pfnfreedynamicgroups: PFN_AUTHZ_FREE_DYNAMIC_GROUPS, szresourcemanagername: P0, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeResourceManager(flags : u32, pfndynamicaccesscheck : PFN_AUTHZ_DYNAMIC_ACCESS_CHECK, pfncomputedynamicgroups : PFN_AUTHZ_COMPUTE_DYNAMIC_GROUPS, pfnfreedynamicgroups : PFN_AUTHZ_FREE_DYNAMIC_GROUPS, szresourcemanagername : ::windows_core::PCWSTR, phauthzresourcemanager : *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeResourceManager(flags, pfndynamicaccesscheck, pfncomputedynamicgroups, pfnfreedynamicgroups, szresourcemanagername.into_param().abi(), phauthzresourcemanager) + AuthzInitializeResourceManager(flags, pfndynamicaccesscheck, pfncomputedynamicgroups, pfnfreedynamicgroups, szresourcemanagername.into_param().abi(), phauthzresourcemanager).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInitializeResourceManagerEx(flags: AUTHZ_RESOURCE_MANAGER_FLAGS, pauthzinitinfo: ::core::option::Option<*const AUTHZ_INIT_INFO>, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzInitializeResourceManagerEx(flags: AUTHZ_RESOURCE_MANAGER_FLAGS, pauthzinitinfo: ::core::option::Option<*const AUTHZ_INIT_INFO>, phauthzresourcemanager: *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzInitializeResourceManagerEx(flags : AUTHZ_RESOURCE_MANAGER_FLAGS, pauthzinitinfo : *const AUTHZ_INIT_INFO, phauthzresourcemanager : *mut AUTHZ_RESOURCE_MANAGER_HANDLE) -> super::super::Foundation:: BOOL); - AuthzInitializeResourceManagerEx(flags, ::core::mem::transmute(pauthzinitinfo.unwrap_or(::std::ptr::null())), phauthzresourcemanager) + AuthzInitializeResourceManagerEx(flags, ::core::mem::transmute(pauthzinitinfo.unwrap_or(::std::ptr::null())), phauthzresourcemanager).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzInstallSecurityEventSource(dwflags : u32, pregistration : *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> super::super::Foundation:: BOOL); - AuthzInstallSecurityEventSource(dwflags, pregistration) + AuthzInstallSecurityEventSource(dwflags, pregistration).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzModifyClaims(hauthzclientcontext: P0, claimclass: AUTHZ_CONTEXT_INFORMATION_CLASS, pclaimoperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pclaims: ::core::option::Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> super::super::Foundation::BOOL +pub unsafe fn AuthzModifyClaims(hauthzclientcontext: P0, claimclass: AUTHZ_CONTEXT_INFORMATION_CLASS, pclaimoperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pclaims: ::core::option::Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzModifyClaims(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, claimclass : AUTHZ_CONTEXT_INFORMATION_CLASS, pclaimoperations : *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pclaims : *const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION) -> super::super::Foundation:: BOOL); - AuthzModifyClaims(hauthzclientcontext.into_param().abi(), claimclass, pclaimoperations, ::core::mem::transmute(pclaims.unwrap_or(::std::ptr::null()))) + AuthzModifyClaims(hauthzclientcontext.into_param().abi(), claimclass, pclaimoperations, ::core::mem::transmute(pclaims.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzModifySecurityAttributes(hauthzclientcontext: P0, poperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes: ::core::option::Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> super::super::Foundation::BOOL +pub unsafe fn AuthzModifySecurityAttributes(hauthzclientcontext: P0, poperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes: ::core::option::Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzModifySecurityAttributes(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, poperations : *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes : *const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION) -> super::super::Foundation:: BOOL); - AuthzModifySecurityAttributes(hauthzclientcontext.into_param().abi(), poperations, ::core::mem::transmute(pattributes.unwrap_or(::std::ptr::null()))) + AuthzModifySecurityAttributes(hauthzclientcontext.into_param().abi(), poperations, ::core::mem::transmute(pattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzModifySids(hauthzclientcontext: P0, sidclass: AUTHZ_CONTEXT_INFORMATION_CLASS, psidoperations: *const AUTHZ_SID_OPERATION, psids: ::core::option::Option<*const super::TOKEN_GROUPS>) -> super::super::Foundation::BOOL +pub unsafe fn AuthzModifySids(hauthzclientcontext: P0, sidclass: AUTHZ_CONTEXT_INFORMATION_CLASS, psidoperations: *const AUTHZ_SID_OPERATION, psids: ::core::option::Option<*const super::TOKEN_GROUPS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzModifySids(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, sidclass : AUTHZ_CONTEXT_INFORMATION_CLASS, psidoperations : *const AUTHZ_SID_OPERATION, psids : *const super:: TOKEN_GROUPS) -> super::super::Foundation:: BOOL); - AuthzModifySids(hauthzclientcontext.into_param().abi(), sidclass, psidoperations, ::core::mem::transmute(psids.unwrap_or(::std::ptr::null()))) + AuthzModifySids(hauthzclientcontext.into_param().abi(), sidclass, psidoperations, ::core::mem::transmute(psids.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, psecuritydescriptor: P2, optionalsecuritydescriptorarray: ::core::option::Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *const AUTHZ_ACCESS_REPLY) -> super::super::Foundation::BOOL +pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, psecuritydescriptor: P2, optionalsecuritydescriptorarray: ::core::option::Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *const AUTHZ_ACCESS_REPLY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzOpenObjectAudit(flags : u32, hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, prequest : *const AUTHZ_ACCESS_REQUEST, hauditevent : AUTHZ_AUDIT_EVENT_HANDLE, psecuritydescriptor : super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorarray : *const super:: PSECURITY_DESCRIPTOR, optionalsecuritydescriptorcount : u32, preply : *const AUTHZ_ACCESS_REPLY) -> super::super::Foundation:: BOOL); - AuthzOpenObjectAudit(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply) + AuthzOpenObjectAudit(flags, hauthzclientcontext.into_param().abi(), prequest, hauditevent.into_param().abi(), psecuritydescriptor.into_param().abi(), ::core::mem::transmute(optionalsecuritydescriptorarray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), optionalsecuritydescriptorarray.as_deref().map_or(0, |slice| slice.len() as _), preply).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn AuthzRegisterCapChangeNotification(phcapchangesubscription: *mut *mut AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__, pfncapchangecallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, pcallbackcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzRegisterCapChangeNotification(phcapchangesubscription: *mut *mut AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__, pfncapchangecallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, pcallbackcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzRegisterCapChangeNotification(phcapchangesubscription : *mut *mut AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__, pfncapchangecallback : super::super::System::Threading:: LPTHREAD_START_ROUTINE, pcallbackcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AuthzRegisterCapChangeNotification(phcapchangesubscription, pfncapchangecallback, ::core::mem::transmute(pcallbackcontext.unwrap_or(::std::ptr::null()))) + AuthzRegisterCapChangeNotification(phcapchangesubscription, pfncapchangecallback, ::core::mem::transmute(pcallbackcontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzRegisterSecurityEventSource(dwflags: u32, szeventsourcename: P0, pheventprovider: *mut isize) -> super::super::Foundation::BOOL +pub unsafe fn AuthzRegisterSecurityEventSource(dwflags: u32, szeventsourcename: P0, pheventprovider: *mut isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("authz.dll" "system" fn AuthzRegisterSecurityEventSource(dwflags : u32, szeventsourcename : ::windows_core::PCWSTR, pheventprovider : *mut isize) -> super::super::Foundation:: BOOL); - AuthzRegisterSecurityEventSource(dwflags, szeventsourcename.into_param().abi(), pheventprovider) + AuthzRegisterSecurityEventSource(dwflags, szeventsourcename.into_param().abi(), pheventprovider).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzReportSecurityEvent(dwflags: u32, heventprovider: P0, dwauditid: u32, pusersid: P1, dwcount: u32) -> super::super::Foundation::BOOL +pub unsafe fn AuthzReportSecurityEvent(dwflags: u32, heventprovider: P0, dwauditid: u32, pusersid: P1, dwcount: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "cdecl" fn AuthzReportSecurityEvent(dwflags : u32, heventprovider : AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid : u32, pusersid : super::super::Foundation:: PSID, dwcount : u32) -> super::super::Foundation:: BOOL); - AuthzReportSecurityEvent(dwflags, heventprovider.into_param().abi(), dwauditid, pusersid.into_param().abi(), dwcount) + AuthzReportSecurityEvent(dwflags, heventprovider.into_param().abi(), dwauditid, pusersid.into_param().abi(), dwcount).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzReportSecurityEventFromParams(dwflags: u32, heventprovider: P0, dwauditid: u32, pusersid: P1, pparams: *const AUDIT_PARAMS) -> super::super::Foundation::BOOL +pub unsafe fn AuthzReportSecurityEventFromParams(dwflags: u32, heventprovider: P0, dwauditid: u32, pusersid: P1, pparams: *const AUDIT_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzReportSecurityEventFromParams(dwflags : u32, heventprovider : AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE, dwauditid : u32, pusersid : super::super::Foundation:: PSID, pparams : *const AUDIT_PARAMS) -> super::super::Foundation:: BOOL); - AuthzReportSecurityEventFromParams(dwflags, heventprovider.into_param().abi(), dwauditid, pusersid.into_param().abi(), pparams) + AuthzReportSecurityEventFromParams(dwflags, heventprovider.into_param().abi(), dwauditid, pusersid.into_param().abi(), pparams).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzSetAppContainerInformation(hauthzclientcontext: P0, pappcontainersid: P1, pcapabilitysids: ::core::option::Option<&[super::SID_AND_ATTRIBUTES]>) -> super::super::Foundation::BOOL +pub unsafe fn AuthzSetAppContainerInformation(hauthzclientcontext: P0, pappcontainersid: P1, pcapabilitysids: ::core::option::Option<&[super::SID_AND_ATTRIBUTES]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("authz.dll" "system" fn AuthzSetAppContainerInformation(hauthzclientcontext : AUTHZ_CLIENT_CONTEXT_HANDLE, pappcontainersid : super::super::Foundation:: PSID, capabilitycount : u32, pcapabilitysids : *const super:: SID_AND_ATTRIBUTES) -> super::super::Foundation:: BOOL); - AuthzSetAppContainerInformation(hauthzclientcontext.into_param().abi(), pappcontainersid.into_param().abi(), pcapabilitysids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcapabilitysids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + AuthzSetAppContainerInformation(hauthzclientcontext.into_param().abi(), pappcontainersid.into_param().abi(), pcapabilitysids.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcapabilitysids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzUninstallSecurityEventSource(dwflags: u32, szeventsourcename: P0) -> super::super::Foundation::BOOL +pub unsafe fn AuthzUninstallSecurityEventSource(dwflags: u32, szeventsourcename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("authz.dll" "system" fn AuthzUninstallSecurityEventSource(dwflags : u32, szeventsourcename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AuthzUninstallSecurityEventSource(dwflags, szeventsourcename.into_param().abi()) + AuthzUninstallSecurityEventSource(dwflags, szeventsourcename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzUnregisterCapChangeNotification(hcapchangesubscription: *const AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzUnregisterCapChangeNotification(hcapchangesubscription: *const AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzUnregisterCapChangeNotification(hcapchangesubscription : *const AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE__) -> super::super::Foundation:: BOOL); - AuthzUnregisterCapChangeNotification(hcapchangesubscription) + AuthzUnregisterCapChangeNotification(hcapchangesubscription).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AuthzUnregisterSecurityEventSource(dwflags: u32, pheventprovider: *mut isize) -> super::super::Foundation::BOOL { +pub unsafe fn AuthzUnregisterSecurityEventSource(dwflags: u32, pheventprovider: *mut isize) -> ::windows_core::Result<()> { ::windows_targets::link!("authz.dll" "system" fn AuthzUnregisterSecurityEventSource(dwflags : u32, pheventprovider : *mut isize) -> super::super::Foundation:: BOOL); - AuthzUnregisterSecurityEventSource(dwflags, pheventprovider) + AuthzUnregisterSecurityEventSource(dwflags, pheventprovider).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`*"] #[inline] @@ -378,7 +378,7 @@ pub unsafe fn BuildImpersonateTrusteeW(ptrustee: *mut TRUSTEE_W, pimpersonatetru #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildSecurityDescriptorA(powner: ::core::option::Option<*const TRUSTEE_A>, pgroup: ::core::option::Option<*const TRUSTEE_A>, plistofaccessentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, plistofauditentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, poldsd: P0, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn BuildSecurityDescriptorA(powner: ::core::option::Option<*const TRUSTEE_A>, pgroup: ::core::option::Option<*const TRUSTEE_A>, plistofaccessentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, plistofauditentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, poldsd: P0, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -394,11 +394,12 @@ where psizenewsd, pnewsd, ) + .ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BuildSecurityDescriptorW(powner: ::core::option::Option<*const TRUSTEE_W>, pgroup: ::core::option::Option<*const TRUSTEE_W>, plistofaccessentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, plistofauditentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, poldsd: P0, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn BuildSecurityDescriptorW(powner: ::core::option::Option<*const TRUSTEE_W>, pgroup: ::core::option::Option<*const TRUSTEE_W>, plistofaccessentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, plistofauditentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, poldsd: P0, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -414,6 +415,7 @@ where psizenewsd, pnewsd, ) + .ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`*"] #[inline] @@ -498,153 +500,153 @@ where #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: u32, stringsecuritydescriptor: *mut ::windows_core::PSTR, stringsecuritydescriptorlen: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: u32, stringsecuritydescriptor: *mut ::windows_core::PSTR, stringsecuritydescriptorlen: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor : super:: PSECURITY_DESCRIPTOR, requestedstringsdrevision : u32, securityinformation : u32, stringsecuritydescriptor : *mut ::windows_core::PSTR, stringsecuritydescriptorlen : *mut u32) -> super::super::Foundation:: BOOL); - ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor.into_param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, ::core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(::std::ptr::null_mut()))) + ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor.into_param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, ::core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: u32, stringsecuritydescriptor: *mut ::windows_core::PWSTR, stringsecuritydescriptorlen: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: u32, stringsecuritydescriptor: *mut ::windows_core::PWSTR, stringsecuritydescriptorlen: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor : super:: PSECURITY_DESCRIPTOR, requestedstringsdrevision : u32, securityinformation : u32, stringsecuritydescriptor : *mut ::windows_core::PWSTR, stringsecuritydescriptorlen : *mut u32) -> super::super::Foundation:: BOOL); - ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor.into_param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, ::core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(::std::ptr::null_mut()))) + ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor.into_param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, ::core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertSidToStringSidA(sid: P0, stringsid: *mut ::windows_core::PSTR) -> super::super::Foundation::BOOL +pub unsafe fn ConvertSidToStringSidA(sid: P0, stringsid: *mut ::windows_core::PSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertSidToStringSidA(sid : super::super::Foundation:: PSID, stringsid : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - ConvertSidToStringSidA(sid.into_param().abi(), stringsid) + ConvertSidToStringSidA(sid.into_param().abi(), stringsid).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertSidToStringSidW(sid: P0, stringsid: *mut ::windows_core::PWSTR) -> super::super::Foundation::BOOL +pub unsafe fn ConvertSidToStringSidW(sid: P0, stringsid: *mut ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertSidToStringSidW(sid : super::super::Foundation:: PSID, stringsid : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - ConvertSidToStringSidW(sid.into_param().abi(), stringsid) + ConvertSidToStringSidW(sid.into_param().abi(), stringsid).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor : ::windows_core::PCSTR, stringsdrevision : u32, securitydescriptor : *mut super:: PSECURITY_DESCRIPTOR, securitydescriptorsize : *mut u32) -> super::super::Foundation:: BOOL); - ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.into_param().abi(), stringsdrevision, securitydescriptor, ::core::mem::transmute(securitydescriptorsize.unwrap_or(::std::ptr::null_mut()))) + ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.into_param().abi(), stringsdrevision, securitydescriptor, ::core::mem::transmute(securitydescriptorsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor : ::windows_core::PCWSTR, stringsdrevision : u32, securitydescriptor : *mut super:: PSECURITY_DESCRIPTOR, securitydescriptorsize : *mut u32) -> super::super::Foundation:: BOOL); - ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.into_param().abi(), stringsdrevision, securitydescriptor, ::core::mem::transmute(securitydescriptorsize.unwrap_or(::std::ptr::null_mut()))) + ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.into_param().abi(), stringsdrevision, securitydescriptor, ::core::mem::transmute(securitydescriptorsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertStringSidToSidA(stringsid: P0, sid: *mut super::super::Foundation::PSID) -> super::super::Foundation::BOOL +pub unsafe fn ConvertStringSidToSidA(stringsid: P0, sid: *mut super::super::Foundation::PSID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertStringSidToSidA(stringsid : ::windows_core::PCSTR, sid : *mut super::super::Foundation:: PSID) -> super::super::Foundation:: BOOL); - ConvertStringSidToSidA(stringsid.into_param().abi(), sid) + ConvertStringSidToSidA(stringsid.into_param().abi(), sid).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertStringSidToSidW(stringsid: P0, sid: *mut super::super::Foundation::PSID) -> super::super::Foundation::BOOL +pub unsafe fn ConvertStringSidToSidW(stringsid: P0, sid: *mut super::super::Foundation::PSID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertStringSidToSidW(stringsid : ::windows_core::PCWSTR, sid : *mut super::super::Foundation:: PSID) -> super::super::Foundation:: BOOL); - ConvertStringSidToSidW(stringsid.into_param().abi(), sid) + ConvertStringSidToSidW(stringsid.into_param().abi(), sid).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeInheritedFromArray(pinheritarray: &[INHERITED_FROMW], pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn FreeInheritedFromArray(pinheritarray: &[INHERITED_FROMW], pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn FreeInheritedFromArray(pinheritarray : *const INHERITED_FROMW, acecnt : u16, pfnarray : *const FN_OBJECT_MGR_FUNCTS) -> super::super::Foundation:: WIN32_ERROR); - FreeInheritedFromArray(::core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len() as _, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null()))) + FreeInheritedFromArray(::core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len() as _, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAuditedPermissionsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetAuditedPermissionsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetAuditedPermissionsFromAclA(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_A, psuccessfulauditedrights : *mut u32, pfailedauditrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetAuditedPermissionsFromAclA(pacl, ptrustee, psuccessfulauditedrights, pfailedauditrights) + GetAuditedPermissionsFromAclA(pacl, ptrustee, psuccessfulauditedrights, pfailedauditrights).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAuditedPermissionsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetAuditedPermissionsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetAuditedPermissionsFromAclW(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_W, psuccessfulauditedrights : *mut u32, pfailedauditrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetAuditedPermissionsFromAclW(pacl, ptrustee, psuccessfulauditedrights, pfailedauditrights) + GetAuditedPermissionsFromAclW(pacl, ptrustee, psuccessfulauditedrights, pfailedauditrights).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetEffectiveRightsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, paccessrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetEffectiveRightsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, paccessrights: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetEffectiveRightsFromAclA(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_A, paccessrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetEffectiveRightsFromAclA(pacl, ptrustee, paccessrights) + GetEffectiveRightsFromAclA(pacl, ptrustee, paccessrights).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetEffectiveRightsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, paccessrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetEffectiveRightsFromAclW(pacl: *const super::ACL, ptrustee: *const TRUSTEE_W, paccessrights: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetEffectiveRightsFromAclW(pacl : *const super:: ACL, ptrustee : *const TRUSTEE_W, paccessrights : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetEffectiveRightsFromAclW(pacl, ptrustee, paccessrights) + GetEffectiveRightsFromAclW(pacl, ptrustee, paccessrights).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetExplicitEntriesFromAclA(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_A) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetExplicitEntriesFromAclA(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_A) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetExplicitEntriesFromAclA(pacl : *const super:: ACL, pccountofexplicitentries : *mut u32, plistofexplicitentries : *mut *mut EXPLICIT_ACCESS_A) -> super::super::Foundation:: WIN32_ERROR); - GetExplicitEntriesFromAclA(pacl, pccountofexplicitentries, plistofexplicitentries) + GetExplicitEntriesFromAclA(pacl, pccountofexplicitentries, plistofexplicitentries).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetExplicitEntriesFromAclW(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_W) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetExplicitEntriesFromAclW(pacl: *const super::ACL, pccountofexplicitentries: *mut u32, plistofexplicitentries: *mut *mut EXPLICIT_ACCESS_W) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetExplicitEntriesFromAclW(pacl : *const super:: ACL, pccountofexplicitentries : *mut u32, plistofexplicitentries : *mut *mut EXPLICIT_ACCESS_W) -> super::super::Foundation:: WIN32_ERROR); - GetExplicitEntriesFromAclW(pacl, pccountofexplicitentries, plistofexplicitentries) + GetExplicitEntriesFromAclW(pacl, pccountofexplicitentries, plistofexplicitentries).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetInheritanceSourceA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, container: P1, pobjectclassguids: ::core::option::Option<&[*const ::windows_core::GUID]>, pacl: *const super::ACL, pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMA) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetInheritanceSourceA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, container: P1, pobjectclassguids: ::core::option::Option<&[*const ::windows_core::GUID]>, pacl: *const super::ACL, pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const ::windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMA) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceA(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray) + GetInheritanceSourceA(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, container: P1, pobjectclassguids: ::core::option::Option<&[*const ::windows_core::GUID]>, pacl: *const super::ACL, pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMW) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, container: P1, pobjectclassguids: ::core::option::Option<&[*const ::windows_core::GUID]>, pacl: *const super::ACL, pfnarray: ::core::option::Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, container : super::super::Foundation:: BOOL, pobjectclassguids : *const *const ::windows_core::GUID, guidcount : u32, pacl : *const super:: ACL, pfnarray : *const FN_OBJECT_MGR_FUNCTS, pgenericmapping : *const super:: GENERIC_MAPPING, pinheritarray : *mut INHERITED_FROMW) -> super::super::Foundation:: WIN32_ERROR); - GetInheritanceSourceW(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray) + GetInheritanceSourceW(pobjectname.into_param().abi(), objecttype, securityinfo, container.into_param().abi(), ::core::mem::transmute(pobjectclassguids.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pobjectclassguids.as_deref().map_or(0, |slice| slice.len() as _), pacl, ::core::mem::transmute(pfnarray.unwrap_or(::std::ptr::null())), pgenericmapping, pinheritarray).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`*"] #[inline] @@ -673,32 +675,32 @@ pub unsafe fn GetMultipleTrusteeW(ptrustee: ::core::option::Option<*const TRUSTE #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetNamedSecurityInfoA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, ppsidowner : *mut super::super::Foundation:: PSID, ppsidgroup : *mut super::super::Foundation:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ppsecuritydescriptor) + GetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ppsecuritydescriptor).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetNamedSecurityInfoW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, ppsidowner : *mut super::super::Foundation:: PSID, ppsidgroup : *mut super::super::Foundation:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ppsecuritydescriptor) + GetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ppsecuritydescriptor).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: ::core::option::Option<*mut super::PSECURITY_DESCRIPTOR>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, ppsidowner: ::core::option::Option<*mut super::super::Foundation::PSID>, ppsidgroup: ::core::option::Option<*mut super::super::Foundation::PSID>, ppdacl: ::core::option::Option<*mut *mut super::ACL>, ppsacl: ::core::option::Option<*mut *mut super::ACL>, ppsecuritydescriptor: ::core::option::Option<*mut super::PSECURITY_DESCRIPTOR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityInfo(handle : super::super::Foundation:: HANDLE, objecttype : SE_OBJECT_TYPE, securityinfo : u32, ppsidowner : *mut super::super::Foundation:: PSID, ppsidgroup : *mut super::super::Foundation:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetSecurityInfo(handle.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsecuritydescriptor.unwrap_or(::std::ptr::null_mut()))) + GetSecurityInfo(handle.into_param().abi(), objecttype, securityinfo, ::core::mem::transmute(ppsidowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsidgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppdacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsacl.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsecuritydescriptor.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`*"] #[inline] @@ -739,77 +741,77 @@ pub unsafe fn GetTrusteeTypeW(ptrustee: ::core::option::Option<*const TRUSTEE_W> #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupSecurityDescriptorPartsA(ppowner: ::core::option::Option<*mut *mut TRUSTEE_A>, ppgroup: ::core::option::Option<*mut *mut TRUSTEE_A>, pccountofaccessentries: ::core::option::Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_A, pccountofauditentries: ::core::option::Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_A, psd: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn LookupSecurityDescriptorPartsA(ppowner: ::core::option::Option<*mut *mut TRUSTEE_A>, ppgroup: ::core::option::Option<*mut *mut TRUSTEE_A>, pccountofaccessentries: ::core::option::Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_A, pccountofauditentries: ::core::option::Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_A, psd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LookupSecurityDescriptorPartsA(ppowner : *mut *mut TRUSTEE_A, ppgroup : *mut *mut TRUSTEE_A, pccountofaccessentries : *mut u32, pplistofaccessentries : *mut *mut EXPLICIT_ACCESS_A, pccountofauditentries : *mut u32, pplistofauditentries : *mut *mut EXPLICIT_ACCESS_A, psd : super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - LookupSecurityDescriptorPartsA(::core::mem::transmute(ppowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pccountofaccessentries.unwrap_or(::std::ptr::null_mut())), pplistofaccessentries, ::core::mem::transmute(pccountofauditentries.unwrap_or(::std::ptr::null_mut())), pplistofauditentries, psd.into_param().abi()) + LookupSecurityDescriptorPartsA(::core::mem::transmute(ppowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pccountofaccessentries.unwrap_or(::std::ptr::null_mut())), pplistofaccessentries, ::core::mem::transmute(pccountofauditentries.unwrap_or(::std::ptr::null_mut())), pplistofauditentries, psd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupSecurityDescriptorPartsW(ppowner: ::core::option::Option<*mut *mut TRUSTEE_W>, ppgroup: ::core::option::Option<*mut *mut TRUSTEE_W>, pccountofaccessentries: ::core::option::Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_W, pccountofauditentries: ::core::option::Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_W, psd: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn LookupSecurityDescriptorPartsW(ppowner: ::core::option::Option<*mut *mut TRUSTEE_W>, ppgroup: ::core::option::Option<*mut *mut TRUSTEE_W>, pccountofaccessentries: ::core::option::Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_W, pccountofauditentries: ::core::option::Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_W, psd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LookupSecurityDescriptorPartsW(ppowner : *mut *mut TRUSTEE_W, ppgroup : *mut *mut TRUSTEE_W, pccountofaccessentries : *mut u32, pplistofaccessentries : *mut *mut EXPLICIT_ACCESS_W, pccountofauditentries : *mut u32, pplistofauditentries : *mut *mut EXPLICIT_ACCESS_W, psd : super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - LookupSecurityDescriptorPartsW(::core::mem::transmute(ppowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pccountofaccessentries.unwrap_or(::std::ptr::null_mut())), pplistofaccessentries, ::core::mem::transmute(pccountofauditentries.unwrap_or(::std::ptr::null_mut())), pplistofauditentries, psd.into_param().abi()) + LookupSecurityDescriptorPartsW(::core::mem::transmute(ppowner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppgroup.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pccountofaccessentries.unwrap_or(::std::ptr::null_mut())), pplistofaccessentries, ::core::mem::transmute(pccountofauditentries.unwrap_or(::std::ptr::null_mut())), pplistofauditentries, psd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEntriesInAclA(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetEntriesInAclA(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_A]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetEntriesInAclA(ccountofexplicitentries : u32, plistofexplicitentries : *const EXPLICIT_ACCESS_A, oldacl : *const super:: ACL, newacl : *mut *mut super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetEntriesInAclA(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl) + SetEntriesInAclA(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEntriesInAclW(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetEntriesInAclW(plistofexplicitentries: ::core::option::Option<&[EXPLICIT_ACCESS_W]>, oldacl: ::core::option::Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetEntriesInAclW(ccountofexplicitentries : u32, plistofexplicitentries : *const EXPLICIT_ACCESS_W, oldacl : *const super:: ACL, newacl : *mut *mut super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetEntriesInAclW(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl) + SetEntriesInAclW(plistofexplicitentries.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(plistofexplicitentries.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(oldacl.unwrap_or(::std::ptr::null())), newacl).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetNamedSecurityInfoA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, psidowner : super::super::Foundation:: PSID, psidgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))) + SetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetNamedSecurityInfoW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, psidowner : super::super::Foundation:: PSID, psidgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))) + SetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, psidowner: P1, psidgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityInfo(handle : super::super::Foundation:: HANDLE, objecttype : SE_OBJECT_TYPE, securityinfo : u32, psidowner : super::super::Foundation:: PSID, psidgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetSecurityInfo(handle.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))) + SetSecurityInfo(handle.into_param().abi(), objecttype, securityinfo, psidowner.into_param().abi(), psidgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, @@ -817,12 +819,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, powner : super::super::Foundation:: PSID, pgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, keepexplicit : super::super::Foundation:: BOOL, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - TreeResetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), keepexplicit.into_param().abi(), fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))) + TreeResetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), keepexplicit.into_param().abi(), fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, @@ -830,31 +832,31 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, powner : super::super::Foundation:: PSID, pgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, keepexplicit : super::super::Foundation:: BOOL, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - TreeResetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), keepexplicit.into_param().abi(), fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))) + TreeResetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), keepexplicit.into_param().abi(), fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TreeSetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeSetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TreeSetNamedSecurityInfoA(pobjectname : ::windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, powner : super::super::Foundation:: PSID, pgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, dwaction : TREE_SEC_INFO, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - TreeSetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), dwaction, fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))) + TreeSetNamedSecurityInfoA(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), dwaction, fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TreeSetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TreeSetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: u32, powner: P1, pgroup: P2, pdacl: ::core::option::Option<*const super::ACL>, psacl: ::core::option::Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TreeSetNamedSecurityInfoW(pobjectname : ::windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : u32, powner : super::super::Foundation:: PSID, pgroup : super::super::Foundation:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL, dwaction : TREE_SEC_INFO, fnprogress : FN_PROGRESS, progressinvokesetting : PROG_INVOKE_SETTING, args : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - TreeSetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), dwaction, fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))) + TreeSetNamedSecurityInfoW(pobjectname.into_param().abi(), objecttype, securityinfo, powner.into_param().abi(), pgroup.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), dwaction, fnprogress, progressinvokesetting, ::core::mem::transmute(args.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Authorization\"`, `\"Win32_System_Com\"`*"] #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs index 302b64bf9c..1f1bcc87ce 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -1,62 +1,62 @@ #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredDeleteA(targetname: P0, r#type: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CredDeleteA(targetname: P0, r#type: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredDeleteA(targetname : ::windows_core::PCSTR, r#type : u32, flags : u32) -> super::super::Foundation:: BOOL); - CredDeleteA(targetname.into_param().abi(), r#type, flags) + CredDeleteA(targetname.into_param().abi(), r#type, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredDeleteW(targetname: P0, r#type: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CredDeleteW(targetname: P0, r#type: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredDeleteW(targetname : ::windows_core::PCWSTR, r#type : u32, flags : u32) -> super::super::Foundation:: BOOL); - CredDeleteW(targetname.into_param().abi(), r#type, flags) + CredDeleteW(targetname.into_param().abi(), r#type, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredEnumerateA(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> super::super::Foundation::BOOL +pub unsafe fn CredEnumerateA(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredEnumerateA(filter : ::windows_core::PCSTR, flags : CRED_ENUMERATE_FLAGS, count : *mut u32, credential : *mut *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredEnumerateA(filter.into_param().abi(), flags, count, credential) + CredEnumerateA(filter.into_param().abi(), flags, count, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredEnumerateW(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> super::super::Foundation::BOOL +pub unsafe fn CredEnumerateW(filter: P0, flags: CRED_ENUMERATE_FLAGS, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredEnumerateW(filter : ::windows_core::PCWSTR, flags : CRED_ENUMERATE_FLAGS, count : *mut u32, credential : *mut *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredEnumerateW(filter.into_param().abi(), flags, count, credential) + CredEnumerateW(filter.into_param().abi(), flags, count, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredFindBestCredentialA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> super::super::Foundation::BOOL +pub unsafe fn CredFindBestCredentialA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredFindBestCredentialA(targetname : ::windows_core::PCSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredFindBestCredentialA(targetname.into_param().abi(), r#type, flags, credential) + CredFindBestCredentialA(targetname.into_param().abi(), r#type, flags, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredFindBestCredentialW(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALW) -> super::super::Foundation::BOOL +pub unsafe fn CredFindBestCredentialW(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredFindBestCredentialW(targetname : ::windows_core::PCWSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredFindBestCredentialW(targetname.into_param().abi(), r#type, flags, credential) + CredFindBestCredentialW(targetname.into_param().abi(), r#type, flags, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`*"] #[inline] @@ -67,29 +67,29 @@ pub unsafe fn CredFree(buffer: *const ::core::ffi::c_void) { #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredGetSessionTypes(maximumpersist: &mut [u32]) -> super::super::Foundation::BOOL { +pub unsafe fn CredGetSessionTypes(maximumpersist: &mut [u32]) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredGetSessionTypes(maximumpersistcount : u32, maximumpersist : *mut u32) -> super::super::Foundation:: BOOL); - CredGetSessionTypes(maximumpersist.len() as _, ::core::mem::transmute(maximumpersist.as_ptr())) + CredGetSessionTypes(maximumpersist.len() as _, ::core::mem::transmute(maximumpersist.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredGetTargetInfoA(targetname: P0, flags: u32, targetinfo: *mut *mut CREDENTIAL_TARGET_INFORMATIONA) -> super::super::Foundation::BOOL +pub unsafe fn CredGetTargetInfoA(targetname: P0, flags: u32, targetinfo: *mut *mut CREDENTIAL_TARGET_INFORMATIONA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredGetTargetInfoA(targetname : ::windows_core::PCSTR, flags : u32, targetinfo : *mut *mut CREDENTIAL_TARGET_INFORMATIONA) -> super::super::Foundation:: BOOL); - CredGetTargetInfoA(targetname.into_param().abi(), flags, targetinfo) + CredGetTargetInfoA(targetname.into_param().abi(), flags, targetinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredGetTargetInfoW(targetname: P0, flags: u32, targetinfo: *mut *mut CREDENTIAL_TARGET_INFORMATIONW) -> super::super::Foundation::BOOL +pub unsafe fn CredGetTargetInfoW(targetname: P0, flags: u32, targetinfo: *mut *mut CREDENTIAL_TARGET_INFORMATIONW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredGetTargetInfoW(targetname : ::windows_core::PCWSTR, flags : u32, targetinfo : *mut *mut CREDENTIAL_TARGET_INFORMATIONW) -> super::super::Foundation:: BOOL); - CredGetTargetInfoW(targetname.into_param().abi(), flags, targetinfo) + CredGetTargetInfoW(targetname.into_param().abi(), flags, targetinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -114,134 +114,134 @@ where #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredIsProtectedA(pszprotectedcredentials: P0, pprotectiontype: *mut CRED_PROTECTION_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn CredIsProtectedA(pszprotectedcredentials: P0, pprotectiontype: *mut CRED_PROTECTION_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredIsProtectedA(pszprotectedcredentials : ::windows_core::PCSTR, pprotectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredIsProtectedA(pszprotectedcredentials.into_param().abi(), pprotectiontype) + CredIsProtectedA(pszprotectedcredentials.into_param().abi(), pprotectiontype).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredIsProtectedW(pszprotectedcredentials: P0, pprotectiontype: *mut CRED_PROTECTION_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn CredIsProtectedW(pszprotectedcredentials: P0, pprotectiontype: *mut CRED_PROTECTION_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredIsProtectedW(pszprotectedcredentials : ::windows_core::PCWSTR, pprotectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredIsProtectedW(pszprotectedcredentials.into_param().abi(), pprotectiontype) + CredIsProtectedW(pszprotectedcredentials.into_param().abi(), pprotectiontype).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredMarshalCredentialA(credtype: CRED_MARSHAL_TYPE, credential: *const ::core::ffi::c_void, marshaledcredential: *mut ::windows_core::PSTR) -> super::super::Foundation::BOOL { +pub unsafe fn CredMarshalCredentialA(credtype: CRED_MARSHAL_TYPE, credential: *const ::core::ffi::c_void, marshaledcredential: *mut ::windows_core::PSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredMarshalCredentialA(credtype : CRED_MARSHAL_TYPE, credential : *const ::core::ffi::c_void, marshaledcredential : *mut ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - CredMarshalCredentialA(credtype, credential, marshaledcredential) + CredMarshalCredentialA(credtype, credential, marshaledcredential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredMarshalCredentialW(credtype: CRED_MARSHAL_TYPE, credential: *const ::core::ffi::c_void, marshaledcredential: *mut ::windows_core::PWSTR) -> super::super::Foundation::BOOL { +pub unsafe fn CredMarshalCredentialW(credtype: CRED_MARSHAL_TYPE, credential: *const ::core::ffi::c_void, marshaledcredential: *mut ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredMarshalCredentialW(credtype : CRED_MARSHAL_TYPE, credential : *const ::core::ffi::c_void, marshaledcredential : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - CredMarshalCredentialW(credtype, credential, marshaledcredential) + CredMarshalCredentialW(credtype, credential, marshaledcredential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pszusername: P0, pszpassword: P1, ppackedcredentials: ::core::option::Option<*mut u8>, pcbpackedcredentials: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CredPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pszusername: P0, pszpassword: P1, ppackedcredentials: ::core::option::Option<*mut u8>, pcbpackedcredentials: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredPackAuthenticationBufferA(dwflags : CRED_PACK_FLAGS, pszusername : ::windows_core::PCSTR, pszpassword : ::windows_core::PCSTR, ppackedcredentials : *mut u8, pcbpackedcredentials : *mut u32) -> super::super::Foundation:: BOOL); - CredPackAuthenticationBufferA(dwflags, pszusername.into_param().abi(), pszpassword.into_param().abi(), ::core::mem::transmute(ppackedcredentials.unwrap_or(::std::ptr::null_mut())), pcbpackedcredentials) + CredPackAuthenticationBufferA(dwflags, pszusername.into_param().abi(), pszpassword.into_param().abi(), ::core::mem::transmute(ppackedcredentials.unwrap_or(::std::ptr::null_mut())), pcbpackedcredentials).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pszusername: P0, pszpassword: P1, ppackedcredentials: ::core::option::Option<*mut u8>, pcbpackedcredentials: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CredPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pszusername: P0, pszpassword: P1, ppackedcredentials: ::core::option::Option<*mut u8>, pcbpackedcredentials: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("credui.dll" "system" fn CredPackAuthenticationBufferW(dwflags : CRED_PACK_FLAGS, pszusername : ::windows_core::PCWSTR, pszpassword : ::windows_core::PCWSTR, ppackedcredentials : *mut u8, pcbpackedcredentials : *mut u32) -> super::super::Foundation:: BOOL); - CredPackAuthenticationBufferW(dwflags, pszusername.into_param().abi(), pszpassword.into_param().abi(), ::core::mem::transmute(ppackedcredentials.unwrap_or(::std::ptr::null_mut())), pcbpackedcredentials) + CredPackAuthenticationBufferW(dwflags, pszusername.into_param().abi(), pszpassword.into_param().abi(), ::core::mem::transmute(ppackedcredentials.unwrap_or(::std::ptr::null_mut())), pcbpackedcredentials).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredProtectA(fasself: P0, pszcredentials: &[u8], pszprotectedcredentials: ::windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: ::core::option::Option<*mut CRED_PROTECTION_TYPE>) -> super::super::Foundation::BOOL +pub unsafe fn CredProtectA(fasself: P0, pszcredentials: &[u8], pszprotectedcredentials: ::windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: ::core::option::Option<*mut CRED_PROTECTION_TYPE>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredProtectA(fasself : super::super::Foundation:: BOOL, pszcredentials : ::windows_core::PCSTR, cchcredentials : u32, pszprotectedcredentials : ::windows_core::PSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectA(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))) + CredProtectA(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredProtectW(fasself: P0, pszcredentials: &[u16], pszprotectedcredentials: ::windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: ::core::option::Option<*mut CRED_PROTECTION_TYPE>) -> super::super::Foundation::BOOL +pub unsafe fn CredProtectW(fasself: P0, pszcredentials: &[u16], pszprotectedcredentials: ::windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: ::core::option::Option<*mut CRED_PROTECTION_TYPE>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredProtectW(fasself : super::super::Foundation:: BOOL, pszcredentials : ::windows_core::PCWSTR, cchcredentials : u32, pszprotectedcredentials : ::windows_core::PWSTR, pcchmaxchars : *mut u32, protectiontype : *mut CRED_PROTECTION_TYPE) -> super::super::Foundation:: BOOL); - CredProtectW(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))) + CredProtectW(fasself.into_param().abi(), ::core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len() as _, ::core::mem::transmute(pszprotectedcredentials), pcchmaxchars, ::core::mem::transmute(protectiontype.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredReadA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> super::super::Foundation::BOOL +pub unsafe fn CredReadA(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredReadA(targetname : ::windows_core::PCSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredReadA(targetname.into_param().abi(), r#type, flags, credential) + CredReadA(targetname.into_param().abi(), r#type, flags, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredReadDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> super::super::Foundation::BOOL { +pub unsafe fn CredReadDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALA) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredReadDomainCredentialsA(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONA, flags : u32, count : *mut u32, credential : *mut *mut *mut CREDENTIALA) -> super::super::Foundation:: BOOL); - CredReadDomainCredentialsA(targetinfo, flags, count, credential) + CredReadDomainCredentialsA(targetinfo, flags, count, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredReadDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONW, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> super::super::Foundation::BOOL { +pub unsafe fn CredReadDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONW, flags: u32, count: *mut u32, credential: *mut *mut *mut CREDENTIALW) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredReadDomainCredentialsW(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONW, flags : u32, count : *mut u32, credential : *mut *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredReadDomainCredentialsW(targetinfo, flags, count, credential) + CredReadDomainCredentialsW(targetinfo, flags, count, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredReadW(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALW) -> super::super::Foundation::BOOL +pub unsafe fn CredReadW(targetname: P0, r#type: u32, flags: u32, credential: *mut *mut CREDENTIALW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredReadW(targetname : ::windows_core::PCWSTR, r#type : u32, flags : u32, credential : *mut *mut CREDENTIALW) -> super::super::Foundation:: BOOL); - CredReadW(targetname.into_param().abi(), r#type, flags, credential) + CredReadW(targetname.into_param().abi(), r#type, flags, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredRenameA(oldtargetname: P0, newtargetname: P1, r#type: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CredRenameA(oldtargetname: P0, newtargetname: P1, r#type: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredRenameA(oldtargetname : ::windows_core::PCSTR, newtargetname : ::windows_core::PCSTR, r#type : u32, flags : u32) -> super::super::Foundation:: BOOL); - CredRenameA(oldtargetname.into_param().abi(), newtargetname.into_param().abi(), r#type, flags) + CredRenameA(oldtargetname.into_param().abi(), newtargetname.into_param().abi(), r#type, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredRenameW(oldtargetname: P0, newtargetname: P1, r#type: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CredRenameW(oldtargetname: P0, newtargetname: P1, r#type: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredRenameW(oldtargetname : ::windows_core::PCWSTR, newtargetname : ::windows_core::PCWSTR, r#type : u32, flags : u32) -> super::super::Foundation:: BOOL); - CredRenameW(oldtargetname.into_param().abi(), newtargetname.into_param().abi(), r#type, flags) + CredRenameW(oldtargetname.into_param().abi(), newtargetname.into_param().abi(), r#type, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -362,84 +362,84 @@ where #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const ::core::ffi::c_void, cbauthbuffer: u32, pszusername: ::windows_core::PSTR, pcchlmaxusername: *mut u32, pszdomainname: ::windows_core::PSTR, pcchmaxdomainname: ::core::option::Option<*mut u32>, pszpassword: ::windows_core::PSTR, pcchmaxpassword: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredUnPackAuthenticationBufferA(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const ::core::ffi::c_void, cbauthbuffer: u32, pszusername: ::windows_core::PSTR, pcchlmaxusername: *mut u32, pszdomainname: ::windows_core::PSTR, pcchmaxdomainname: ::core::option::Option<*mut u32>, pszpassword: ::windows_core::PSTR, pcchmaxpassword: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("credui.dll" "system" fn CredUnPackAuthenticationBufferA(dwflags : CRED_PACK_FLAGS, pauthbuffer : *const ::core::ffi::c_void, cbauthbuffer : u32, pszusername : ::windows_core::PSTR, pcchlmaxusername : *mut u32, pszdomainname : ::windows_core::PSTR, pcchmaxdomainname : *mut u32, pszpassword : ::windows_core::PSTR, pcchmaxpassword : *mut u32) -> super::super::Foundation:: BOOL); - CredUnPackAuthenticationBufferA(dwflags, pauthbuffer, cbauthbuffer, ::core::mem::transmute(pszusername), pcchlmaxusername, ::core::mem::transmute(pszdomainname), ::core::mem::transmute(pcchmaxdomainname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszpassword), pcchmaxpassword) + CredUnPackAuthenticationBufferA(dwflags, pauthbuffer, cbauthbuffer, ::core::mem::transmute(pszusername), pcchlmaxusername, ::core::mem::transmute(pszdomainname), ::core::mem::transmute(pcchmaxdomainname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszpassword), pcchmaxpassword).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const ::core::ffi::c_void, cbauthbuffer: u32, pszusername: ::windows_core::PWSTR, pcchmaxusername: *mut u32, pszdomainname: ::windows_core::PWSTR, pcchmaxdomainname: ::core::option::Option<*mut u32>, pszpassword: ::windows_core::PWSTR, pcchmaxpassword: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredUnPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pauthbuffer: *const ::core::ffi::c_void, cbauthbuffer: u32, pszusername: ::windows_core::PWSTR, pcchmaxusername: *mut u32, pszdomainname: ::windows_core::PWSTR, pcchmaxdomainname: ::core::option::Option<*mut u32>, pszpassword: ::windows_core::PWSTR, pcchmaxpassword: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("credui.dll" "system" fn CredUnPackAuthenticationBufferW(dwflags : CRED_PACK_FLAGS, pauthbuffer : *const ::core::ffi::c_void, cbauthbuffer : u32, pszusername : ::windows_core::PWSTR, pcchmaxusername : *mut u32, pszdomainname : ::windows_core::PWSTR, pcchmaxdomainname : *mut u32, pszpassword : ::windows_core::PWSTR, pcchmaxpassword : *mut u32) -> super::super::Foundation:: BOOL); - CredUnPackAuthenticationBufferW(dwflags, pauthbuffer, cbauthbuffer, ::core::mem::transmute(pszusername), pcchmaxusername, ::core::mem::transmute(pszdomainname), ::core::mem::transmute(pcchmaxdomainname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszpassword), pcchmaxpassword) + CredUnPackAuthenticationBufferW(dwflags, pauthbuffer, cbauthbuffer, ::core::mem::transmute(pszusername), pcchmaxusername, ::core::mem::transmute(pszdomainname), ::core::mem::transmute(pcchmaxdomainname.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pszpassword), pcchmaxpassword).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnmarshalCredentialA(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn CredUnmarshalCredentialA(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnmarshalCredentialA(marshaledcredential : ::windows_core::PCSTR, credtype : *mut CRED_MARSHAL_TYPE, credential : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CredUnmarshalCredentialA(marshaledcredential.into_param().abi(), credtype, credential) + CredUnmarshalCredentialA(marshaledcredential.into_param().abi(), credtype, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnmarshalCredentialW(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn CredUnmarshalCredentialW(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnmarshalCredentialW(marshaledcredential : ::windows_core::PCWSTR, credtype : *mut CRED_MARSHAL_TYPE, credential : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CredUnmarshalCredentialW(marshaledcredential.into_param().abi(), credtype, credential) + CredUnmarshalCredentialW(marshaledcredential.into_param().abi(), credtype, credential).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnprotectA(fasself: P0, pszprotectedcredentials: &[u8], pszcredentials: ::windows_core::PSTR, pcchmaxchars: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CredUnprotectA(fasself: P0, pszprotectedcredentials: &[u8], pszcredentials: ::windows_core::PSTR, pcchmaxchars: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnprotectA(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : ::windows_core::PCSTR, cchprotectedcredentials : u32, pszcredentials : ::windows_core::PSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectA(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars) + CredUnprotectA(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredUnprotectW(fasself: P0, pszprotectedcredentials: &[u16], pszcredentials: ::windows_core::PWSTR, pcchmaxchars: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CredUnprotectW(fasself: P0, pszprotectedcredentials: &[u16], pszcredentials: ::windows_core::PWSTR, pcchmaxchars: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CredUnprotectW(fasself : super::super::Foundation:: BOOL, pszprotectedcredentials : ::windows_core::PCWSTR, cchprotectedcredentials : u32, pszcredentials : ::windows_core::PWSTR, pcchmaxchars : *mut u32) -> super::super::Foundation:: BOOL); - CredUnprotectW(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars) + CredUnprotectW(fasself.into_param().abi(), ::core::mem::transmute(pszprotectedcredentials.as_ptr()), pszprotectedcredentials.len() as _, ::core::mem::transmute(pszcredentials), pcchmaxchars).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredWriteA(credential: *const CREDENTIALA, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredWriteA(credential: *const CREDENTIALA, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredWriteA(credential : *const CREDENTIALA, flags : u32) -> super::super::Foundation:: BOOL); - CredWriteA(credential, flags) + CredWriteA(credential, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredWriteDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, credential: *const CREDENTIALA, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredWriteDomainCredentialsA(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONA, credential: *const CREDENTIALA, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredWriteDomainCredentialsA(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONA, credential : *const CREDENTIALA, flags : u32) -> super::super::Foundation:: BOOL); - CredWriteDomainCredentialsA(targetinfo, credential, flags) + CredWriteDomainCredentialsA(targetinfo, credential, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredWriteDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONW, credential: *const CREDENTIALW, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredWriteDomainCredentialsW(targetinfo: *const CREDENTIAL_TARGET_INFORMATIONW, credential: *const CREDENTIALW, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredWriteDomainCredentialsW(targetinfo : *const CREDENTIAL_TARGET_INFORMATIONW, credential : *const CREDENTIALW, flags : u32) -> super::super::Foundation:: BOOL); - CredWriteDomainCredentialsW(targetinfo, credential, flags) + CredWriteDomainCredentialsW(targetinfo, credential, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CredWriteW(credential: *const CREDENTIALW, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CredWriteW(credential: *const CREDENTIALW, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CredWriteW(credential : *const CREDENTIALW, flags : u32) -> super::super::Foundation:: BOOL); - CredWriteW(credential, flags) + CredWriteW(credential, flags).ok() } #[doc = "*Required features: `\"Win32_Security_Credentials\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs index e09cffc9a2..61cf5b0d65 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Catalog/mod.rs @@ -1,19 +1,19 @@ #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: ::core::option::Option<*const ::windows_core::GUID>, dwflags: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: ::core::option::Option<*const ::windows_core::GUID>, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminAcquireContext(phcatadmin : *mut isize, pgsubsystem : *const ::windows_core::GUID, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminAcquireContext(phcatadmin, ::core::mem::transmute(pgsubsystem.unwrap_or(::std::ptr::null())), dwflags) + CryptCATAdminAcquireContext(phcatadmin, ::core::mem::transmute(pgsubsystem.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATAdminAcquireContext2(phcatadmin: *mut isize, pgsubsystem: ::core::option::Option<*const ::windows_core::GUID>, pwszhashalgorithm: P0, pstronghashpolicy: ::core::option::Option<*const super::CERT_STRONG_SIGN_PARA>, dwflags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptCATAdminAcquireContext2(phcatadmin: *mut isize, pgsubsystem: ::core::option::Option<*const ::windows_core::GUID>, pwszhashalgorithm: P0, pstronghashpolicy: ::core::option::Option<*const super::CERT_STRONG_SIGN_PARA>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminAcquireContext2(phcatadmin : *mut isize, pgsubsystem : *const ::windows_core::GUID, pwszhashalgorithm : ::windows_core::PCWSTR, pstronghashpolicy : *const super:: CERT_STRONG_SIGN_PARA, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminAcquireContext2(phcatadmin, ::core::mem::transmute(pgsubsystem.unwrap_or(::std::ptr::null())), pwszhashalgorithm.into_param().abi(), ::core::mem::transmute(pstronghashpolicy.unwrap_or(::std::ptr::null())), dwflags) + CryptCATAdminAcquireContext2(phcatadmin, ::core::mem::transmute(pgsubsystem.unwrap_or(::std::ptr::null())), pwszhashalgorithm.into_param().abi(), ::core::mem::transmute(pstronghashpolicy.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`*"] #[inline] @@ -38,12 +38,12 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin: isize, hfile: P0, pcbhash: *mut u32, pbhash: ::core::option::Option<*mut u8>, dwflags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin: isize, hfile: P0, pcbhash: *mut u32, pbhash: ::core::option::Option<*mut u8>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin : isize, hfile : super::super::super::Foundation:: HANDLE, pcbhash : *mut u32, pbhash : *mut u8, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminCalcHashFromFileHandle2(hcatadmin, hfile.into_param().abi(), pcbhash, ::core::mem::transmute(pbhash.unwrap_or(::std::ptr::null_mut())), dwflags) + CryptCATAdminCalcHashFromFileHandle2(hcatadmin, hfile.into_param().abi(), pcbhash, ::core::mem::transmute(pbhash.unwrap_or(::std::ptr::null_mut())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`*"] #[inline] @@ -78,22 +78,22 @@ pub unsafe fn CryptCATAdminReleaseContext(hcatadmin: isize, dwflags: u32) -> sup #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATAdminRemoveCatalog(hcatadmin: isize, pwszcatalogfile: P0, dwflags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptCATAdminRemoveCatalog(hcatadmin: isize, pwszcatalogfile: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminRemoveCatalog(hcatadmin : isize, pwszcatalogfile : ::windows_core::PCWSTR, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminRemoveCatalog(hcatadmin, pwszcatalogfile.into_param().abi(), dwflags) + CryptCATAdminRemoveCatalog(hcatadmin, pwszcatalogfile.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATAdminResolveCatalogPath(hcatadmin: isize, pwszcatalogfile: P0, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptCATAdminResolveCatalogPath(hcatadmin: isize, pwszcatalogfile: P0, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminResolveCatalogPath(hcatadmin : isize, pwszcatalogfile : ::windows_core::PCWSTR, pscatinfo : *mut CATALOG_INFO, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminResolveCatalogPath(hcatadmin, pwszcatalogfile.into_param().abi(), pscatinfo, dwflags) + CryptCATAdminResolveCatalogPath(hcatadmin, pwszcatalogfile.into_param().abi(), pscatinfo, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Sip\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Sip"))] @@ -147,9 +147,9 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATCatalogInfoFromContext(hcatinfo: isize, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptCATCatalogInfoFromContext(hcatinfo: isize, pscatinfo: *mut CATALOG_INFO, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATCatalogInfoFromContext(hcatinfo : isize, pscatinfo : *mut CATALOG_INFO, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATCatalogInfoFromContext(hcatinfo, pscatinfo, dwflags) + CryptCATCatalogInfoFromContext(hcatinfo, pscatinfo, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -254,12 +254,12 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCATPersistStore(hcatalog: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptCATPersistStore(hcatalog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wintrust.dll" "system" fn CryptCATPersistStore(hcatalog : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - CryptCATPersistStore(hcatalog.into_param().abi()) + CryptCATPersistStore(hcatalog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Sip\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Sip"))] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs index ca08a44a28..a80bfb4295 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Sip/mod.rs @@ -1,16 +1,16 @@ #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSIPAddProvider(psnewprov: *mut SIP_ADD_NEWPROVIDER) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPAddProvider(psnewprov: *mut SIP_ADD_NEWPROVIDER) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSIPAddProvider(psnewprov : *mut SIP_ADD_NEWPROVIDER) -> super::super::super::Foundation:: BOOL); - CryptSIPAddProvider(psnewprov) + CryptSIPAddProvider(psnewprov).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPCreateIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pcbindirectdata: *mut u32, pindirectdata: *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPCreateIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pcbindirectdata: *mut u32, pindirectdata: *mut SIP_INDIRECT_DATA) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPCreateIndirectData(psubjectinfo : *mut SIP_SUBJECTINFO, pcbindirectdata : *mut u32, pindirectdata : *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation:: BOOL); - CryptSIPCreateIndirectData(psubjectinfo, pcbindirectdata, pindirectdata) + CryptSIPCreateIndirectData(psubjectinfo, pcbindirectdata, pindirectdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] @@ -29,66 +29,66 @@ pub unsafe fn CryptSIPGetSealedDigest(psubjectinfo: *const SIP_SUBJECTINFO, psig #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPGetSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, pdwencodingtype: *mut super::CERT_QUERY_ENCODING_TYPE, dwindex: u32, pcbsigneddatamsg: *mut u32, pbsigneddatamsg: *mut u8) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPGetSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, pdwencodingtype: *mut super::CERT_QUERY_ENCODING_TYPE, dwindex: u32, pcbsigneddatamsg: *mut u32, pbsigneddatamsg: *mut u8) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPGetSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, pdwencodingtype : *mut super:: CERT_QUERY_ENCODING_TYPE, dwindex : u32, pcbsigneddatamsg : *mut u32, pbsigneddatamsg : *mut u8) -> super::super::super::Foundation:: BOOL); - CryptSIPGetSignedDataMsg(psubjectinfo, pdwencodingtype, dwindex, pcbsigneddatamsg, pbsigneddatamsg) + CryptSIPGetSignedDataMsg(psubjectinfo, pdwencodingtype, dwindex, pcbsigneddatamsg, pbsigneddatamsg).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPLoad(pgsubject: *const ::windows_core::GUID, dwflags: u32, psipdispatch: *mut SIP_DISPATCH_INFO) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPLoad(pgsubject: *const ::windows_core::GUID, dwflags: u32, psipdispatch: *mut SIP_DISPATCH_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSIPLoad(pgsubject : *const ::windows_core::GUID, dwflags : u32, psipdispatch : *mut SIP_DISPATCH_INFO) -> super::super::super::Foundation:: BOOL); - CryptSIPLoad(pgsubject, dwflags, psipdispatch) + CryptSIPLoad(pgsubject, dwflags, psipdispatch).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPPutSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwencodingtype: super::CERT_QUERY_ENCODING_TYPE, pdwindex: *mut u32, cbsigneddatamsg: u32, pbsigneddatamsg: *mut u8) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPPutSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwencodingtype: super::CERT_QUERY_ENCODING_TYPE, pdwindex: *mut u32, cbsigneddatamsg: u32, pbsigneddatamsg: *mut u8) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPPutSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, dwencodingtype : super:: CERT_QUERY_ENCODING_TYPE, pdwindex : *mut u32, cbsigneddatamsg : u32, pbsigneddatamsg : *mut u8) -> super::super::super::Foundation:: BOOL); - CryptSIPPutSignedDataMsg(psubjectinfo, dwencodingtype, pdwindex, cbsigneddatamsg, pbsigneddatamsg) + CryptSIPPutSignedDataMsg(psubjectinfo, dwencodingtype, pdwindex, cbsigneddatamsg, pbsigneddatamsg).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSIPRemoveProvider(pgprov: *mut ::windows_core::GUID) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPRemoveProvider(pgprov: *mut ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSIPRemoveProvider(pgprov : *mut ::windows_core::GUID) -> super::super::super::Foundation:: BOOL); - CryptSIPRemoveProvider(pgprov) + CryptSIPRemoveProvider(pgprov).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPRemoveSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwindex: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPRemoveSignedDataMsg(psubjectinfo: *mut SIP_SUBJECTINFO, dwindex: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPRemoveSignedDataMsg(psubjectinfo : *mut SIP_SUBJECTINFO, dwindex : u32) -> super::super::super::Foundation:: BOOL); - CryptSIPRemoveSignedDataMsg(psubjectinfo, dwindex) + CryptSIPRemoveSignedDataMsg(psubjectinfo, dwindex).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSIPRetrieveSubjectGuid(filename: P0, hfilein: P1, pgsubject: *mut ::windows_core::GUID) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptSIPRetrieveSubjectGuid(filename: P0, hfilein: P1, pgsubject: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSIPRetrieveSubjectGuid(filename : ::windows_core::PCWSTR, hfilein : super::super::super::Foundation:: HANDLE, pgsubject : *mut ::windows_core::GUID) -> super::super::super::Foundation:: BOOL); - CryptSIPRetrieveSubjectGuid(filename.into_param().abi(), hfilein.into_param().abi(), pgsubject) + CryptSIPRetrieveSubjectGuid(filename.into_param().abi(), hfilein.into_param().abi(), pgsubject).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename: P0, hfilein: P1, pgsubject: *mut ::windows_core::GUID) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename: P0, hfilein: P1, pgsubject: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSIPRetrieveSubjectGuidForCatalogFile(filename : ::windows_core::PCWSTR, hfilein : super::super::super::Foundation:: HANDLE, pgsubject : *mut ::windows_core::GUID) -> super::super::super::Foundation:: BOOL); - CryptSIPRetrieveSubjectGuidForCatalogFile(filename.into_param().abi(), hfilein.into_param().abi(), pgsubject) + CryptSIPRetrieveSubjectGuidForCatalogFile(filename.into_param().abi(), hfilein.into_param().abi(), pgsubject).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Foundation\"`, `\"Win32_Security_Cryptography_Catalog\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_Cryptography_Catalog"))] #[inline] -pub unsafe fn CryptSIPVerifyIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pindirectdata: *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptSIPVerifyIndirectData(psubjectinfo: *mut SIP_SUBJECTINFO, pindirectdata: *mut SIP_INDIRECT_DATA) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn CryptSIPVerifyIndirectData(psubjectinfo : *mut SIP_SUBJECTINFO, pindirectdata : *mut SIP_INDIRECT_DATA) -> super::super::super::Foundation:: BOOL); - CryptSIPVerifyIndirectData(psubjectinfo, pindirectdata) + CryptSIPVerifyIndirectData(psubjectinfo, pindirectdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_Sip\"`*"] pub const MSSIP_ADDINFO_BLOB: u32 = 3u32; diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/UI/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/UI/mod.rs index 0e17123595..e8888e4ced 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/UI/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/UI/mod.rs @@ -28,16 +28,16 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Security_WinTrust\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip", feature = "Win32_Security_WinTrust", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn CryptUIDlgViewCertificateA(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTA, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptUIDlgViewCertificateA(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTA, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgViewCertificateA(pcertviewinfo : *const CRYPTUI_VIEWCERTIFICATE_STRUCTA, pfpropertieschanged : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - CryptUIDlgViewCertificateA(pcertviewinfo, pfpropertieschanged) + CryptUIDlgViewCertificateA(pcertviewinfo, pfpropertieschanged).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_Security_Cryptography_Catalog\"`, `\"Win32_Security_Cryptography_Sip\"`, `\"Win32_Security_WinTrust\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip", feature = "Win32_Security_WinTrust", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn CryptUIDlgViewCertificateW(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTW, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> super::super::super::Foundation::BOOL { +pub unsafe fn CryptUIDlgViewCertificateW(pcertviewinfo: *const CRYPTUI_VIEWCERTIFICATE_STRUCTW, pfpropertieschanged: *mut super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("cryptui.dll" "system" fn CryptUIDlgViewCertificateW(pcertviewinfo : *const CRYPTUI_VIEWCERTIFICATE_STRUCTW, pfpropertieschanged : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - CryptUIDlgViewCertificateW(pcertviewinfo, pfpropertieschanged) + CryptUIDlgViewCertificateW(pcertviewinfo, pfpropertieschanged).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -64,13 +64,13 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUIWizExport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P0, pwszwizardtitle: P1, pexportinfo: *const CRYPTUI_WIZ_EXPORT_INFO, pvoid: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptUIWizExport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P0, pwszwizardtitle: P1, pexportinfo: *const CRYPTUI_WIZ_EXPORT_INFO, pvoid: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("cryptui.dll" "system" fn CryptUIWizExport(dwflags : CRYPTUI_WIZ_FLAGS, hwndparent : super::super::super::Foundation:: HWND, pwszwizardtitle : ::windows_core::PCWSTR, pexportinfo : *const CRYPTUI_WIZ_EXPORT_INFO, pvoid : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - CryptUIWizExport(dwflags, hwndparent.into_param().abi(), pwszwizardtitle.into_param().abi(), pexportinfo, ::core::mem::transmute(pvoid.unwrap_or(::std::ptr::null()))) + CryptUIWizExport(dwflags, hwndparent.into_param().abi(), pwszwizardtitle.into_param().abi(), pexportinfo, ::core::mem::transmute(pvoid.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -82,14 +82,14 @@ pub unsafe fn CryptUIWizFreeDigitalSignContext(psigncontext: *const CRYPTUI_WIZ_ #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUIWizImport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P0, pwszwizardtitle: P1, pimportsrc: ::core::option::Option<*const CRYPTUI_WIZ_IMPORT_SRC_INFO>, hdestcertstore: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn CryptUIWizImport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P0, pwszwizardtitle: P1, pimportsrc: ::core::option::Option<*const CRYPTUI_WIZ_IMPORT_SRC_INFO>, hdestcertstore: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("cryptui.dll" "system" fn CryptUIWizImport(dwflags : CRYPTUI_WIZ_FLAGS, hwndparent : super::super::super::Foundation:: HWND, pwszwizardtitle : ::windows_core::PCWSTR, pimportsrc : *const CRYPTUI_WIZ_IMPORT_SRC_INFO, hdestcertstore : super:: HCERTSTORE) -> super::super::super::Foundation:: BOOL); - CryptUIWizImport(dwflags, hwndparent.into_param().abi(), pwszwizardtitle.into_param().abi(), ::core::mem::transmute(pimportsrc.unwrap_or(::std::ptr::null())), hdestcertstore.into_param().abi()) + CryptUIWizImport(dwflags, hwndparent.into_param().abi(), pwszwizardtitle.into_param().abi(), ::core::mem::transmute(pimportsrc.unwrap_or(::std::ptr::null())), hdestcertstore.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography_UI\"`*"] pub const ACTION_REVOCATION_DEFAULT_CACHE: u32 = 131072u32; diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs index 2240521892..6e47a8b938 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -567,122 +567,122 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCRLContextToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCRLContextToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCRLContextToStore(hcertstore : HCERTSTORE, pcrlcontext : *const CRL_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCRLContextToStore(hcertstore.into_param().abi(), pcrlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCRLContextToStore(hcertstore.into_param().abi(), pcrlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCRLLinkToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCRLLinkToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCRLLinkToStore(hcertstore : HCERTSTORE, pcrlcontext : *const CRL_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCRLLinkToStore(hcertstore.into_param().abi(), pcrlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCRLLinkToStore(hcertstore.into_param().abi(), pcrlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCTLContextToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCTLContextToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCTLContextToStore(hcertstore : HCERTSTORE, pctlcontext : *const CTL_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCTLContextToStore(hcertstore.into_param().abi(), pctlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCTLContextToStore(hcertstore.into_param().abi(), pctlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCTLLinkToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCTLLinkToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCTLLinkToStore(hcertstore : HCERTSTORE, pctlcontext : *const CTL_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCTLLinkToStore(hcertstore.into_param().abi(), pctlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCTLLinkToStore(hcertstore.into_param().abi(), pctlcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCertificateContextToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCertificateContextToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCertificateContextToStore(hcertstore : HCERTSTORE, pcertcontext : *const CERT_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCertificateContextToStore(hcertstore.into_param().abi(), pcertcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCertificateContextToStore(hcertstore.into_param().abi(), pcertcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddCertificateLinkToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddCertificateLinkToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddCertificateLinkToStore(hcertstore : HCERTSTORE, pcertcontext : *const CERT_CONTEXT, dwadddisposition : u32, ppstorecontext : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddCertificateLinkToStore(hcertstore.into_param().abi(), pcertcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))) + CertAddCertificateLinkToStore(hcertstore.into_param().abi(), pcertcontext, dwadddisposition, ::core::mem::transmute(ppstorecontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEncodedCRLToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8], dwadddisposition: u32, ppcrlcontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEncodedCRLToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8], dwadddisposition: u32, ppcrlcontext: ::core::option::Option<*mut *mut CRL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCRLToStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcrlencoded : *const u8, cbcrlencoded : u32, dwadddisposition : u32, ppcrlcontext : *mut *mut CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCRLToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcrlcontext.unwrap_or(::std::ptr::null_mut()))) + CertAddEncodedCRLToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcrlcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEncodedCTLToStore(hcertstore: P0, dwmsgandcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbctlencoded: &[u8], dwadddisposition: u32, ppctlcontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEncodedCTLToStore(hcertstore: P0, dwmsgandcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbctlencoded: &[u8], dwadddisposition: u32, ppctlcontext: ::core::option::Option<*mut *mut CTL_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCTLToStore(hcertstore : HCERTSTORE, dwmsgandcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbctlencoded : *const u8, cbctlencoded : u32, dwadddisposition : u32, ppctlcontext : *mut *mut CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCTLToStore(hcertstore.into_param().abi(), dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppctlcontext.unwrap_or(::std::ptr::null_mut()))) + CertAddEncodedCTLToStore(hcertstore.into_param().abi(), dwmsgandcertencodingtype, ::core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppctlcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEncodedCertificateToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8], dwadddisposition: u32, ppcertcontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEncodedCertificateToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8], dwadddisposition: u32, ppcertcontext: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbcertencoded : *const u8, cbcertencoded : u32, dwadddisposition : u32, ppcertcontext : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcertcontext.unwrap_or(::std::ptr::null_mut()))) + CertAddEncodedCertificateToStore(hcertstore.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _, dwadddisposition, ::core::mem::transmute(ppcertcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: P0, pbcertencoded: &[u8]) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: P0, pbcertencoded: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToSystemStoreA(szcertstorename : ::windows_core::PCSTR, pbcertencoded : *const u8, cbcertencoded : u32) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToSystemStoreA(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _) + CertAddEncodedCertificateToSystemStoreA(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEncodedCertificateToSystemStoreW(szcertstorename: P0, pbcertencoded: &[u8]) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEncodedCertificateToSystemStoreW(szcertstorename: P0, pbcertencoded: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEncodedCertificateToSystemStoreW(szcertstorename : ::windows_core::PCWSTR, pbcertencoded : *const u8, cbcertencoded : u32) -> super::super::Foundation:: BOOL); - CertAddEncodedCertificateToSystemStoreW(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _) + CertAddEncodedCertificateToSystemStoreW(szcertstorename.into_param().abi(), ::core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len() as _).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P0) -> super::super::Foundation::BOOL +pub unsafe fn CertAddEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddEnhancedKeyUsageIdentifier(pcertcontext : *const CERT_CONTEXT, pszusageidentifier : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CertAddEnhancedKeyUsageIdentifier(pcertcontext, pszusageidentifier.into_param().abi()) + CertAddEnhancedKeyUsageIdentifier(pcertcontext, pszusageidentifier.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -699,12 +699,12 @@ pub unsafe fn CertAddRefServerOcspResponseContext(pserverocspresponsecontext: :: #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertAddSerializedElementToStore(hcertstore: P0, pbelement: &[u8], dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: ::core::option::Option<*mut u32>, ppvcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CertAddSerializedElementToStore(hcertstore: P0, pbelement: &[u8], dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: ::core::option::Option<*mut u32>, ppvcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertAddSerializedElementToStore(hcertstore : HCERTSTORE, pbelement : *const u8, cbelement : u32, dwadddisposition : u32, dwflags : u32, dwcontexttypeflags : u32, pdwcontexttype : *mut u32, ppvcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertAddSerializedElementToStore(hcertstore.into_param().abi(), ::core::mem::transmute(pbelement.as_ptr()), pbelement.len() as _, dwadddisposition, dwflags, dwcontexttypeflags, ::core::mem::transmute(pdwcontexttype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppvcontext.unwrap_or(::std::ptr::null_mut()))) + CertAddSerializedElementToStore(hcertstore.into_param().abi(), ::core::mem::transmute(pbelement.as_ptr()), pbelement.len() as _, dwadddisposition, dwflags, dwcontexttypeflags, ::core::mem::transmute(pdwcontexttype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppvcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -732,12 +732,12 @@ pub unsafe fn CertCloseServerOcspResponse(hserverocspresponse: ::core::option::O #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertCloseStore(hcertstore: P0, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CertCloseStore(hcertstore: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertCloseStore(hcertstore : HCERTSTORE, dwflags : u32) -> super::super::Foundation:: BOOL); - CertCloseStore(hcertstore.into_param().abi(), dwflags) + CertCloseStore(hcertstore.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -756,9 +756,9 @@ pub unsafe fn CertCompareCertificateName(dwcertencodingtype: CERT_QUERY_ENCODING #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertCompareIntegerBlob(pint1: *const CRYPT_INTEGER_BLOB, pint2: *const CRYPT_INTEGER_BLOB) -> super::super::Foundation::BOOL { +pub unsafe fn CertCompareIntegerBlob(pint1: *const CRYPT_INTEGER_BLOB, pint2: *const CRYPT_INTEGER_BLOB) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertCompareIntegerBlob(pint1 : *const CRYPT_INTEGER_BLOB, pint2 : *const CRYPT_INTEGER_BLOB) -> super::super::Foundation:: BOOL); - CertCompareIntegerBlob(pint1, pint2) + CertCompareIntegerBlob(pint1, pint2).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -770,12 +770,12 @@ pub unsafe fn CertComparePublicKeyInfo(dwcertencodingtype: CERT_QUERY_ENCODING_T #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertControlStore(hcertstore: P0, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CertControlStore(hcertstore: P0, dwflags: CERT_CONTROL_STORE_FLAGS, dwctrltype: u32, pvctrlpara: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertControlStore(hcertstore : HCERTSTORE, dwflags : CERT_CONTROL_STORE_FLAGS, dwctrltype : u32, pvctrlpara : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertControlStore(hcertstore.into_param().abi(), dwflags, dwctrltype, ::core::mem::transmute(pvctrlpara.unwrap_or(::std::ptr::null()))) + CertControlStore(hcertstore.into_param().abi(), dwflags, dwctrltype, ::core::mem::transmute(pvctrlpara.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -794,16 +794,16 @@ pub unsafe fn CertCreateCTLContext(dwmsgandcertencodingtype: u32, pbctlencoded: #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, rgoptattr: ::core::option::Option<&[CRYPT_ATTRIBUTE]>, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pctlentry: ::core::option::Option<*mut CTL_ENTRY>, pcbctlentry: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, rgoptattr: ::core::option::Option<&[CRYPT_ATTRIBUTE]>, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pctlentry: ::core::option::Option<*mut CTL_ENTRY>, pcbctlentry: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext : *const CERT_CONTEXT, coptattr : u32, rgoptattr : *const CRYPT_ATTRIBUTE, dwflags : u32, pvreserved : *const ::core::ffi::c_void, pctlentry : *mut CTL_ENTRY, pcbctlentry : *mut u32) -> super::super::Foundation:: BOOL); - CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgoptattr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pctlentry.unwrap_or(::std::ptr::null_mut())), pcbctlentry) + CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgoptattr.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pctlentry.unwrap_or(::std::ptr::null_mut())), pcbctlentry).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> super::super::Foundation::BOOL { +pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertCreateCertificateChainEngine(pconfig : *const CERT_CHAIN_ENGINE_CONFIG, phchainengine : *mut HCERTCHAINENGINE) -> super::super::Foundation:: BOOL); - CertCreateCertificateChainEngine(pconfig, phchainengine) + CertCreateCertificateChainEngine(pconfig, phchainengine).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -832,23 +832,23 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> super::super::Foundation::BOOL { +pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertDeleteCRLFromStore(pcrlcontext : *const CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertDeleteCRLFromStore(pcrlcontext) + CertDeleteCRLFromStore(pcrlcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertDeleteCTLFromStore(pctlcontext: *const CTL_CONTEXT) -> super::super::Foundation::BOOL { +pub unsafe fn CertDeleteCTLFromStore(pctlcontext: *const CTL_CONTEXT) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertDeleteCTLFromStore(pctlcontext : *const CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertDeleteCTLFromStore(pctlcontext) + CertDeleteCTLFromStore(pctlcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertDeleteCertificateFromStore(pcertcontext: *const CERT_CONTEXT) -> super::super::Foundation::BOOL { +pub unsafe fn CertDeleteCertificateFromStore(pcertcontext: *const CERT_CONTEXT) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertDeleteCertificateFromStore(pcertcontext : *const CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertDeleteCertificateFromStore(pcertcontext) + CertDeleteCertificateFromStore(pcertcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -941,9 +941,9 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertEnumPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenum: PFN_CERT_ENUM_PHYSICAL_STORE) -> super::super::Foundation::BOOL { +pub unsafe fn CertEnumPhysicalStore(pvsystemstore: *const ::core::ffi::c_void, dwflags: u32, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenum: PFN_CERT_ENUM_PHYSICAL_STORE) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertEnumPhysicalStore(pvsystemstore : *const ::core::ffi::c_void, dwflags : u32, pvarg : *mut ::core::ffi::c_void, pfnenum : PFN_CERT_ENUM_PHYSICAL_STORE) -> super::super::Foundation:: BOOL); - CertEnumPhysicalStore(pvsystemstore, dwflags, ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenum) + CertEnumPhysicalStore(pvsystemstore, dwflags, ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenum).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1108,9 +1108,9 @@ pub unsafe fn CertFreeServerOcspResponseContext(pserverocspresponsecontext: ::co #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetCRLContextProperty(pcrlcontext : *const CRL_CONTEXT, dwpropid : u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CertGetCRLContextProperty(pcrlcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CertGetCRLContextProperty(pcrlcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1125,41 +1125,41 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetCTLContextProperty(pctlcontext : *const CTL_CONTEXT, dwpropid : u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CertGetCTLContextProperty(pctlcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CertGetCTLContextProperty(pctlcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetCertificateChain(hchainengine: P0, pcertcontext: *const CERT_CONTEXT, ptime: ::core::option::Option<*const super::super::Foundation::FILETIME>, hadditionalstore: P1, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn CertGetCertificateChain(hchainengine: P0, pcertcontext: *const CERT_CONTEXT, ptime: ::core::option::Option<*const super::super::Foundation::FILETIME>, hadditionalstore: P1, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertGetCertificateChain(hchainengine : HCERTCHAINENGINE, pcertcontext : *const CERT_CONTEXT, ptime : *const super::super::Foundation:: FILETIME, hadditionalstore : HCERTSTORE, pchainpara : *const CERT_CHAIN_PARA, dwflags : u32, pvreserved : *const ::core::ffi::c_void, ppchaincontext : *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation:: BOOL); - CertGetCertificateChain(hchainengine.into_param().abi(), pcertcontext, ::core::mem::transmute(ptime.unwrap_or(::std::ptr::null())), hadditionalstore.into_param().abi(), pchainpara, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ppchaincontext) + CertGetCertificateChain(hchainengine.into_param().abi(), pcertcontext, ::core::mem::transmute(ptime.unwrap_or(::std::ptr::null())), hadditionalstore.into_param().abi(), pchainpara, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ppchaincontext).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetCertificateContextProperty(pcertcontext : *const CERT_CONTEXT, dwpropid : u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CertGetCertificateContextProperty(pcertcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CertGetCertificateContextProperty(pcertcontext, dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pusage: ::core::option::Option<*mut CTL_USAGE>, pcbusage: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pusage: ::core::option::Option<*mut CTL_USAGE>, pcbusage: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetEnhancedKeyUsage(pcertcontext : *const CERT_CONTEXT, dwflags : u32, pusage : *mut CTL_USAGE, pcbusage : *mut u32) -> super::super::Foundation:: BOOL); - CertGetEnhancedKeyUsage(pcertcontext, dwflags, ::core::mem::transmute(pusage.unwrap_or(::std::ptr::null_mut())), pcbusage) + CertGetEnhancedKeyUsage(pcertcontext, dwflags, ::core::mem::transmute(pusage.unwrap_or(::std::ptr::null_mut())), pcbusage).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetIntendedKeyUsage(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pcertinfo : *const CERT_INFO, pbkeyusage : *mut u8, cbkeyusage : u32) -> super::super::Foundation:: BOOL); - CertGetIntendedKeyUsage(dwcertencodingtype, pcertinfo, ::core::mem::transmute(pbkeyusage.as_ptr()), pbkeyusage.len() as _) + CertGetIntendedKeyUsage(dwcertencodingtype, pcertinfo, ::core::mem::transmute(pbkeyusage.as_ptr()), pbkeyusage.len() as _).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1200,12 +1200,12 @@ pub unsafe fn CertGetServerOcspResponseContext(hserverocspresponse: *const ::cor #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetStoreProperty(hcertstore: P0, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CertGetStoreProperty(hcertstore: P0, dwpropid: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertGetStoreProperty(hcertstore : HCERTSTORE, dwpropid : u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CertGetStoreProperty(hcertstore.into_param().abi(), dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CertGetStoreProperty(hcertstore.into_param().abi(), dwpropid, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1220,26 +1220,26 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertGetValidUsages(rghcerts: &[*const CERT_CONTEXT], cnumoids: *mut i32, rghoids: ::core::option::Option<*mut ::windows_core::PSTR>, pcboids: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertGetValidUsages(rghcerts: &[*const CERT_CONTEXT], cnumoids: *mut i32, rghoids: ::core::option::Option<*mut ::windows_core::PSTR>, pcboids: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertGetValidUsages(ccerts : u32, rghcerts : *const *const CERT_CONTEXT, cnumoids : *mut i32, rghoids : *mut ::windows_core::PSTR, pcboids : *mut u32) -> super::super::Foundation:: BOOL); - CertGetValidUsages(rghcerts.len() as _, ::core::mem::transmute(rghcerts.as_ptr()), cnumoids, ::core::mem::transmute(rghoids.unwrap_or(::std::ptr::null_mut())), pcboids) + CertGetValidUsages(rghcerts.len() as _, ::core::mem::transmute(rghcerts.as_ptr()), cnumoids, ::core::mem::transmute(rghoids.unwrap_or(::std::ptr::null_mut())), pcboids).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertIsRDNAttrsInCertificateName(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwflags: u32, pcertname: *const CRYPT_INTEGER_BLOB, prdn: *const CERT_RDN) -> super::super::Foundation::BOOL { +pub unsafe fn CertIsRDNAttrsInCertificateName(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwflags: u32, pcertname: *const CRYPT_INTEGER_BLOB, prdn: *const CERT_RDN) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertIsRDNAttrsInCertificateName(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwflags : u32, pcertname : *const CRYPT_INTEGER_BLOB, prdn : *const CERT_RDN) -> super::super::Foundation:: BOOL); - CertIsRDNAttrsInCertificateName(dwcertencodingtype, dwflags, pcertname, prdn) + CertIsRDNAttrsInCertificateName(dwcertencodingtype, dwflags, pcertname, prdn).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertIsStrongHashToSign(pstrongsignpara: *const CERT_STRONG_SIGN_PARA, pwszcnghashalgid: P0, psigningcert: ::core::option::Option<*const CERT_CONTEXT>) -> super::super::Foundation::BOOL +pub unsafe fn CertIsStrongHashToSign(pstrongsignpara: *const CERT_STRONG_SIGN_PARA, pwszcnghashalgid: P0, psigningcert: ::core::option::Option<*const CERT_CONTEXT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertIsStrongHashToSign(pstrongsignpara : *const CERT_STRONG_SIGN_PARA, pwszcnghashalgid : ::windows_core::PCWSTR, psigningcert : *const CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertIsStrongHashToSign(pstrongsignpara, pwszcnghashalgid.into_param().abi(), ::core::mem::transmute(psigningcert.unwrap_or(::std::ptr::null()))) + CertIsStrongHashToSign(pstrongsignpara, pwszcnghashalgid.into_param().abi(), ::core::mem::transmute(psigningcert.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1352,12 +1352,12 @@ pub unsafe fn CertRegisterSystemStore(pvsystemstore: *const ::core::ffi::c_void, #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P0) -> super::super::Foundation::BOOL +pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext : *const CERT_CONTEXT, pszusageidentifier : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CertRemoveEnhancedKeyUsageIdentifier(pcertcontext, pszusageidentifier.into_param().abi()) + CertRemoveEnhancedKeyUsageIdentifier(pcertcontext, pszusageidentifier.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -1372,98 +1372,98 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertResyncCertificateChainEngine(hchainengine: P0) -> super::super::Foundation::BOOL +pub unsafe fn CertResyncCertificateChainEngine(hchainengine: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertResyncCertificateChainEngine(hchainengine : HCERTCHAINENGINE) -> super::super::Foundation:: BOOL); - CertResyncCertificateChainEngine(hchainengine.into_param().abi()) + CertResyncCertificateChainEngine(hchainengine.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertRetrieveLogoOrBiometricInfo(pcertcontext: *const CERT_CONTEXT, lpszlogoorbiometrictype: P0, dwretrievalflags: u32, dwtimeout: u32, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppbdata: *mut *mut u8, pcbdata: *mut u32, ppwszmimetype: ::core::option::Option<*mut ::windows_core::PWSTR>) -> super::super::Foundation::BOOL +pub unsafe fn CertRetrieveLogoOrBiometricInfo(pcertcontext: *const CERT_CONTEXT, lpszlogoorbiometrictype: P0, dwretrievalflags: u32, dwtimeout: u32, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppbdata: *mut *mut u8, pcbdata: *mut u32, ppwszmimetype: ::core::option::Option<*mut ::windows_core::PWSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertRetrieveLogoOrBiometricInfo(pcertcontext : *const CERT_CONTEXT, lpszlogoorbiometrictype : ::windows_core::PCSTR, dwretrievalflags : u32, dwtimeout : u32, dwflags : u32, pvreserved : *const ::core::ffi::c_void, ppbdata : *mut *mut u8, pcbdata : *mut u32, ppwszmimetype : *mut ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - CertRetrieveLogoOrBiometricInfo(pcertcontext, lpszlogoorbiometrictype.into_param().abi(), dwretrievalflags, dwtimeout, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ppbdata, pcbdata, ::core::mem::transmute(ppwszmimetype.unwrap_or(::std::ptr::null_mut()))) + CertRetrieveLogoOrBiometricInfo(pcertcontext, lpszlogoorbiometrictype.into_param().abi(), dwretrievalflags, dwtimeout, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ppbdata, pcbdata, ::core::mem::transmute(ppwszmimetype.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSaveStore(hcertstore: P0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, dwsaveas: CERT_STORE_SAVE_AS, dwsaveto: CERT_STORE_SAVE_TO, pvsavetopara: *mut ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CertSaveStore(hcertstore: P0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, dwsaveas: CERT_STORE_SAVE_AS, dwsaveto: CERT_STORE_SAVE_TO, pvsavetopara: *mut ::core::ffi::c_void, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertSaveStore(hcertstore : HCERTSTORE, dwencodingtype : CERT_QUERY_ENCODING_TYPE, dwsaveas : CERT_STORE_SAVE_AS, dwsaveto : CERT_STORE_SAVE_TO, pvsavetopara : *mut ::core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - CertSaveStore(hcertstore.into_param().abi(), dwencodingtype, dwsaveas, dwsaveto, pvsavetopara, dwflags) + CertSaveStore(hcertstore.into_param().abi(), dwencodingtype, dwsaveas, dwsaveto, pvsavetopara, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSelectCertificateChains(pselectioncontext: ::core::option::Option<*const ::windows_core::GUID>, dwflags: u32, pchainparameters: ::core::option::Option<*const CERT_SELECT_CHAIN_PARA>, rgpcriteria: ::core::option::Option<&[CERT_SELECT_CRITERIA]>, hstore: P0, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation::BOOL +pub unsafe fn CertSelectCertificateChains(pselectioncontext: ::core::option::Option<*const ::windows_core::GUID>, dwflags: u32, pchainparameters: ::core::option::Option<*const CERT_SELECT_CHAIN_PARA>, rgpcriteria: ::core::option::Option<&[CERT_SELECT_CRITERIA]>, hstore: P0, pcselection: *mut u32, pprgpselection: *mut *mut *mut CERT_CHAIN_CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CertSelectCertificateChains(pselectioncontext : *const ::windows_core::GUID, dwflags : u32, pchainparameters : *const CERT_SELECT_CHAIN_PARA, ccriteria : u32, rgpcriteria : *const CERT_SELECT_CRITERIA, hstore : HCERTSTORE, pcselection : *mut u32, pprgpselection : *mut *mut *mut CERT_CHAIN_CONTEXT) -> super::super::Foundation:: BOOL); - CertSelectCertificateChains(::core::mem::transmute(pselectioncontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pchainparameters.unwrap_or(::std::ptr::null())), rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), hstore.into_param().abi(), pcselection, pprgpselection) + CertSelectCertificateChains(::core::mem::transmute(pselectioncontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pchainparameters.unwrap_or(::std::ptr::null())), rgpcriteria.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rgpcriteria.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), hstore.into_param().abi(), pcselection, pprgpselection).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSerializeCRLStoreElement(pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertSerializeCRLStoreElement(pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSerializeCRLStoreElement(pcrlcontext : *const CRL_CONTEXT, dwflags : u32, pbelement : *mut u8, pcbelement : *mut u32) -> super::super::Foundation:: BOOL); - CertSerializeCRLStoreElement(pcrlcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement) + CertSerializeCRLStoreElement(pcrlcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSerializeCTLStoreElement(pctlcontext: *const CTL_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertSerializeCTLStoreElement(pctlcontext: *const CTL_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSerializeCTLStoreElement(pctlcontext : *const CTL_CONTEXT, dwflags : u32, pbelement : *mut u8, pcbelement : *mut u32) -> super::super::Foundation:: BOOL); - CertSerializeCTLStoreElement(pctlcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement) + CertSerializeCTLStoreElement(pctlcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSerializeCertificateStoreElement(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertSerializeCertificateStoreElement(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pbelement: ::core::option::Option<*mut u8>, pcbelement: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSerializeCertificateStoreElement(pcertcontext : *const CERT_CONTEXT, dwflags : u32, pbelement : *mut u8, pcbelement : *mut u32) -> super::super::Foundation:: BOOL); - CertSerializeCertificateStoreElement(pcertcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement) + CertSerializeCertificateStoreElement(pcertcontext, dwflags, ::core::mem::transmute(pbelement.unwrap_or(::std::ptr::null_mut())), pcbelement).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CertSetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSetCRLContextProperty(pcrlcontext : *const CRL_CONTEXT, dwpropid : u32, dwflags : u32, pvdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertSetCRLContextProperty(pcrlcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))) + CertSetCRLContextProperty(pcrlcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CertSetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSetCTLContextProperty(pctlcontext : *const CTL_CONTEXT, dwpropid : u32, dwflags : u32, pvdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertSetCTLContextProperty(pctlcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))) + CertSetCTLContextProperty(pctlcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext : *const CERT_CONTEXT, pctlentry : *const CTL_ENTRY, dwflags : u32) -> super::super::Foundation:: BOOL); - CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext, pctlentry, dwflags) + CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext, pctlentry, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CertSetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSetCertificateContextProperty(pcertcontext : *const CERT_CONTEXT, dwpropid : u32, dwflags : u32, pvdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertSetCertificateContextProperty(pcertcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))) + CertSetCertificateContextProperty(pcertcontext, dwpropid, dwflags, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertSetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, pusage: ::core::option::Option<*const CTL_USAGE>) -> super::super::Foundation::BOOL { +pub unsafe fn CertSetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, pusage: ::core::option::Option<*const CTL_USAGE>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertSetEnhancedKeyUsage(pcertcontext : *const CERT_CONTEXT, pusage : *const CTL_USAGE) -> super::super::Foundation:: BOOL); - CertSetEnhancedKeyUsage(pcertcontext, ::core::mem::transmute(pusage.unwrap_or(::std::ptr::null()))) + CertSetEnhancedKeyUsage(pcertcontext, ::core::mem::transmute(pusage.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1478,22 +1478,22 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertStrToNameA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32, ppszerror: ::core::option::Option<*mut ::windows_core::PCSTR>) -> super::super::Foundation::BOOL +pub unsafe fn CertStrToNameA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32, ppszerror: ::core::option::Option<*mut ::windows_core::PCSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertStrToNameA(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pszx500 : ::windows_core::PCSTR, dwstrtype : CERT_STRING_TYPE, pvreserved : *const ::core::ffi::c_void, pbencoded : *mut u8, pcbencoded : *mut u32, ppszerror : *mut ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CertStrToNameA(dwcertencodingtype, pszx500.into_param().abi(), dwstrtype, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded, ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))) + CertStrToNameA(dwcertencodingtype, pszx500.into_param().abi(), dwstrtype, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded, ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertStrToNameW(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32, ppszerror: ::core::option::Option<*mut ::windows_core::PCWSTR>) -> super::super::Foundation::BOOL +pub unsafe fn CertStrToNameW(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32, ppszerror: ::core::option::Option<*mut ::windows_core::PCWSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CertStrToNameW(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pszx500 : ::windows_core::PCWSTR, dwstrtype : CERT_STRING_TYPE, pvreserved : *const ::core::ffi::c_void, pbencoded : *mut u8, pcbencoded : *mut u32, ppszerror : *mut ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CertStrToNameW(dwcertencodingtype, pszx500.into_param().abi(), dwstrtype, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded, ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))) + CertStrToNameW(dwcertencodingtype, pszx500.into_param().abi(), dwstrtype, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded, ::core::mem::transmute(ppszerror.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1529,9 +1529,9 @@ pub unsafe fn CertVerifyCRLTimeValidity(ptimetoverify: ::core::option::Option<*c #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertVerifyCTLUsage(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, psubjectusage: *const CTL_USAGE, dwflags: u32, pverifyusagepara: ::core::option::Option<*const CTL_VERIFY_USAGE_PARA>, pverifyusagestatus: *mut CTL_VERIFY_USAGE_STATUS) -> super::super::Foundation::BOOL { +pub unsafe fn CertVerifyCTLUsage(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, psubjectusage: *const CTL_USAGE, dwflags: u32, pverifyusagepara: ::core::option::Option<*const CTL_VERIFY_USAGE_PARA>, pverifyusagestatus: *mut CTL_VERIFY_USAGE_STATUS) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertVerifyCTLUsage(dwencodingtype : u32, dwsubjecttype : u32, pvsubject : *const ::core::ffi::c_void, psubjectusage : *const CTL_USAGE, dwflags : u32, pverifyusagepara : *const CTL_VERIFY_USAGE_PARA, pverifyusagestatus : *mut CTL_VERIFY_USAGE_STATUS) -> super::super::Foundation:: BOOL); - CertVerifyCTLUsage(dwencodingtype, dwsubjecttype, pvsubject, psubjectusage, dwflags, ::core::mem::transmute(pverifyusagepara.unwrap_or(::std::ptr::null())), pverifyusagestatus) + CertVerifyCTLUsage(dwencodingtype, dwsubjecttype, pvsubject, psubjectusage, dwflags, ::core::mem::transmute(pverifyusagepara.unwrap_or(::std::ptr::null())), pverifyusagestatus).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1546,16 +1546,16 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, rgpvcontext: &[*const ::core::ffi::c_void], dwflags: u32, prevpara: ::core::option::Option<*const CERT_REVOCATION_PARA>, prevstatus: *mut CERT_REVOCATION_STATUS) -> super::super::Foundation::BOOL { +pub unsafe fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, rgpvcontext: &[*const ::core::ffi::c_void], dwflags: u32, prevpara: ::core::option::Option<*const CERT_REVOCATION_PARA>, prevstatus: *mut CERT_REVOCATION_STATUS) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertVerifyRevocation(dwencodingtype : u32, dwrevtype : u32, ccontext : u32, rgpvcontext : *const *const ::core::ffi::c_void, dwflags : u32, prevpara : *const CERT_REVOCATION_PARA, prevstatus : *mut CERT_REVOCATION_STATUS) -> super::super::Foundation:: BOOL); - CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len() as _, ::core::mem::transmute(rgpvcontext.as_ptr()), dwflags, ::core::mem::transmute(prevpara.unwrap_or(::std::ptr::null())), prevstatus) + CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len() as _, ::core::mem::transmute(rgpvcontext.as_ptr()), dwflags, ::core::mem::transmute(prevpara.unwrap_or(::std::ptr::null())), prevstatus).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CertVerifySubjectCertificateContext(psubject: *const CERT_CONTEXT, pissuer: ::core::option::Option<*const CERT_CONTEXT>, pdwflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CertVerifySubjectCertificateContext(psubject: *const CERT_CONTEXT, pissuer: ::core::option::Option<*const CERT_CONTEXT>, pdwflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CertVerifySubjectCertificateContext(psubject : *const CERT_CONTEXT, pissuer : *const CERT_CONTEXT, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - CertVerifySubjectCertificateContext(psubject, ::core::mem::transmute(pissuer.unwrap_or(::std::ptr::null())), pdwflags) + CertVerifySubjectCertificateContext(psubject, ::core::mem::transmute(pissuer.unwrap_or(::std::ptr::null())), pdwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1580,31 +1580,31 @@ pub unsafe fn CloseCryptoHandle(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) - #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptAcquireCertificatePrivateKey(pcert: *const CERT_CONTEXT, dwflags: CRYPT_ACQUIRE_FLAGS, pvparameters: ::core::option::Option<*const ::core::ffi::c_void>, phcryptprovorncryptkey: *mut HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, pdwkeyspec: ::core::option::Option<*mut CERT_KEY_SPEC>, pfcallerfreeprovorncryptkey: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptAcquireCertificatePrivateKey(pcert: *const CERT_CONTEXT, dwflags: CRYPT_ACQUIRE_FLAGS, pvparameters: ::core::option::Option<*const ::core::ffi::c_void>, phcryptprovorncryptkey: *mut HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, pdwkeyspec: ::core::option::Option<*mut CERT_KEY_SPEC>, pfcallerfreeprovorncryptkey: ::core::option::Option<*mut super::super::Foundation::BOOL>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptAcquireCertificatePrivateKey(pcert : *const CERT_CONTEXT, dwflags : CRYPT_ACQUIRE_FLAGS, pvparameters : *const ::core::ffi::c_void, phcryptprovorncryptkey : *mut HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, pdwkeyspec : *mut CERT_KEY_SPEC, pfcallerfreeprovorncryptkey : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CryptAcquireCertificatePrivateKey(pcert, dwflags, ::core::mem::transmute(pvparameters.unwrap_or(::std::ptr::null())), phcryptprovorncryptkey, ::core::mem::transmute(pdwkeyspec.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfcallerfreeprovorncryptkey.unwrap_or(::std::ptr::null_mut()))) + CryptAcquireCertificatePrivateKey(pcert, dwflags, ::core::mem::transmute(pvparameters.unwrap_or(::std::ptr::null())), phcryptprovorncryptkey, ::core::mem::transmute(pdwkeyspec.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pfcallerfreeprovorncryptkey.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptAcquireContextA(phprov: *mut usize, szcontainer: P0, szprovider: P1, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptAcquireContextA(phprov: *mut usize, szcontainer: P0, szprovider: P1, dwprovtype: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptAcquireContextA(phprov : *mut usize, szcontainer : ::windows_core::PCSTR, szprovider : ::windows_core::PCSTR, dwprovtype : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptAcquireContextA(phprov, szcontainer.into_param().abi(), szprovider.into_param().abi(), dwprovtype, dwflags) + CryptAcquireContextA(phprov, szcontainer.into_param().abi(), szprovider.into_param().abi(), dwprovtype, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptAcquireContextW(phprov: *mut usize, szcontainer: P0, szprovider: P1, dwprovtype: u32, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptAcquireContextW(phprov: *mut usize, szcontainer: P0, szprovider: P1, dwprovtype: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptAcquireContextW(phprov : *mut usize, szcontainer : ::windows_core::PCWSTR, szprovider : ::windows_core::PCWSTR, dwprovtype : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptAcquireContextW(phprov, szcontainer.into_param().abi(), szprovider.into_param().abi(), dwprovtype, dwflags) + CryptAcquireContextW(phprov, szcontainer.into_param().abi(), szprovider.into_param().abi(), dwprovtype, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1633,9 +1633,9 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptContextAddRef(hprov: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptContextAddRef(hprov: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptContextAddRef(hprov : usize, pdwreserved : *const u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptContextAddRef(hprov, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags) + CryptContextAddRef(hprov, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1647,24 +1647,24 @@ pub unsafe fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCreateHash(hprov: usize, algid: u32, hkey: usize, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptCreateHash(hprov: usize, algid: u32, hkey: usize, dwflags: u32, phhash: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptCreateHash(hprov : usize, algid : u32, hkey : usize, dwflags : u32, phhash : *mut usize) -> super::super::Foundation:: BOOL); - CryptCreateHash(hprov, algid, hkey, dwflags, phhash) + CryptCreateHash(hprov, algid, hkey, dwflags, phhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptCreateKeyIdentifierFromCSP(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpubkeyoid: P0, ppubkeystruc: *const PUBLICKEYSTRUC, cbpubkeystruc: u32, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbhash: ::core::option::Option<*mut u8>, pcbhash: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptCreateKeyIdentifierFromCSP(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpubkeyoid: P0, ppubkeystruc: *const PUBLICKEYSTRUC, cbpubkeystruc: u32, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbhash: ::core::option::Option<*mut u8>, pcbhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptCreateKeyIdentifierFromCSP(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pszpubkeyoid : ::windows_core::PCSTR, ppubkeystruc : *const PUBLICKEYSTRUC, cbpubkeystruc : u32, dwflags : u32, pvreserved : *const ::core::ffi::c_void, pbhash : *mut u8, pcbhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptCreateKeyIdentifierFromCSP(dwcertencodingtype, pszpubkeyoid.into_param().abi(), ppubkeystruc, cbpubkeystruc, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhash.unwrap_or(::std::ptr::null_mut())), pcbhash) + CryptCreateKeyIdentifierFromCSP(dwcertencodingtype, pszpubkeyoid.into_param().abi(), ppubkeystruc, cbpubkeystruc, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbhash.unwrap_or(::std::ptr::null_mut())), pcbhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: ::core::option::Option<*const CRYPT_DECRYPT_MESSAGE_PARA>, pverifypara: ::core::option::Option<*const CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbencodedblob: &[u8], dwprevinnercontenttype: u32, pdwmsgtype: ::core::option::Option<*mut u32>, pdwinnercontenttype: ::core::option::Option<*mut u32>, pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: ::core::option::Option<*const CRYPT_DECRYPT_MESSAGE_PARA>, pverifypara: ::core::option::Option<*const CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbencodedblob: &[u8], dwprevinnercontenttype: u32, pdwmsgtype: ::core::option::Option<*mut u32>, pdwinnercontenttype: ::core::option::Option<*mut u32>, pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecodeMessage(dwmsgtypeflags : u32, pdecryptpara : *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbencodedblob : *const u8, cbencodedblob : u32, dwprevinnercontenttype : u32, pdwmsgtype : *mut u32, pdwinnercontenttype : *mut u32, pbdecoded : *mut u8, pcbdecoded : *mut u32, ppxchgcert : *mut *mut CERT_CONTEXT, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); CryptDecodeMessage( dwmsgtypeflags, @@ -1681,143 +1681,144 @@ pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: ::core::opti ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pbencoded: &[u8], dwflags: u32, pvstructinfo: ::core::option::Option<*mut ::core::ffi::c_void>, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptDecodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pbencoded: &[u8], dwflags: u32, pvstructinfo: ::core::option::Option<*mut ::core::ffi::c_void>, pcbstructinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecodeObject(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pvstructinfo : *mut ::core::ffi::c_void, pcbstructinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo) + CryptDecodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pbencoded: &[u8], dwflags: u32, pdecodepara: ::core::option::Option<*const CRYPT_DECODE_PARA>, pvstructinfo: ::core::option::Option<*mut ::core::ffi::c_void>, pcbstructinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptDecodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pbencoded: &[u8], dwflags: u32, pdecodepara: ::core::option::Option<*const CRYPT_DECODE_PARA>, pvstructinfo: ::core::option::Option<*mut ::core::ffi::c_void>, pcbstructinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecodeObjectEx(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pdecodepara : *const CRYPT_DECODE_PARA, pvstructinfo : *mut ::core::ffi::c_void, pcbstructinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pdecodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo) + CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, dwflags, ::core::mem::transmute(pdecodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvstructinfo.unwrap_or(::std::ptr::null_mut())), pcbstructinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CryptDecrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32) -> super::super::Foundation:: BOOL); - CryptDecrypt(hkey, hhash, r#final.into_param().abi(), dwflags, pbdata, pdwdatalen) + CryptDecrypt(hkey, hhash, r#final.into_param().abi(), dwflags, pbdata, pdwdatalen).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecryptAndVerifyMessageSignature(pdecryptpara : *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbencryptedblob : *const u8, cbencryptedblob : u32, pbdecrypted : *mut u8, pcbdecrypted : *mut u32, ppxchgcert : *mut *mut CERT_CONTEXT, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))) + CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: &[u8], pbdecrypted: ::core::option::Option<*mut u8>, pcbdecrypted: ::core::option::Option<*mut u32>, ppxchgcert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptDecryptMessage(pdecryptpara : *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob : *const u8, cbencryptedblob : u32, pbdecrypted : *mut u8, pcbdecrypted : *mut u32, ppxchgcert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptDecryptMessage(pdecryptpara, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut()))) + CryptDecryptMessage(pdecryptpara, ::core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len() as _, ::core::mem::transmute(pbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecrypted.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppxchgcert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDeriveKey(hprov: usize, algid: u32, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDeriveKey(hprov: usize, algid: u32, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptDeriveKey(hprov : usize, algid : u32, hbasedata : usize, dwflags : u32, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptDeriveKey(hprov, algid, hbasedata, dwflags, phkey) + CryptDeriveKey(hprov, algid, hbasedata, dwflags, phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDestroyHash(hhash: usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDestroyHash(hhash: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptDestroyHash(hhash : usize) -> super::super::Foundation:: BOOL); - CryptDestroyHash(hhash) + CryptDestroyHash(hhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDestroyKey(hkey: usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDestroyKey(hkey: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptDestroyKey(hkey : usize) -> super::super::Foundation:: BOOL); - CryptDestroyKey(hkey) + CryptDestroyKey(hkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDuplicateHash(hhash: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, phhash: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDuplicateHash(hhash: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, phhash: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptDuplicateHash(hhash : usize, pdwreserved : *const u32, dwflags : u32, phhash : *mut usize) -> super::super::Foundation:: BOOL); - CryptDuplicateHash(hhash, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, phhash) + CryptDuplicateHash(hhash, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, phhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptDuplicateKey(hkey: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptDuplicateKey(hkey: usize, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptDuplicateKey(hkey : usize, pdwreserved : *const u32, dwflags : u32, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptDuplicateKey(hkey, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, phkey) + CryptDuplicateKey(hkey, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEncodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const ::core::ffi::c_void, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptEncodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const ::core::ffi::c_void, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptEncodeObject(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pvstructinfo : *const ::core::ffi::c_void, pbencoded : *mut u8, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptEncodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded) + CryptEncodeObject(dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEncodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const ::core::ffi::c_void, dwflags: CRYPT_ENCODE_OBJECT_FLAGS, pencodepara: ::core::option::Option<*const CRYPT_ENCODE_PARA>, pvencoded: ::core::option::Option<*mut ::core::ffi::c_void>, pcbencoded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptEncodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const ::core::ffi::c_void, dwflags: CRYPT_ENCODE_OBJECT_FLAGS, pencodepara: ::core::option::Option<*const CRYPT_ENCODE_PARA>, pvencoded: ::core::option::Option<*mut ::core::ffi::c_void>, pcbencoded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptEncodeObjectEx(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pvstructinfo : *const ::core::ffi::c_void, dwflags : CRYPT_ENCODE_OBJECT_FLAGS, pencodepara : *const CRYPT_ENCODE_PARA, pvencoded : *mut ::core::ffi::c_void, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptEncodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, dwflags, ::core::mem::transmute(pencodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded) + CryptEncodeObjectEx(dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, dwflags, ::core::mem::transmute(pencodepara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: ::core::option::Option<&mut [u8]>, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: ::core::option::Option<&mut [u8]>, pdwdatalen: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CryptEncrypt(hkey : usize, hhash : usize, r#final : super::super::Foundation:: BOOL, dwflags : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwbuflen : u32) -> super::super::Foundation:: BOOL); - CryptEncrypt(hkey, hhash, r#final.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwdatalen, pbdata.as_deref().map_or(0, |slice| slice.len() as _)) + CryptEncrypt(hkey, hhash, r#final.into_param().abi(), dwflags, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pdwdatalen, pbdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobeencrypted: ::core::option::Option<&[u8]>, pbencryptedblob: ::core::option::Option<*mut u8>, pcbencryptedblob: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobeencrypted: ::core::option::Option<&[u8]>, pbencryptedblob: ::core::option::Option<*mut u8>, pcbencryptedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptEncryptMessage(pencryptpara : *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert : u32, rgprecipientcert : *const *const CERT_CONTEXT, pbtobeencrypted : *const u8, cbtobeencrypted : u32, pbencryptedblob : *mut u8, pcbencryptedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptEncryptMessage(pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobeencrypted.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbencryptedblob) + CryptEncryptMessage(pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobeencrypted.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbtobeencrypted.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbencryptedblob).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumKeyIdentifierProperties(pkeyidentifier: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenum: PFN_CRYPT_ENUM_KEYID_PROP) -> super::super::Foundation::BOOL +pub unsafe fn CryptEnumKeyIdentifierProperties(pkeyidentifier: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenum: PFN_CRYPT_ENUM_KEYID_PROP) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptEnumKeyIdentifierProperties(pkeyidentifier : *const CRYPT_INTEGER_BLOB, dwpropid : u32, dwflags : u32, pwszcomputername : ::windows_core::PCWSTR, pvreserved : *const ::core::ffi::c_void, pvarg : *mut ::core::ffi::c_void, pfnenum : PFN_CRYPT_ENUM_KEYID_PROP) -> super::super::Foundation:: BOOL); - CryptEnumKeyIdentifierProperties(::core::mem::transmute(pkeyidentifier.unwrap_or(::std::ptr::null())), dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenum) + CryptEnumKeyIdentifierProperties(::core::mem::transmute(pkeyidentifier.unwrap_or(::std::ptr::null())), dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenum).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumOIDFunction(dwencodingtype: u32, pszfuncname: P0, pszoid: P1, dwflags: u32, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenumoidfunc: PFN_CRYPT_ENUM_OID_FUNC) -> super::super::Foundation::BOOL +pub unsafe fn CryptEnumOIDFunction(dwencodingtype: u32, pszfuncname: P0, pszoid: P1, dwflags: u32, pvarg: ::core::option::Option<*mut ::core::ffi::c_void>, pfnenumoidfunc: PFN_CRYPT_ENUM_OID_FUNC) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptEnumOIDFunction(dwencodingtype : u32, pszfuncname : ::windows_core::PCSTR, pszoid : ::windows_core::PCSTR, dwflags : u32, pvarg : *mut ::core::ffi::c_void, pfnenumoidfunc : PFN_CRYPT_ENUM_OID_FUNC) -> super::super::Foundation:: BOOL); - CryptEnumOIDFunction(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), dwflags, ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenumoidfunc) + CryptEnumOIDFunction(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), dwflags, ::core::mem::transmute(pvarg.unwrap_or(::std::ptr::null_mut())), pfnenumoidfunc).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1829,68 +1830,68 @@ pub unsafe fn CryptEnumOIDInfo(dwgroupid: u32, dwflags: u32, pvarg: ::core::opti #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: ::windows_core::PSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: ::windows_core::PSTR, pcbtypename: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptEnumProviderTypesA(dwindex : u32, pdwreserved : *const u32, dwflags : u32, pdwprovtype : *mut u32, sztypename : ::windows_core::PSTR, pcbtypename : *mut u32) -> super::super::Foundation:: BOOL); - CryptEnumProviderTypesA(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(sztypename), pcbtypename) + CryptEnumProviderTypesA(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(sztypename), pcbtypename).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: ::windows_core::PWSTR, pcbtypename: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, sztypename: ::windows_core::PWSTR, pcbtypename: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptEnumProviderTypesW(dwindex : u32, pdwreserved : *const u32, dwflags : u32, pdwprovtype : *mut u32, sztypename : ::windows_core::PWSTR, pcbtypename : *mut u32) -> super::super::Foundation:: BOOL); - CryptEnumProviderTypesW(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(sztypename), pcbtypename) + CryptEnumProviderTypesW(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(sztypename), pcbtypename).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumProvidersA(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: ::windows_core::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptEnumProvidersA(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: ::windows_core::PSTR, pcbprovname: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptEnumProvidersA(dwindex : u32, pdwreserved : *const u32, dwflags : u32, pdwprovtype : *mut u32, szprovname : ::windows_core::PSTR, pcbprovname : *mut u32) -> super::super::Foundation:: BOOL); - CryptEnumProvidersA(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(szprovname), pcbprovname) + CryptEnumProvidersA(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(szprovname), pcbprovname).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptEnumProvidersW(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: ::windows_core::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptEnumProvidersW(dwindex: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pdwprovtype: *mut u32, szprovname: ::windows_core::PWSTR, pcbprovname: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptEnumProvidersW(dwindex : u32, pdwreserved : *const u32, dwflags : u32, pdwprovtype : *mut u32, szprovname : ::windows_core::PWSTR, pcbprovname : *mut u32) -> super::super::Foundation:: BOOL); - CryptEnumProvidersW(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(szprovname), pcbprovname) + CryptEnumProvidersW(dwindex, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, pdwprovtype, ::core::mem::transmute(szprovname), pcbprovname).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptExportKey(hkey: usize, hexpkey: usize, dwblobtype: u32, dwflags: CRYPT_KEY_FLAGS, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptExportKey(hkey: usize, hexpkey: usize, dwblobtype: u32, dwflags: CRYPT_KEY_FLAGS, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptExportKey(hkey : usize, hexpkey : usize, dwblobtype : u32, dwflags : CRYPT_KEY_FLAGS, pbdata : *mut u8, pdwdatalen : *mut u32) -> super::super::Foundation:: BOOL); - CryptExportKey(hkey, hexpkey, dwblobtype, dwflags, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen) + CryptExportKey(hkey, hexpkey, dwblobtype, dwflags, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptExportPKCS8(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: P0, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbprivatekeyblob: ::core::option::Option<*mut u8>, pcbprivatekeyblob: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptExportPKCS8(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: P0, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbprivatekeyblob: ::core::option::Option<*mut u8>, pcbprivatekeyblob: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptExportPKCS8(hcryptprov : usize, dwkeyspec : u32, pszprivatekeyobjid : ::windows_core::PCSTR, dwflags : u32, pvauxinfo : *const ::core::ffi::c_void, pbprivatekeyblob : *mut u8, pcbprivatekeyblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptExportPKCS8(hcryptprov, dwkeyspec, pszprivatekeyobjid.into_param().abi(), dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbprivatekeyblob.unwrap_or(::std::ptr::null_mut())), pcbprivatekeyblob) + CryptExportPKCS8(hcryptprov, dwkeyspec, pszprivatekeyobjid.into_param().abi(), dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbprivatekeyblob.unwrap_or(::std::ptr::null_mut())), pcbprivatekeyblob).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: ::core::option::Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: ::core::option::Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptExportPublicKeyInfo(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : u32, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *mut CERT_PUBLIC_KEY_INFO, pcbinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptExportPublicKeyInfo(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pinfo.unwrap_or(::std::ptr::null_mut())), pcbinfo) + CryptExportPublicKeyInfo(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pinfo.unwrap_or(::std::ptr::null_mut())), pcbinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P1, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pinfo: ::core::option::Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P1, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pinfo: ::core::option::Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : u32, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid : ::windows_core::PCSTR, dwflags : u32, pvauxinfo : *const ::core::ffi::c_void, pinfo : *mut CERT_PUBLIC_KEY_INFO, pcbinfo : *mut u32) -> super::super::Foundation:: BOOL); - CryptExportPublicKeyInfoEx(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, pszpublickeyobjid.into_param().abi(), dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pinfo.unwrap_or(::std::ptr::null_mut())), pcbinfo) + CryptExportPublicKeyInfoEx(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, pszpublickeyobjid.into_param().abi(), dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pinfo.unwrap_or(::std::ptr::null_mut())), pcbinfo).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1906,9 +1907,9 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptFindCertificateKeyProvInfo(pcert: *const CERT_CONTEXT, dwflags: CRYPT_FIND_FLAGS, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptFindCertificateKeyProvInfo(pcert: *const CERT_CONTEXT, dwflags: CRYPT_FIND_FLAGS, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptFindCertificateKeyProvInfo(pcert : *const CERT_CONTEXT, dwflags : CRYPT_FIND_FLAGS, pvreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptFindCertificateKeyProvInfo(pcert, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) + CryptFindCertificateKeyProvInfo(pcert, dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -1928,12 +1929,12 @@ pub unsafe fn CryptFindOIDInfo(dwkeytype: u32, pvkey: *const ::core::ffi::c_void #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptFormatObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwformattype: u32, dwformatstrtype: u32, pformatstruct: ::core::option::Option<*const ::core::ffi::c_void>, lpszstructtype: P0, pbencoded: &[u8], pbformat: ::core::option::Option<*mut ::core::ffi::c_void>, pcbformat: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptFormatObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwformattype: u32, dwformatstrtype: u32, pformatstruct: ::core::option::Option<*const ::core::ffi::c_void>, lpszstructtype: P0, pbencoded: &[u8], pbformat: ::core::option::Option<*mut ::core::ffi::c_void>, pcbformat: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptFormatObject(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwformattype : u32, dwformatstrtype : u32, pformatstruct : *const ::core::ffi::c_void, lpszstructtype : ::windows_core::PCSTR, pbencoded : *const u8, cbencoded : u32, pbformat : *mut ::core::ffi::c_void, pcbformat : *mut u32) -> super::super::Foundation:: BOOL); - CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, ::core::mem::transmute(pformatstruct.unwrap_or(::std::ptr::null())), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbformat.unwrap_or(::std::ptr::null_mut())), pcbformat) + CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, ::core::mem::transmute(pformatstruct.unwrap_or(::std::ptr::null())), lpszstructtype.into_param().abi(), ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbformat.unwrap_or(::std::ptr::null_mut())), pcbformat).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1945,16 +1946,16 @@ pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const ::core::ffi::c_void, #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGenKey(hprov: usize, algid: u32, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGenKey(hprov: usize, algid: u32, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGenKey(hprov : usize, algid : u32, dwflags : CRYPT_KEY_FLAGS, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptGenKey(hprov, algid, dwflags, phkey) + CryptGenKey(hprov, algid, dwflags, phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGenRandom(hprov: usize, pbbuffer: &mut [u8]) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGenRandom(hprov: usize, pbbuffer: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGenRandom(hprov : usize, dwlen : u32, pbbuffer : *mut u8) -> super::super::Foundation:: BOOL); - CryptGenRandom(hprov, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())) + CryptGenRandom(hprov, pbbuffer.len() as _, ::core::mem::transmute(pbbuffer.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1970,9 +1971,9 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdlllist: ::windows_core::PWSTR, pcchdlllist: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pwszdlllist: ::windows_core::PWSTR, pcchdlllist: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetDefaultOIDDllList(hfuncset : *const ::core::ffi::c_void, dwencodingtype : u32, pwszdlllist : ::windows_core::PWSTR, pcchdlllist : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetDefaultOIDDllList(hfuncset, dwencodingtype, ::core::mem::transmute(pwszdlllist), pcchdlllist) + CryptGetDefaultOIDDllList(hfuncset, dwencodingtype, ::core::mem::transmute(pwszdlllist), pcchdlllist).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1987,40 +1988,40 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pszprovname: ::windows_core::PSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pszprovname: ::windows_core::PSTR, pcbprovname: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetDefaultProviderA(dwprovtype : u32, pdwreserved : *const u32, dwflags : u32, pszprovname : ::windows_core::PSTR, pcbprovname : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetDefaultProviderA(dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pszprovname), pcbprovname) + CryptGetDefaultProviderA(dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pszprovname), pcbprovname).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pszprovname: ::windows_core::PWSTR, pcbprovname: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32, pszprovname: ::windows_core::PWSTR, pcbprovname: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetDefaultProviderW(dwprovtype : u32, pdwreserved : *const u32, dwflags : u32, pszprovname : ::windows_core::PWSTR, pcbprovname : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetDefaultProviderW(dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pszprovname), pcbprovname) + CryptGetDefaultProviderW(dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pszprovname), pcbprovname).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetHashParam(hhash: usize, dwparam: u32, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetHashParam(hhash: usize, dwparam: u32, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetHashParam(hhash : usize, dwparam : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptGetHashParam(hhash, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags) + CryptGetHashParam(hhash, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptGetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetKeyIdentifierProperty(pkeyidentifier : *const CRYPT_INTEGER_BLOB, dwpropid : u32, dwflags : u32, pwszcomputername : ::windows_core::PCWSTR, pvreserved : *const ::core::ffi::c_void, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CryptGetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetKeyParam(hkey : usize, dwparam : CRYPT_KEY_PARAM_ID, pbdata : *mut u8, pdwdatalen : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptGetKeyParam(hkey, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags) + CryptGetKeyParam(hkey, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -2041,147 +2042,147 @@ pub unsafe fn CryptGetMessageSignerCount(dwmsgencodingtype: u32, pbsignedblob: & #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetOIDFunctionAddress(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pszoid: P0, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn CryptGetOIDFunctionAddress(hfuncset: *const ::core::ffi::c_void, dwencodingtype: u32, pszoid: P0, dwflags: u32, ppvfuncaddr: *mut *mut ::core::ffi::c_void, phfuncaddr: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetOIDFunctionAddress(hfuncset : *const ::core::ffi::c_void, dwencodingtype : u32, pszoid : ::windows_core::PCSTR, dwflags : u32, ppvfuncaddr : *mut *mut ::core::ffi::c_void, phfuncaddr : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptGetOIDFunctionAddress(hfuncset, dwencodingtype, pszoid.into_param().abi(), dwflags, ppvfuncaddr, phfuncaddr) + CryptGetOIDFunctionAddress(hfuncset, dwencodingtype, pszoid.into_param().abi(), dwflags, ppvfuncaddr, phfuncaddr).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetOIDFunctionValue(dwencodingtype: u32, pszfuncname: P0, pszoid: P1, pwszvaluename: P2, pdwvaluetype: ::core::option::Option<*mut u32>, pbvaluedata: ::core::option::Option<*mut u8>, pcbvaluedata: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn CryptGetOIDFunctionValue(dwencodingtype: u32, pszfuncname: P0, pszoid: P1, pwszvaluename: P2, pdwvaluetype: ::core::option::Option<*mut u32>, pbvaluedata: ::core::option::Option<*mut u8>, pcbvaluedata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptGetOIDFunctionValue(dwencodingtype : u32, pszfuncname : ::windows_core::PCSTR, pszoid : ::windows_core::PCSTR, pwszvaluename : ::windows_core::PCWSTR, pdwvaluetype : *mut u32, pbvaluedata : *mut u8, pcbvaluedata : *mut u32) -> super::super::Foundation:: BOOL); - CryptGetOIDFunctionValue(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), ::core::mem::transmute(pdwvaluetype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbvaluedata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbvaluedata.unwrap_or(::std::ptr::null_mut()))) + CryptGetOIDFunctionValue(dwencodingtype, pszfuncname.into_param().abi(), pszoid.into_param().abi(), pwszvaluename.into_param().abi(), ::core::mem::transmute(pdwvaluetype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbvaluedata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbvaluedata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetObjectUrl(pszurloid: P0, pvpara: *const ::core::ffi::c_void, dwflags: CRYPT_GET_URL_FLAGS, purlarray: ::core::option::Option<*mut CRYPT_URL_ARRAY>, pcburlarray: *mut u32, purlinfo: ::core::option::Option<*mut CRYPT_URL_INFO>, pcburlinfo: ::core::option::Option<*mut u32>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CryptGetObjectUrl(pszurloid: P0, pvpara: *const ::core::ffi::c_void, dwflags: CRYPT_GET_URL_FLAGS, purlarray: ::core::option::Option<*mut CRYPT_URL_ARRAY>, pcburlarray: *mut u32, purlinfo: ::core::option::Option<*mut CRYPT_URL_INFO>, pcburlinfo: ::core::option::Option<*mut u32>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("cryptnet.dll" "system" fn CryptGetObjectUrl(pszurloid : ::windows_core::PCSTR, pvpara : *const ::core::ffi::c_void, dwflags : CRYPT_GET_URL_FLAGS, purlarray : *mut CRYPT_URL_ARRAY, pcburlarray : *mut u32, purlinfo : *mut CRYPT_URL_INFO, pcburlinfo : *mut u32, pvreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptGetObjectUrl(pszurloid.into_param().abi(), pvpara, dwflags, ::core::mem::transmute(purlarray.unwrap_or(::std::ptr::null_mut())), pcburlarray, ::core::mem::transmute(purlinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcburlinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) + CryptGetObjectUrl(pszurloid.into_param().abi(), pvpara, dwflags, ::core::mem::transmute(purlarray.unwrap_or(::std::ptr::null_mut())), pcburlarray, ::core::mem::transmute(purlinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcburlinfo.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetProvParam(hprov: usize, dwparam: u32, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetProvParam(hprov: usize, dwparam: u32, pbdata: ::core::option::Option<*mut u8>, pdwdatalen: *mut u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetProvParam(hprov : usize, dwparam : u32, pbdata : *mut u8, pdwdatalen : *mut u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptGetProvParam(hprov, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags) + CryptGetProvParam(hprov, dwparam, ::core::mem::transmute(pbdata.unwrap_or(::std::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptGetUserKey(hprov : usize, dwkeyspec : u32, phuserkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptGetUserKey(hprov, dwkeyspec, phuserkey) + CryptGetUserKey(hprov, dwkeyspec, phuserkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashCertificate(hcryptprov: P0, algid: u32, dwflags: u32, pbencoded: &[u8], pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptHashCertificate(hcryptprov: P0, algid: u32, dwflags: u32, pbencoded: &[u8], pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashCertificate(hcryptprov : HCRYPTPROV_LEGACY, algid : u32, dwflags : u32, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashCertificate(hcryptprov.into_param().abi(), algid, dwflags, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash) + CryptHashCertificate(hcryptprov.into_param().abi(), algid, dwflags, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashCertificate2(pwszcnghashalgid: P0, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<&[u8]>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptHashCertificate2(pwszcnghashalgid: P0, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<&[u8]>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashCertificate2(pwszcnghashalgid : ::windows_core::PCWSTR, dwflags : u32, pvreserved : *const ::core::ffi::c_void, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashCertificate2(pwszcnghashalgid.into_param().abi(), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencoded.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash) + CryptHashCertificate2(pwszcnghashalgid.into_param().abi(), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbencoded.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptHashData(hhash : usize, pbdata : *const u8, dwdatalen : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptHashData(hhash, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, dwflags) + CryptHashData(hhash, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: P0, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: ::core::option::Option<*mut u8>, pcbhashedblob: ::core::option::Option<*mut u32>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn CryptHashMessage(phashpara: *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash: P0, ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbhashedblob: ::core::option::Option<*mut u8>, pcbhashedblob: ::core::option::Option<*mut u32>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashMessage(phashpara : *const CRYPT_HASH_MESSAGE_PARA, fdetachedhash : super::super::Foundation:: BOOL, ctobehashed : u32, rgpbtobehashed : *const *const u8, rgcbtobehashed : *const u32, pbhashedblob : *mut u8, pcbhashedblob : *mut u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashMessage(phashpara, fdetachedhash.into_param().abi(), ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbhashedblob.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbhashedblob.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))) + CryptHashMessage(phashpara, fdetachedhash.into_param().abi(), ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbhashedblob.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbhashedblob.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: P0, algid: u32, dwflags: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: P0, algid: u32, dwflags: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashPublicKeyInfo(hcryptprov : HCRYPTPROV_LEGACY, algid : u32, dwflags : u32, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *const CERT_PUBLIC_KEY_INFO, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashPublicKeyInfo(hcryptprov.into_param().abi(), algid, dwflags, dwcertencodingtype, pinfo, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash) + CryptHashPublicKeyInfo(hcryptprov.into_param().abi(), algid, dwflags, dwcertencodingtype, pinfo, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptHashSessionKey(hhash : usize, hkey : usize, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptHashSessionKey(hhash, hkey, dwflags) + CryptHashSessionKey(hhash, hkey, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptHashToBeSigned(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptHashToBeSigned(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptHashToBeSigned(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashToBeSigned(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash) + CryptHashToBeSigned(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), pcbcomputedhash).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptImportKey(hprov : usize, pbdata : *const u8, dwdatalen : u32, hpubkey : usize, dwflags : CRYPT_KEY_FLAGS, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptImportKey(hprov, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, hpubkey, dwflags, phkey) + CryptImportKey(hprov, ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, hpubkey, dwflags, phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptImportPKCS8(sprivatekeyandparams: CRYPT_PKCS8_IMPORT_PARAMS, dwflags: CRYPT_KEY_FLAGS, phcryptprov: ::core::option::Option<*mut usize>, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptImportPKCS8(sprivatekeyandparams: CRYPT_PKCS8_IMPORT_PARAMS, dwflags: CRYPT_KEY_FLAGS, phcryptprov: ::core::option::Option<*mut usize>, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptImportPKCS8(sprivatekeyandparams : CRYPT_PKCS8_IMPORT_PARAMS, dwflags : CRYPT_KEY_FLAGS, phcryptprov : *mut usize, pvauxinfo : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptImportPKCS8(::core::mem::transmute(sprivatekeyandparams), dwflags, ::core::mem::transmute(phcryptprov.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null()))) + CryptImportPKCS8(::core::mem::transmute(sprivatekeyandparams), dwflags, ::core::mem::transmute(phcryptprov.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptImportPublicKeyInfo(hcryptprov : usize, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *const CERT_PUBLIC_KEY_INFO, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptImportPublicKeyInfo(hcryptprov, dwcertencodingtype, pinfo, phkey) + CryptImportPublicKeyInfo(hcryptprov, dwcertencodingtype, pinfo, phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptImportPublicKeyInfoEx(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, aikeyalg: u32, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, phkey: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn CryptImportPublicKeyInfoEx(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, aikeyalg: u32, dwflags: u32, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, phkey: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptImportPublicKeyInfoEx(hcryptprov : usize, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *const CERT_PUBLIC_KEY_INFO, aikeyalg : u32, dwflags : u32, pvauxinfo : *const ::core::ffi::c_void, phkey : *mut usize) -> super::super::Foundation:: BOOL); - CryptImportPublicKeyInfoEx(hcryptprov, dwcertencodingtype, pinfo, aikeyalg, dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), phkey) + CryptImportPublicKeyInfoEx(hcryptprov, dwcertencodingtype, pinfo, aikeyalg, dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptImportPublicKeyInfoEx2(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, phkey: *mut BCRYPT_KEY_HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn CryptImportPublicKeyInfoEx2(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, phkey: *mut BCRYPT_KEY_HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptImportPublicKeyInfoEx2(dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pinfo : *const CERT_PUBLIC_KEY_INFO, dwflags : CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo : *const ::core::ffi::c_void, phkey : *mut BCRYPT_KEY_HANDLE) -> super::super::Foundation:: BOOL); - CryptImportPublicKeyInfoEx2(dwcertencodingtype, pinfo, dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), phkey) + CryptImportPublicKeyInfoEx2(dwcertencodingtype, pinfo, dwflags, ::core::mem::transmute(pvauxinfo.unwrap_or(::std::ptr::null())), phkey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -2202,9 +2203,9 @@ pub unsafe fn CryptInstallCancelRetrieval(pfncancel: PFN_CRYPT_CANCEL_RETRIEVAL, #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptInstallDefaultContext(hcryptprov: usize, dwdefaulttype: CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, phdefaultcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn CryptInstallDefaultContext(hcryptprov: usize, dwdefaulttype: CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, phdefaultcontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptInstallDefaultContext(hcryptprov : usize, dwdefaulttype : CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara : *const ::core::ffi::c_void, dwflags : CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved : *const ::core::ffi::c_void, phdefaultcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptInstallDefaultContext(hcryptprov, dwdefaulttype, ::core::mem::transmute(pvdefaultpara.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), phdefaultcontext) + CryptInstallDefaultContext(hcryptprov, dwdefaulttype, ::core::mem::transmute(pvdefaultpara.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), phdefaultcontext).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2247,30 +2248,30 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgClose(hcryptmsg: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgClose(hcryptmsg: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgClose(hcryptmsg : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptMsgClose(::core::mem::transmute(hcryptmsg.unwrap_or(::std::ptr::null()))) + CryptMsgClose(::core::mem::transmute(hcryptmsg.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgControl(hcryptmsg: *const ::core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgControl(hcryptmsg: *const ::core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgControl(hcryptmsg : *const ::core::ffi::c_void, dwflags : u32, dwctrltype : u32, pvctrlpara : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptMsgControl(hcryptmsg, dwflags, dwctrltype, ::core::mem::transmute(pvctrlpara.unwrap_or(::std::ptr::null()))) + CryptMsgControl(hcryptmsg, dwflags, dwctrltype, ::core::mem::transmute(pvctrlpara.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgCountersign(hcryptmsg: *const ::core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgCountersign(hcryptmsg: *const ::core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgCountersign(hcryptmsg : *const ::core::ffi::c_void, dwindex : u32, ccountersigners : u32, rgcountersigners : *const CMSG_SIGNER_ENCODE_INFO) -> super::super::Foundation:: BOOL); - CryptMsgCountersign(hcryptmsg, dwindex, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr())) + CryptMsgCountersign(hcryptmsg, dwindex, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: &[u8], rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO], pbcountersignature: ::core::option::Option<*mut u8>, pcbcountersignature: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: &[u8], rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO], pbcountersignature: ::core::option::Option<*mut u8>, pcbcountersignature: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgCountersignEncoded(dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, ccountersigners : u32, rgcountersigners : *const CMSG_SIGNER_ENCODE_INFO, pbcountersignature : *mut u8, pcbcountersignature : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgCountersignEncoded(dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr()), ::core::mem::transmute(pbcountersignature.unwrap_or(::std::ptr::null_mut())), pcbcountersignature) + CryptMsgCountersignEncoded(dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, rgcountersigners.len() as _, ::core::mem::transmute(rgcountersigners.as_ptr()), ::core::mem::transmute(pbcountersignature.unwrap_or(::std::ptr::null_mut())), pcbcountersignature).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -2281,23 +2282,23 @@ pub unsafe fn CryptMsgDuplicate(hcryptmsg: ::core::option::Option<*const ::core: #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const CTL_INFO, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const CTL_INFO, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype : u32, pctlinfo : *const CTL_INFO, psigninfo : *const CMSG_SIGNED_ENCODE_INFO, dwflags : u32, pbencoded : *mut u8, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgEncodeAndSignCTL(dwmsgencodingtype, pctlinfo, psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded) + CryptMsgEncodeAndSignCTL(dwmsgencodingtype, pctlinfo, psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgGetAndVerifySigner(hcryptmsg: *const ::core::ffi::c_void, rghsignerstore: ::core::option::Option<&[HCERTSTORE]>, dwflags: u32, ppsigner: ::core::option::Option<*mut *mut CERT_CONTEXT>, pdwsignerindex: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgGetAndVerifySigner(hcryptmsg: *const ::core::ffi::c_void, rghsignerstore: ::core::option::Option<&[HCERTSTORE]>, dwflags: u32, ppsigner: ::core::option::Option<*mut *mut CERT_CONTEXT>, pdwsignerindex: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgGetAndVerifySigner(hcryptmsg : *const ::core::ffi::c_void, csignerstore : u32, rghsignerstore : *const HCERTSTORE, dwflags : u32, ppsigner : *mut *mut CERT_CONTEXT, pdwsignerindex : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rghsignerstore.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(ppsigner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwsignerindex.unwrap_or(::std::ptr::null_mut()))) + CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(rghsignerstore.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), dwflags, ::core::mem::transmute(ppsigner.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwsignerindex.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgGetParam(hcryptmsg: *const ::core::ffi::c_void, dwparamtype: u32, dwindex: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgGetParam(hcryptmsg: *const ::core::ffi::c_void, dwparamtype: u32, dwindex: u32, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgGetParam(hcryptmsg : *const ::core::ffi::c_void, dwparamtype : u32, dwindex : u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgGetParam(hcryptmsg, dwparamtype, dwindex, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata) + CryptMsgGetParam(hcryptmsg, dwparamtype, dwindex, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), pcbdata).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2322,61 +2323,61 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: &[u8], psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: &[u8], psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgSignCTL(dwmsgencodingtype : u32, pbctlcontent : *const u8, cbctlcontent : u32, psigninfo : *const CMSG_SIGNED_ENCODE_INFO, dwflags : u32, pbencoded : *mut u8, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptMsgSignCTL(dwmsgencodingtype, ::core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len() as _, psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded) + CryptMsgSignCTL(dwmsgencodingtype, ::core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len() as _, psigninfo, dwflags, ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgUpdate(hcryptmsg: *const ::core::ffi::c_void, pbdata: ::core::option::Option<&[u8]>, ffinal: P0) -> super::super::Foundation::BOOL +pub unsafe fn CryptMsgUpdate(hcryptmsg: *const ::core::ffi::c_void, pbdata: ::core::option::Option<&[u8]>, ffinal: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgUpdate(hcryptmsg : *const ::core::ffi::c_void, pbdata : *const u8, cbdata : u32, ffinal : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CryptMsgUpdate(hcryptmsg, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), ffinal.into_param().abi()) + CryptMsgUpdate(hcryptmsg, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), ffinal.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], pcicountersigner: *const CERT_INFO) -> super::super::Foundation::BOOL +pub unsafe fn CryptMsgVerifyCountersignatureEncoded(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], pcicountersigner: *const CERT_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgVerifyCountersignatureEncoded(hcryptprov : HCRYPTPROV_LEGACY, dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, pbsignerinfocountersignature : *const u8, cbsignerinfocountersignature : u32, pcicountersigner : *const CERT_INFO) -> super::super::Foundation:: BOOL); - CryptMsgVerifyCountersignatureEncoded(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, pcicountersigner) + CryptMsgVerifyCountersignatureEncoded(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, pcicountersigner).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], dwsignertype: u32, pvsigner: *const ::core::ffi::c_void, dwflags: u32, pvextra: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov: P0, dwencodingtype: u32, pbsignerinfo: &[u8], pbsignerinfocountersignature: &[u8], dwsignertype: u32, pvsigner: *const ::core::ffi::c_void, dwflags: u32, pvextra: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptMsgVerifyCountersignatureEncodedEx(hcryptprov : HCRYPTPROV_LEGACY, dwencodingtype : u32, pbsignerinfo : *const u8, cbsignerinfo : u32, pbsignerinfocountersignature : *const u8, cbsignerinfocountersignature : u32, dwsignertype : u32, pvsigner : *const ::core::ffi::c_void, dwflags : u32, pvextra : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, dwsignertype, pvsigner, dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))) + CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.into_param().abi(), dwencodingtype, ::core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len() as _, ::core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len() as _, dwsignertype, pvsigner, dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptProtectData(pdatain: *const CRYPT_INTEGER_BLOB, szdatadescr: P0, poptionalentropy: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppromptstruct: ::core::option::Option<*const CRYPTPROTECT_PROMPTSTRUCT>, dwflags: u32, pdataout: *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation::BOOL +pub unsafe fn CryptProtectData(pdatain: *const CRYPT_INTEGER_BLOB, szdatadescr: P0, poptionalentropy: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppromptstruct: ::core::option::Option<*const CRYPTPROTECT_PROMPTSTRUCT>, dwflags: u32, pdataout: *mut CRYPT_INTEGER_BLOB) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptProtectData(pdatain : *const CRYPT_INTEGER_BLOB, szdatadescr : ::windows_core::PCWSTR, poptionalentropy : *const CRYPT_INTEGER_BLOB, pvreserved : *const ::core::ffi::c_void, ppromptstruct : *const CRYPTPROTECT_PROMPTSTRUCT, dwflags : u32, pdataout : *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation:: BOOL); - CryptProtectData(pdatain, szdatadescr.into_param().abi(), ::core::mem::transmute(poptionalentropy.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppromptstruct.unwrap_or(::std::ptr::null())), dwflags, pdataout) + CryptProtectData(pdatain, szdatadescr.into_param().abi(), ::core::mem::transmute(poptionalentropy.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppromptstruct.unwrap_or(::std::ptr::null())), dwflags, pdataout).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptProtectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptProtectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptProtectMemory(pdatain : *mut ::core::ffi::c_void, cbdatain : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptProtectMemory(pdatain, cbdatain, dwflags) + CryptProtectMemory(pdatain, cbdatain, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: *const ::core::ffi::c_void, dwexpectedcontenttypeflags: CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags: CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags: u32, pdwmsgandcertencodingtype: ::core::option::Option<*mut CERT_QUERY_ENCODING_TYPE>, pdwcontenttype: ::core::option::Option<*mut CERT_QUERY_CONTENT_TYPE>, pdwformattype: ::core::option::Option<*mut CERT_QUERY_FORMAT_TYPE>, phcertstore: ::core::option::Option<*mut HCERTSTORE>, phmsg: ::core::option::Option<*mut *mut ::core::ffi::c_void>, ppvcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: *const ::core::ffi::c_void, dwexpectedcontenttypeflags: CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags: CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags: u32, pdwmsgandcertencodingtype: ::core::option::Option<*mut CERT_QUERY_ENCODING_TYPE>, pdwcontenttype: ::core::option::Option<*mut CERT_QUERY_CONTENT_TYPE>, pdwformattype: ::core::option::Option<*mut CERT_QUERY_FORMAT_TYPE>, phcertstore: ::core::option::Option<*mut HCERTSTORE>, phmsg: ::core::option::Option<*mut *mut ::core::ffi::c_void>, ppvcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptQueryObject(dwobjecttype : CERT_QUERY_OBJECT_TYPE, pvobject : *const ::core::ffi::c_void, dwexpectedcontenttypeflags : CERT_QUERY_CONTENT_TYPE_FLAGS, dwexpectedformattypeflags : CERT_QUERY_FORMAT_TYPE_FLAGS, dwflags : u32, pdwmsgandcertencodingtype : *mut CERT_QUERY_ENCODING_TYPE, pdwcontenttype : *mut CERT_QUERY_CONTENT_TYPE, pdwformattype : *mut CERT_QUERY_FORMAT_TYPE, phcertstore : *mut HCERTSTORE, phmsg : *mut *mut ::core::ffi::c_void, ppvcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); CryptQueryObject( dwobjecttype, @@ -2391,6 +2392,7 @@ pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: * ::core::mem::transmute(phmsg.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppvcontext.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2426,9 +2428,9 @@ pub unsafe fn CryptRegisterOIDInfo(pinfo: *const CRYPT_OID_INFO, dwflags: u32) - #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptReleaseContext(hprov: usize, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptReleaseContext(hprov: usize, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptReleaseContext(hprov : usize, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptReleaseContext(hprov, dwflags) + CryptReleaseContext(hprov, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2457,13 +2459,13 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptRetrieveTimeStamp(wszurl: P0, dwretrievalflags: u32, dwtimeout: u32, pszhashid: P1, ppara: ::core::option::Option<*const CRYPT_TIMESTAMP_PARA>, pbdata: &[u8], pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: ::core::option::Option<*mut HCERTSTORE>) -> super::super::Foundation::BOOL +pub unsafe fn CryptRetrieveTimeStamp(wszurl: P0, dwretrievalflags: u32, dwtimeout: u32, pszhashid: P1, ppara: ::core::option::Option<*const CRYPT_TIMESTAMP_PARA>, pbdata: &[u8], pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: ::core::option::Option<*mut HCERTSTORE>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptRetrieveTimeStamp(wszurl : ::windows_core::PCWSTR, dwretrievalflags : u32, dwtimeout : u32, pszhashid : ::windows_core::PCSTR, ppara : *const CRYPT_TIMESTAMP_PARA, pbdata : *const u8, cbdata : u32, pptscontext : *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner : *mut *mut CERT_CONTEXT, phstore : *mut HCERTSTORE) -> super::super::Foundation:: BOOL); - CryptRetrieveTimeStamp(wszurl.into_param().abi(), dwretrievalflags, dwtimeout, pszhashid.into_param().abi(), ::core::mem::transmute(ppara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))) + CryptRetrieveTimeStamp(wszurl.into_param().abi(), dwretrievalflags, dwtimeout, pszhashid.into_param().abi(), ::core::mem::transmute(ppara.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbdata.as_ptr()), pbdata.len() as _, pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2479,26 +2481,26 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetHashParam(hhash : usize, dwparam : CRYPT_SET_HASH_PARAM, pbdata : *const u8, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptSetHashParam(hhash, dwparam, pbdata, dwflags) + CryptSetHashParam(hhash, dwparam, pbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CryptSetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, pvdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSetKeyIdentifierProperty(pkeyidentifier : *const CRYPT_INTEGER_BLOB, dwpropid : u32, dwflags : u32, pwszcomputername : ::windows_core::PCWSTR, pvreserved : *const ::core::ffi::c_void, pvdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptSetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))) + CryptSetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.into_param().abi(), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetKeyParam(hkey : usize, dwparam : CRYPT_KEY_PARAM_ID, pbdata : *const u8, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptSetKeyParam(hkey, dwparam, pbdata, dwflags) + CryptSetKeyParam(hkey, dwparam, pbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] @@ -2515,128 +2517,128 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetProvParam(hprov: usize, dwparam: CRYPT_SET_PROV_PARAM_ID, pbdata: *const u8, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptSetProvParam(hprov: usize, dwparam: CRYPT_SET_PROV_PARAM_ID, pbdata: *const u8, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetProvParam(hprov : usize, dwparam : CRYPT_SET_PROV_PARAM_ID, pbdata : *const u8, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptSetProvParam(hprov, dwparam, pbdata, dwflags) + CryptSetProvParam(hprov, dwparam, pbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetProviderA(pszprovname: P0, dwprovtype: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSetProviderA(pszprovname: P0, dwprovtype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetProviderA(pszprovname : ::windows_core::PCSTR, dwprovtype : u32) -> super::super::Foundation:: BOOL); - CryptSetProviderA(pszprovname.into_param().abi(), dwprovtype) + CryptSetProviderA(pszprovname.into_param().abi(), dwprovtype).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetProviderExA(pszprovname: P0, dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSetProviderExA(pszprovname: P0, dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetProviderExA(pszprovname : ::windows_core::PCSTR, dwprovtype : u32, pdwreserved : *const u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptSetProviderExA(pszprovname.into_param().abi(), dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags) + CryptSetProviderExA(pszprovname.into_param().abi(), dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetProviderExW(pszprovname: P0, dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSetProviderExW(pszprovname: P0, dwprovtype: u32, pdwreserved: ::core::option::Option<*const u32>, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetProviderExW(pszprovname : ::windows_core::PCWSTR, dwprovtype : u32, pdwreserved : *const u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptSetProviderExW(pszprovname.into_param().abi(), dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags) + CryptSetProviderExW(pszprovname.into_param().abi(), dwprovtype, ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSetProviderW(pszprovname: P0, dwprovtype: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSetProviderW(pszprovname: P0, dwprovtype: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSetProviderW(pszprovname : ::windows_core::PCWSTR, dwprovtype : u32) -> super::super::Foundation:: BOOL); - CryptSetProviderW(pszprovname.into_param().abi(), dwprovtype) + CryptSetProviderW(pszprovname.into_param().abi(), dwprovtype).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey: P0, dwkeyspec: CERT_KEY_SPEC, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P1, pvstructinfo: *const ::core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey: P0, dwkeyspec: CERT_KEY_SPEC, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P1, pvstructinfo: *const ::core::ffi::c_void, psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbencoded: ::core::option::Option<*mut u8>, pcbencoded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignAndEncodeCertificate(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : CERT_KEY_SPEC, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, lpszstructtype : ::windows_core::PCSTR, pvstructinfo : *const ::core::ffi::c_void, psignaturealgorithm : *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo : *const ::core::ffi::c_void, pbencoded : *mut u8, pcbencoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignAndEncodeCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded) + CryptSignAndEncodeCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, lpszstructtype.into_param().abi(), pvstructinfo, psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbencoded.unwrap_or(::std::ptr::null_mut())), pcbencoded).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobesignedandencrypted: &[u8], pbsignedandencryptedblob: ::core::option::Option<*mut u8>, pcbsignedandencryptedblob: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobesignedandencrypted: &[u8], pbsignedandencryptedblob: ::core::option::Option<*mut u8>, pcbsignedandencryptedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignAndEncryptMessage(psignpara : *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara : *const CRYPT_ENCRYPT_MESSAGE_PARA, crecipientcert : u32, rgprecipientcert : *const *const CERT_CONTEXT, pbtobesignedandencrypted : *const u8, cbtobesignedandencrypted : u32, pbsignedandencryptedblob : *mut u8, pcbsignedandencryptedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len() as _, ::core::mem::transmute(pbsignedandencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedandencryptedblob) + CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len() as _, ::core::mem::transmute(rgprecipientcert.as_ptr()), ::core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len() as _, ::core::mem::transmute(pbsignedandencryptedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedandencryptedblob).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignCertificate(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencodedtobesigned: &[u8], psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbsignature: ::core::option::Option<*mut u8>, pcbsignature: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSignCertificate(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencodedtobesigned: &[u8], psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: ::core::option::Option<*const ::core::ffi::c_void>, pbsignature: ::core::option::Option<*mut u8>, pcbsignature: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignCertificate(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : u32, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencodedtobesigned : *const u8, cbencodedtobesigned : u32, psignaturealgorithm : *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo : *const ::core::ffi::c_void, pbsignature : *mut u8, pcbsignature : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len() as _, psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pcbsignature) + CryptSignCertificate(hcryptprovorncryptkey.into_param().abi(), dwkeyspec, dwcertencodingtype, ::core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len() as _, psignaturealgorithm, ::core::mem::transmute(pvhashauxinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pcbsignature).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: ::core::option::Option<*mut u8>, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: ::core::option::Option<*mut u8>, pdwsiglen: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSignHashA(hhash : usize, dwkeyspec : u32, szdescription : ::windows_core::PCSTR, dwflags : u32, pbsignature : *mut u8, pdwsiglen : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignHashA(hhash, dwkeyspec, szdescription.into_param().abi(), dwflags, ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pdwsiglen) + CryptSignHashA(hhash, dwkeyspec, szdescription.into_param().abi(), dwflags, ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pdwsiglen).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: ::core::option::Option<*mut u8>, pdwsiglen: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: ::core::option::Option<*mut u8>, pdwsiglen: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptSignHashW(hhash : usize, dwkeyspec : u32, szdescription : ::windows_core::PCWSTR, dwflags : u32, pbsignature : *mut u8, pdwsiglen : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignHashW(hhash, dwkeyspec, szdescription.into_param().abi(), dwflags, ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pdwsiglen) + CryptSignHashW(hhash, dwkeyspec, szdescription.into_param().abi(), dwflags, ::core::mem::transmute(pbsignature.unwrap_or(::std::ptr::null_mut())), pdwsiglen).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: P0, ctobesigned: u32, rgpbtobesigned: ::core::option::Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: ::core::option::Option<*mut u8>, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: P0, ctobesigned: u32, rgpbtobesigned: ::core::option::Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: ::core::option::Option<*mut u8>, pcbsignedblob: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignMessage(psignpara : *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature : super::super::Foundation:: BOOL, ctobesigned : u32, rgpbtobesigned : *const *const u8, rgcbtobesigned : *const u32, pbsignedblob : *mut u8, pcbsignedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignMessage(psignpara, fdetachedsignature.into_param().abi(), ctobesigned, ::core::mem::transmute(rgpbtobesigned.unwrap_or(::std::ptr::null())), rgcbtobesigned, ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob) + CryptSignMessage(psignpara, fdetachedsignature.into_param().abi(), ctobesigned, ::core::mem::transmute(rgpbtobesigned.unwrap_or(::std::ptr::null())), rgcbtobesigned, ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: &[u8], pbsignedblob: ::core::option::Option<*mut u8>, pcbsignedblob: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: &[u8], pbsignedblob: ::core::option::Option<*mut u8>, pcbsignedblob: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptSignMessageWithKey(psignpara : *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned : *const u8, cbtobesigned : u32, pbsignedblob : *mut u8, pcbsignedblob : *mut u32) -> super::super::Foundation:: BOOL); - CryptSignMessageWithKey(psignpara, ::core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len() as _, ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob) + CryptSignMessageWithKey(psignpara, ::core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len() as _, ::core::mem::transmute(pbsignedblob.unwrap_or(::std::ptr::null_mut())), pcbsignedblob).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptStringToBinaryA(pszstring: &[u8], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptStringToBinaryA(pszstring: &[u8], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptStringToBinaryA(pszstring : ::windows_core::PCSTR, cchstring : u32, dwflags : CRYPT_STRING, pbbinary : *mut u8, pcbbinary : *mut u32, pdwskip : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - CryptStringToBinaryA(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))) + CryptStringToBinaryA(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptStringToBinaryW(pszstring: &[u16], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptStringToBinaryW(pszstring: &[u16], dwflags: CRYPT_STRING, pbbinary: ::core::option::Option<*mut u8>, pcbbinary: *mut u32, pdwskip: ::core::option::Option<*mut u32>, pdwflags: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptStringToBinaryW(pszstring : ::windows_core::PCWSTR, cchstring : u32, dwflags : CRYPT_STRING, pbbinary : *mut u8, pcbbinary : *mut u32, pdwskip : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - CryptStringToBinaryW(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))) + CryptStringToBinaryW(::core::mem::transmute(pszstring.as_ptr()), pszstring.len() as _, dwflags, ::core::mem::transmute(pbbinary.unwrap_or(::std::ptr::null_mut())), pcbbinary, ::core::mem::transmute(pdwskip.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2648,23 +2650,23 @@ pub unsafe fn CryptUninstallCancelRetrieval(dwflags: u32, pvreserved: ::core::op #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUninstallDefaultContext(hdefaultcontext: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptUninstallDefaultContext(hdefaultcontext: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: u32, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptUninstallDefaultContext(hdefaultcontext : *const ::core::ffi::c_void, dwflags : u32, pvreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptUninstallDefaultContext(::core::mem::transmute(hdefaultcontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))) + CryptUninstallDefaultContext(::core::mem::transmute(hdefaultcontext.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUnprotectData(pdatain: *const CRYPT_INTEGER_BLOB, ppszdatadescr: ::core::option::Option<*mut ::windows_core::PWSTR>, poptionalentropy: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppromptstruct: ::core::option::Option<*const CRYPTPROTECT_PROMPTSTRUCT>, dwflags: u32, pdataout: *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation::BOOL { +pub unsafe fn CryptUnprotectData(pdatain: *const CRYPT_INTEGER_BLOB, ppszdatadescr: ::core::option::Option<*mut ::windows_core::PWSTR>, poptionalentropy: ::core::option::Option<*const CRYPT_INTEGER_BLOB>, pvreserved: ::core::option::Option<*const ::core::ffi::c_void>, ppromptstruct: ::core::option::Option<*const CRYPTPROTECT_PROMPTSTRUCT>, dwflags: u32, pdataout: *mut CRYPT_INTEGER_BLOB) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptUnprotectData(pdatain : *const CRYPT_INTEGER_BLOB, ppszdatadescr : *mut ::windows_core::PWSTR, poptionalentropy : *const CRYPT_INTEGER_BLOB, pvreserved : *const ::core::ffi::c_void, ppromptstruct : *const CRYPTPROTECT_PROMPTSTRUCT, dwflags : u32, pdataout : *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation:: BOOL); - CryptUnprotectData(pdatain, ::core::mem::transmute(ppszdatadescr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(poptionalentropy.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppromptstruct.unwrap_or(::std::ptr::null())), dwflags, pdataout) + CryptUnprotectData(pdatain, ::core::mem::transmute(ppszdatadescr.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(poptionalentropy.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pvreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(ppromptstruct.unwrap_or(::std::ptr::null())), dwflags, pdataout).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUnprotectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CryptUnprotectMemory(pdatain: *mut ::core::ffi::c_void, cbdatain: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptUnprotectMemory(pdatain : *mut ::core::ffi::c_void, cbdatain : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptUnprotectMemory(pdatain, cbdatain, dwflags) + CryptUnprotectMemory(pdatain, cbdatain, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2698,98 +2700,98 @@ pub unsafe fn CryptUnregisterOIDInfo(pinfo: *const CRYPT_OID_INFO) -> super::sup #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptUpdateProtectedState(poldsid: P0, pwszoldpassword: P1, dwflags: u32, pdwsuccesscount: ::core::option::Option<*mut u32>, pdwfailurecount: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn CryptUpdateProtectedState(poldsid: P0, pwszoldpassword: P1, dwflags: u32, pdwsuccesscount: ::core::option::Option<*mut u32>, pdwfailurecount: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn CryptUpdateProtectedState(poldsid : super::super::Foundation:: PSID, pwszoldpassword : ::windows_core::PCWSTR, dwflags : u32, pdwsuccesscount : *mut u32, pdwfailurecount : *mut u32) -> super::super::Foundation:: BOOL); - CryptUpdateProtectedState(poldsid.into_param().abi(), pwszoldpassword.into_param().abi(), dwflags, ::core::mem::transmute(pdwsuccesscount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwfailurecount.unwrap_or(::std::ptr::null_mut()))) + CryptUpdateProtectedState(poldsid.into_param().abi(), pwszoldpassword.into_param().abi(), dwflags, ::core::mem::transmute(pdwsuccesscount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwfailurecount.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], ppublickey: *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation::BOOL +pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], ppublickey: *const CERT_PUBLIC_KEY_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyCertificateSignature(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, pbencoded : *const u8, cbencoded : u32, ppublickey : *const CERT_PUBLIC_KEY_INFO) -> super::super::Foundation:: BOOL); - CryptVerifyCertificateSignature(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ppublickey) + CryptVerifyCertificateSignature(hcryptprov.into_param().abi(), dwcertencodingtype, ::core::mem::transmute(pbencoded.as_ptr()), pbencoded.len() as _, ppublickey).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyCertificateSignatureEx(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, dwissuertype: u32, pvissuer: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn CryptVerifyCertificateSignatureEx(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwsubjecttype: u32, pvsubject: *const ::core::ffi::c_void, dwissuertype: u32, pvissuer: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: CRYPT_VERIFY_CERT_FLAGS, pvextra: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyCertificateSignatureEx(hcryptprov : HCRYPTPROV_LEGACY, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwsubjecttype : u32, pvsubject : *const ::core::ffi::c_void, dwissuertype : u32, pvissuer : *const ::core::ffi::c_void, dwflags : CRYPT_VERIFY_CERT_FLAGS, pvextra : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptVerifyCertificateSignatureEx(hcryptprov.into_param().abi(), dwcertencodingtype, dwsubjecttype, pvsubject, dwissuertype, ::core::mem::transmute(pvissuer.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyCertificateSignatureEx(hcryptprov.into_param().abi(), dwcertencodingtype, dwsubjecttype, pvsubject, dwissuertype, ::core::mem::transmute(pvissuer.unwrap_or(::std::ptr::null())), dwflags, ::core::mem::transmute(pvextra.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: &[u8], ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: &[u8], ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyDetachedMessageHash(phashpara : *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob : *const u8, cbdetachedhashblob : u32, ctobehashed : u32, rgpbtobehashed : *const *const u8, rgcbtobehashed : *const u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyDetachedMessageHash(phashpara, ::core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len() as _, ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyDetachedMessageHash(phashpara, ::core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len() as _, ctobehashed, rgpbtobehashed, rgcbtobehashed, ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyDetachedMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbdetachedsignblob: &[u8], ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptVerifyDetachedMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbdetachedsignblob: &[u8], ctobesigned: u32, rgpbtobesigned: *const *const u8, rgcbtobesigned: *const u32, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyDetachedMessageSignature(pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbdetachedsignblob : *const u8, cbdetachedsignblob : u32, ctobesigned : u32, rgpbtobesigned : *const *const u8, rgcbtobesigned : *const u32, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len() as _, ctobesigned, rgpbtobesigned, rgcbtobesigned, ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len() as _, ctobesigned, rgpbtobesigned, rgcbtobesigned, ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: &[u8], pbtobehashed: ::core::option::Option<*mut u8>, pcbtobehashed: ::core::option::Option<*mut u32>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: &[u8], pbtobehashed: ::core::option::Option<*mut u8>, pcbtobehashed: ::core::option::Option<*mut u32>, pbcomputedhash: ::core::option::Option<*mut u8>, pcbcomputedhash: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageHash(phashpara : *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob : *const u8, cbhashedblob : u32, pbtobehashed : *mut u8, pcbtobehashed : *mut u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyMessageHash(phashpara, ::core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len() as _, ::core::mem::transmute(pbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyMessageHash(phashpara, ::core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len() as _, ::core::mem::transmute(pbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbtobehashed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbcomputedhash.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbcomputedhash.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptVerifyMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>, ppsignercert: ::core::option::Option<*mut *mut CERT_CONTEXT>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageSignature(pverifypara : *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex : u32, pbsignedblob : *const u8, cbsignedblob : u32, pbdecoded : *mut u8, pcbdecoded : *mut u32, ppsignercert : *mut *mut CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CryptVerifyMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyMessageSignature(pverifypara, dwsignerindex, ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(ppsignercert.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: ::core::option::Option<*const CERT_PUBLIC_KEY_INFO>, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: ::core::option::Option<*const CERT_PUBLIC_KEY_INFO>, pbsignedblob: &[u8], pbdecoded: ::core::option::Option<*mut u8>, pcbdecoded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyMessageSignatureWithKey(pverifypara : *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo : *const CERT_PUBLIC_KEY_INFO, pbsignedblob : *const u8, cbsignedblob : u32, pbdecoded : *mut u8, pcbdecoded : *mut u32) -> super::super::Foundation:: BOOL); - CryptVerifyMessageSignatureWithKey(pverifypara, ::core::mem::transmute(ppublickeyinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyMessageSignatureWithKey(pverifypara, ::core::mem::transmute(ppublickeyinfo.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len() as _, ::core::mem::transmute(pbdecoded.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdecoded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifySignatureA(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P0, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptVerifySignatureA(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptVerifySignatureA(hhash : usize, pbsignature : *const u8, dwsiglen : u32, hpubkey : usize, szdescription : ::windows_core::PCSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptVerifySignatureA(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags) + CryptVerifySignatureA(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifySignatureW(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P0, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CryptVerifySignatureW(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CryptVerifySignatureW(hhash : usize, pbsignature : *const u8, dwsiglen : u32, hpubkey : usize, szdescription : ::windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - CryptVerifySignatureW(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags) + CryptVerifySignatureW(hhash, ::core::mem::transmute(pbsignature.as_ptr()), pbsignature.len() as _, hpubkey, szdescription.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CryptVerifyTimeStampSignature(pbtscontentinfo: &[u8], pbdata: ::core::option::Option<&[u8]>, hadditionalstore: P0, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: ::core::option::Option<*mut HCERTSTORE>) -> super::super::Foundation::BOOL +pub unsafe fn CryptVerifyTimeStampSignature(pbtscontentinfo: &[u8], pbdata: ::core::option::Option<&[u8]>, hadditionalstore: P0, pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: ::core::option::Option<*mut HCERTSTORE>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("crypt32.dll" "system" fn CryptVerifyTimeStampSignature(pbtscontentinfo : *const u8, cbtscontentinfo : u32, pbdata : *const u8, cbdata : u32, hadditionalstore : HCERTSTORE, pptscontext : *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner : *mut *mut CERT_CONTEXT, phstore : *mut HCERTSTORE) -> super::super::Foundation:: BOOL); - CryptVerifyTimeStampSignature(::core::mem::transmute(pbtscontentinfo.as_ptr()), pbtscontentinfo.len() as _, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), hadditionalstore.into_param().abi(), pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))) + CryptVerifyTimeStampSignature(::core::mem::transmute(pbtscontentinfo.as_ptr()), pbtscontentinfo.len() as _, ::core::mem::transmute(pbdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len() as _), hadditionalstore.into_param().abi(), pptscontext, pptssigner, ::core::mem::transmute(phstore.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] @@ -3403,24 +3405,24 @@ where #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PFXExportCertStore(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P1, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn PFXExportCertStore(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P1, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn PFXExportCertStore(hstore : HCERTSTORE, ppfx : *mut CRYPT_INTEGER_BLOB, szpassword : ::windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: BOOL); - PFXExportCertStore(hstore.into_param().abi(), ppfx, szpassword.into_param().abi(), dwflags) + PFXExportCertStore(hstore.into_param().abi(), ppfx, szpassword.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PFXExportCertStoreEx(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P1, pvpara: *const ::core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn PFXExportCertStoreEx(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P1, pvpara: *const ::core::ffi::c_void, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("crypt32.dll" "system" fn PFXExportCertStoreEx(hstore : HCERTSTORE, ppfx : *mut CRYPT_INTEGER_BLOB, szpassword : ::windows_core::PCWSTR, pvpara : *const ::core::ffi::c_void, dwflags : u32) -> super::super::Foundation:: BOOL); - PFXExportCertStoreEx(hstore.into_param().abi(), ppfx, szpassword.into_param().abi(), pvpara, dwflags) + PFXExportCertStoreEx(hstore.into_param().abi(), ppfx, szpassword.into_param().abi(), pvpara, dwflags).ok() } #[doc = "*Required features: `\"Win32_Security_Cryptography\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs index de665e0751..dd70ae3160 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Isolation/mod.rs @@ -56,13 +56,13 @@ where #[doc = "*Required features: `\"Win32_Security_Isolation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAppContainerNamedObjectPath(token: P0, appcontainersid: P1, objectpath: ::core::option::Option<&mut [u16]>, returnlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetAppContainerNamedObjectPath(token: P0, appcontainersid: P1, objectpath: ::core::option::Option<&mut [u16]>, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetAppContainerNamedObjectPath(token : super::super::Foundation:: HANDLE, appcontainersid : super::super::Foundation:: PSID, objectpathlength : u32, objectpath : ::windows_core::PWSTR, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetAppContainerNamedObjectPath(token.into_param().abi(), appcontainersid.into_param().abi(), objectpath.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(objectpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnlength) + GetAppContainerNamedObjectPath(token.into_param().abi(), appcontainersid.into_param().abi(), objectpath.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(objectpath.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), returnlength).ok() } #[doc = "*Required features: `\"Win32_Security_Isolation\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] diff --git a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs index 88f29b32b5..de3d16af1b 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs @@ -89,29 +89,29 @@ where #[doc = "*Required features: `\"Win32_Security_WinTrust\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WintrustAddActionID(pgactionid: *const ::windows_core::GUID, fdwflags: u32, psprovinfo: *const CRYPT_REGISTER_ACTIONID) -> super::super::Foundation::BOOL { +pub unsafe fn WintrustAddActionID(pgactionid: *const ::windows_core::GUID, fdwflags: u32, psprovinfo: *const CRYPT_REGISTER_ACTIONID) -> ::windows_core::Result<()> { ::windows_targets::link!("wintrust.dll" "system" fn WintrustAddActionID(pgactionid : *const ::windows_core::GUID, fdwflags : u32, psprovinfo : *const CRYPT_REGISTER_ACTIONID) -> super::super::Foundation:: BOOL); - WintrustAddActionID(pgactionid, fdwflags, psprovinfo) + WintrustAddActionID(pgactionid, fdwflags, psprovinfo).ok() } #[doc = "*Required features: `\"Win32_Security_WinTrust\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WintrustAddDefaultForUsage(pszusageoid: P0, psdefusage: *const CRYPT_PROVIDER_REGDEFUSAGE) -> super::super::Foundation::BOOL +pub unsafe fn WintrustAddDefaultForUsage(pszusageoid: P0, psdefusage: *const CRYPT_PROVIDER_REGDEFUSAGE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn WintrustAddDefaultForUsage(pszusageoid : ::windows_core::PCSTR, psdefusage : *const CRYPT_PROVIDER_REGDEFUSAGE) -> super::super::Foundation:: BOOL); - WintrustAddDefaultForUsage(pszusageoid.into_param().abi(), psdefusage) + WintrustAddDefaultForUsage(pszusageoid.into_param().abi(), psdefusage).ok() } #[doc = "*Required features: `\"Win32_Security_WinTrust\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WintrustGetDefaultForUsage(dwaction: WINTRUST_GET_DEFAULT_FOR_USAGE_ACTION, pszusageoid: P0, psusage: *mut CRYPT_PROVIDER_DEFUSAGE) -> super::super::Foundation::BOOL +pub unsafe fn WintrustGetDefaultForUsage(dwaction: WINTRUST_GET_DEFAULT_FOR_USAGE_ACTION, pszusageoid: P0, psusage: *mut CRYPT_PROVIDER_DEFUSAGE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wintrust.dll" "system" fn WintrustGetDefaultForUsage(dwaction : WINTRUST_GET_DEFAULT_FOR_USAGE_ACTION, pszusageoid : ::windows_core::PCSTR, psusage : *mut CRYPT_PROVIDER_DEFUSAGE) -> super::super::Foundation:: BOOL); - WintrustGetDefaultForUsage(dwaction, pszusageoid.into_param().abi(), psusage) + WintrustGetDefaultForUsage(dwaction, pszusageoid.into_param().abi(), psusage).ok() } #[doc = "*Required features: `\"Win32_Security_WinTrust\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 9f3dd9c5f3..94a804a7ef 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -33,18 +33,18 @@ pub mod WinWlx; #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheck(psecuritydescriptor: P0, clienttoken: P1, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheck(psecuritydescriptor: P0, clienttoken: P1, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheck(psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::Foundation:: BOOL); - AccessCheck(psecuritydescriptor.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus) + AccessCheck(psecuritydescriptor.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: ::core::option::Option<*const ::core::ffi::c_void>, objecttypename: P1, objectname: P2, securitydescriptor: P3, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P4, grantedaccess: *mut u32, accessstatus: *mut i32, pfgenerateonclose: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: ::core::option::Option<*const ::core::ffi::c_void>, objecttypename: P1, objectname: P2, securitydescriptor: P3, desiredaccess: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P4, grantedaccess: *mut u32, accessstatus: *mut i32, pfgenerateonclose: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -53,7 +53,7 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, objecttypename : ::windows_core::PCSTR, objectname : ::windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut i32, pfgenerateonclose : *mut i32) -> super::Foundation:: BOOL); - AccessCheckAndAuditAlarmA(subsystemname.into_param().abi(), ::core::mem::transmute(handleid.unwrap_or(::std::ptr::null())), objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), desiredaccess, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatus, pfgenerateonclose) + AccessCheckAndAuditAlarmA(subsystemname.into_param().abi(), ::core::mem::transmute(handleid.unwrap_or(::std::ptr::null())), objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), desiredaccess, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatus, pfgenerateonclose).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -72,19 +72,19 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckByType(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: ::core::option::Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByType(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: ::core::option::Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckByType(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : super::Foundation:: PSID, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::Foundation:: BOOL); - AccessCheckByType(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len() as _), genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus) + AccessCheckByType(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len() as _), genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, securitydescriptor: P3, principalselfsid: P4, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatus: *mut i32, pfgenerateonclose: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeAndAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, securitydescriptor: P3, principalselfsid: P4, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatus: *mut i32, pfgenerateonclose: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -112,6 +112,7 @@ where accessstatus, pfgenerateonclose, ) + .ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -148,19 +149,19 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckByTypeResultList(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccesslist: *mut u32, accessstatuslist: *mut u32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultList(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, privilegeset: ::core::option::Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccesslist: *mut u32, accessstatuslist: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultList(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : super::Foundation:: PSID, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, privilegeset : *mut PRIVILEGE_SET, privilegesetlength : *mut u32, grantedaccesslist : *mut u32, accessstatuslist : *mut u32) -> super::Foundation:: BOOL); - AccessCheckByTypeResultList(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccesslist, accessstatuslist) + AccessCheckByTypeResultList(psecuritydescriptor.into_param().abi(), principalselfsid.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, ::core::mem::transmute(privilegeset.unwrap_or(::std::ptr::null_mut())), privilegesetlength, grantedaccesslist, accessstatuslist).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, securitydescriptor: P3, principalselfsid: P4, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, securitydescriptor: P3, principalselfsid: P4, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -170,12 +171,12 @@ where P5: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, objecttypename : ::windows_core::PCSTR, objectname : ::windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : super::Foundation:: PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut i32) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.into_param().abi(), handleid, objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), principalselfsid.into_param().abi(), desiredaccess, audittype, flags, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose) + AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.into_param().abi(), handleid, objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), principalselfsid.into_param().abi(), desiredaccess, audittype, flags, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const ::core::ffi::c_void, clienttoken: P1, objecttypename: P2, objectname: P3, securitydescriptor: P4, principalselfsid: P5, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P6, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut i32) -> super::Foundation::BOOL +pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname: P0, handleid: *const ::core::ffi::c_void, clienttoken: P1, objecttypename: P2, objectname: P3, securitydescriptor: P4, principalselfsid: P5, desiredaccess: u32, audittype: AUDIT_EVENT_TYPE, flags: u32, objecttypelist: ::core::option::Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P6, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, @@ -186,7 +187,7 @@ where P6: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : ::windows_core::PCSTR, objectname : ::windows_core::PCSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : super::Foundation:: PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut i32) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.into_param().abi(), handleid, clienttoken.into_param().abi(), objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), principalselfsid.into_param().abi(), desiredaccess, audittype, flags, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose) + AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.into_param().abi(), handleid, clienttoken.into_param().abi(), objecttypename.into_param().abi(), objectname.into_param().abi(), securitydescriptor.into_param().abi(), principalselfsid.into_param().abi(), desiredaccess, audittype, flags, ::core::mem::transmute(objecttypelist.unwrap_or(::std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.into_param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -222,182 +223,182 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessAllowedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessAllowedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessAllowedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessAllowedAce(pacl, dwacerevision, accessmask, psid.into_param().abi()) + AddAccessAllowedAce(pacl, dwacerevision, accessmask, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessAllowedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessAllowedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessAllowedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessAllowedAceEx(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()) + AddAccessAllowedAceEx(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessAllowedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessAllowedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessAllowedObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const ::windows_core::GUID, inheritedobjecttypeguid : *const ::windows_core::GUID, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessAllowedObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi()) + AddAccessAllowedObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessDeniedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessDeniedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessDeniedAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, accessmask : u32, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessDeniedAce(pacl, dwacerevision, accessmask, psid.into_param().abi()) + AddAccessDeniedAce(pacl, dwacerevision, accessmask, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessDeniedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessDeniedAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessDeniedAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessDeniedAceEx(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()) + AddAccessDeniedAceEx(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAccessDeniedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddAccessDeniedObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAccessDeniedObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const ::windows_core::GUID, inheritedobjecttypeguid : *const ::windows_core::GUID, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddAccessDeniedObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi()) + AddAccessDeniedObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwstartingaceindex: u32, pacelist: *const ::core::ffi::c_void, nacelistlength: u32) -> super::Foundation::BOOL { +pub unsafe fn AddAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwstartingaceindex: u32, pacelist: *const ::core::ffi::c_void, nacelistlength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn AddAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwstartingaceindex : u32, pacelist : *const ::core::ffi::c_void, nacelistlength : u32) -> super::Foundation:: BOOL); - AddAce(pacl, dwacerevision, dwstartingaceindex, pacelist, nacelistlength) + AddAce(pacl, dwacerevision, dwstartingaceindex, pacelist, nacelistlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> super::Foundation::BOOL +pub unsafe fn AddAuditAccessAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwaccessmask: u32, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, dwaccessmask : u32, psid : super::Foundation:: PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAce(pacl, dwacerevision, dwaccessmask, psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()) + AddAuditAccessAce(pacl, dwacerevision, dwaccessmask, psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> super::Foundation::BOOL +pub unsafe fn AddAuditAccessAceEx(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, dwaccessmask: u32, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessAceEx(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, dwaccessmask : u32, psid : super::Foundation:: PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessAceEx(pacl, dwacerevision, aceflags, dwaccessmask, psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()) + AddAuditAccessAceEx(pacl, dwacerevision, aceflags, dwaccessmask, psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> super::Foundation::BOOL +pub unsafe fn AddAuditAccessObjectAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, objecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, inheritedobjecttypeguid: ::core::option::Option<*const ::windows_core::GUID>, psid: P0, bauditsuccess: P1, bauditfailure: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddAuditAccessObjectAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, objecttypeguid : *const ::windows_core::GUID, inheritedobjecttypeguid : *const ::windows_core::GUID, psid : super::Foundation:: PSID, bauditsuccess : super::Foundation:: BOOL, bauditfailure : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AddAuditAccessObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()) + AddAuditAccessObjectAce(pacl, dwacerevision, aceflags, accessmask, ::core::mem::transmute(objecttypeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(inheritedobjecttypeguid.unwrap_or(::std::ptr::null())), psid.into_param().abi(), bauditsuccess.into_param().abi(), bauditfailure.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddConditionalAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, acetype: u8, accessmask: u32, psid: P0, conditionstr: P1, returnlength: *mut u32) -> super::Foundation::BOOL +pub unsafe fn AddConditionalAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, acetype: u8, accessmask: u32, psid: P0, conditionstr: P1, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn AddConditionalAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, acetype : u8, accessmask : u32, psid : super::Foundation:: PSID, conditionstr : ::windows_core::PCWSTR, returnlength : *mut u32) -> super::Foundation:: BOOL); - AddConditionalAce(pacl, dwacerevision, aceflags, acetype, accessmask, psid.into_param().abi(), conditionstr.into_param().abi(), returnlength) + AddConditionalAce(pacl, dwacerevision, aceflags, acetype, accessmask, psid.into_param().abi(), conditionstr.into_param().abi(), returnlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddMandatoryAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, mandatorypolicy: u32, plabelsid: P0) -> super::Foundation::BOOL +pub unsafe fn AddMandatoryAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, mandatorypolicy: u32, plabelsid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AddMandatoryAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, mandatorypolicy : u32, plabelsid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddMandatoryAce(pacl, dwacerevision, aceflags, mandatorypolicy, plabelsid.into_param().abi()) + AddMandatoryAce(pacl, dwacerevision, aceflags, mandatorypolicy, plabelsid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddResourceAttributeAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0, pattributeinfo: *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength: *mut u32) -> super::Foundation::BOOL +pub unsafe fn AddResourceAttributeAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0, pattributeinfo: *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AddResourceAttributeAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : super::Foundation:: PSID, pattributeinfo : *const CLAIM_SECURITY_ATTRIBUTES_INFORMATION, preturnlength : *mut u32) -> super::Foundation:: BOOL); - AddResourceAttributeAce(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi(), pattributeinfo, preturnlength) + AddResourceAttributeAce(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi(), pattributeinfo, preturnlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddScopedPolicyIDAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> super::Foundation::BOOL +pub unsafe fn AddScopedPolicyIDAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, aceflags: ACE_FLAGS, accessmask: u32, psid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AddScopedPolicyIDAce(pacl : *mut ACL, dwacerevision : ACE_REVISION, aceflags : ACE_FLAGS, accessmask : u32, psid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - AddScopedPolicyIDAce(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()) + AddScopedPolicyIDAce(pacl, dwacerevision, aceflags, accessmask, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AdjustTokenGroups(tokenhandle: P0, resettodefault: P1, newstate: ::core::option::Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: ::core::option::Option<*mut TOKEN_GROUPS>, returnlength: ::core::option::Option<*mut u32>) -> super::Foundation::BOOL +pub unsafe fn AdjustTokenGroups(tokenhandle: P0, resettodefault: P1, newstate: ::core::option::Option<*const TOKEN_GROUPS>, bufferlength: u32, previousstate: ::core::option::Option<*mut TOKEN_GROUPS>, returnlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AdjustTokenGroups(tokenhandle : super::Foundation:: HANDLE, resettodefault : super::Foundation:: BOOL, newstate : *const TOKEN_GROUPS, bufferlength : u32, previousstate : *mut TOKEN_GROUPS, returnlength : *mut u32) -> super::Foundation:: BOOL); - AdjustTokenGroups(tokenhandle.into_param().abi(), resettodefault.into_param().abi(), ::core::mem::transmute(newstate.unwrap_or(::std::ptr::null())), bufferlength, ::core::mem::transmute(previousstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))) + AdjustTokenGroups(tokenhandle.into_param().abi(), resettodefault.into_param().abi(), ::core::mem::transmute(newstate.unwrap_or(::std::ptr::null())), bufferlength, ::core::mem::transmute(previousstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AdjustTokenPrivileges(tokenhandle: P0, disableallprivileges: P1, newstate: ::core::option::Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: ::core::option::Option<*mut TOKEN_PRIVILEGES>, returnlength: ::core::option::Option<*mut u32>) -> super::Foundation::BOOL +pub unsafe fn AdjustTokenPrivileges(tokenhandle: P0, disableallprivileges: P1, newstate: ::core::option::Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: ::core::option::Option<*mut TOKEN_PRIVILEGES>, returnlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn AdjustTokenPrivileges(tokenhandle : super::Foundation:: HANDLE, disableallprivileges : super::Foundation:: BOOL, newstate : *const TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::Foundation:: BOOL); - AdjustTokenPrivileges(tokenhandle.into_param().abi(), disableallprivileges.into_param().abi(), ::core::mem::transmute(newstate.unwrap_or(::std::ptr::null())), bufferlength, ::core::mem::transmute(previousstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))) + AdjustTokenPrivileges(tokenhandle.into_param().abi(), disableallprivileges.into_param().abi(), ::core::mem::transmute(newstate.unwrap_or(::std::ptr::null())), bufferlength, ::core::mem::transmute(previousstate.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocateAndInitializeSid(pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8, nsubauthority0: u32, nsubauthority1: u32, nsubauthority2: u32, nsubauthority3: u32, nsubauthority4: u32, nsubauthority5: u32, nsubauthority6: u32, nsubauthority7: u32, psid: *mut super::Foundation::PSID) -> super::Foundation::BOOL { +pub unsafe fn AllocateAndInitializeSid(pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8, nsubauthority0: u32, nsubauthority1: u32, nsubauthority2: u32, nsubauthority3: u32, nsubauthority4: u32, nsubauthority5: u32, nsubauthority6: u32, nsubauthority7: u32, psid: *mut super::Foundation::PSID) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn AllocateAndInitializeSid(pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8, nsubauthority0 : u32, nsubauthority1 : u32, nsubauthority2 : u32, nsubauthority3 : u32, nsubauthority4 : u32, nsubauthority5 : u32, nsubauthority6 : u32, nsubauthority7 : u32, psid : *mut super::Foundation:: PSID) -> super::Foundation:: BOOL); - AllocateAndInitializeSid(pidentifierauthority, nsubauthoritycount, nsubauthority0, nsubauthority1, nsubauthority2, nsubauthority3, nsubauthority4, nsubauthority5, nsubauthority6, nsubauthority7, psid) + AllocateAndInitializeSid(pidentifierauthority, nsubauthoritycount, nsubauthority0, nsubauthority1, nsubauthority2, nsubauthority3, nsubauthority4, nsubauthority5, nsubauthority6, nsubauthority7, psid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocateLocallyUniqueId(luid: *mut super::Foundation::LUID) -> super::Foundation::BOOL { +pub unsafe fn AllocateLocallyUniqueId(luid: *mut super::Foundation::LUID) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn AllocateLocallyUniqueId(luid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - AllocateLocallyUniqueId(luid) + AllocateLocallyUniqueId(luid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -416,62 +417,62 @@ pub unsafe fn AreAnyAccessesGranted(grantedaccess: u32, desiredaccess: u32) -> s #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckTokenCapability(tokenhandle: P0, capabilitysidtocheck: P1, hascapability: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn CheckTokenCapability(tokenhandle: P0, capabilitysidtocheck: P1, hascapability: *mut super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CheckTokenCapability(tokenhandle : super::Foundation:: HANDLE, capabilitysidtocheck : super::Foundation:: PSID, hascapability : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenCapability(tokenhandle.into_param().abi(), capabilitysidtocheck.into_param().abi(), hascapability) + CheckTokenCapability(tokenhandle.into_param().abi(), capabilitysidtocheck.into_param().abi(), hascapability).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckTokenMembership(tokenhandle: P0, sidtocheck: P1, ismember: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn CheckTokenMembership(tokenhandle: P0, sidtocheck: P1, ismember: *mut super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CheckTokenMembership(tokenhandle : super::Foundation:: HANDLE, sidtocheck : super::Foundation:: PSID, ismember : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenMembership(tokenhandle.into_param().abi(), sidtocheck.into_param().abi(), ismember) + CheckTokenMembership(tokenhandle.into_param().abi(), sidtocheck.into_param().abi(), ismember).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckTokenMembershipEx(tokenhandle: P0, sidtocheck: P1, flags: u32, ismember: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn CheckTokenMembershipEx(tokenhandle: P0, sidtocheck: P1, flags: u32, ismember: *mut super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CheckTokenMembershipEx(tokenhandle : super::Foundation:: HANDLE, sidtocheck : super::Foundation:: PSID, flags : u32, ismember : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - CheckTokenMembershipEx(tokenhandle.into_param().abi(), sidtocheck.into_param().abi(), flags, ismember) + CheckTokenMembershipEx(tokenhandle.into_param().abi(), sidtocheck.into_param().abi(), flags, ismember).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: P0, currentsecuritydescriptor: P1, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: ::core::option::Option<*const ::windows_core::GUID>, isdirectoryobject: P2, genericmapping: *const GENERIC_MAPPING) -> super::Foundation::BOOL +pub unsafe fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor: P0, currentsecuritydescriptor: P1, newsecuritydescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: ::core::option::Option<*const ::windows_core::GUID>, isdirectoryobject: P2, genericmapping: *const GENERIC_MAPPING) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, currentsecuritydescriptor : PSECURITY_DESCRIPTOR, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const ::windows_core::GUID, isdirectoryobject : super::Foundation:: BOOLEAN, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor.into_param().abi(), currentsecuritydescriptor.into_param().abi(), newsecuritydescriptor, ::core::mem::transmute(objecttype.unwrap_or(::std::ptr::null())), isdirectoryobject.into_param().abi(), genericmapping) + ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor.into_param().abi(), currentsecuritydescriptor.into_param().abi(), newsecuritydescriptor, ::core::mem::transmute(objecttype.unwrap_or(::std::ptr::null())), isdirectoryobject.into_param().abi(), genericmapping).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: super::Foundation::PSID, psourcesid: P0) -> super::Foundation::BOOL +pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: super::Foundation::PSID, psourcesid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CopySid(ndestinationsidlength : u32, pdestinationsid : super::Foundation:: PSID, psourcesid : super::Foundation:: PSID) -> super::Foundation:: BOOL); - CopySid(ndestinationsidlength, pdestinationsid, psourcesid.into_param().abi()) + CopySid(ndestinationsidlength, pdestinationsid, psourcesid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: P2, token: P3, genericmapping: *const GENERIC_MAPPING) -> super::Foundation::BOOL +pub unsafe fn CreatePrivateObjectSecurity(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, isdirectoryobject: P2, token: P3, genericmapping: *const GENERIC_MAPPING) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -479,12 +480,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurity(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, isdirectoryobject : super::Foundation:: BOOL, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurity(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, isdirectoryobject.into_param().abi(), token.into_param().abi(), genericmapping) + CreatePrivateObjectSecurity(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, isdirectoryobject.into_param().abi(), token.into_param().abi(), genericmapping).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: ::core::option::Option<*const ::windows_core::GUID>, iscontainerobject: P2, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P3, genericmapping: *const GENERIC_MAPPING) -> super::Foundation::BOOL +pub unsafe fn CreatePrivateObjectSecurityEx(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttype: ::core::option::Option<*const ::windows_core::GUID>, iscontainerobject: P2, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P3, genericmapping: *const GENERIC_MAPPING) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -492,12 +493,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityEx(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttype : *const ::windows_core::GUID, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurityEx(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttype.unwrap_or(::std::ptr::null())), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping) + CreatePrivateObjectSecurityEx(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttype.unwrap_or(::std::ptr::null())), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: ::core::option::Option<&[*const ::windows_core::GUID]>, iscontainerobject: P2, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P3, genericmapping: *const GENERIC_MAPPING) -> super::Foundation::BOOL +pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: ::core::option::Option<&[*const ::windows_core::GUID]>, iscontainerobject: P2, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P3, genericmapping: *const GENERIC_MAPPING) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -505,12 +506,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor : PSECURITY_DESCRIPTOR, creatordescriptor : PSECURITY_DESCRIPTOR, newdescriptor : *mut PSECURITY_DESCRIPTOR, objecttypes : *const *const ::windows_core::GUID, guidcount : u32, iscontainerobject : super::Foundation:: BOOL, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, token : super::Foundation:: HANDLE, genericmapping : *const GENERIC_MAPPING) -> super::Foundation:: BOOL); - CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len() as _), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping) + CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor.into_param().abi(), creatordescriptor.into_param().abi(), newdescriptor, ::core::mem::transmute(objecttypes.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), objecttypes.as_deref().map_or(0, |slice| slice.len() as _), iscontainerobject.into_param().abi(), autoinheritflags, token.into_param().abi(), genericmapping).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateRestrictedToken(existingtokenhandle: P0, flags: CREATE_RESTRICTED_TOKEN_FLAGS, sidstodisable: ::core::option::Option<&[SID_AND_ATTRIBUTES]>, privilegestodelete: ::core::option::Option<&[LUID_AND_ATTRIBUTES]>, sidstorestrict: ::core::option::Option<&[SID_AND_ATTRIBUTES]>, newtokenhandle: *mut super::Foundation::HANDLE) -> super::Foundation::BOOL +pub unsafe fn CreateRestrictedToken(existingtokenhandle: P0, flags: CREATE_RESTRICTED_TOKEN_FLAGS, sidstodisable: ::core::option::Option<&[SID_AND_ATTRIBUTES]>, privilegestodelete: ::core::option::Option<&[LUID_AND_ATTRIBUTES]>, sidstorestrict: ::core::option::Option<&[SID_AND_ATTRIBUTES]>, newtokenhandle: *mut super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -526,100 +527,101 @@ where ::core::mem::transmute(sidstorestrict.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), newtokenhandle, ) + .ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateWellKnownSid(wellknownsidtype: WELL_KNOWN_SID_TYPE, domainsid: P0, psid: super::Foundation::PSID, cbsid: *mut u32) -> super::Foundation::BOOL +pub unsafe fn CreateWellKnownSid(wellknownsidtype: WELL_KNOWN_SID_TYPE, domainsid: P0, psid: super::Foundation::PSID, cbsid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreateWellKnownSid(wellknownsidtype : WELL_KNOWN_SID_TYPE, domainsid : super::Foundation:: PSID, psid : super::Foundation:: PSID, cbsid : *mut u32) -> super::Foundation:: BOOL); - CreateWellKnownSid(wellknownsidtype, domainsid.into_param().abi(), psid, cbsid) + CreateWellKnownSid(wellknownsidtype, domainsid.into_param().abi(), psid, cbsid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteAce(pacl: *mut ACL, dwaceindex: u32) -> super::Foundation::BOOL { +pub unsafe fn DeleteAce(pacl: *mut ACL, dwaceindex: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn DeleteAce(pacl : *mut ACL, dwaceindex : u32) -> super::Foundation:: BOOL); - DeleteAce(pacl, dwaceindex) + DeleteAce(pacl, dwaceindex).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeriveCapabilitySidsFromName(capname: P0, capabilitygroupsids: *mut *mut super::Foundation::PSID, capabilitygroupsidcount: *mut u32, capabilitysids: *mut *mut super::Foundation::PSID, capabilitysidcount: *mut u32) -> super::Foundation::BOOL +pub unsafe fn DeriveCapabilitySidsFromName(capname: P0, capabilitygroupsids: *mut *mut super::Foundation::PSID, capabilitygroupsidcount: *mut u32, capabilitysids: *mut *mut super::Foundation::PSID, capabilitysidcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-security-base-l1-2-2.dll" "system" fn DeriveCapabilitySidsFromName(capname : ::windows_core::PCWSTR, capabilitygroupsids : *mut *mut super::Foundation:: PSID, capabilitygroupsidcount : *mut u32, capabilitysids : *mut *mut super::Foundation:: PSID, capabilitysidcount : *mut u32) -> super::Foundation:: BOOL); - DeriveCapabilitySidsFromName(capname.into_param().abi(), capabilitygroupsids, capabilitygroupsidcount, capabilitysids, capabilitysidcount) + DeriveCapabilitySidsFromName(capname.into_param().abi(), capabilitygroupsids, capabilitygroupsidcount, capabilitysids, capabilitysidcount).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyPrivateObjectSecurity(objectdescriptor: *const PSECURITY_DESCRIPTOR) -> super::Foundation::BOOL { +pub unsafe fn DestroyPrivateObjectSecurity(objectdescriptor: *const PSECURITY_DESCRIPTOR) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn DestroyPrivateObjectSecurity(objectdescriptor : *const PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - DestroyPrivateObjectSecurity(objectdescriptor) + DestroyPrivateObjectSecurity(objectdescriptor).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DuplicateToken(existingtokenhandle: P0, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle: *mut super::Foundation::HANDLE) -> super::Foundation::BOOL +pub unsafe fn DuplicateToken(existingtokenhandle: P0, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle: *mut super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn DuplicateToken(existingtokenhandle : super::Foundation:: HANDLE, impersonationlevel : SECURITY_IMPERSONATION_LEVEL, duplicatetokenhandle : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - DuplicateToken(existingtokenhandle.into_param().abi(), impersonationlevel, duplicatetokenhandle) + DuplicateToken(existingtokenhandle.into_param().abi(), impersonationlevel, duplicatetokenhandle).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DuplicateTokenEx(hexistingtoken: P0, dwdesiredaccess: TOKEN_ACCESS_MASK, lptokenattributes: ::core::option::Option<*const SECURITY_ATTRIBUTES>, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, tokentype: TOKEN_TYPE, phnewtoken: *mut super::Foundation::HANDLE) -> super::Foundation::BOOL +pub unsafe fn DuplicateTokenEx(hexistingtoken: P0, dwdesiredaccess: TOKEN_ACCESS_MASK, lptokenattributes: ::core::option::Option<*const SECURITY_ATTRIBUTES>, impersonationlevel: SECURITY_IMPERSONATION_LEVEL, tokentype: TOKEN_TYPE, phnewtoken: *mut super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn DuplicateTokenEx(hexistingtoken : super::Foundation:: HANDLE, dwdesiredaccess : TOKEN_ACCESS_MASK, lptokenattributes : *const SECURITY_ATTRIBUTES, impersonationlevel : SECURITY_IMPERSONATION_LEVEL, tokentype : TOKEN_TYPE, phnewtoken : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - DuplicateTokenEx(hexistingtoken.into_param().abi(), dwdesiredaccess, ::core::mem::transmute(lptokenattributes.unwrap_or(::std::ptr::null())), impersonationlevel, tokentype, phnewtoken) + DuplicateTokenEx(hexistingtoken.into_param().abi(), dwdesiredaccess, ::core::mem::transmute(lptokenattributes.unwrap_or(::std::ptr::null())), impersonationlevel, tokentype, phnewtoken).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EqualDomainSid(psid1: P0, psid2: P1, pfequal: *mut super::Foundation::BOOL) -> super::Foundation::BOOL +pub unsafe fn EqualDomainSid(psid1: P0, psid2: P1, pfequal: *mut super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EqualDomainSid(psid1 : super::Foundation:: PSID, psid2 : super::Foundation:: PSID, pfequal : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - EqualDomainSid(psid1.into_param().abi(), psid2.into_param().abi(), pfequal) + EqualDomainSid(psid1.into_param().abi(), psid2.into_param().abi(), pfequal).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EqualPrefixSid(psid1: P0, psid2: P1) -> super::Foundation::BOOL +pub unsafe fn EqualPrefixSid(psid1: P0, psid2: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EqualPrefixSid(psid1 : super::Foundation:: PSID, psid2 : super::Foundation:: PSID) -> super::Foundation:: BOOL); - EqualPrefixSid(psid1.into_param().abi(), psid2.into_param().abi()) + EqualPrefixSid(psid1.into_param().abi(), psid2.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EqualSid(psid1: P0, psid2: P1) -> super::Foundation::BOOL +pub unsafe fn EqualSid(psid1: P0, psid2: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EqualSid(psid1 : super::Foundation:: PSID, psid2 : super::Foundation:: PSID) -> super::Foundation:: BOOL); - EqualSid(psid1.into_param().abi(), psid2.into_param().abi()) + EqualSid(psid1.into_param().abi(), psid2.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindFirstFreeAce(pacl: *const ACL, pace: *mut *mut ::core::ffi::c_void) -> super::Foundation::BOOL { +pub unsafe fn FindFirstFreeAce(pacl: *const ACL, pace: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn FindFirstFreeAce(pacl : *const ACL, pace : *mut *mut ::core::ffi::c_void) -> super::Foundation:: BOOL); - FindFirstFreeAce(pacl, pace) + FindFirstFreeAce(pacl, pace).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -634,16 +636,16 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAce(pacl: *const ACL, dwaceindex: u32, pace: *mut *mut ::core::ffi::c_void) -> super::Foundation::BOOL { +pub unsafe fn GetAce(pacl: *const ACL, dwaceindex: u32, pace: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetAce(pacl : *const ACL, dwaceindex : u32, pace : *mut *mut ::core::ffi::c_void) -> super::Foundation:: BOOL); - GetAce(pacl, dwaceindex, pace) + GetAce(pacl, dwaceindex, pace).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAclInformation(pacl: *const ACL, paclinformation: *mut ::core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> super::Foundation::BOOL { +pub unsafe fn GetAclInformation(pacl: *const ACL, paclinformation: *mut ::core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetAclInformation(pacl : *const ACL, paclinformation : *mut ::core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> super::Foundation:: BOOL); - GetAclInformation(pacl, paclinformation, naclinformationlength, dwaclinformationclass) + GetAclInformation(pacl, paclinformation, naclinformationlength, dwaclinformationclass).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -665,12 +667,12 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetFileSecurityA(lpfilename : ::windows_core::PCSTR, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetFileSecurityA(lpfilename.into_param().abi(), requestedinformation, psecuritydescriptor, nlength, lpnlengthneeded) + GetFileSecurityA(lpfilename.into_param().abi(), requestedinformation, psecuritydescriptor, nlength, lpnlengthneeded).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -685,12 +687,12 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetKernelObjectSecurity(handle: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetKernelObjectSecurity(handle: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetKernelObjectSecurity(handle : super::Foundation:: HANDLE, requestedinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetKernelObjectSecurity(handle.into_param().abi(), requestedinformation, psecuritydescriptor, nlength, lpnlengthneeded) + GetKernelObjectSecurity(handle.into_param().abi(), requestedinformation, psecuritydescriptor, nlength, lpnlengthneeded).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -702,42 +704,42 @@ pub unsafe fn GetLengthSid(psid: super::Foundation::PSID) -> u32 { #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPrivateObjectSecurity(objectdescriptor: P0, securityinformation: u32, resultantdescriptor: PSECURITY_DESCRIPTOR, descriptorlength: u32, returnlength: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetPrivateObjectSecurity(objectdescriptor: P0, securityinformation: u32, resultantdescriptor: PSECURITY_DESCRIPTOR, descriptorlength: u32, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetPrivateObjectSecurity(objectdescriptor : PSECURITY_DESCRIPTOR, securityinformation : u32, resultantdescriptor : PSECURITY_DESCRIPTOR, descriptorlength : u32, returnlength : *mut u32) -> super::Foundation:: BOOL); - GetPrivateObjectSecurity(objectdescriptor.into_param().abi(), securityinformation, resultantdescriptor, descriptorlength, returnlength) + GetPrivateObjectSecurity(objectdescriptor.into_param().abi(), securityinformation, resultantdescriptor, descriptorlength, returnlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityDescriptorControl(psecuritydescriptor: P0, pcontrol: *mut u16, lpdwrevision: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetSecurityDescriptorControl(psecuritydescriptor: P0, pcontrol: *mut u16, lpdwrevision: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, pcontrol : *mut u16, lpdwrevision : *mut u32) -> super::Foundation:: BOOL); - GetSecurityDescriptorControl(psecuritydescriptor.into_param().abi(), pcontrol, lpdwrevision) + GetSecurityDescriptorControl(psecuritydescriptor.into_param().abi(), pcontrol, lpdwrevision).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityDescriptorDacl(psecuritydescriptor: P0, lpbdaclpresent: *mut i32, pdacl: *mut *mut ACL, lpbdacldefaulted: *mut i32) -> super::Foundation::BOOL +pub unsafe fn GetSecurityDescriptorDacl(psecuritydescriptor: P0, lpbdaclpresent: *mut i32, pdacl: *mut *mut ACL, lpbdacldefaulted: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbdaclpresent : *mut i32, pdacl : *mut *mut ACL, lpbdacldefaulted : *mut i32) -> super::Foundation:: BOOL); - GetSecurityDescriptorDacl(psecuritydescriptor.into_param().abi(), lpbdaclpresent, pdacl, lpbdacldefaulted) + GetSecurityDescriptorDacl(psecuritydescriptor.into_param().abi(), lpbdaclpresent, pdacl, lpbdacldefaulted).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityDescriptorGroup(psecuritydescriptor: P0, pgroup: *mut super::Foundation::PSID, lpbgroupdefaulted: *mut i32) -> super::Foundation::BOOL +pub unsafe fn GetSecurityDescriptorGroup(psecuritydescriptor: P0, pgroup: *mut super::Foundation::PSID, lpbgroupdefaulted: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : *mut super::Foundation:: PSID, lpbgroupdefaulted : *mut i32) -> super::Foundation:: BOOL); - GetSecurityDescriptorGroup(psecuritydescriptor.into_param().abi(), pgroup, lpbgroupdefaulted) + GetSecurityDescriptorGroup(psecuritydescriptor.into_param().abi(), pgroup, lpbgroupdefaulted).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] #[inline] @@ -751,12 +753,12 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityDescriptorOwner(psecuritydescriptor: P0, powner: *mut super::Foundation::PSID, lpbownerdefaulted: *mut i32) -> super::Foundation::BOOL +pub unsafe fn GetSecurityDescriptorOwner(psecuritydescriptor: P0, powner: *mut super::Foundation::PSID, lpbownerdefaulted: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : *mut super::Foundation:: PSID, lpbownerdefaulted : *mut i32) -> super::Foundation:: BOOL); - GetSecurityDescriptorOwner(psecuritydescriptor.into_param().abi(), powner, lpbownerdefaulted) + GetSecurityDescriptorOwner(psecuritydescriptor.into_param().abi(), powner, lpbownerdefaulted).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] #[inline] @@ -770,12 +772,12 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSecurityDescriptorSacl(psecuritydescriptor: P0, lpbsaclpresent: *mut i32, psacl: *mut *mut ACL, lpbsacldefaulted: *mut i32) -> super::Foundation::BOOL +pub unsafe fn GetSecurityDescriptorSacl(psecuritydescriptor: P0, lpbsaclpresent: *mut i32, psacl: *mut *mut ACL, lpbsacldefaulted: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, lpbsaclpresent : *mut i32, psacl : *mut *mut ACL, lpbsacldefaulted : *mut i32) -> super::Foundation:: BOOL); - GetSecurityDescriptorSacl(psecuritydescriptor.into_param().abi(), lpbsaclpresent, psacl, lpbsacldefaulted) + GetSecurityDescriptorSacl(psecuritydescriptor.into_param().abi(), lpbsaclpresent, psacl, lpbsacldefaulted).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -816,90 +818,90 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: ::core::option::Option<*mut ::core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: ::core::option::Option<*mut ::core::ffi::c_void>, tokeninformationlength: u32, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetTokenInformation(tokenhandle : super::Foundation:: HANDLE, tokeninformationclass : TOKEN_INFORMATION_CLASS, tokeninformation : *mut ::core::ffi::c_void, tokeninformationlength : u32, returnlength : *mut u32) -> super::Foundation:: BOOL); - GetTokenInformation(tokenhandle.into_param().abi(), tokeninformationclass, ::core::mem::transmute(tokeninformation.unwrap_or(::std::ptr::null_mut())), tokeninformationlength, returnlength) + GetTokenInformation(tokenhandle.into_param().abi(), tokeninformationclass, ::core::mem::transmute(tokeninformation.unwrap_or(::std::ptr::null_mut())), tokeninformationlength, returnlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserObjectSecurity(hobj: P0, psirequested: *const u32, psid: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetUserObjectSecurity(hobj: P0, psirequested: *const u32, psid: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const u32, psid : PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::Foundation:: BOOL); - GetUserObjectSecurity(hobj.into_param().abi(), psirequested, psid, nlength, lpnlengthneeded) + GetUserObjectSecurity(hobj.into_param().abi(), psirequested, psid, nlength, lpnlengthneeded).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWindowsAccountDomainSid(psid: P0, pdomainsid: super::Foundation::PSID, cbdomainsid: *mut u32) -> super::Foundation::BOOL +pub unsafe fn GetWindowsAccountDomainSid(psid: P0, pdomainsid: super::Foundation::PSID, cbdomainsid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetWindowsAccountDomainSid(psid : super::Foundation:: PSID, pdomainsid : super::Foundation:: PSID, cbdomainsid : *mut u32) -> super::Foundation:: BOOL); - GetWindowsAccountDomainSid(psid.into_param().abi(), pdomainsid, cbdomainsid) + GetWindowsAccountDomainSid(psid.into_param().abi(), pdomainsid, cbdomainsid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImpersonateAnonymousToken(threadhandle: P0) -> super::Foundation::BOOL +pub unsafe fn ImpersonateAnonymousToken(threadhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ImpersonateAnonymousToken(threadhandle : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - ImpersonateAnonymousToken(threadhandle.into_param().abi()) + ImpersonateAnonymousToken(threadhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImpersonateLoggedOnUser(htoken: P0) -> super::Foundation::BOOL +pub unsafe fn ImpersonateLoggedOnUser(htoken: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ImpersonateLoggedOnUser(htoken : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - ImpersonateLoggedOnUser(htoken.into_param().abi()) + ImpersonateLoggedOnUser(htoken.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImpersonateSelf(impersonationlevel: SECURITY_IMPERSONATION_LEVEL) -> super::Foundation::BOOL { +pub unsafe fn ImpersonateSelf(impersonationlevel: SECURITY_IMPERSONATION_LEVEL) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn ImpersonateSelf(impersonationlevel : SECURITY_IMPERSONATION_LEVEL) -> super::Foundation:: BOOL); - ImpersonateSelf(impersonationlevel) + ImpersonateSelf(impersonationlevel).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeAcl(pacl: *mut ACL, nacllength: u32, dwaclrevision: ACE_REVISION) -> super::Foundation::BOOL { +pub unsafe fn InitializeAcl(pacl: *mut ACL, nacllength: u32, dwaclrevision: ACE_REVISION) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn InitializeAcl(pacl : *mut ACL, nacllength : u32, dwaclrevision : ACE_REVISION) -> super::Foundation:: BOOL); - InitializeAcl(pacl, nacllength, dwaclrevision) + InitializeAcl(pacl, nacllength, dwaclrevision).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeSecurityDescriptor(psecuritydescriptor: PSECURITY_DESCRIPTOR, dwrevision: u32) -> super::Foundation::BOOL { +pub unsafe fn InitializeSecurityDescriptor(psecuritydescriptor: PSECURITY_DESCRIPTOR, dwrevision: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn InitializeSecurityDescriptor(psecuritydescriptor : PSECURITY_DESCRIPTOR, dwrevision : u32) -> super::Foundation:: BOOL); - InitializeSecurityDescriptor(psecuritydescriptor, dwrevision) + InitializeSecurityDescriptor(psecuritydescriptor, dwrevision).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeSid(sid: super::Foundation::PSID, pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8) -> super::Foundation::BOOL { +pub unsafe fn InitializeSid(sid: super::Foundation::PSID, pidentifierauthority: *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn InitializeSid(sid : super::Foundation:: PSID, pidentifierauthority : *const SID_IDENTIFIER_AUTHORITY, nsubauthoritycount : u8) -> super::Foundation:: BOOL); - InitializeSid(sid, pidentifierauthority, nsubauthoritycount) + InitializeSid(sid, pidentifierauthority, nsubauthoritycount).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsTokenRestricted(tokenhandle: P0) -> super::Foundation::BOOL +pub unsafe fn IsTokenRestricted(tokenhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn IsTokenRestricted(tokenhandle : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - IsTokenRestricted(tokenhandle.into_param().abi()) + IsTokenRestricted(tokenhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -941,19 +943,19 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LogonUserA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> super::Foundation::BOOL +pub unsafe fn LogonUserA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LogonUserA(lpszusername : ::windows_core::PCSTR, lpszdomain : ::windows_core::PCSTR, lpszpassword : ::windows_core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - LogonUserA(lpszusername.into_param().abi(), lpszdomain.into_param().abi(), lpszpassword.into_param().abi(), dwlogontype, dwlogonprovider, phtoken) + LogonUserA(lpszusername.into_param().abi(), lpszdomain.into_param().abi(), lpszpassword.into_param().abi(), dwlogontype, dwlogonprovider, phtoken).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LogonUserExA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: ::core::option::Option<*mut super::Foundation::HANDLE>, pplogonsid: ::core::option::Option<*mut super::Foundation::PSID>, ppprofilebuffer: ::core::option::Option<*mut *mut ::core::ffi::c_void>, pdwprofilelength: ::core::option::Option<*mut u32>, pquotalimits: ::core::option::Option<*mut QUOTA_LIMITS>) -> super::Foundation::BOOL +pub unsafe fn LogonUserExA(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: ::core::option::Option<*mut super::Foundation::HANDLE>, pplogonsid: ::core::option::Option<*mut super::Foundation::PSID>, ppprofilebuffer: ::core::option::Option<*mut *mut ::core::ffi::c_void>, pdwprofilelength: ::core::option::Option<*mut u32>, pquotalimits: ::core::option::Option<*mut QUOTA_LIMITS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -972,11 +974,12 @@ where ::core::mem::transmute(pdwprofilelength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pquotalimits.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LogonUserExW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: ::core::option::Option<*mut super::Foundation::HANDLE>, pplogonsid: ::core::option::Option<*mut super::Foundation::PSID>, ppprofilebuffer: ::core::option::Option<*mut *mut ::core::ffi::c_void>, pdwprofilelength: ::core::option::Option<*mut u32>, pquotalimits: ::core::option::Option<*mut QUOTA_LIMITS>) -> super::Foundation::BOOL +pub unsafe fn LogonUserExW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: ::core::option::Option<*mut super::Foundation::HANDLE>, pplogonsid: ::core::option::Option<*mut super::Foundation::PSID>, ppprofilebuffer: ::core::option::Option<*mut *mut ::core::ffi::c_void>, pdwprofilelength: ::core::option::Option<*mut u32>, pquotalimits: ::core::option::Option<*mut QUOTA_LIMITS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -995,146 +998,147 @@ where ::core::mem::transmute(pdwprofilelength.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pquotalimits.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LogonUserW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> super::Foundation::BOOL +pub unsafe fn LogonUserW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LogonUserW(lpszusername : ::windows_core::PCWSTR, lpszdomain : ::windows_core::PCWSTR, lpszpassword : ::windows_core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - LogonUserW(lpszusername.into_param().abi(), lpszdomain.into_param().abi(), lpszpassword.into_param().abi(), dwlogontype, dwlogonprovider, phtoken) + LogonUserW(lpszusername.into_param().abi(), lpszdomain.into_param().abi(), lpszpassword.into_param().abi(), dwlogontype, dwlogonprovider, phtoken).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupAccountNameA(lpsystemname: P0, lpaccountname: P1, sid: super::Foundation::PSID, cbsid: *mut u32, referenceddomainname: ::windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> super::Foundation::BOOL +pub unsafe fn LookupAccountNameA(lpsystemname: P0, lpaccountname: P1, sid: super::Foundation::PSID, cbsid: *mut u32, referenceddomainname: ::windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupAccountNameA(lpsystemname : ::windows_core::PCSTR, lpaccountname : ::windows_core::PCSTR, sid : super::Foundation:: PSID, cbsid : *mut u32, referenceddomainname : ::windows_core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountNameA(lpsystemname.into_param().abi(), lpaccountname.into_param().abi(), sid, cbsid, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse) + LookupAccountNameA(lpsystemname.into_param().abi(), lpaccountname.into_param().abi(), sid, cbsid, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupAccountNameW(lpsystemname: P0, lpaccountname: P1, sid: super::Foundation::PSID, cbsid: *mut u32, referenceddomainname: ::windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> super::Foundation::BOOL +pub unsafe fn LookupAccountNameW(lpsystemname: P0, lpaccountname: P1, sid: super::Foundation::PSID, cbsid: *mut u32, referenceddomainname: ::windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupAccountNameW(lpsystemname : ::windows_core::PCWSTR, lpaccountname : ::windows_core::PCWSTR, sid : super::Foundation:: PSID, cbsid : *mut u32, referenceddomainname : ::windows_core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountNameW(lpsystemname.into_param().abi(), lpaccountname.into_param().abi(), sid, cbsid, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse) + LookupAccountNameW(lpsystemname.into_param().abi(), lpaccountname.into_param().abi(), sid, cbsid, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupAccountSidA(lpsystemname: P0, sid: P1, name: ::windows_core::PSTR, cchname: *mut u32, referenceddomainname: ::windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> super::Foundation::BOOL +pub unsafe fn LookupAccountSidA(lpsystemname: P0, sid: P1, name: ::windows_core::PSTR, cchname: *mut u32, referenceddomainname: ::windows_core::PSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LookupAccountSidA(lpsystemname : ::windows_core::PCSTR, sid : super::Foundation:: PSID, name : ::windows_core::PSTR, cchname : *mut u32, referenceddomainname : ::windows_core::PSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountSidA(lpsystemname.into_param().abi(), sid.into_param().abi(), ::core::mem::transmute(name), cchname, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse) + LookupAccountSidA(lpsystemname.into_param().abi(), sid.into_param().abi(), ::core::mem::transmute(name), cchname, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupAccountSidW(lpsystemname: P0, sid: P1, name: ::windows_core::PWSTR, cchname: *mut u32, referenceddomainname: ::windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> super::Foundation::BOOL +pub unsafe fn LookupAccountSidW(lpsystemname: P0, sid: P1, name: ::windows_core::PWSTR, cchname: *mut u32, referenceddomainname: ::windows_core::PWSTR, cchreferenceddomainname: *mut u32, peuse: *mut SID_NAME_USE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn LookupAccountSidW(lpsystemname : ::windows_core::PCWSTR, sid : super::Foundation:: PSID, name : ::windows_core::PWSTR, cchname : *mut u32, referenceddomainname : ::windows_core::PWSTR, cchreferenceddomainname : *mut u32, peuse : *mut SID_NAME_USE) -> super::Foundation:: BOOL); - LookupAccountSidW(lpsystemname.into_param().abi(), sid.into_param().abi(), ::core::mem::transmute(name), cchname, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse) + LookupAccountSidW(lpsystemname.into_param().abi(), sid.into_param().abi(), ::core::mem::transmute(name), cchname, ::core::mem::transmute(referenceddomainname), cchreferenceddomainname, peuse).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeDisplayNameA(lpsystemname: P0, lpname: P1, lpdisplayname: ::windows_core::PSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeDisplayNameA(lpsystemname: P0, lpname: P1, lpdisplayname: ::windows_core::PSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameA(lpsystemname : ::windows_core::PCSTR, lpname : ::windows_core::PCSTR, lpdisplayname : ::windows_core::PSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeDisplayNameA(lpsystemname.into_param().abi(), lpname.into_param().abi(), ::core::mem::transmute(lpdisplayname), cchdisplayname, lplanguageid) + LookupPrivilegeDisplayNameA(lpsystemname.into_param().abi(), lpname.into_param().abi(), ::core::mem::transmute(lpdisplayname), cchdisplayname, lplanguageid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeDisplayNameW(lpsystemname: P0, lpname: P1, lpdisplayname: ::windows_core::PWSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeDisplayNameW(lpsystemname: P0, lpname: P1, lpdisplayname: ::windows_core::PWSTR, cchdisplayname: *mut u32, lplanguageid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeDisplayNameW(lpsystemname : ::windows_core::PCWSTR, lpname : ::windows_core::PCWSTR, lpdisplayname : ::windows_core::PWSTR, cchdisplayname : *mut u32, lplanguageid : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeDisplayNameW(lpsystemname.into_param().abi(), lpname.into_param().abi(), ::core::mem::transmute(lpdisplayname), cchdisplayname, lplanguageid) + LookupPrivilegeDisplayNameW(lpsystemname.into_param().abi(), lpname.into_param().abi(), ::core::mem::transmute(lpdisplayname), cchdisplayname, lplanguageid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeNameA(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: ::windows_core::PSTR, cchname: *mut u32) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeNameA(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: ::windows_core::PSTR, cchname: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeNameA(lpsystemname : ::windows_core::PCSTR, lpluid : *const super::Foundation:: LUID, lpname : ::windows_core::PSTR, cchname : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeNameA(lpsystemname.into_param().abi(), lpluid, ::core::mem::transmute(lpname), cchname) + LookupPrivilegeNameA(lpsystemname.into_param().abi(), lpluid, ::core::mem::transmute(lpname), cchname).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeNameW(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: ::windows_core::PWSTR, cchname: *mut u32) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeNameW(lpsystemname: P0, lpluid: *const super::Foundation::LUID, lpname: ::windows_core::PWSTR, cchname: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeNameW(lpsystemname : ::windows_core::PCWSTR, lpluid : *const super::Foundation:: LUID, lpname : ::windows_core::PWSTR, cchname : *mut u32) -> super::Foundation:: BOOL); - LookupPrivilegeNameW(lpsystemname.into_param().abi(), lpluid, ::core::mem::transmute(lpname), cchname) + LookupPrivilegeNameW(lpsystemname.into_param().abi(), lpluid, ::core::mem::transmute(lpname), cchname).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeValueA(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeValueA(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeValueA(lpsystemname : ::windows_core::PCSTR, lpname : ::windows_core::PCSTR, lpluid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - LookupPrivilegeValueA(lpsystemname.into_param().abi(), lpname.into_param().abi(), lpluid) + LookupPrivilegeValueA(lpsystemname.into_param().abi(), lpname.into_param().abi(), lpluid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LookupPrivilegeValueW(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> super::Foundation::BOOL +pub unsafe fn LookupPrivilegeValueW(lpsystemname: P0, lpname: P1, lpluid: *mut super::Foundation::LUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn LookupPrivilegeValueW(lpsystemname : ::windows_core::PCWSTR, lpname : ::windows_core::PCWSTR, lpluid : *mut super::Foundation:: LUID) -> super::Foundation:: BOOL); - LookupPrivilegeValueW(lpsystemname.into_param().abi(), lpname.into_param().abi(), lpluid) + LookupPrivilegeValueW(lpsystemname.into_param().abi(), lpname.into_param().abi(), lpluid).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MakeAbsoluteSD(pselfrelativesecuritydescriptor: P0, pabsolutesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwabsolutesecuritydescriptorsize: *mut u32, pdacl: ::core::option::Option<*mut ACL>, lpdwdaclsize: *mut u32, psacl: ::core::option::Option<*mut ACL>, lpdwsaclsize: *mut u32, powner: super::Foundation::PSID, lpdwownersize: *mut u32, pprimarygroup: super::Foundation::PSID, lpdwprimarygroupsize: *mut u32) -> super::Foundation::BOOL +pub unsafe fn MakeAbsoluteSD(pselfrelativesecuritydescriptor: P0, pabsolutesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwabsolutesecuritydescriptorsize: *mut u32, pdacl: ::core::option::Option<*mut ACL>, lpdwdaclsize: *mut u32, psacl: ::core::option::Option<*mut ACL>, lpdwsaclsize: *mut u32, powner: super::Foundation::PSID, lpdwownersize: *mut u32, pprimarygroup: super::Foundation::PSID, lpdwprimarygroupsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn MakeAbsoluteSD(pselfrelativesecuritydescriptor : PSECURITY_DESCRIPTOR, pabsolutesecuritydescriptor : PSECURITY_DESCRIPTOR, lpdwabsolutesecuritydescriptorsize : *mut u32, pdacl : *mut ACL, lpdwdaclsize : *mut u32, psacl : *mut ACL, lpdwsaclsize : *mut u32, powner : super::Foundation:: PSID, lpdwownersize : *mut u32, pprimarygroup : super::Foundation:: PSID, lpdwprimarygroupsize : *mut u32) -> super::Foundation:: BOOL); - MakeAbsoluteSD(pselfrelativesecuritydescriptor.into_param().abi(), pabsolutesecuritydescriptor, lpdwabsolutesecuritydescriptorsize, ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null_mut())), lpdwdaclsize, ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null_mut())), lpdwsaclsize, powner, lpdwownersize, pprimarygroup, lpdwprimarygroupsize) + MakeAbsoluteSD(pselfrelativesecuritydescriptor.into_param().abi(), pabsolutesecuritydescriptor, lpdwabsolutesecuritydescriptorsize, ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null_mut())), lpdwdaclsize, ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null_mut())), lpdwsaclsize, powner, lpdwownersize, pprimarygroup, lpdwprimarygroupsize).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MakeSelfRelativeSD(pabsolutesecuritydescriptor: P0, pselfrelativesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwbufferlength: *mut u32) -> super::Foundation::BOOL +pub unsafe fn MakeSelfRelativeSD(pabsolutesecuritydescriptor: P0, pselfrelativesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwbufferlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn MakeSelfRelativeSD(pabsolutesecuritydescriptor : PSECURITY_DESCRIPTOR, pselfrelativesecuritydescriptor : PSECURITY_DESCRIPTOR, lpdwbufferlength : *mut u32) -> super::Foundation:: BOOL); - MakeSelfRelativeSD(pabsolutesecuritydescriptor.into_param().abi(), pselfrelativesecuritydescriptor, lpdwbufferlength) + MakeSelfRelativeSD(pabsolutesecuritydescriptor.into_param().abi(), pselfrelativesecuritydescriptor, lpdwbufferlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] #[inline] @@ -1145,13 +1149,13 @@ pub unsafe fn MapGenericMask(accessmask: *mut u32, genericmapping: *const GENERI #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ObjectCloseAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, generateonclose: P1) -> super::Foundation::BOOL +pub unsafe fn ObjectCloseAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, generateonclose: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ObjectCloseAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectCloseAuditAlarmA(subsystemname.into_param().abi(), handleid, generateonclose.into_param().abi()) + ObjectCloseAuditAlarmA(subsystemname.into_param().abi(), handleid, generateonclose.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1167,13 +1171,13 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ObjectDeleteAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, generateonclose: P1) -> super::Foundation::BOOL +pub unsafe fn ObjectDeleteAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, generateonclose: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ObjectDeleteAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, generateonclose : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectDeleteAuditAlarmA(subsystemname.into_param().abi(), handleid, generateonclose.into_param().abi()) + ObjectDeleteAuditAlarmA(subsystemname.into_param().abi(), handleid, generateonclose.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1189,7 +1193,7 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, psecuritydescriptor: P3, clienttoken: P4, desiredaccess: u32, grantedaccess: u32, privileges: ::core::option::Option<*const PRIVILEGE_SET>, objectcreation: P5, accessgranted: P6, generateonclose: *mut i32) -> super::Foundation::BOOL +pub unsafe fn ObjectOpenAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, objecttypename: P1, objectname: P2, psecuritydescriptor: P3, clienttoken: P4, desiredaccess: u32, grantedaccess: u32, privileges: ::core::option::Option<*const PRIVILEGE_SET>, objectcreation: P5, accessgranted: P6, generateonclose: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -1200,7 +1204,7 @@ where P6: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, objecttypename : ::windows_core::PCSTR, objectname : ::windows_core::PCSTR, psecuritydescriptor : PSECURITY_DESCRIPTOR, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const PRIVILEGE_SET, objectcreation : super::Foundation:: BOOL, accessgranted : super::Foundation:: BOOL, generateonclose : *mut i32) -> super::Foundation:: BOOL); - ObjectOpenAuditAlarmA(subsystemname.into_param().abi(), handleid, objecttypename.into_param().abi(), objectname.into_param().abi(), psecuritydescriptor.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, grantedaccess, ::core::mem::transmute(privileges.unwrap_or(::std::ptr::null())), objectcreation.into_param().abi(), accessgranted.into_param().abi(), generateonclose) + ObjectOpenAuditAlarmA(subsystemname.into_param().abi(), handleid, objecttypename.into_param().abi(), objectname.into_param().abi(), psecuritydescriptor.into_param().abi(), clienttoken.into_param().abi(), desiredaccess, grantedaccess, ::core::mem::transmute(privileges.unwrap_or(::std::ptr::null())), objectcreation.into_param().abi(), accessgranted.into_param().abi(), generateonclose).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1221,14 +1225,14 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, clienttoken: P1, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P2) -> super::Foundation::BOOL +pub unsafe fn ObjectPrivilegeAuditAlarmA(subsystemname: P0, handleid: *const ::core::ffi::c_void, clienttoken: P1, desiredaccess: u32, privileges: *const PRIVILEGE_SET, accessgranted: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ObjectPrivilegeAuditAlarmA(subsystemname : ::windows_core::PCSTR, handleid : *const ::core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, desiredaccess : u32, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectPrivilegeAuditAlarmA(subsystemname.into_param().abi(), handleid, clienttoken.into_param().abi(), desiredaccess, privileges, accessgranted.into_param().abi()) + ObjectPrivilegeAuditAlarmA(subsystemname.into_param().abi(), handleid, clienttoken.into_param().abi(), desiredaccess, privileges, accessgranted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1245,17 +1249,17 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrivilegeCheck(clienttoken: P0, requiredprivileges: *mut PRIVILEGE_SET, pfresult: *mut i32) -> super::Foundation::BOOL +pub unsafe fn PrivilegeCheck(clienttoken: P0, requiredprivileges: *mut PRIVILEGE_SET, pfresult: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn PrivilegeCheck(clienttoken : super::Foundation:: HANDLE, requiredprivileges : *mut PRIVILEGE_SET, pfresult : *mut i32) -> super::Foundation:: BOOL); - PrivilegeCheck(clienttoken.into_param().abi(), requiredprivileges, pfresult) + PrivilegeCheck(clienttoken.into_param().abi(), requiredprivileges, pfresult).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: P2, privileges: *const PRIVILEGE_SET, accessgranted: P3) -> super::Foundation::BOOL +pub unsafe fn PrivilegedServiceAuditAlarmA(subsystemname: P0, servicename: P1, clienttoken: P2, privileges: *const PRIVILEGE_SET, accessgranted: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -1263,7 +1267,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn PrivilegedServiceAuditAlarmA(subsystemname : ::windows_core::PCSTR, servicename : ::windows_core::PCSTR, clienttoken : super::Foundation:: HANDLE, privileges : *const PRIVILEGE_SET, accessgranted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - PrivilegedServiceAuditAlarmA(subsystemname.into_param().abi(), servicename.into_param().abi(), clienttoken.into_param().abi(), privileges, accessgranted.into_param().abi()) + PrivilegedServiceAuditAlarmA(subsystemname.into_param().abi(), servicename.into_param().abi(), clienttoken.into_param().abi(), privileges, accessgranted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1289,9 +1293,9 @@ pub unsafe fn QuerySecurityAccessMask(securityinformation: u32) -> u32 { #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RevertToSelf() -> super::Foundation::BOOL { +pub unsafe fn RevertToSelf() -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn RevertToSelf() -> super::Foundation:: BOOL); - RevertToSelf() + RevertToSelf().ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1317,9 +1321,9 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const ::core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> super::Foundation::BOOL { +pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const ::core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetAclInformation(pacl : *mut ACL, paclinformation : *const ::core::ffi::c_void, naclinformationlength : u32, dwaclinformationclass : ACL_INFORMATION_CLASS) -> super::Foundation:: BOOL); - SetAclInformation(pacl, paclinformation, naclinformationlength, dwaclinformationclass) + SetAclInformation(pacl, paclinformation, naclinformationlength, dwaclinformationclass).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1334,13 +1338,13 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileSecurityA(lpfilename: P0, securityinformation: u32, psecuritydescriptor: P1) -> super::Foundation::BOOL +pub unsafe fn SetFileSecurityA(lpfilename: P0, securityinformation: u32, psecuritydescriptor: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetFileSecurityA(lpfilename : ::windows_core::PCSTR, securityinformation : u32, psecuritydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetFileSecurityA(lpfilename.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()) + SetFileSecurityA(lpfilename.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1356,35 +1360,35 @@ where #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetKernelObjectSecurity(handle: P0, securityinformation: u32, securitydescriptor: P1) -> super::Foundation::BOOL +pub unsafe fn SetKernelObjectSecurity(handle: P0, securityinformation: u32, securitydescriptor: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetKernelObjectSecurity(handle : super::Foundation:: HANDLE, securityinformation : u32, securitydescriptor : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetKernelObjectSecurity(handle.into_param().abi(), securityinformation, securitydescriptor.into_param().abi()) + SetKernelObjectSecurity(handle.into_param().abi(), securityinformation, securitydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPrivateObjectSecurity(securityinformation: u32, modificationdescriptor: P0, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, genericmapping: *const GENERIC_MAPPING, token: P1) -> super::Foundation::BOOL +pub unsafe fn SetPrivateObjectSecurity(securityinformation: u32, modificationdescriptor: P0, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, genericmapping: *const GENERIC_MAPPING, token: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetPrivateObjectSecurity(securityinformation : u32, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetPrivateObjectSecurity(securityinformation, modificationdescriptor.into_param().abi(), objectssecuritydescriptor, genericmapping, token.into_param().abi()) + SetPrivateObjectSecurity(securityinformation, modificationdescriptor.into_param().abi(), objectssecuritydescriptor, genericmapping, token.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPrivateObjectSecurityEx(securityinformation: u32, modificationdescriptor: P0, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, genericmapping: *const GENERIC_MAPPING, token: P1) -> super::Foundation::BOOL +pub unsafe fn SetPrivateObjectSecurityEx(securityinformation: u32, modificationdescriptor: P0, objectssecuritydescriptor: *mut PSECURITY_DESCRIPTOR, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, genericmapping: *const GENERIC_MAPPING, token: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetPrivateObjectSecurityEx(securityinformation : u32, modificationdescriptor : PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut PSECURITY_DESCRIPTOR, autoinheritflags : SECURITY_AUTO_INHERIT_FLAGS, genericmapping : *const GENERIC_MAPPING, token : super::Foundation:: HANDLE) -> super::Foundation:: BOOL); - SetPrivateObjectSecurityEx(securityinformation, modificationdescriptor.into_param().abi(), objectssecuritydescriptor, autoinheritflags, genericmapping, token.into_param().abi()) + SetPrivateObjectSecurityEx(securityinformation, modificationdescriptor.into_param().abi(), objectssecuritydescriptor, autoinheritflags, genericmapping, token.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] #[inline] @@ -1397,45 +1401,45 @@ pub unsafe fn SetSecurityAccessMask(securityinformation: u32) -> u32 { #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: P0, controlbitsofinterest: SECURITY_DESCRIPTOR_CONTROL, controlbitstoset: SECURITY_DESCRIPTOR_CONTROL) -> super::Foundation::BOOL +pub unsafe fn SetSecurityDescriptorControl(psecuritydescriptor: P0, controlbitsofinterest: SECURITY_DESCRIPTOR_CONTROL, controlbitstoset: SECURITY_DESCRIPTOR_CONTROL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorControl(psecuritydescriptor : PSECURITY_DESCRIPTOR, controlbitsofinterest : SECURITY_DESCRIPTOR_CONTROL, controlbitstoset : SECURITY_DESCRIPTOR_CONTROL) -> super::Foundation:: BOOL); - SetSecurityDescriptorControl(psecuritydescriptor.into_param().abi(), controlbitsofinterest, controlbitstoset) + SetSecurityDescriptorControl(psecuritydescriptor.into_param().abi(), controlbitsofinterest, controlbitstoset).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: P0, pdacl: ::core::option::Option<*const ACL>, bdacldefaulted: P1) -> super::Foundation::BOOL +pub unsafe fn SetSecurityDescriptorDacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bdaclpresent: P0, pdacl: ::core::option::Option<*const ACL>, bdacldefaulted: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorDacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bdaclpresent : super::Foundation:: BOOL, pdacl : *const ACL, bdacldefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorDacl(psecuritydescriptor, bdaclpresent.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), bdacldefaulted.into_param().abi()) + SetSecurityDescriptorDacl(psecuritydescriptor, bdaclpresent.into_param().abi(), ::core::mem::transmute(pdacl.unwrap_or(::std::ptr::null())), bdacldefaulted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: P0, bgroupdefaulted: P1) -> super::Foundation::BOOL +pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: P0, bgroupdefaulted: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorGroup(psecuritydescriptor : PSECURITY_DESCRIPTOR, pgroup : super::Foundation:: PSID, bgroupdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorGroup(psecuritydescriptor, pgroup.into_param().abi(), bgroupdefaulted.into_param().abi()) + SetSecurityDescriptorGroup(psecuritydescriptor, pgroup.into_param().abi(), bgroupdefaulted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: P0, bownerdefaulted: P1) -> super::Foundation::BOOL +pub unsafe fn SetSecurityDescriptorOwner(psecuritydescriptor: PSECURITY_DESCRIPTOR, powner: P0, bownerdefaulted: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorOwner(psecuritydescriptor : PSECURITY_DESCRIPTOR, powner : super::Foundation:: PSID, bownerdefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorOwner(psecuritydescriptor, powner.into_param().abi(), bownerdefaulted.into_param().abi()) + SetSecurityDescriptorOwner(psecuritydescriptor, powner.into_param().abi(), bownerdefaulted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] #[inline] @@ -1446,34 +1450,34 @@ pub unsafe fn SetSecurityDescriptorRMControl(securitydescriptor: PSECURITY_DESCR #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: P0, psacl: ::core::option::Option<*const ACL>, bsacldefaulted: P1) -> super::Foundation::BOOL +pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: P0, psacl: ::core::option::Option<*const ACL>, bsacldefaulted: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorSacl(psecuritydescriptor : PSECURITY_DESCRIPTOR, bsaclpresent : super::Foundation:: BOOL, psacl : *const ACL, bsacldefaulted : super::Foundation:: BOOL) -> super::Foundation:: BOOL); - SetSecurityDescriptorSacl(psecuritydescriptor, bsaclpresent.into_param().abi(), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), bsacldefaulted.into_param().abi()) + SetSecurityDescriptorSacl(psecuritydescriptor, bsaclpresent.into_param().abi(), ::core::mem::transmute(psacl.unwrap_or(::std::ptr::null())), bsacldefaulted.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const ::core::ffi::c_void, tokeninformationlength: u32) -> super::Foundation::BOOL +pub unsafe fn SetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const ::core::ffi::c_void, tokeninformationlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetTokenInformation(tokenhandle : super::Foundation:: HANDLE, tokeninformationclass : TOKEN_INFORMATION_CLASS, tokeninformation : *const ::core::ffi::c_void, tokeninformationlength : u32) -> super::Foundation:: BOOL); - SetTokenInformation(tokenhandle.into_param().abi(), tokeninformationclass, tokeninformation, tokeninformationlength) + SetTokenInformation(tokenhandle.into_param().abi(), tokeninformationclass, tokeninformation, tokeninformationlength).ok() } #[doc = "*Required features: `\"Win32_Security\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUserObjectSecurity(hobj: P0, psirequested: *const OBJECT_SECURITY_INFORMATION, psid: P1) -> super::Foundation::BOOL +pub unsafe fn SetUserObjectSecurity(hobj: P0, psirequested: *const OBJECT_SECURITY_INFORMATION, psid: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetUserObjectSecurity(hobj : super::Foundation:: HANDLE, psirequested : *const OBJECT_SECURITY_INFORMATION, psid : PSECURITY_DESCRIPTOR) -> super::Foundation:: BOOL); - SetUserObjectSecurity(hobj.into_param().abi(), psirequested, psid.into_param().abi()) + SetUserObjectSecurity(hobj.into_param().abi(), psirequested, psid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Security\"`*"] pub const CVT_SECONDS: u32 = 1u32; diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs index 083b30116c..f8f5ca6a5b 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs @@ -1,101 +1,101 @@ #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseCompressor(compressorhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseCompressor(compressorhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cabinet.dll" "system" fn CloseCompressor(compressorhandle : COMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - CloseCompressor(compressorhandle.into_param().abi()) + CloseCompressor(compressorhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseDecompressor(decompressorhandle: isize) -> super::super::Foundation::BOOL { +pub unsafe fn CloseDecompressor(decompressorhandle: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn CloseDecompressor(decompressorhandle : isize) -> super::super::Foundation:: BOOL); - CloseDecompressor(decompressorhandle) + CloseDecompressor(decompressorhandle).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Compress(compressorhandle: P0, uncompresseddata: ::core::option::Option<*const ::core::ffi::c_void>, uncompresseddatasize: usize, compressedbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, compressedbuffersize: usize, compresseddatasize: *mut usize) -> super::super::Foundation::BOOL +pub unsafe fn Compress(compressorhandle: P0, uncompresseddata: ::core::option::Option<*const ::core::ffi::c_void>, uncompresseddatasize: usize, compressedbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, compressedbuffersize: usize, compresseddatasize: *mut usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cabinet.dll" "system" fn Compress(compressorhandle : COMPRESSOR_HANDLE, uncompresseddata : *const ::core::ffi::c_void, uncompresseddatasize : usize, compressedbuffer : *mut ::core::ffi::c_void, compressedbuffersize : usize, compresseddatasize : *mut usize) -> super::super::Foundation:: BOOL); - Compress(compressorhandle.into_param().abi(), ::core::mem::transmute(uncompresseddata.unwrap_or(::std::ptr::null())), uncompresseddatasize, ::core::mem::transmute(compressedbuffer.unwrap_or(::std::ptr::null_mut())), compressedbuffersize, compresseddatasize) + Compress(compressorhandle.into_param().abi(), ::core::mem::transmute(uncompresseddata.unwrap_or(::std::ptr::null())), uncompresseddatasize, ::core::mem::transmute(compressedbuffer.unwrap_or(::std::ptr::null_mut())), compressedbuffersize, compresseddatasize).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateCompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: ::core::option::Option<*const COMPRESS_ALLOCATION_ROUTINES>, compressorhandle: *mut isize) -> super::super::Foundation::BOOL { +pub unsafe fn CreateCompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: ::core::option::Option<*const COMPRESS_ALLOCATION_ROUTINES>, compressorhandle: *mut isize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn CreateCompressor(algorithm : COMPRESS_ALGORITHM, allocationroutines : *const COMPRESS_ALLOCATION_ROUTINES, compressorhandle : *mut isize) -> super::super::Foundation:: BOOL); - CreateCompressor(algorithm, ::core::mem::transmute(allocationroutines.unwrap_or(::std::ptr::null())), compressorhandle) + CreateCompressor(algorithm, ::core::mem::transmute(allocationroutines.unwrap_or(::std::ptr::null())), compressorhandle).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateDecompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: ::core::option::Option<*const COMPRESS_ALLOCATION_ROUTINES>, decompressorhandle: *mut isize) -> super::super::Foundation::BOOL { +pub unsafe fn CreateDecompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: ::core::option::Option<*const COMPRESS_ALLOCATION_ROUTINES>, decompressorhandle: *mut isize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn CreateDecompressor(algorithm : COMPRESS_ALGORITHM, allocationroutines : *const COMPRESS_ALLOCATION_ROUTINES, decompressorhandle : *mut isize) -> super::super::Foundation:: BOOL); - CreateDecompressor(algorithm, ::core::mem::transmute(allocationroutines.unwrap_or(::std::ptr::null())), decompressorhandle) + CreateDecompressor(algorithm, ::core::mem::transmute(allocationroutines.unwrap_or(::std::ptr::null())), decompressorhandle).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Decompress(decompressorhandle: isize, compresseddata: ::core::option::Option<*const ::core::ffi::c_void>, compresseddatasize: usize, uncompressedbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, uncompressedbuffersize: usize, uncompresseddatasize: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL { +pub unsafe fn Decompress(decompressorhandle: isize, compresseddata: ::core::option::Option<*const ::core::ffi::c_void>, compresseddatasize: usize, uncompressedbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, uncompressedbuffersize: usize, uncompresseddatasize: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn Decompress(decompressorhandle : isize, compresseddata : *const ::core::ffi::c_void, compresseddatasize : usize, uncompressedbuffer : *mut ::core::ffi::c_void, uncompressedbuffersize : usize, uncompresseddatasize : *mut usize) -> super::super::Foundation:: BOOL); - Decompress(decompressorhandle, ::core::mem::transmute(compresseddata.unwrap_or(::std::ptr::null())), compresseddatasize, ::core::mem::transmute(uncompressedbuffer.unwrap_or(::std::ptr::null_mut())), uncompressedbuffersize, ::core::mem::transmute(uncompresseddatasize.unwrap_or(::std::ptr::null_mut()))) + Decompress(decompressorhandle, ::core::mem::transmute(compresseddata.unwrap_or(::std::ptr::null())), compresseddatasize, ::core::mem::transmute(uncompressedbuffer.unwrap_or(::std::ptr::null_mut())), uncompressedbuffersize, ::core::mem::transmute(uncompresseddatasize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut ::core::ffi::c_void, compressinformationsize: usize) -> super::super::Foundation::BOOL +pub unsafe fn QueryCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut ::core::ffi::c_void, compressinformationsize: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cabinet.dll" "system" fn QueryCompressorInformation(compressorhandle : COMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *mut ::core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - QueryCompressorInformation(compressorhandle.into_param().abi(), compressinformationclass, compressinformation, compressinformationsize) + QueryCompressorInformation(compressorhandle.into_param().abi(), compressinformationclass, compressinformation, compressinformationsize).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryDecompressorInformation(decompressorhandle: isize, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut ::core::ffi::c_void, compressinformationsize: usize) -> super::super::Foundation::BOOL { +pub unsafe fn QueryDecompressorInformation(decompressorhandle: isize, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut ::core::ffi::c_void, compressinformationsize: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn QueryDecompressorInformation(decompressorhandle : isize, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *mut ::core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - QueryDecompressorInformation(decompressorhandle, compressinformationclass, compressinformation, compressinformationsize) + QueryDecompressorInformation(decompressorhandle, compressinformationclass, compressinformation, compressinformationsize).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ResetCompressor(compressorhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn ResetCompressor(compressorhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cabinet.dll" "system" fn ResetCompressor(compressorhandle : COMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - ResetCompressor(compressorhandle.into_param().abi()) + ResetCompressor(compressorhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ResetDecompressor(decompressorhandle: isize) -> super::super::Foundation::BOOL { +pub unsafe fn ResetDecompressor(decompressorhandle: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn ResetDecompressor(decompressorhandle : isize) -> super::super::Foundation:: BOOL); - ResetDecompressor(decompressorhandle) + ResetDecompressor(decompressorhandle).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const ::core::ffi::c_void, compressinformationsize: usize) -> super::super::Foundation::BOOL +pub unsafe fn SetCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const ::core::ffi::c_void, compressinformationsize: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("cabinet.dll" "system" fn SetCompressorInformation(compressorhandle : COMPRESSOR_HANDLE, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *const ::core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - SetCompressorInformation(compressorhandle.into_param().abi(), compressinformationclass, compressinformation, compressinformationsize) + SetCompressorInformation(compressorhandle.into_param().abi(), compressinformationclass, compressinformation, compressinformationsize).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDecompressorInformation(decompressorhandle: isize, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const ::core::ffi::c_void, compressinformationsize: usize) -> super::super::Foundation::BOOL { +pub unsafe fn SetDecompressorInformation(decompressorhandle: isize, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *const ::core::ffi::c_void, compressinformationsize: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("cabinet.dll" "system" fn SetDecompressorInformation(decompressorhandle : isize, compressinformationclass : COMPRESS_INFORMATION_CLASS, compressinformation : *const ::core::ffi::c_void, compressinformationsize : usize) -> super::super::Foundation:: BOOL); - SetDecompressorInformation(decompressorhandle, compressinformationclass, compressinformation, compressinformationsize) + SetDecompressorInformation(decompressorhandle, compressinformationclass, compressinformation, compressinformationsize).ok() } #[doc = "*Required features: `\"Win32_Storage_Compression\"`*"] pub const COMPRESS_ALGORITHM_INVALID: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs index 168214a703..351dcd428d 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -1,23 +1,23 @@ #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddLogContainer(hlog: P0, pcbcontainer: ::core::option::Option<*const u64>, pwszcontainerpath: P1, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn AddLogContainer(hlog: P0, pcbcontainer: ::core::option::Option<*const u64>, pwszcontainerpath: P1, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clfsw32.dll" "system" fn AddLogContainer(hlog : super::super::Foundation:: HANDLE, pcbcontainer : *const u64, pwszcontainerpath : ::windows_core::PCWSTR, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AddLogContainer(hlog.into_param().abi(), ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), pwszcontainerpath.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + AddLogContainer(hlog.into_param().abi(), ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), pwszcontainerpath.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddLogContainerSet(hlog: P0, pcbcontainer: ::core::option::Option<*const u64>, rgwszcontainerpath: &[::windows_core::PCWSTR], preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn AddLogContainerSet(hlog: P0, pcbcontainer: ::core::option::Option<*const u64>, rgwszcontainerpath: &[::windows_core::PCWSTR], preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn AddLogContainerSet(hlog : super::super::Foundation:: HANDLE, ccontainer : u16, pcbcontainer : *const u64, rgwszcontainerpath : *const ::windows_core::PCWSTR, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - AddLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + AddLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(pcbcontainer.unwrap_or(::std::ptr::null())), ::core::mem::transmute(rgwszcontainerpath.as_ptr()), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -32,23 +32,23 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn AdvanceLogBase(pvmarshal: *mut ::core::ffi::c_void, plsnbase: *mut CLS_LSN, fflags: u32, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn AdvanceLogBase(pvmarshal: *mut ::core::ffi::c_void, plsnbase: *mut CLS_LSN, fflags: u32, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn AdvanceLogBase(pvmarshal : *mut ::core::ffi::c_void, plsnbase : *mut CLS_LSN, fflags : u32, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - AdvanceLogBase(pvmarshal, plsnbase, fflags, poverlapped) + AdvanceLogBase(pvmarshal, plsnbase, fflags, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AlignReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, rgcbreservation: *mut i64, pcbalignreservation: *mut i64) -> super::super::Foundation::BOOL { +pub unsafe fn AlignReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, rgcbreservation: *mut i64, pcbalignreservation: *mut i64) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn AlignReservedLog(pvmarshal : *mut ::core::ffi::c_void, creservedrecords : u32, rgcbreservation : *mut i64, pcbalignreservation : *mut i64) -> super::super::Foundation:: BOOL); - AlignReservedLog(pvmarshal, creservedrecords, rgcbreservation, pcbalignreservation) + AlignReservedLog(pvmarshal, creservedrecords, rgcbreservation, pcbalignreservation).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> super::super::Foundation::BOOL { +pub unsafe fn AllocReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn AllocReservedLog(pvmarshal : *mut ::core::ffi::c_void, creservedrecords : u32, pcbadjustment : *mut i64) -> super::super::Foundation:: BOOL); - AllocReservedLog(pvmarshal, creservedrecords, pcbadjustment) + AllocReservedLog(pvmarshal, creservedrecords, pcbadjustment).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -70,36 +70,36 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BackupRead(hfile: P0, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: P1, bprocesssecurity: P2, lpcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn BackupRead(hfile: P0, lpbuffer: &mut [u8], lpnumberofbytesread: *mut u32, babort: P1, bprocesssecurity: P2, lpcontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BackupRead(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupRead(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbytesread, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext) + BackupRead(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbytesread, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BackupSeek(hfile: P0, dwlowbytestoseek: u32, dwhighbytestoseek: u32, lpdwlowbyteseeked: *mut u32, lpdwhighbyteseeked: *mut u32, lpcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn BackupSeek(hfile: P0, dwlowbytestoseek: u32, dwhighbytestoseek: u32, lpdwlowbyteseeked: *mut u32, lpdwhighbyteseeked: *mut u32, lpcontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BackupSeek(hfile : super::super::Foundation:: HANDLE, dwlowbytestoseek : u32, dwhighbytestoseek : u32, lpdwlowbyteseeked : *mut u32, lpdwhighbyteseeked : *mut u32, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupSeek(hfile.into_param().abi(), dwlowbytestoseek, dwhighbytestoseek, lpdwlowbyteseeked, lpdwhighbyteseeked, lpcontext) + BackupSeek(hfile.into_param().abi(), dwlowbytestoseek, dwhighbytestoseek, lpdwlowbyteseeked, lpdwhighbyteseeked, lpcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BackupWrite(hfile: P0, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: P1, bprocesssecurity: P2, lpcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn BackupWrite(hfile: P0, lpbuffer: &[u8], lpnumberofbyteswritten: *mut u32, babort: P1, bprocesssecurity: P2, lpcontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BackupWrite(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, babort : super::super::Foundation:: BOOL, bprocesssecurity : super::super::Foundation:: BOOL, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - BackupWrite(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbyteswritten, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext) + BackupWrite(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofbyteswritten, babort.into_param().abi(), bprocesssecurity.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -131,32 +131,32 @@ pub unsafe fn BuildIoRingRegisterFileHandles(ioring: *const HIORING__, handles: #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckNameLegalDOS8Dot3A(lpname: P0, lpoemname: ::core::option::Option<&mut [u8]>, pbnamecontainsspaces: ::core::option::Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn CheckNameLegalDOS8Dot3A(lpname: P0, lpoemname: ::core::option::Option<&mut [u8]>, pbnamecontainsspaces: ::core::option::Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CheckNameLegalDOS8Dot3A(lpname : ::windows_core::PCSTR, lpoemname : ::windows_core::PSTR, oemnamesize : u32, pbnamecontainsspaces : *mut super::super::Foundation:: BOOL, pbnamelegal : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CheckNameLegalDOS8Dot3A(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal) + CheckNameLegalDOS8Dot3A(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckNameLegalDOS8Dot3W(lpname: P0, lpoemname: ::core::option::Option<&mut [u8]>, pbnamecontainsspaces: ::core::option::Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn CheckNameLegalDOS8Dot3W(lpname: P0, lpoemname: ::core::option::Option<&mut [u8]>, pbnamecontainsspaces: ::core::option::Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CheckNameLegalDOS8Dot3W(lpname : ::windows_core::PCWSTR, lpoemname : ::windows_core::PSTR, oemnamesize : u32, pbnamecontainsspaces : *mut super::super::Foundation:: BOOL, pbnamelegal : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CheckNameLegalDOS8Dot3W(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal) + CheckNameLegalDOS8Dot3W(lpname.into_param().abi(), ::core::mem::transmute(lpoemname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpoemname.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pbnamecontainsspaces.unwrap_or(::std::ptr::null_mut())), pbnamelegal).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseAndResetLogFile(hlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseAndResetLogFile(hlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn CloseAndResetLogFile(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CloseAndResetLogFile(hlog.into_param().abi()) + CloseAndResetLogFile(hlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -173,42 +173,42 @@ pub unsafe fn CloseIoRing(ioring: *const HIORING__) -> ::windows_core::Result<() #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn CommitComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn CommitComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - CommitComplete(enlistmenthandle.into_param().abi(), tmvirtualclock) + CommitComplete(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn CommitEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn CommitEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - CommitEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock) + CommitEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitTransaction(transactionhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn CommitTransaction(transactionhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn CommitTransaction(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CommitTransaction(transactionhandle.into_param().abi()) + CommitTransaction(transactionhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CommitTransactionAsync(transactionhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn CommitTransactionAsync(transactionhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn CommitTransactionAsync(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CommitTransactionAsync(transactionhandle.into_param().abi()) + CommitTransactionAsync(transactionhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -231,36 +231,36 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, bfailifexists : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CopyFileA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), bfailifexists.into_param().abi()) + CopyFileA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), bfailifexists.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileExA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*mut i32>, dwcopyflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileExA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*mut i32>, dwcopyflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileExA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, pbcancel : *mut i32, dwcopyflags : u32) -> super::super::Foundation:: BOOL); - CopyFileExA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null_mut())), dwcopyflags) + CopyFileExA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null_mut())), dwcopyflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileExW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*mut i32>, dwcopyflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileExW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*mut i32>, dwcopyflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileExW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, pbcancel : *mut i32, dwcopyflags : u32) -> super::super::Foundation:: BOOL); - CopyFileExW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null_mut())), dwcopyflags) + CopyFileExW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null_mut())), dwcopyflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -277,38 +277,38 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*const i32>, dwcopyflags: u32, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*const i32>, dwcopyflags: u32, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileTransactedA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, pbcancel : *const i32, dwcopyflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CopyFileTransactedA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null())), dwcopyflags, htransaction.into_param().abi()) + CopyFileTransactedA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null())), dwcopyflags, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*const i32>, dwcopyflags: u32, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, pbcancel: ::core::option::Option<*const i32>, dwcopyflags: u32, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileTransactedW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, pbcancel : *const i32, dwcopyflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CopyFileTransactedW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null())), dwcopyflags, htransaction.into_param().abi()) + CopyFileTransactedW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pbcancel.unwrap_or(::std::ptr::null())), dwcopyflags, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> super::super::Foundation::BOOL +pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CopyFileW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, bfailifexists : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CopyFileW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), bfailifexists.into_param().abi()) + CopyFileW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), bfailifexists.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -319,34 +319,34 @@ pub unsafe fn CopyLZFile(hfsource: i32, hfdest: i32) -> i32 { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryA(lppathname: P0, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryA(lppathname: P0, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryA(lppathname : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateDirectoryA(lppathname.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateDirectoryA(lppathname.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryExA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryExA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryExA(lptemplatedirectory : ::windows_core::PCSTR, lpnewdirectory : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateDirectoryExA(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateDirectoryExA(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryExW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryExW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryExW(lptemplatedirectory : ::windows_core::PCWSTR, lpnewdirectory : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateDirectoryExW(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateDirectoryExW(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -361,36 +361,36 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryTransactedA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryTransactedA(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryTransactedA(lptemplatedirectory : ::windows_core::PCSTR, lpnewdirectory : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CreateDirectoryTransactedA(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()) + CreateDirectoryTransactedA(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryTransactedW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryTransactedW(lptemplatedirectory: P0, lpnewdirectory: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryTransactedW(lptemplatedirectory : ::windows_core::PCWSTR, lpnewdirectory : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CreateDirectoryTransactedW(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()) + CreateDirectoryTransactedW(lptemplatedirectory.into_param().abi(), lpnewdirectory.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateDirectoryW(lppathname: P0, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateDirectoryW(lppathname: P0, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateDirectoryW(lppathname : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateDirectoryW(lppathname.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateDirectoryW(lppathname.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -489,48 +489,48 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateHardLinkA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateHardLinkA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateHardLinkA(lpfilename : ::windows_core::PCSTR, lpexistingfilename : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateHardLinkA(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateHardLinkA(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateHardLinkTransactedA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateHardLinkTransactedA(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CreateHardLinkTransactedA(lpfilename : ::windows_core::PCSTR, lpexistingfilename : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CreateHardLinkTransactedA(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()) + CreateHardLinkTransactedA(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateHardLinkTransactedW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn CreateHardLinkTransactedW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CreateHardLinkTransactedW(lpfilename : ::windows_core::PCWSTR, lpexistingfilename : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CreateHardLinkTransactedW(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()) + CreateHardLinkTransactedW(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateHardLinkW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::BOOL +pub unsafe fn CreateHardLinkW(lpfilename: P0, lpexistingfilename: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateHardLinkW(lpfilename : ::windows_core::PCWSTR, lpexistingfilename : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateHardLinkW(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + CreateHardLinkW(lpfilename.into_param().abi(), lpexistingfilename.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -542,12 +542,12 @@ pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_F #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn CreateLogContainerScanContext(hlog: P0, cfromcontainer: u32, ccontainers: u32, escanmode: u8, pcxscan: *mut CLS_SCAN_CONTEXT, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn CreateLogContainerScanContext(hlog: P0, cfromcontainer: u32, ccontainers: u32, escanmode: u8, pcxscan: *mut CLS_SCAN_CONTEXT, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn CreateLogContainerScanContext(hlog : super::super::Foundation:: HANDLE, cfromcontainer : u32, ccontainers : u32, escanmode : u8, pcxscan : *mut CLS_SCAN_CONTEXT, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - CreateLogContainerScanContext(hlog.into_param().abi(), cfromcontainer, ccontainers, escanmode, pcxscan, poverlapped) + CreateLogContainerScanContext(hlog.into_param().abi(), cfromcontainer, ccontainers, escanmode, pcxscan, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -563,12 +563,12 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateLogMarshallingArea(hlog: P0, pfnallocbuffer: CLFS_BLOCK_ALLOCATION, pfnfreebuffer: CLFS_BLOCK_DEALLOCATION, pvblockalloccontext: *mut ::core::ffi::c_void, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshal: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn CreateLogMarshallingArea(hlog: P0, pfnallocbuffer: CLFS_BLOCK_ALLOCATION, pfnfreebuffer: CLFS_BLOCK_DEALLOCATION, pvblockalloccontext: *mut ::core::ffi::c_void, cbmarshallingbuffer: u32, cmaxwritebuffers: u32, cmaxreadbuffers: u32, ppvmarshal: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn CreateLogMarshallingArea(hlog : super::super::Foundation:: HANDLE, pfnallocbuffer : CLFS_BLOCK_ALLOCATION, pfnfreebuffer : CLFS_BLOCK_DEALLOCATION, pvblockalloccontext : *mut ::core::ffi::c_void, cbmarshallingbuffer : u32, cmaxwritebuffers : u32, cmaxreadbuffers : u32, ppvmarshal : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreateLogMarshallingArea(hlog.into_param().abi(), pfnallocbuffer, pfnfreebuffer, pvblockalloccontext, cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, ppvmarshal) + CreateLogMarshallingArea(hlog.into_param().abi(), pfnallocbuffer, pfnfreebuffer, pvblockalloccontext, cbmarshallingbuffer, cmaxwritebuffers, cmaxreadbuffers, ppvmarshal).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -663,54 +663,54 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DecryptFileA(lpfilename: P0, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn DecryptFileA(lpfilename: P0, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn DecryptFileA(lpfilename : ::windows_core::PCSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - DecryptFileA(lpfilename.into_param().abi(), dwreserved) + DecryptFileA(lpfilename.into_param().abi(), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DecryptFileW(lpfilename: P0, dwreserved: u32) -> super::super::Foundation::BOOL +pub unsafe fn DecryptFileW(lpfilename: P0, dwreserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn DecryptFileW(lpfilename : ::windows_core::PCWSTR, dwreserved : u32) -> super::super::Foundation:: BOOL); - DecryptFileW(lpfilename.into_param().abi(), dwreserved) + DecryptFileW(lpfilename.into_param().abi(), dwreserved).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DefineDosDeviceA(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P0, lptargetpath: P1) -> super::super::Foundation::BOOL +pub unsafe fn DefineDosDeviceA(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P0, lptargetpath: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DefineDosDeviceA(dwflags : DEFINE_DOS_DEVICE_FLAGS, lpdevicename : ::windows_core::PCSTR, lptargetpath : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DefineDosDeviceA(dwflags, lpdevicename.into_param().abi(), lptargetpath.into_param().abi()) + DefineDosDeviceA(dwflags, lpdevicename.into_param().abi(), lptargetpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DefineDosDeviceW(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P0, lptargetpath: P1) -> super::super::Foundation::BOOL +pub unsafe fn DefineDosDeviceW(dwflags: DEFINE_DOS_DEVICE_FLAGS, lpdevicename: P0, lptargetpath: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DefineDosDeviceW(dwflags : DEFINE_DOS_DEVICE_FLAGS, lpdevicename : ::windows_core::PCWSTR, lptargetpath : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DefineDosDeviceW(dwflags, lpdevicename.into_param().abi(), lptargetpath.into_param().abi()) + DefineDosDeviceW(dwflags, lpdevicename.into_param().abi(), lptargetpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteFileA(lpfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteFileA(lpfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteFileA(lpfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteFileA(lpfilename.into_param().abi()) + DeleteFileA(lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -725,91 +725,91 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteFileTransactedA(lpfilename: P0, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn DeleteFileTransactedA(lpfilename: P0, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteFileTransactedA(lpfilename : ::windows_core::PCSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteFileTransactedA(lpfilename.into_param().abi(), htransaction.into_param().abi()) + DeleteFileTransactedA(lpfilename.into_param().abi(), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteFileTransactedW(lpfilename: P0, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn DeleteFileTransactedW(lpfilename: P0, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteFileTransactedW(lpfilename : ::windows_core::PCWSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteFileTransactedW(lpfilename.into_param().abi(), htransaction.into_param().abi()) + DeleteFileTransactedW(lpfilename.into_param().abi(), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteFileW(lpfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteFileW(lpfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteFileW(lpfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeleteFileW(lpfilename.into_param().abi()) + DeleteFileW(lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteLogByHandle(hlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteLogByHandle(hlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn DeleteLogByHandle(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteLogByHandle(hlog.into_param().abi()) + DeleteLogByHandle(hlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteLogFile(pszlogfilename: P0, pvreserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn DeleteLogFile(pszlogfilename: P0, pvreserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clfsw32.dll" "system" fn DeleteLogFile(pszlogfilename : ::windows_core::PCWSTR, pvreserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteLogFile(pszlogfilename.into_param().abi(), pvreserved) + DeleteLogFile(pszlogfilename.into_param().abi(), pvreserved).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteLogMarshallingArea(pvmarshal: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DeleteLogMarshallingArea(pvmarshal: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn DeleteLogMarshallingArea(pvmarshal : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteLogMarshallingArea(pvmarshal) + DeleteLogMarshallingArea(pvmarshal).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteVolumeMountPointA(lpszvolumemountpoint: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteVolumeMountPointA(lpszvolumemountpoint: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteVolumeMountPointA(lpszvolumemountpoint : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteVolumeMountPointA(lpszvolumemountpoint.into_param().abi()) + DeleteVolumeMountPointA(lpszvolumemountpoint.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteVolumeMountPointW(lpszvolumemountpoint: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteVolumeMountPointW(lpszvolumemountpoint: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteVolumeMountPointW(lpszvolumemountpoint : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeleteVolumeMountPointW(lpszvolumemountpoint.into_param().abi()) + DeleteVolumeMountPointW(lpszvolumemountpoint.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeregisterManageableLogClient(hlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeregisterManageableLogClient(hlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn DeregisterManageableLogClient(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeregisterManageableLogClient(hlog.into_param().abi()) + DeregisterManageableLogClient(hlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -825,33 +825,33 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EncryptFileA(lpfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn EncryptFileA(lpfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EncryptFileA(lpfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - EncryptFileA(lpfilename.into_param().abi()) + EncryptFileA(lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EncryptFileW(lpfilename: P0) -> super::super::Foundation::BOOL +pub unsafe fn EncryptFileW(lpfilename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EncryptFileW(lpfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - EncryptFileW(lpfilename.into_param().abi()) + EncryptFileW(lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EncryptionDisable(dirpath: P0, disable: P1) -> super::super::Foundation::BOOL +pub unsafe fn EncryptionDisable(dirpath: P0, disable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EncryptionDisable(dirpath : ::windows_core::PCWSTR, disable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EncryptionDisable(dirpath.into_param().abi(), disable.into_param().abi()) + EncryptionDisable(dirpath.into_param().abi(), disable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -867,49 +867,49 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FileEncryptionStatusA(lpfilename: P0, lpstatus: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FileEncryptionStatusA(lpfilename: P0, lpstatus: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn FileEncryptionStatusA(lpfilename : ::windows_core::PCSTR, lpstatus : *mut u32) -> super::super::Foundation:: BOOL); - FileEncryptionStatusA(lpfilename.into_param().abi(), lpstatus) + FileEncryptionStatusA(lpfilename.into_param().abi(), lpstatus).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FileEncryptionStatusW(lpfilename: P0, lpstatus: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FileEncryptionStatusW(lpfilename: P0, lpstatus: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn FileEncryptionStatusW(lpfilename : ::windows_core::PCWSTR, lpstatus : *mut u32) -> super::super::Foundation:: BOOL); - FileEncryptionStatusW(lpfilename.into_param().abi(), lpstatus) + FileEncryptionStatusW(lpfilename.into_param().abi(), lpstatus).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FileTimeToLocalFileTime(lpfiletime: *const super::super::Foundation::FILETIME, lplocalfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { +pub unsafe fn FileTimeToLocalFileTime(lpfiletime: *const super::super::Foundation::FILETIME, lplocalfiletime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FileTimeToLocalFileTime(lpfiletime : *const super::super::Foundation:: FILETIME, lplocalfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - FileTimeToLocalFileTime(lpfiletime, lplocalfiletime) + FileTimeToLocalFileTime(lpfiletime, lplocalfiletime).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindClose(hfindfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindClose(hfindfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindClose(hfindfile : FindFileHandle) -> super::super::Foundation:: BOOL); - FindClose(hfindfile.into_param().abi()) + FindClose(hfindfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindCloseChangeNotification(hchangehandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindCloseChangeNotification(hchangehandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindCloseChangeNotification(hchangehandle : FindChangeNotificationHandle) -> super::super::Foundation:: BOOL); - FindCloseChangeNotification(hchangehandle.into_param().abi()) + FindCloseChangeNotification(hchangehandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1092,136 +1092,136 @@ pub unsafe fn FindFirstVolumeW(lpszvolumename: &mut [u16]) -> ::windows_core::Re #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextChangeNotification(hchangehandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindNextChangeNotification(hchangehandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextChangeNotification(hchangehandle : FindChangeNotificationHandle) -> super::super::Foundation:: BOOL); - FindNextChangeNotification(hchangehandle.into_param().abi()) + FindNextChangeNotification(hchangehandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextFileA(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAA) -> super::super::Foundation::BOOL +pub unsafe fn FindNextFileA(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextFileA(hfindfile : FindFileHandle, lpfindfiledata : *mut WIN32_FIND_DATAA) -> super::super::Foundation:: BOOL); - FindNextFileA(hfindfile.into_param().abi(), lpfindfiledata) + FindNextFileA(hfindfile.into_param().abi(), lpfindfiledata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextFileNameW(hfindstream: P0, stringlength: *mut u32, linkname: ::windows_core::PWSTR) -> super::super::Foundation::BOOL +pub unsafe fn FindNextFileNameW(hfindstream: P0, stringlength: *mut u32, linkname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextFileNameW(hfindstream : FindFileNameHandle, stringlength : *mut u32, linkname : ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - FindNextFileNameW(hfindstream.into_param().abi(), stringlength, ::core::mem::transmute(linkname)) + FindNextFileNameW(hfindstream.into_param().abi(), stringlength, ::core::mem::transmute(linkname)).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextFileW(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAW) -> super::super::Foundation::BOOL +pub unsafe fn FindNextFileW(hfindfile: P0, lpfindfiledata: *mut WIN32_FIND_DATAW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextFileW(hfindfile : FindFileHandle, lpfindfiledata : *mut WIN32_FIND_DATAW) -> super::super::Foundation:: BOOL); - FindNextFileW(hfindfile.into_param().abi(), lpfindfiledata) + FindNextFileW(hfindfile.into_param().abi(), lpfindfiledata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextStreamW(hfindstream: P0, lpfindstreamdata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn FindNextStreamW(hfindstream: P0, lpfindstreamdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextStreamW(hfindstream : FindStreamHandle, lpfindstreamdata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextStreamW(hfindstream.into_param().abi(), lpfindstreamdata) + FindNextStreamW(hfindstream.into_param().abi(), lpfindstreamdata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextVolumeA(hfindvolume: P0, lpszvolumename: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn FindNextVolumeA(hfindvolume: P0, lpszvolumename: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeA(hfindvolume : FindVolumeHandle, lpszvolumename : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeA(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _) + FindNextVolumeA(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextVolumeMountPointA(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn FindNextVolumeMountPointA(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointA(hfindvolumemountpoint : FindVolumeMountPointHandle, lpszvolumemountpoint : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointA(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _) + FindNextVolumeMountPointA(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextVolumeMountPointW(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn FindNextVolumeMountPointW(hfindvolumemountpoint: P0, lpszvolumemountpoint: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeMountPointW(hfindvolumemountpoint : FindVolumeMountPointHandle, lpszvolumemountpoint : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeMountPointW(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _) + FindNextVolumeMountPointW(hfindvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumemountpoint.as_ptr()), lpszvolumemountpoint.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindNextVolumeW(hfindvolume: P0, lpszvolumename: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn FindNextVolumeW(hfindvolume: P0, lpszvolumename: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindNextVolumeW(hfindvolume : FindVolumeHandle, lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - FindNextVolumeW(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _) + FindNextVolumeW(hfindvolume.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindVolumeClose(hfindvolume: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindVolumeClose(hfindvolume: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindVolumeClose(hfindvolume : FindVolumeHandle) -> super::super::Foundation:: BOOL); - FindVolumeClose(hfindvolume.into_param().abi()) + FindVolumeClose(hfindvolume.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindVolumeMountPointClose(hfindvolumemountpoint: P0) -> super::super::Foundation::BOOL +pub unsafe fn FindVolumeMountPointClose(hfindvolumemountpoint: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FindVolumeMountPointClose(hfindvolumemountpoint : FindVolumeMountPointHandle) -> super::super::Foundation:: BOOL); - FindVolumeMountPointClose(hfindvolumemountpoint.into_param().abi()) + FindVolumeMountPointClose(hfindvolumemountpoint.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushFileBuffers(hfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn FlushFileBuffers(hfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FlushFileBuffers(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FlushFileBuffers(hfile.into_param().abi()) + FlushFileBuffers(hfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn FlushLogBuffers(pvmarshal: *const ::core::ffi::c_void, poverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { +pub unsafe fn FlushLogBuffers(pvmarshal: *const ::core::ffi::c_void, poverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn FlushLogBuffers(pvmarshal : *const ::core::ffi::c_void, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - FlushLogBuffers(pvmarshal, ::core::mem::transmute(poverlapped.unwrap_or(::std::ptr::null_mut()))) + FlushLogBuffers(pvmarshal, ::core::mem::transmute(poverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn FlushLogToLsn(pvmarshalcontext: *mut ::core::ffi::c_void, plsnflush: *mut CLS_LSN, plsnlastflushed: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn FlushLogToLsn(pvmarshalcontext: *mut ::core::ffi::c_void, plsnflush: *mut CLS_LSN, plsnlastflushed: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn FlushLogToLsn(pvmarshalcontext : *mut ::core::ffi::c_void, plsnflush : *mut CLS_LSN, plsnlastflushed : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - FlushLogToLsn(pvmarshalcontext, plsnflush, plsnlastflushed, poverlapped) + FlushLogToLsn(pvmarshalcontext, plsnflush, plsnlastflushed, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1239,29 +1239,29 @@ pub unsafe fn FreeEncryptionCertificateHashList(pusers: *const ENCRYPTION_CERTIF #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> super::super::Foundation::BOOL { +pub unsafe fn FreeReservedLog(pvmarshal: *mut ::core::ffi::c_void, creservedrecords: u32, pcbadjustment: *mut i64) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn FreeReservedLog(pvmarshal : *mut ::core::ffi::c_void, creservedrecords : u32, pcbadjustment : *mut i64) -> super::super::Foundation:: BOOL); - FreeReservedLog(pvmarshal, creservedrecords, pcbadjustment) + FreeReservedLog(pvmarshal, creservedrecords, pcbadjustment).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetBinaryTypeA(lpapplicationname: P0, lpbinarytype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetBinaryTypeA(lpapplicationname: P0, lpbinarytype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetBinaryTypeA(lpapplicationname : ::windows_core::PCSTR, lpbinarytype : *mut u32) -> super::super::Foundation:: BOOL); - GetBinaryTypeA(lpapplicationname.into_param().abi(), lpbinarytype) + GetBinaryTypeA(lpapplicationname.into_param().abi(), lpbinarytype).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetBinaryTypeW(lpapplicationname: P0, lpbinarytype: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetBinaryTypeW(lpapplicationname: P0, lpbinarytype: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetBinaryTypeW(lpapplicationname : ::windows_core::PCWSTR, lpbinarytype : *mut u32) -> super::super::Foundation:: BOOL); - GetBinaryTypeW(lpapplicationname.into_param().abi(), lpbinarytype) + GetBinaryTypeW(lpapplicationname.into_param().abi(), lpbinarytype).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1306,52 +1306,52 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentClockTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn GetCurrentClockTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetCurrentClockTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - GetCurrentClockTransactionManager(transactionmanagerhandle.into_param().abi(), tmvirtualclock) + GetCurrentClockTransactionManager(transactionmanagerhandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDiskFreeSpaceA(lprootpathname: P0, lpsectorspercluster: ::core::option::Option<*mut u32>, lpbytespersector: ::core::option::Option<*mut u32>, lpnumberoffreeclusters: ::core::option::Option<*mut u32>, lptotalnumberofclusters: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetDiskFreeSpaceA(lprootpathname: P0, lpsectorspercluster: ::core::option::Option<*mut u32>, lpbytespersector: ::core::option::Option<*mut u32>, lpnumberoffreeclusters: ::core::option::Option<*mut u32>, lptotalnumberofclusters: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDiskFreeSpaceA(lprootpathname : ::windows_core::PCSTR, lpsectorspercluster : *mut u32, lpbytespersector : *mut u32, lpnumberoffreeclusters : *mut u32, lptotalnumberofclusters : *mut u32) -> super::super::Foundation:: BOOL); - GetDiskFreeSpaceA(lprootpathname.into_param().abi(), ::core::mem::transmute(lpsectorspercluster.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytespersector.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnumberoffreeclusters.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofclusters.unwrap_or(::std::ptr::null_mut()))) + GetDiskFreeSpaceA(lprootpathname.into_param().abi(), ::core::mem::transmute(lpsectorspercluster.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytespersector.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnumberoffreeclusters.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofclusters.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDiskFreeSpaceExA(lpdirectoryname: P0, lpfreebytesavailabletocaller: ::core::option::Option<*mut u64>, lptotalnumberofbytes: ::core::option::Option<*mut u64>, lptotalnumberoffreebytes: ::core::option::Option<*mut u64>) -> super::super::Foundation::BOOL +pub unsafe fn GetDiskFreeSpaceExA(lpdirectoryname: P0, lpfreebytesavailabletocaller: ::core::option::Option<*mut u64>, lptotalnumberofbytes: ::core::option::Option<*mut u64>, lptotalnumberoffreebytes: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDiskFreeSpaceExA(lpdirectoryname : ::windows_core::PCSTR, lpfreebytesavailabletocaller : *mut u64, lptotalnumberofbytes : *mut u64, lptotalnumberoffreebytes : *mut u64) -> super::super::Foundation:: BOOL); - GetDiskFreeSpaceExA(lpdirectoryname.into_param().abi(), ::core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofbytes.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(::std::ptr::null_mut()))) + GetDiskFreeSpaceExA(lpdirectoryname.into_param().abi(), ::core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofbytes.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDiskFreeSpaceExW(lpdirectoryname: P0, lpfreebytesavailabletocaller: ::core::option::Option<*mut u64>, lptotalnumberofbytes: ::core::option::Option<*mut u64>, lptotalnumberoffreebytes: ::core::option::Option<*mut u64>) -> super::super::Foundation::BOOL +pub unsafe fn GetDiskFreeSpaceExW(lpdirectoryname: P0, lpfreebytesavailabletocaller: ::core::option::Option<*mut u64>, lptotalnumberofbytes: ::core::option::Option<*mut u64>, lptotalnumberoffreebytes: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDiskFreeSpaceExW(lpdirectoryname : ::windows_core::PCWSTR, lpfreebytesavailabletocaller : *mut u64, lptotalnumberofbytes : *mut u64, lptotalnumberoffreebytes : *mut u64) -> super::super::Foundation:: BOOL); - GetDiskFreeSpaceExW(lpdirectoryname.into_param().abi(), ::core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofbytes.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(::std::ptr::null_mut()))) + GetDiskFreeSpaceExW(lpdirectoryname.into_param().abi(), ::core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofbytes.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDiskFreeSpaceW(lprootpathname: P0, lpsectorspercluster: ::core::option::Option<*mut u32>, lpbytespersector: ::core::option::Option<*mut u32>, lpnumberoffreeclusters: ::core::option::Option<*mut u32>, lptotalnumberofclusters: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetDiskFreeSpaceW(lprootpathname: P0, lpsectorspercluster: ::core::option::Option<*mut u32>, lpbytespersector: ::core::option::Option<*mut u32>, lpnumberoffreeclusters: ::core::option::Option<*mut u32>, lptotalnumberofclusters: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetDiskFreeSpaceW(lprootpathname : ::windows_core::PCWSTR, lpsectorspercluster : *mut u32, lpbytespersector : *mut u32, lpnumberoffreeclusters : *mut u32, lptotalnumberofclusters : *mut u32) -> super::super::Foundation:: BOOL); - GetDiskFreeSpaceW(lprootpathname.into_param().abi(), ::core::mem::transmute(lpsectorspercluster.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytespersector.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnumberoffreeclusters.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofclusters.unwrap_or(::std::ptr::null_mut()))) + GetDiskFreeSpaceW(lprootpathname.into_param().abi(), ::core::mem::transmute(lpsectorspercluster.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytespersector.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnumberoffreeclusters.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalnumberofclusters.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1401,22 +1401,22 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetEnlistmentId(enlistmenthandle: P0, enlistmentid: *mut ::windows_core::GUID) -> super::super::Foundation::BOOL +pub unsafe fn GetEnlistmentId(enlistmenthandle: P0, enlistmentid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetEnlistmentId(enlistmenthandle : super::super::Foundation:: HANDLE, enlistmentid : *mut ::windows_core::GUID) -> super::super::Foundation:: BOOL); - GetEnlistmentId(enlistmenthandle.into_param().abi(), enlistmentid) + GetEnlistmentId(enlistmenthandle.into_param().abi(), enlistmentid).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut ::core::ffi::c_void, bufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut ::core::ffi::c_void, bufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetEnlistmentRecoveryInformation(enlistmenthandle : super::super::Foundation:: HANDLE, buffersize : u32, buffer : *mut ::core::ffi::c_void, bufferused : *mut u32) -> super::super::Foundation:: BOOL); - GetEnlistmentRecoveryInformation(enlistmenthandle.into_param().abi(), buffersize, buffer, bufferused) + GetEnlistmentRecoveryInformation(enlistmenthandle.into_param().abi(), buffersize, buffer, bufferused).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1448,12 +1448,12 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileAttributesExA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileAttributesExA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesExA(lpfilename : ::windows_core::PCSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileAttributesExA(lpfilename.into_param().abi(), finfolevelid, lpfileinformation) + GetFileAttributesExA(lpfilename.into_param().abi(), finfolevelid, lpfileinformation).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1468,34 +1468,34 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileAttributesExW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileAttributesExW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesExW(lpfilename : ::windows_core::PCWSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileAttributesExW(lpfilename.into_param().abi(), finfolevelid, lpfileinformation) + GetFileAttributesExW(lpfilename.into_param().abi(), finfolevelid, lpfileinformation).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileAttributesTransactedA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn GetFileAttributesTransactedA(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesTransactedA(lpfilename : ::windows_core::PCSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut ::core::ffi::c_void, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetFileAttributesTransactedA(lpfilename.into_param().abi(), finfolevelid, lpfileinformation, htransaction.into_param().abi()) + GetFileAttributesTransactedA(lpfilename.into_param().abi(), finfolevelid, lpfileinformation, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileAttributesTransactedW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn GetFileAttributesTransactedW(lpfilename: P0, finfolevelid: GET_FILEEX_INFO_LEVELS, lpfileinformation: *mut ::core::ffi::c_void, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileAttributesTransactedW(lpfilename : ::windows_core::PCWSTR, finfolevelid : GET_FILEEX_INFO_LEVELS, lpfileinformation : *mut ::core::ffi::c_void, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetFileAttributesTransactedW(lpfilename.into_param().abi(), finfolevelid, lpfileinformation, htransaction.into_param().abi()) + GetFileAttributesTransactedW(lpfilename.into_param().abi(), finfolevelid, lpfileinformation, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1509,32 +1509,32 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileBandwidthReservation(hfile: P0, lpperiodmilliseconds: *mut u32, lpbytesperperiod: *mut u32, pdiscardable: *mut i32, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetFileBandwidthReservation(hfile: P0, lpperiodmilliseconds: *mut u32, lpbytesperperiod: *mut u32, pdiscardable: *mut i32, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileBandwidthReservation(hfile : super::super::Foundation:: HANDLE, lpperiodmilliseconds : *mut u32, lpbytesperperiod : *mut u32, pdiscardable : *mut i32, lptransfersize : *mut u32, lpnumoutstandingrequests : *mut u32) -> super::super::Foundation:: BOOL); - GetFileBandwidthReservation(hfile.into_param().abi(), lpperiodmilliseconds, lpbytesperperiod, pdiscardable, lptransfersize, lpnumoutstandingrequests) + GetFileBandwidthReservation(hfile.into_param().abi(), lpperiodmilliseconds, lpbytesperperiod, pdiscardable, lptransfersize, lpnumoutstandingrequests).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileInformationByHandle(hfile: P0, lpfileinformation: *mut BY_HANDLE_FILE_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn GetFileInformationByHandle(hfile: P0, lpfileinformation: *mut BY_HANDLE_FILE_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileInformationByHandle(hfile : super::super::Foundation:: HANDLE, lpfileinformation : *mut BY_HANDLE_FILE_INFORMATION) -> super::super::Foundation:: BOOL); - GetFileInformationByHandle(hfile.into_param().abi(), lpfileinformation) + GetFileInformationByHandle(hfile.into_param().abi(), lpfileinformation).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileInformationByHandleEx(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *mut ::core::ffi::c_void, dwbuffersize: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetFileInformationByHandleEx(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *mut ::core::ffi::c_void, dwbuffersize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileInformationByHandleEx(hfile : super::super::Foundation:: HANDLE, fileinformationclass : FILE_INFO_BY_HANDLE_CLASS, lpfileinformation : *mut ::core::ffi::c_void, dwbuffersize : u32) -> super::super::Foundation:: BOOL); - GetFileInformationByHandleEx(hfile.into_param().abi(), fileinformationclass, lpfileinformation, dwbuffersize) + GetFileInformationByHandleEx(hfile.into_param().abi(), fileinformationclass, lpfileinformation, dwbuffersize).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1549,22 +1549,22 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileSizeEx(hfile: P0, lpfilesize: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn GetFileSizeEx(hfile: P0, lpfilesize: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileSizeEx(hfile : super::super::Foundation:: HANDLE, lpfilesize : *mut i64) -> super::super::Foundation:: BOOL); - GetFileSizeEx(hfile.into_param().abi(), lpfilesize) + GetFileSizeEx(hfile.into_param().abi(), lpfilesize).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileTime(hfile: P0, lpcreationtime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lplastaccesstime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lplastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::BOOL +pub unsafe fn GetFileTime(hfile: P0, lpcreationtime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lplastaccesstime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lplastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetFileTime(hfile : super::super::Foundation:: HANDLE, lpcreationtime : *mut super::super::Foundation:: FILETIME, lplastaccesstime : *mut super::super::Foundation:: FILETIME, lplastwritetime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetFileTime(hfile.into_param().abi(), ::core::mem::transmute(lpcreationtime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lplastaccesstime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lplastwritetime.unwrap_or(::std::ptr::null_mut()))) + GetFileTime(hfile.into_param().abi(), ::core::mem::transmute(lpcreationtime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lplastaccesstime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lplastwritetime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1579,32 +1579,32 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileVersionInfoA(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileVersionInfoA(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("version.dll" "system" fn GetFileVersionInfoA(lptstrfilename : ::windows_core::PCSTR, dwhandle : u32, dwlen : u32, lpdata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoA(lptstrfilename.into_param().abi(), dwhandle, dwlen, lpdata) + GetFileVersionInfoA(lptstrfilename.into_param().abi(), dwhandle, dwlen, lpdata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileVersionInfoExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileVersionInfoExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("version.dll" "system" fn GetFileVersionInfoExA(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : ::windows_core::PCSTR, dwhandle : u32, dwlen : u32, lpdata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoExA(dwflags, lpwstrfilename.into_param().abi(), dwhandle, dwlen, lpdata) + GetFileVersionInfoExA(dwflags, lpwstrfilename.into_param().abi(), dwhandle, dwlen, lpdata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileVersionInfoExW(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileVersionInfoExW(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("version.dll" "system" fn GetFileVersionInfoExW(dwflags : GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename : ::windows_core::PCWSTR, dwhandle : u32, dwlen : u32, lpdata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoExW(dwflags, lpwstrfilename.into_param().abi(), dwhandle, dwlen, lpdata) + GetFileVersionInfoExW(dwflags, lpwstrfilename.into_param().abi(), dwhandle, dwlen, lpdata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1645,12 +1645,12 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("version.dll" "system" fn GetFileVersionInfoW(lptstrfilename : ::windows_core::PCWSTR, dwhandle : u32, dwlen : u32, lpdata : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetFileVersionInfoW(lptstrfilename.into_param().abi(), dwhandle, dwlen, lpdata) + GetFileVersionInfoW(lptstrfilename.into_param().abi(), dwhandle, dwlen, lpdata).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1721,33 +1721,33 @@ pub unsafe fn GetIoRingInfo(ioring: *const HIORING__, info: *mut IORING_INFO) -> #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLogContainerName(hlog: P0, cidlogicalcontainer: u32, pwstrcontainername: P1, clencontainername: u32, pcactuallencontainername: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetLogContainerName(hlog: P0, cidlogicalcontainer: u32, pwstrcontainername: P1, clencontainername: u32, pcactuallencontainername: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clfsw32.dll" "system" fn GetLogContainerName(hlog : super::super::Foundation:: HANDLE, cidlogicalcontainer : u32, pwstrcontainername : ::windows_core::PCWSTR, clencontainername : u32, pcactuallencontainername : *mut u32) -> super::super::Foundation:: BOOL); - GetLogContainerName(hlog.into_param().abi(), cidlogicalcontainer, pwstrcontainername.into_param().abi(), clencontainername, pcactuallencontainername) + GetLogContainerName(hlog.into_param().abi(), cidlogicalcontainer, pwstrcontainername.into_param().abi(), clencontainername, pcactuallencontainername).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLogFileInformation(hlog: P0, pinfobuffer: *mut CLS_INFORMATION, cbbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetLogFileInformation(hlog: P0, pinfobuffer: *mut CLS_INFORMATION, cbbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn GetLogFileInformation(hlog : super::super::Foundation:: HANDLE, pinfobuffer : *mut CLS_INFORMATION, cbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetLogFileInformation(hlog.into_param().abi(), pinfobuffer, cbbuffer) + GetLogFileInformation(hlog.into_param().abi(), pinfobuffer, cbbuffer).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLogIoStatistics(hlog: P0, pvstatsbuffer: *mut ::core::ffi::c_void, cbstatsbuffer: u32, estatsclass: CLFS_IOSTATS_CLASS, pcbstatswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetLogIoStatistics(hlog: P0, pvstatsbuffer: *mut ::core::ffi::c_void, cbstatsbuffer: u32, estatsclass: CLFS_IOSTATS_CLASS, pcbstatswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn GetLogIoStatistics(hlog : super::super::Foundation:: HANDLE, pvstatsbuffer : *mut ::core::ffi::c_void, cbstatsbuffer : u32, estatsclass : CLFS_IOSTATS_CLASS, pcbstatswritten : *mut u32) -> super::super::Foundation:: BOOL); - GetLogIoStatistics(hlog.into_param().abi(), pvstatsbuffer, cbstatsbuffer, estatsclass, pcbstatswritten) + GetLogIoStatistics(hlog.into_param().abi(), pvstatsbuffer, cbstatsbuffer, estatsclass, pcbstatswritten).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1817,29 +1817,29 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNextLogArchiveExtent(pvarchivecontext: *mut ::core::ffi::c_void, rgadextent: *mut CLS_ARCHIVE_DESCRIPTOR, cdescriptors: u32, pcdescriptorsreturned: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetNextLogArchiveExtent(pvarchivecontext: *mut ::core::ffi::c_void, rgadextent: *mut CLS_ARCHIVE_DESCRIPTOR, cdescriptors: u32, pcdescriptorsreturned: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn GetNextLogArchiveExtent(pvarchivecontext : *mut ::core::ffi::c_void, rgadextent : *mut CLS_ARCHIVE_DESCRIPTOR, cdescriptors : u32, pcdescriptorsreturned : *mut u32) -> super::super::Foundation:: BOOL); - GetNextLogArchiveExtent(pvarchivecontext, rgadextent, cdescriptors, pcdescriptorsreturned) + GetNextLogArchiveExtent(pvarchivecontext, rgadextent, cdescriptors, pcdescriptorsreturned).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNotificationResourceManager(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, notificationlength: u32, dwmilliseconds: u32, returnlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNotificationResourceManager(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, notificationlength: u32, dwmilliseconds: u32, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetNotificationResourceManager(resourcemanagerhandle : super::super::Foundation:: HANDLE, transactionnotification : *mut TRANSACTION_NOTIFICATION, notificationlength : u32, dwmilliseconds : u32, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetNotificationResourceManager(resourcemanagerhandle.into_param().abi(), transactionnotification, notificationlength, dwmilliseconds, returnlength) + GetNotificationResourceManager(resourcemanagerhandle.into_param().abi(), transactionnotification, notificationlength, dwmilliseconds, returnlength).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn GetNotificationResourceManagerAsync(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, transactionnotificationlength: u32, returnlength: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn GetNotificationResourceManagerAsync(resourcemanagerhandle: P0, transactionnotification: *mut TRANSACTION_NOTIFICATION, transactionnotificationlength: u32, returnlength: *mut u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetNotificationResourceManagerAsync(resourcemanagerhandle : super::super::Foundation:: HANDLE, transactionnotification : *mut TRANSACTION_NOTIFICATION, transactionnotificationlength : u32, returnlength : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - GetNotificationResourceManagerAsync(resourcemanagerhandle.into_param().abi(), transactionnotification, transactionnotificationlength, returnlength, lpoverlapped) + GetNotificationResourceManagerAsync(resourcemanagerhandle.into_param().abi(), transactionnotification, transactionnotificationlength, returnlength, lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -1936,37 +1936,37 @@ pub unsafe fn GetTempPathW(lpbuffer: ::core::option::Option<&mut [u16]>) -> u32 #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTransactionId(transactionhandle: P0, transactionid: *mut ::windows_core::GUID) -> super::super::Foundation::BOOL +pub unsafe fn GetTransactionId(transactionhandle: P0, transactionid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetTransactionId(transactionhandle : super::super::Foundation:: HANDLE, transactionid : *mut ::windows_core::GUID) -> super::super::Foundation:: BOOL); - GetTransactionId(transactionhandle.into_param().abi(), transactionid) + GetTransactionId(transactionhandle.into_param().abi(), transactionid).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTransactionInformation(transactionhandle: P0, outcome: *mut u32, isolationlevel: *mut u32, isolationflags: *mut u32, timeout: *mut u32, description: ::core::option::Option<&mut [u16]>) -> super::super::Foundation::BOOL +pub unsafe fn GetTransactionInformation(transactionhandle: P0, outcome: *mut u32, isolationlevel: *mut u32, isolationflags: *mut u32, timeout: *mut u32, description: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetTransactionInformation(transactionhandle : super::super::Foundation:: HANDLE, outcome : *mut u32, isolationlevel : *mut u32, isolationflags : *mut u32, timeout : *mut u32, bufferlength : u32, description : ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - GetTransactionInformation(transactionhandle.into_param().abi(), outcome, isolationlevel, isolationflags, timeout, description.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + GetTransactionInformation(transactionhandle.into_param().abi(), outcome, isolationlevel, isolationflags, timeout, description.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(description.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTransactionManagerId(transactionmanagerhandle: P0, transactionmanagerid: *mut ::windows_core::GUID) -> super::super::Foundation::BOOL +pub unsafe fn GetTransactionManagerId(transactionmanagerhandle: P0, transactionmanagerid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn GetTransactionManagerId(transactionmanagerhandle : super::super::Foundation:: HANDLE, transactionmanagerid : *mut ::windows_core::GUID) -> super::super::Foundation:: BOOL); - GetTransactionManagerId(transactionmanagerhandle.into_param().abi(), transactionmanagerid) + GetTransactionManagerId(transactionmanagerhandle.into_param().abi(), transactionmanagerid).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumeInformationA(lprootpathname: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u8]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u8]>) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumeInformationA(lprootpathname: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u8]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { @@ -1981,11 +1981,12 @@ where ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ) + .ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumeInformationByHandleW(hfile: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u16]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u16]>) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumeInformationByHandleW(hfile: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u16]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -2000,11 +2001,12 @@ where ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ) + .ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumeInformationW(lprootpathname: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u16]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u16]>) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumeInformationW(lprootpathname: P0, lpvolumenamebuffer: ::core::option::Option<&mut [u16]>, lpvolumeserialnumber: ::core::option::Option<*mut u32>, lpmaximumcomponentlength: ::core::option::Option<*mut u32>, lpfilesystemflags: ::core::option::Option<*mut u32>, lpfilesystemnamebuffer: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { @@ -2019,86 +2021,87 @@ where ::core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len() as _), ) + .ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint: P0, lpszvolumename: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint: P0, lpszvolumename: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint : ::windows_core::PCSTR, lpszvolumename : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _) + GetVolumeNameForVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint: P0, lpszvolumename: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint: P0, lpszvolumename: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint : ::windows_core::PCWSTR, lpszvolumename : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _) + GetVolumeNameForVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), ::core::mem::transmute(lpszvolumename.as_ptr()), lpszvolumename.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumePathNameA(lpszfilename: P0, lpszvolumepathname: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumePathNameA(lpszfilename: P0, lpszvolumepathname: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNameA(lpszfilename : ::windows_core::PCSTR, lpszvolumepathname : ::windows_core::PSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumePathNameA(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _) + GetVolumePathNameA(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumePathNameW(lpszfilename: P0, lpszvolumepathname: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumePathNameW(lpszfilename: P0, lpszvolumepathname: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNameW(lpszfilename : ::windows_core::PCWSTR, lpszvolumepathname : ::windows_core::PWSTR, cchbufferlength : u32) -> super::super::Foundation:: BOOL); - GetVolumePathNameW(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _) + GetVolumePathNameW(lpszfilename.into_param().abi(), ::core::mem::transmute(lpszvolumepathname.as_ptr()), lpszvolumepathname.len() as _).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumePathNamesForVolumeNameA(lpszvolumename: P0, lpszvolumepathnames: ::core::option::Option<&mut [u8]>, lpcchreturnlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumePathNamesForVolumeNameA(lpszvolumename: P0, lpszvolumepathnames: ::core::option::Option<&mut [u8]>, lpcchreturnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameA(lpszvolumename : ::windows_core::PCSTR, lpszvolumepathnames : ::windows_core::PSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetVolumePathNamesForVolumeNameA(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength) + GetVolumePathNamesForVolumeNameA(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVolumePathNamesForVolumeNameW(lpszvolumename: P0, lpszvolumepathnames: ::core::option::Option<&mut [u16]>, lpcchreturnlength: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetVolumePathNamesForVolumeNameW(lpszvolumename: P0, lpszvolumepathnames: ::core::option::Option<&mut [u16]>, lpcchreturnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetVolumePathNamesForVolumeNameW(lpszvolumename : ::windows_core::PCWSTR, lpszvolumepathnames : ::windows_core::PWSTR, cchbufferlength : u32, lpcchreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - GetVolumePathNamesForVolumeNameW(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength) + GetVolumePathNamesForVolumeNameW(lpszvolumename.into_param().abi(), ::core::mem::transmute(lpszvolumepathnames.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpszvolumepathnames.as_deref().map_or(0, |slice| slice.len() as _), lpcchreturnlength).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HandleLogFull(hlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn HandleLogFull(hlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn HandleLogFull(hlog : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - HandleLogFull(hlog.into_param().abi()) + HandleLogFull(hlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InstallLogPolicy(hlog: P0, ppolicy: *mut CLFS_MGMT_POLICY) -> super::super::Foundation::BOOL +pub unsafe fn InstallLogPolicy(hlog: P0, ppolicy: *mut CLFS_MGMT_POLICY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn InstallLogPolicy(hlog : super::super::Foundation:: HANDLE, ppolicy : *mut CLFS_MGMT_POLICY) -> super::super::Foundation:: BOOL); - InstallLogPolicy(hlog.into_param().abi(), ppolicy) + InstallLogPolicy(hlog.into_param().abi(), ppolicy).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2170,39 +2173,39 @@ pub unsafe fn LZStart() -> i32 { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LocalFileTimeToFileTime(lplocalfiletime: *const super::super::Foundation::FILETIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { +pub unsafe fn LocalFileTimeToFileTime(lplocalfiletime: *const super::super::Foundation::FILETIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn LocalFileTimeToFileTime(lplocalfiletime : *const super::super::Foundation:: FILETIME, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - LocalFileTimeToFileTime(lplocalfiletime, lpfiletime) + LocalFileTimeToFileTime(lplocalfiletime, lpfiletime).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32) -> super::super::Foundation::BOOL +pub unsafe fn LockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn LockFile(hfile : super::super::Foundation:: HANDLE, dwfileoffsetlow : u32, dwfileoffsethigh : u32, nnumberofbytestolocklow : u32, nnumberofbytestolockhigh : u32) -> super::super::Foundation:: BOOL); - LockFile(hfile.into_param().abi(), dwfileoffsetlow, dwfileoffsethigh, nnumberofbytestolocklow, nnumberofbytestolockhigh) + LockFile(hfile.into_param().abi(), dwfileoffsetlow, dwfileoffsethigh, nnumberofbytestolocklow, nnumberofbytestolockhigh).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn LockFileEx(hfile: P0, dwflags: LOCK_FILE_FLAGS, dwreserved: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn LockFileEx(hfile: P0, dwflags: LOCK_FILE_FLAGS, dwreserved: u32, nnumberofbytestolocklow: u32, nnumberofbytestolockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn LockFileEx(hfile : super::super::Foundation:: HANDLE, dwflags : LOCK_FILE_FLAGS, dwreserved : u32, nnumberofbytestolocklow : u32, nnumberofbytestolockhigh : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - LockFileEx(hfile.into_param().abi(), dwflags, dwreserved, nnumberofbytestolocklow, nnumberofbytestolockhigh, lpoverlapped) + LockFileEx(hfile.into_param().abi(), dwflags, dwreserved, nnumberofbytestolocklow, nnumberofbytestolockhigh, lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LogTailAdvanceFailure(hlog: P0, dwreason: u32) -> super::super::Foundation::BOOL +pub unsafe fn LogTailAdvanceFailure(hlog: P0, dwreason: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn LogTailAdvanceFailure(hlog : super::super::Foundation:: HANDLE, dwreason : u32) -> super::super::Foundation:: BOOL); - LogTailAdvanceFailure(hlog.into_param().abi(), dwreason) + LogTailAdvanceFailure(hlog.into_param().abi(), dwreason).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -2272,35 +2275,35 @@ pub unsafe fn LsnRecordSequence(plsn: *const CLS_LSN) -> u32 { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileA(lpexistingfilename: P0, lpnewfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileA(lpexistingfilename: P0, lpnewfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - MoveFileA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi()) + MoveFileA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileExA(lpexistingfilename: P0, lpnewfilename: P1, dwflags: MOVE_FILE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileExA(lpexistingfilename: P0, lpnewfilename: P1, dwflags: MOVE_FILE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileExA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - MoveFileExA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), dwflags) + MoveFileExA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileExW(lpexistingfilename: P0, lpnewfilename: P1, dwflags: MOVE_FILE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileExW(lpexistingfilename: P0, lpnewfilename: P1, dwflags: MOVE_FILE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileExW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - MoveFileExW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), dwflags) + MoveFileExW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2316,59 +2319,59 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileTransactedA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileTransactedA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, dwflags : MOVE_FILE_FLAGS, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - MoveFileTransactedA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags, htransaction.into_param().abi()) + MoveFileTransactedA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P2) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileTransactedW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, dwflags : MOVE_FILE_FLAGS, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - MoveFileTransactedW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags, htransaction.into_param().abi()) + MoveFileTransactedW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileW(lpexistingfilename: P0, lpnewfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileW(lpexistingfilename: P0, lpnewfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - MoveFileW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi()) + MoveFileW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileWithProgressA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileWithProgressA(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileWithProgressA(lpexistingfilename : ::windows_core::PCSTR, lpnewfilename : ::windows_core::PCSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - MoveFileWithProgressA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags) + MoveFileWithProgressA(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveFileWithProgressW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn MoveFileWithProgressW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn MoveFileWithProgressW(lpexistingfilename : ::windows_core::PCWSTR, lpnewfilename : ::windows_core::PCWSTR, lpprogressroutine : LPPROGRESS_ROUTINE, lpdata : *const ::core::ffi::c_void, dwflags : MOVE_FILE_FLAGS) -> super::super::Foundation:: BOOL); - MoveFileWithProgressW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags) + MoveFileWithProgressW(lpexistingfilename.into_param().abi(), lpnewfilename.into_param().abi(), lpprogressroutine, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -2658,52 +2661,52 @@ pub unsafe fn PopIoRingCompletion(ioring: *const HIORING__) -> ::windows_core::R #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn PrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn PrePrepareComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrePrepareComplete(enlistmenthandle.into_param().abi(), tmvirtualclock) + PrePrepareComplete(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn PrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn PrePrepareEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrePrepareEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock) + PrePrepareEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn PrepareComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn PrepareComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrepareComplete(enlistmenthandle.into_param().abi(), tmvirtualclock) + PrepareComplete(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn PrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn PrepareEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - PrepareEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock) + PrepareEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrepareLogArchive(hlog: P0, pszbaselogfilename: &mut [u16], plsnlow: ::core::option::Option<*const CLS_LSN>, plsnhigh: ::core::option::Option<*const CLS_LSN>, pcactuallength: ::core::option::Option<*mut u32>, poffbaselogfiledata: *mut u64, pcbbaselogfilelength: *mut u64, plsnbase: *mut CLS_LSN, plsnlast: *mut CLS_LSN, plsncurrentarchivetail: *mut CLS_LSN, ppvarchivecontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn PrepareLogArchive(hlog: P0, pszbaselogfilename: &mut [u16], plsnlow: ::core::option::Option<*const CLS_LSN>, plsnhigh: ::core::option::Option<*const CLS_LSN>, pcactuallength: ::core::option::Option<*mut u32>, poffbaselogfiledata: *mut u64, pcbbaselogfilelength: *mut u64, plsnbase: *mut CLS_LSN, plsnlast: *mut CLS_LSN, plsncurrentarchivetail: *mut CLS_LSN, ppvarchivecontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn PrepareLogArchive(hlog : super::super::Foundation:: HANDLE, pszbaselogfilename : ::windows_core::PWSTR, clen : u32, plsnlow : *const CLS_LSN, plsnhigh : *const CLS_LSN, pcactuallength : *mut u32, poffbaselogfiledata : *mut u64, pcbbaselogfilelength : *mut u64, plsnbase : *mut CLS_LSN, plsnlast : *mut CLS_LSN, plsncurrentarchivetail : *mut CLS_LSN, ppvarchivecontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - PrepareLogArchive(hlog.into_param().abi(), ::core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len() as _, ::core::mem::transmute(plsnlow.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnhigh.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pcactuallength.unwrap_or(::std::ptr::null_mut())), poffbaselogfiledata, pcbbaselogfilelength, plsnbase, plsnlast, plsncurrentarchivetail, ppvarchivecontext) + PrepareLogArchive(hlog.into_param().abi(), ::core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len() as _, ::core::mem::transmute(plsnlow.unwrap_or(::std::ptr::null())), ::core::mem::transmute(plsnhigh.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pcactuallength.unwrap_or(::std::ptr::null_mut())), poffbaselogfiledata, pcbbaselogfilelength, plsnbase, plsnlast, plsncurrentarchivetail, ppvarchivecontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2744,12 +2747,12 @@ pub unsafe fn QueryIoRingCapabilities() -> ::windows_core::Result(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE, ppolicybuffer: *mut CLFS_MGMT_POLICY, pcbpolicybuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryLogPolicy(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE, ppolicybuffer: *mut CLFS_MGMT_POLICY, pcbpolicybuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn QueryLogPolicy(hlog : super::super::Foundation:: HANDLE, epolicytype : CLFS_MGMT_POLICY_TYPE, ppolicybuffer : *mut CLFS_MGMT_POLICY, pcbpolicybuffer : *mut u32) -> super::super::Foundation:: BOOL); - QueryLogPolicy(hlog.into_param().abi(), epolicytype, ppolicybuffer, pcbpolicybuffer) + QueryLogPolicy(hlog.into_param().abi(), epolicytype, ppolicybuffer, pcbpolicybuffer).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -2785,24 +2788,24 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadDirectoryChangesExW(hdirectory: P0, lpbuffer: *mut ::core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> super::super::Foundation::BOOL +pub unsafe fn ReadDirectoryChangesExW(hdirectory: P0, lpbuffer: *mut ::core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE, readdirectorynotifyinformationclass: READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadDirectoryChangesExW(hdirectory : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nbufferlength : u32, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE, lpbytesreturned : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE, readdirectorynotifyinformationclass : READ_DIRECTORY_NOTIFY_INFORMATION_CLASS) -> super::super::Foundation:: BOOL); - ReadDirectoryChangesExW(hdirectory.into_param().abi(), lpbuffer, nbufferlength, bwatchsubtree.into_param().abi(), dwnotifyfilter, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine, readdirectorynotifyinformationclass) + ReadDirectoryChangesExW(hdirectory.into_param().abi(), lpbuffer, nbufferlength, bwatchsubtree.into_param().abi(), dwnotifyfilter, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine, readdirectorynotifyinformationclass).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadDirectoryChangesW(hdirectory: P0, lpbuffer: *mut ::core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation::BOOL +pub unsafe fn ReadDirectoryChangesW(hdirectory: P0, lpbuffer: *mut ::core::ffi::c_void, nbufferlength: u32, bwatchsubtree: P1, dwnotifyfilter: FILE_NOTIFY_CHANGE, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadDirectoryChangesW(hdirectory : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nbufferlength : u32, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : FILE_NOTIFY_CHANGE, lpbytesreturned : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - ReadDirectoryChangesW(hdirectory.into_param().abi(), lpbuffer, nbufferlength, bwatchsubtree.into_param().abi(), dwnotifyfilter, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine) + ReadDirectoryChangesW(hdirectory.into_param().abi(), lpbuffer, nbufferlength, bwatchsubtree.into_param().abi(), dwnotifyfilter, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut())), lpcompletionroutine).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -2813,148 +2816,148 @@ pub unsafe fn ReadEncryptedFileRaw(pfexportcallback: PFE_EXPORT_FUNC, pvcallback #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadFile(hfile: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nnumberofbytestoread: u32, lpnumberofbytesread: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn ReadFile(hfile: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nnumberofbytestoread: u32, lpnumberofbytesread: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadFile(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nnumberofbytestoread, ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + ReadFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nnumberofbytestoread, ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadFileEx(hfile: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nnumberofbytestoread: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation::BOOL +pub unsafe fn ReadFileEx(hfile: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nnumberofbytestoread: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nnumberofbytestoread : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - ReadFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nnumberofbytestoread, lpoverlapped, lpcompletionroutine) + ReadFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nnumberofbytestoread, lpoverlapped, lpcompletionroutine).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadFileScatter(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestoread: u32, lpreserved: ::core::option::Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn ReadFileScatter(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestoread: u32, lpreserved: ::core::option::Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadFileScatter(hfile : super::super::Foundation:: HANDLE, asegmentarray : *const FILE_SEGMENT_ELEMENT, nnumberofbytestoread : u32, lpreserved : *const u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadFileScatter(hfile.into_param().abi(), asegmentarray, nnumberofbytestoread, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lpoverlapped) + ReadFileScatter(hfile.into_param().abi(), asegmentarray, nnumberofbytestoread, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadLogArchiveMetadata(pvarchivecontext: *mut ::core::ffi::c_void, cboffset: u32, cbbytestoread: u32, pbreadbuffer: *mut u8, pcbbytesread: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn ReadLogArchiveMetadata(pvarchivecontext: *mut ::core::ffi::c_void, cboffset: u32, cbbytestoread: u32, pbreadbuffer: *mut u8, pcbbytesread: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReadLogArchiveMetadata(pvarchivecontext : *mut ::core::ffi::c_void, cboffset : u32, cbbytestoread : u32, pbreadbuffer : *mut u8, pcbbytesread : *mut u32) -> super::super::Foundation:: BOOL); - ReadLogArchiveMetadata(pvarchivecontext, cboffset, cbbytestoread, pbreadbuffer, pcbbytesread) + ReadLogArchiveMetadata(pvarchivecontext, cboffset, cbbytestoread, pbreadbuffer, pcbbytesread).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadLogNotification(hlog: P0, pnotification: *mut CLFS_MGMT_NOTIFICATION, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn ReadLogNotification(hlog: P0, pnotification: *mut CLFS_MGMT_NOTIFICATION, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn ReadLogNotification(hlog : super::super::Foundation:: HANDLE, pnotification : *mut CLFS_MGMT_NOTIFICATION, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadLogNotification(hlog.into_param().abi(), pnotification, lpoverlapped) + ReadLogNotification(hlog.into_param().abi(), pnotification, lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadLogRecord(pvmarshal: *mut ::core::ffi::c_void, plsnfirst: *mut CLS_LSN, econtextmode: CLFS_CONTEXT_MODE, ppvreadbuffer: *mut *mut ::core::ffi::c_void, pcbreadbuffer: *mut u32, perecordtype: *mut u8, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, ppvreadcontext: *mut *mut ::core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReadLogRecord(pvmarshal: *mut ::core::ffi::c_void, plsnfirst: *mut CLS_LSN, econtextmode: CLFS_CONTEXT_MODE, ppvreadbuffer: *mut *mut ::core::ffi::c_void, pcbreadbuffer: *mut u32, perecordtype: *mut u8, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, ppvreadcontext: *mut *mut ::core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReadLogRecord(pvmarshal : *mut ::core::ffi::c_void, plsnfirst : *mut CLS_LSN, econtextmode : CLFS_CONTEXT_MODE, ppvreadbuffer : *mut *mut ::core::ffi::c_void, pcbreadbuffer : *mut u32, perecordtype : *mut u8, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, ppvreadcontext : *mut *mut ::core::ffi::c_void, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadLogRecord(pvmarshal, plsnfirst, econtextmode, ppvreadbuffer, pcbreadbuffer, perecordtype, plsnundonext, plsnprevious, ppvreadcontext, poverlapped) + ReadLogRecord(pvmarshal, plsnfirst, econtextmode, ppvreadbuffer, pcbreadbuffer, perecordtype, plsnundonext, plsnprevious, ppvreadcontext, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadLogRestartArea(pvmarshal: *mut ::core::ffi::c_void, ppvrestartbuffer: *mut *mut ::core::ffi::c_void, pcbrestartbuffer: *mut u32, plsn: *mut CLS_LSN, ppvcontext: *mut *mut ::core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReadLogRestartArea(pvmarshal: *mut ::core::ffi::c_void, ppvrestartbuffer: *mut *mut ::core::ffi::c_void, pcbrestartbuffer: *mut u32, plsn: *mut CLS_LSN, ppvcontext: *mut *mut ::core::ffi::c_void, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReadLogRestartArea(pvmarshal : *mut ::core::ffi::c_void, ppvrestartbuffer : *mut *mut ::core::ffi::c_void, pcbrestartbuffer : *mut u32, plsn : *mut CLS_LSN, ppvcontext : *mut *mut ::core::ffi::c_void, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadLogRestartArea(pvmarshal, ppvrestartbuffer, pcbrestartbuffer, plsn, ppvcontext, poverlapped) + ReadLogRestartArea(pvmarshal, ppvrestartbuffer, pcbrestartbuffer, plsn, ppvcontext, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadNextLogRecord(pvreadcontext: *mut ::core::ffi::c_void, ppvbuffer: *mut *mut ::core::ffi::c_void, pcbbuffer: *mut u32, perecordtype: *mut u8, plsnuser: *mut CLS_LSN, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, plsnrecord: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReadNextLogRecord(pvreadcontext: *mut ::core::ffi::c_void, ppvbuffer: *mut *mut ::core::ffi::c_void, pcbbuffer: *mut u32, perecordtype: *mut u8, plsnuser: *mut CLS_LSN, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, plsnrecord: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReadNextLogRecord(pvreadcontext : *mut ::core::ffi::c_void, ppvbuffer : *mut *mut ::core::ffi::c_void, pcbbuffer : *mut u32, perecordtype : *mut u8, plsnuser : *mut CLS_LSN, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, plsnrecord : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadNextLogRecord(pvreadcontext, ppvbuffer, pcbbuffer, perecordtype, plsnuser, plsnundonext, plsnprevious, plsnrecord, poverlapped) + ReadNextLogRecord(pvreadcontext, ppvbuffer, pcbbuffer, perecordtype, plsnuser, plsnundonext, plsnprevious, plsnrecord, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn ReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn ReadOnlyEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - ReadOnlyEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock) + ReadOnlyEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReadPreviousLogRestartArea(pvreadcontext: *mut ::core::ffi::c_void, ppvrestartbuffer: *mut *mut ::core::ffi::c_void, pcbrestartbuffer: *mut u32, plsnrestart: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReadPreviousLogRestartArea(pvreadcontext: *mut ::core::ffi::c_void, ppvrestartbuffer: *mut *mut ::core::ffi::c_void, pcbrestartbuffer: *mut u32, plsnrestart: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReadPreviousLogRestartArea(pvreadcontext : *mut ::core::ffi::c_void, ppvrestartbuffer : *mut *mut ::core::ffi::c_void, pcbrestartbuffer : *mut u32, plsnrestart : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadPreviousLogRestartArea(pvreadcontext, ppvrestartbuffer, pcbrestartbuffer, plsnrestart, poverlapped) + ReadPreviousLogRestartArea(pvreadcontext, ppvrestartbuffer, pcbrestartbuffer, plsnrestart, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RecoverEnlistment(enlistmenthandle: P0, enlistmentkey: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn RecoverEnlistment(enlistmenthandle: P0, enlistmentkey: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RecoverEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, enlistmentkey : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RecoverEnlistment(enlistmenthandle.into_param().abi(), enlistmentkey) + RecoverEnlistment(enlistmenthandle.into_param().abi(), enlistmentkey).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RecoverResourceManager(resourcemanagerhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn RecoverResourceManager(resourcemanagerhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RecoverResourceManager(resourcemanagerhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RecoverResourceManager(resourcemanagerhandle.into_param().abi()) + RecoverResourceManager(resourcemanagerhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RecoverTransactionManager(transactionmanagerhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn RecoverTransactionManager(transactionmanagerhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RecoverTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RecoverTransactionManager(transactionmanagerhandle.into_param().abi()) + RecoverTransactionManager(transactionmanagerhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterForLogWriteNotification(hlog: P0, cbthreshold: u32, fenable: P1) -> super::super::Foundation::BOOL +pub unsafe fn RegisterForLogWriteNotification(hlog: P0, cbthreshold: u32, fenable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RegisterForLogWriteNotification(hlog : super::super::Foundation:: HANDLE, cbthreshold : u32, fenable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterForLogWriteNotification(hlog.into_param().abi(), cbthreshold, fenable.into_param().abi()) + RegisterForLogWriteNotification(hlog.into_param().abi(), cbthreshold, fenable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterManageableLogClient(hlog: P0, pcallbacks: *mut LOG_MANAGEMENT_CALLBACKS) -> super::super::Foundation::BOOL +pub unsafe fn RegisterManageableLogClient(hlog: P0, pcallbacks: *mut LOG_MANAGEMENT_CALLBACKS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RegisterManageableLogClient(hlog : super::super::Foundation:: HANDLE, pcallbacks : *mut LOG_MANAGEMENT_CALLBACKS) -> super::super::Foundation:: BOOL); - RegisterManageableLogClient(hlog.into_param().abi(), pcallbacks) + RegisterManageableLogClient(hlog.into_param().abi(), pcallbacks).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveDirectoryA(lppathname: P0) -> super::super::Foundation::BOOL +pub unsafe fn RemoveDirectoryA(lppathname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryA(lppathname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - RemoveDirectoryA(lppathname.into_param().abi()) + RemoveDirectoryA(lppathname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2969,67 +2972,67 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveDirectoryTransactedA(lppathname: P0, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn RemoveDirectoryTransactedA(lppathname: P0, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryTransactedA(lppathname : ::windows_core::PCSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RemoveDirectoryTransactedA(lppathname.into_param().abi(), htransaction.into_param().abi()) + RemoveDirectoryTransactedA(lppathname.into_param().abi(), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveDirectoryTransactedW(lppathname: P0, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn RemoveDirectoryTransactedW(lppathname: P0, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryTransactedW(lppathname : ::windows_core::PCWSTR, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RemoveDirectoryTransactedW(lppathname.into_param().abi(), htransaction.into_param().abi()) + RemoveDirectoryTransactedW(lppathname.into_param().abi(), htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveDirectoryW(lppathname: P0) -> super::super::Foundation::BOOL +pub unsafe fn RemoveDirectoryW(lppathname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn RemoveDirectoryW(lppathname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - RemoveDirectoryW(lppathname.into_param().abi()) + RemoveDirectoryW(lppathname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveLogContainer(hlog: P0, pwszcontainerpath: P1, fforce: P2, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn RemoveLogContainer(hlog: P0, pwszcontainerpath: P1, fforce: P2, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RemoveLogContainer(hlog : super::super::Foundation:: HANDLE, pwszcontainerpath : ::windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveLogContainer(hlog.into_param().abi(), pwszcontainerpath.into_param().abi(), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + RemoveLogContainer(hlog.into_param().abi(), pwszcontainerpath.into_param().abi(), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveLogContainerSet(hlog: P0, rgwszcontainerpath: &[::windows_core::PCWSTR], fforce: P1, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn RemoveLogContainerSet(hlog: P0, rgwszcontainerpath: &[::windows_core::PCWSTR], fforce: P1, preserved: ::core::option::Option<*mut ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RemoveLogContainerSet(hlog : super::super::Foundation:: HANDLE, ccontainer : u16, rgwszcontainerpath : *const ::windows_core::PCWSTR, fforce : super::super::Foundation:: BOOL, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))) + RemoveLogContainerSet(hlog.into_param().abi(), rgwszcontainerpath.len() as _, ::core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.into_param().abi(), ::core::mem::transmute(preserved.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveLogPolicy(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn RemoveLogPolicy(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn RemoveLogPolicy(hlog : super::super::Foundation:: HANDLE, epolicytype : CLFS_MGMT_POLICY_TYPE) -> super::super::Foundation:: BOOL); - RemoveLogPolicy(hlog.into_param().abi(), epolicytype) + RemoveLogPolicy(hlog.into_param().abi(), epolicytype).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -3044,24 +3047,24 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RenameTransactionManager(logfilename: P0, existingtransactionmanagerguid: *mut ::windows_core::GUID) -> super::super::Foundation::BOOL +pub unsafe fn RenameTransactionManager(logfilename: P0, existingtransactionmanagerguid: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ktmw32.dll" "system" fn RenameTransactionManager(logfilename : ::windows_core::PCWSTR, existingtransactionmanagerguid : *mut ::windows_core::GUID) -> super::super::Foundation:: BOOL); - RenameTransactionManager(logfilename.into_param().abi(), existingtransactionmanagerguid) + RenameTransactionManager(logfilename.into_param().abi(), existingtransactionmanagerguid).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReplaceFileA(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: REPLACE_FILE_FLAGS, lpexclude: ::core::option::Option<*const ::core::ffi::c_void>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ReplaceFileA(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: REPLACE_FILE_FLAGS, lpexclude: ::core::option::Option<*const ::core::ffi::c_void>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ReplaceFileA(lpreplacedfilename : ::windows_core::PCSTR, lpreplacementfilename : ::windows_core::PCSTR, lpbackupfilename : ::windows_core::PCSTR, dwreplaceflags : REPLACE_FILE_FLAGS, lpexclude : *const ::core::ffi::c_void, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplaceFileA(lpreplacedfilename.into_param().abi(), lpreplacementfilename.into_param().abi(), lpbackupfilename.into_param().abi(), dwreplaceflags, ::core::mem::transmute(lpexclude.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + ReplaceFileA(lpreplacedfilename.into_param().abi(), lpreplacementfilename.into_param().abi(), lpbackupfilename.into_param().abi(), dwreplaceflags, ::core::mem::transmute(lpexclude.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3078,85 +3081,85 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReplaceFileW(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: REPLACE_FILE_FLAGS, lpexclude: ::core::option::Option<*const ::core::ffi::c_void>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ReplaceFileW(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: REPLACE_FILE_FLAGS, lpexclude: ::core::option::Option<*const ::core::ffi::c_void>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ReplaceFileW(lpreplacedfilename : ::windows_core::PCWSTR, lpreplacementfilename : ::windows_core::PCWSTR, lpbackupfilename : ::windows_core::PCWSTR, dwreplaceflags : REPLACE_FILE_FLAGS, lpexclude : *const ::core::ffi::c_void, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplaceFileW(lpreplacedfilename.into_param().abi(), lpreplacementfilename.into_param().abi(), lpbackupfilename.into_param().abi(), dwreplaceflags, ::core::mem::transmute(lpexclude.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + ReplaceFileW(lpreplacedfilename.into_param().abi(), lpreplacementfilename.into_param().abi(), lpbackupfilename.into_param().abi(), dwreplaceflags, ::core::mem::transmute(lpexclude.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReserveAndAppendLog(pvmarshal: *mut ::core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReserveAndAppendLog(pvmarshal: *mut ::core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReserveAndAppendLog(pvmarshal : *mut ::core::ffi::c_void, rgwriteentries : *mut CLS_WRITE_ENTRY, cwriteentries : u32, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, creserverecords : u32, rgcbreservation : *mut i64, fflags : CLFS_FLAG, plsn : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReserveAndAppendLog(pvmarshal, rgwriteentries, cwriteentries, plsnundonext, plsnprevious, creserverecords, rgcbreservation, fflags, plsn, poverlapped) + ReserveAndAppendLog(pvmarshal, rgwriteentries, cwriteentries, plsnundonext, plsnprevious, creserverecords, rgcbreservation, fflags, plsn, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ReserveAndAppendLogAligned(pvmarshal: *mut ::core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, cbentryalignment: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn ReserveAndAppendLogAligned(pvmarshal: *mut ::core::ffi::c_void, rgwriteentries: *mut CLS_WRITE_ENTRY, cwriteentries: u32, cbentryalignment: u32, plsnundonext: *mut CLS_LSN, plsnprevious: *mut CLS_LSN, creserverecords: u32, rgcbreservation: *mut i64, fflags: CLFS_FLAG, plsn: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ReserveAndAppendLogAligned(pvmarshal : *mut ::core::ffi::c_void, rgwriteentries : *mut CLS_WRITE_ENTRY, cwriteentries : u32, cbentryalignment : u32, plsnundonext : *mut CLS_LSN, plsnprevious : *mut CLS_LSN, creserverecords : u32, rgcbreservation : *mut i64, fflags : CLFS_FLAG, plsn : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReserveAndAppendLogAligned(pvmarshal, rgwriteentries, cwriteentries, cbentryalignment, plsnundonext, plsnprevious, creserverecords, rgcbreservation, fflags, plsn, poverlapped) + ReserveAndAppendLogAligned(pvmarshal, rgwriteentries, cwriteentries, cbentryalignment, plsnundonext, plsnprevious, creserverecords, rgcbreservation, fflags, plsn, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RollbackComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn RollbackComplete(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RollbackComplete(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollbackComplete(enlistmenthandle.into_param().abi(), tmvirtualclock) + RollbackComplete(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn RollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RollbackEnlistment(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollbackEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock) + RollbackEnlistment(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RollbackTransaction(transactionhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn RollbackTransaction(transactionhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RollbackTransaction(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RollbackTransaction(transactionhandle.into_param().abi()) + RollbackTransaction(transactionhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RollbackTransactionAsync(transactionhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn RollbackTransactionAsync(transactionhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RollbackTransactionAsync(transactionhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - RollbackTransactionAsync(transactionhandle.into_param().abi()) + RollbackTransactionAsync(transactionhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RollforwardTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn RollforwardTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn RollforwardTransactionManager(transactionmanagerhandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - RollforwardTransactionManager(transactionmanagerhandle.into_param().abi(), tmvirtualclock) + RollforwardTransactionManager(transactionmanagerhandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ScanLogContainers(pcxscan: *mut CLS_SCAN_CONTEXT, escanmode: u8, preserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn ScanLogContainers(pcxscan: *mut CLS_SCAN_CONTEXT, escanmode: u8, preserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn ScanLogContainers(pcxscan : *mut CLS_SCAN_CONTEXT, escanmode : u8, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ScanLogContainers(pcxscan, escanmode, preserved) + ScanLogContainers(pcxscan, escanmode, preserved).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3193,32 +3196,32 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEndOfFile(hfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetEndOfFile(hfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetEndOfFile(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetEndOfFile(hfile.into_param().abi()) + SetEndOfFile(hfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn SetEndOfLog(hlog: P0, plsnend: *mut CLS_LSN, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn SetEndOfLog(hlog: P0, plsnend: *mut CLS_LSN, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn SetEndOfLog(hlog : super::super::Foundation:: HANDLE, plsnend : *mut CLS_LSN, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - SetEndOfLog(hlog.into_param().abi(), plsnend, lpoverlapped) + SetEndOfLog(hlog.into_param().abi(), plsnend, lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetEnlistmentRecoveryInformation(enlistmenthandle: P0, buffersize: u32, buffer: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn SetEnlistmentRecoveryInformation(enlistmenthandle : super::super::Foundation:: HANDLE, buffersize : u32, buffer : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetEnlistmentRecoveryInformation(enlistmenthandle.into_param().abi(), buffersize, buffer) + SetEnlistmentRecoveryInformation(enlistmenthandle.into_param().abi(), buffersize, buffer).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3235,12 +3238,12 @@ pub unsafe fn SetFileApisToOEM() { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileAttributesA(lpfilename: P0, dwfileattributes: FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation::BOOL +pub unsafe fn SetFileAttributesA(lpfilename: P0, dwfileattributes: FILE_FLAGS_AND_ATTRIBUTES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesA(lpfilename : ::windows_core::PCSTR, dwfileattributes : FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation:: BOOL); - SetFileAttributesA(lpfilename.into_param().abi(), dwfileattributes) + SetFileAttributesA(lpfilename.into_param().abi(), dwfileattributes).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3255,75 +3258,75 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileAttributesTransactedA(lpfilename: P0, dwfileattributes: u32, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetFileAttributesTransactedA(lpfilename: P0, dwfileattributes: u32, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesTransactedA(lpfilename : ::windows_core::PCSTR, dwfileattributes : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetFileAttributesTransactedA(lpfilename.into_param().abi(), dwfileattributes, htransaction.into_param().abi()) + SetFileAttributesTransactedA(lpfilename.into_param().abi(), dwfileattributes, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileAttributesTransactedW(lpfilename: P0, dwfileattributes: u32, htransaction: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetFileAttributesTransactedW(lpfilename: P0, dwfileattributes: u32, htransaction: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesTransactedW(lpfilename : ::windows_core::PCWSTR, dwfileattributes : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetFileAttributesTransactedW(lpfilename.into_param().abi(), dwfileattributes, htransaction.into_param().abi()) + SetFileAttributesTransactedW(lpfilename.into_param().abi(), dwfileattributes, htransaction.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileAttributesW(lpfilename: P0, dwfileattributes: FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation::BOOL +pub unsafe fn SetFileAttributesW(lpfilename: P0, dwfileattributes: FILE_FLAGS_AND_ATTRIBUTES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileAttributesW(lpfilename : ::windows_core::PCWSTR, dwfileattributes : FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation:: BOOL); - SetFileAttributesW(lpfilename.into_param().abi(), dwfileattributes) + SetFileAttributesW(lpfilename.into_param().abi(), dwfileattributes).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileBandwidthReservation(hfile: P0, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: P1, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFileBandwidthReservation(hfile: P0, nperiodmilliseconds: u32, nbytesperperiod: u32, bdiscardable: P1, lptransfersize: *mut u32, lpnumoutstandingrequests: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileBandwidthReservation(hfile : super::super::Foundation:: HANDLE, nperiodmilliseconds : u32, nbytesperperiod : u32, bdiscardable : super::super::Foundation:: BOOL, lptransfersize : *mut u32, lpnumoutstandingrequests : *mut u32) -> super::super::Foundation:: BOOL); - SetFileBandwidthReservation(hfile.into_param().abi(), nperiodmilliseconds, nbytesperperiod, bdiscardable.into_param().abi(), lptransfersize, lpnumoutstandingrequests) + SetFileBandwidthReservation(hfile.into_param().abi(), nperiodmilliseconds, nbytesperperiod, bdiscardable.into_param().abi(), lptransfersize, lpnumoutstandingrequests).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileCompletionNotificationModes(filehandle: P0, flags: u8) -> super::super::Foundation::BOOL +pub unsafe fn SetFileCompletionNotificationModes(filehandle: P0, flags: u8) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileCompletionNotificationModes(filehandle : super::super::Foundation:: HANDLE, flags : u8) -> super::super::Foundation:: BOOL); - SetFileCompletionNotificationModes(filehandle.into_param().abi(), flags) + SetFileCompletionNotificationModes(filehandle.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileInformationByHandle(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *const ::core::ffi::c_void, dwbuffersize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFileInformationByHandle(hfile: P0, fileinformationclass: FILE_INFO_BY_HANDLE_CLASS, lpfileinformation: *const ::core::ffi::c_void, dwbuffersize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileInformationByHandle(hfile : super::super::Foundation:: HANDLE, fileinformationclass : FILE_INFO_BY_HANDLE_CLASS, lpfileinformation : *const ::core::ffi::c_void, dwbuffersize : u32) -> super::super::Foundation:: BOOL); - SetFileInformationByHandle(hfile.into_param().abi(), fileinformationclass, lpfileinformation, dwbuffersize) + SetFileInformationByHandle(hfile.into_param().abi(), fileinformationclass, lpfileinformation, dwbuffersize).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileIoOverlappedRange(filehandle: P0, overlappedrangestart: *const u8, length: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFileIoOverlappedRange(filehandle: P0, overlappedrangestart: *const u8, length: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileIoOverlappedRange(filehandle : super::super::Foundation:: HANDLE, overlappedrangestart : *const u8, length : u32) -> super::super::Foundation:: BOOL); - SetFileIoOverlappedRange(filehandle.into_param().abi(), overlappedrangestart, length) + SetFileIoOverlappedRange(filehandle.into_param().abi(), overlappedrangestart, length).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3338,54 +3341,54 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFilePointerEx(hfile: P0, lidistancetomove: i64, lpnewfilepointer: ::core::option::Option<*mut i64>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> super::super::Foundation::BOOL +pub unsafe fn SetFilePointerEx(hfile: P0, lidistancetomove: i64, lpnewfilepointer: ::core::option::Option<*mut i64>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFilePointerEx(hfile : super::super::Foundation:: HANDLE, lidistancetomove : i64, lpnewfilepointer : *mut i64, dwmovemethod : SET_FILE_POINTER_MOVE_METHOD) -> super::super::Foundation:: BOOL); - SetFilePointerEx(hfile.into_param().abi(), lidistancetomove, ::core::mem::transmute(lpnewfilepointer.unwrap_or(::std::ptr::null_mut())), dwmovemethod) + SetFilePointerEx(hfile.into_param().abi(), lidistancetomove, ::core::mem::transmute(lpnewfilepointer.unwrap_or(::std::ptr::null_mut())), dwmovemethod).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileShortNameA(hfile: P0, lpshortname: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetFileShortNameA(hfile: P0, lpshortname: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileShortNameA(hfile : super::super::Foundation:: HANDLE, lpshortname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetFileShortNameA(hfile.into_param().abi(), lpshortname.into_param().abi()) + SetFileShortNameA(hfile.into_param().abi(), lpshortname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileShortNameW(hfile: P0, lpshortname: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetFileShortNameW(hfile: P0, lpshortname: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileShortNameW(hfile : super::super::Foundation:: HANDLE, lpshortname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetFileShortNameW(hfile.into_param().abi(), lpshortname.into_param().abi()) + SetFileShortNameW(hfile.into_param().abi(), lpshortname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileTime(hfile: P0, lpcreationtime: ::core::option::Option<*const super::super::Foundation::FILETIME>, lplastaccesstime: ::core::option::Option<*const super::super::Foundation::FILETIME>, lplastwritetime: ::core::option::Option<*const super::super::Foundation::FILETIME>) -> super::super::Foundation::BOOL +pub unsafe fn SetFileTime(hfile: P0, lpcreationtime: ::core::option::Option<*const super::super::Foundation::FILETIME>, lplastaccesstime: ::core::option::Option<*const super::super::Foundation::FILETIME>, lplastwritetime: ::core::option::Option<*const super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileTime(hfile : super::super::Foundation:: HANDLE, lpcreationtime : *const super::super::Foundation:: FILETIME, lplastaccesstime : *const super::super::Foundation:: FILETIME, lplastwritetime : *const super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - SetFileTime(hfile.into_param().abi(), ::core::mem::transmute(lpcreationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lplastaccesstime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lplastwritetime.unwrap_or(::std::ptr::null()))) + SetFileTime(hfile.into_param().abi(), ::core::mem::transmute(lpcreationtime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lplastaccesstime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lplastwritetime.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFileValidData(hfile: P0, validdatalength: i64) -> super::super::Foundation::BOOL +pub unsafe fn SetFileValidData(hfile: P0, validdatalength: i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetFileValidData(hfile : super::super::Foundation:: HANDLE, validdatalength : i64) -> super::super::Foundation:: BOOL); - SetFileValidData(hfile.into_param().abi(), validdatalength) + SetFileValidData(hfile.into_param().abi(), validdatalength).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3400,50 +3403,50 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLogArchiveMode(hlog: P0, emode: CLFS_LOG_ARCHIVE_MODE) -> super::super::Foundation::BOOL +pub unsafe fn SetLogArchiveMode(hlog: P0, emode: CLFS_LOG_ARCHIVE_MODE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn SetLogArchiveMode(hlog : super::super::Foundation:: HANDLE, emode : CLFS_LOG_ARCHIVE_MODE) -> super::super::Foundation:: BOOL); - SetLogArchiveMode(hlog.into_param().abi(), emode) + SetLogArchiveMode(hlog.into_param().abi(), emode).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLogArchiveTail(hlog: P0, plsnarchivetail: *mut CLS_LSN, preserved: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn SetLogArchiveTail(hlog: P0, plsnarchivetail: *mut CLS_LSN, preserved: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn SetLogArchiveTail(hlog : super::super::Foundation:: HANDLE, plsnarchivetail : *mut CLS_LSN, preserved : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetLogArchiveTail(hlog.into_param().abi(), plsnarchivetail, preserved) + SetLogArchiveTail(hlog.into_param().abi(), plsnarchivetail, preserved).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLogFileSizeWithPolicy(hlog: P0, pdesiredsize: *const u64, presultingsize: *mut u64) -> super::super::Foundation::BOOL +pub unsafe fn SetLogFileSizeWithPolicy(hlog: P0, pdesiredsize: *const u64, presultingsize: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("clfsw32.dll" "system" fn SetLogFileSizeWithPolicy(hlog : super::super::Foundation:: HANDLE, pdesiredsize : *const u64, presultingsize : *mut u64) -> super::super::Foundation:: BOOL); - SetLogFileSizeWithPolicy(hlog.into_param().abi(), pdesiredsize, presultingsize) + SetLogFileSizeWithPolicy(hlog.into_param().abi(), pdesiredsize, presultingsize).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetResourceManagerCompletionPort(resourcemanagerhandle: P0, iocompletionporthandle: P1, completionkey: usize) -> super::super::Foundation::BOOL +pub unsafe fn SetResourceManagerCompletionPort(resourcemanagerhandle: P0, iocompletionporthandle: P1, completionkey: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn SetResourceManagerCompletionPort(resourcemanagerhandle : super::super::Foundation:: HANDLE, iocompletionporthandle : super::super::Foundation:: HANDLE, completionkey : usize) -> super::super::Foundation:: BOOL); - SetResourceManagerCompletionPort(resourcemanagerhandle.into_param().abi(), iocompletionporthandle.into_param().abi(), completionkey) + SetResourceManagerCompletionPort(resourcemanagerhandle.into_param().abi(), iocompletionporthandle.into_param().abi(), completionkey).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSearchPathMode(flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetSearchPathMode(flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetSearchPathMode(flags : u32) -> super::super::Foundation:: BOOL); - SetSearchPathMode(flags) + SetSearchPathMode(flags).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3469,13 +3472,13 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetTransactionInformation(transactionhandle: P0, isolationlevel: u32, isolationflags: u32, timeout: u32, description: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetTransactionInformation(transactionhandle: P0, isolationlevel: u32, isolationflags: u32, timeout: u32, description: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("ktmw32.dll" "system" fn SetTransactionInformation(transactionhandle : super::super::Foundation:: HANDLE, isolationlevel : u32, isolationflags : u32, timeout : u32, description : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetTransactionInformation(transactionhandle.into_param().abi(), isolationlevel, isolationflags, timeout, description.into_param().abi()) + SetTransactionInformation(transactionhandle.into_param().abi(), isolationlevel, isolationflags, timeout, description.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -3494,56 +3497,56 @@ pub unsafe fn SetUserFileEncryptionKeyEx(pencryptioncertificate: ::core::option: #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVolumeLabelA(lprootpathname: P0, lpvolumename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetVolumeLabelA(lprootpathname: P0, lpvolumename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetVolumeLabelA(lprootpathname : ::windows_core::PCSTR, lpvolumename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetVolumeLabelA(lprootpathname.into_param().abi(), lpvolumename.into_param().abi()) + SetVolumeLabelA(lprootpathname.into_param().abi(), lpvolumename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVolumeLabelW(lprootpathname: P0, lpvolumename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetVolumeLabelW(lprootpathname: P0, lpvolumename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetVolumeLabelW(lprootpathname : ::windows_core::PCWSTR, lpvolumename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetVolumeLabelW(lprootpathname.into_param().abi(), lpvolumename.into_param().abi()) + SetVolumeLabelW(lprootpathname.into_param().abi(), lpvolumename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVolumeMountPointA(lpszvolumemountpoint: P0, lpszvolumename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetVolumeMountPointA(lpszvolumemountpoint: P0, lpszvolumename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetVolumeMountPointA(lpszvolumemountpoint : ::windows_core::PCSTR, lpszvolumename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), lpszvolumename.into_param().abi()) + SetVolumeMountPointA(lpszvolumemountpoint.into_param().abi(), lpszvolumename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVolumeMountPointW(lpszvolumemountpoint: P0, lpszvolumename: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetVolumeMountPointW(lpszvolumemountpoint: P0, lpszvolumename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetVolumeMountPointW(lpszvolumemountpoint : ::windows_core::PCWSTR, lpszvolumename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), lpszvolumename.into_param().abi()) + SetVolumeMountPointW(lpszvolumemountpoint.into_param().abi(), lpszvolumename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SinglePhaseReject(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> super::super::Foundation::BOOL +pub unsafe fn SinglePhaseReject(enlistmenthandle: P0, tmvirtualclock: *mut i64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("ktmw32.dll" "system" fn SinglePhaseReject(enlistmenthandle : super::super::Foundation:: HANDLE, tmvirtualclock : *mut i64) -> super::super::Foundation:: BOOL); - SinglePhaseReject(enlistmenthandle.into_param().abi(), tmvirtualclock) + SinglePhaseReject(enlistmenthandle.into_param().abi(), tmvirtualclock).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3554,23 +3557,23 @@ pub unsafe fn SubmitIoRing(ioring: *const HIORING__, waitoperations: u32, millis #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateLogArchive(pvarchivecontext: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn TerminateLogArchive(pvarchivecontext: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn TerminateLogArchive(pvarchivecontext : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - TerminateLogArchive(pvarchivecontext) + TerminateLogArchive(pvarchivecontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateReadLog(pvcursorcontext: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn TerminateReadLog(pvcursorcontext: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn TerminateReadLog(pvcursorcontext : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - TerminateReadLog(pvcursorcontext) + TerminateReadLog(pvcursorcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn TruncateLog(pvmarshal: *const ::core::ffi::c_void, plsnend: *const CLS_LSN, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL { +pub unsafe fn TruncateLog(pvmarshal: *const ::core::ffi::c_void, plsnend: *const CLS_LSN, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn TruncateLog(pvmarshal : *const ::core::ffi::c_void, plsnend : *const CLS_LSN, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - TruncateLog(pvmarshal, plsnend, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + TruncateLog(pvmarshal, plsnend, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3583,12 +3586,12 @@ pub unsafe fn TxfGetThreadMiniVersionForCreate() -> u16 { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TxfLogCreateFileReadContext(logpath: P0, beginninglsn: CLS_LSN, endinglsn: CLS_LSN, txffileid: *const TXF_ID, txflogcontext: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn TxfLogCreateFileReadContext(logpath: P0, beginninglsn: CLS_LSN, endinglsn: CLS_LSN, txffileid: *const TXF_ID, txflogcontext: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("txfw32.dll" "system" fn TxfLogCreateFileReadContext(logpath : ::windows_core::PCWSTR, beginninglsn : CLS_LSN, endinglsn : CLS_LSN, txffileid : *const TXF_ID, txflogcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - TxfLogCreateFileReadContext(logpath.into_param().abi(), ::core::mem::transmute(beginninglsn), ::core::mem::transmute(endinglsn), txffileid, txflogcontext) + TxfLogCreateFileReadContext(logpath.into_param().abi(), ::core::mem::transmute(beginninglsn), ::core::mem::transmute(endinglsn), txffileid, txflogcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3603,16 +3606,16 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TxfLogDestroyReadContext(txflogcontext: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn TxfLogDestroyReadContext(txflogcontext: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("txfw32.dll" "system" fn TxfLogDestroyReadContext(txflogcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - TxfLogDestroyReadContext(txflogcontext) + TxfLogDestroyReadContext(txflogcontext).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TxfLogReadRecords(txflogcontext: *const ::core::ffi::c_void, bufferlength: u32, buffer: *mut ::core::ffi::c_void, bytesused: *mut u32, recordcount: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn TxfLogReadRecords(txflogcontext: *const ::core::ffi::c_void, bufferlength: u32, buffer: *mut ::core::ffi::c_void, bytesused: *mut u32, recordcount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("txfw32.dll" "system" fn TxfLogReadRecords(txflogcontext : *const ::core::ffi::c_void, bufferlength : u32, buffer : *mut ::core::ffi::c_void, bytesused : *mut u32, recordcount : *mut u32) -> super::super::Foundation:: BOOL); - TxfLogReadRecords(txflogcontext, bufferlength, buffer, bytesused, recordcount) + TxfLogReadRecords(txflogcontext, bufferlength, buffer, bytesused, recordcount).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3647,32 +3650,32 @@ pub unsafe fn TxfSetThreadMiniVersionForCreate(miniversion: u16) { #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32) -> super::super::Foundation::BOOL +pub unsafe fn UnlockFile(hfile: P0, dwfileoffsetlow: u32, dwfileoffsethigh: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn UnlockFile(hfile : super::super::Foundation:: HANDLE, dwfileoffsetlow : u32, dwfileoffsethigh : u32, nnumberofbytestounlocklow : u32, nnumberofbytestounlockhigh : u32) -> super::super::Foundation:: BOOL); - UnlockFile(hfile.into_param().abi(), dwfileoffsetlow, dwfileoffsethigh, nnumberofbytestounlocklow, nnumberofbytestounlockhigh) + UnlockFile(hfile.into_param().abi(), dwfileoffsetlow, dwfileoffsethigh, nnumberofbytestounlocklow, nnumberofbytestounlockhigh).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn UnlockFileEx(hfile: P0, dwreserved: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn UnlockFileEx(hfile: P0, dwreserved: u32, nnumberofbytestounlocklow: u32, nnumberofbytestounlockhigh: u32, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn UnlockFileEx(hfile : super::super::Foundation:: HANDLE, dwreserved : u32, nnumberofbytestounlocklow : u32, nnumberofbytestounlockhigh : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - UnlockFileEx(hfile.into_param().abi(), dwreserved, nnumberofbytestounlocklow, nnumberofbytestounlockhigh, lpoverlapped) + UnlockFileEx(hfile.into_param().abi(), dwreserved, nnumberofbytestounlocklow, nnumberofbytestounlockhigh, lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ValidateLog(pszlogfilename: P0, psalogfile: *mut super::super::Security::SECURITY_ATTRIBUTES, pinfobuffer: *mut CLS_INFORMATION, pcbbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ValidateLog(pszlogfilename: P0, psalogfile: *mut super::super::Security::SECURITY_ATTRIBUTES, pinfobuffer: *mut CLS_INFORMATION, pcbbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("clfsw32.dll" "system" fn ValidateLog(pszlogfilename : ::windows_core::PCWSTR, psalogfile : *mut super::super::Security:: SECURITY_ATTRIBUTES, pinfobuffer : *mut CLS_INFORMATION, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - ValidateLog(pszlogfilename.into_param().abi(), psalogfile, pinfobuffer, pcbbuffer) + ValidateLog(pszlogfilename.into_param().abi(), psalogfile, pinfobuffer, pcbbuffer).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3867,9 +3870,9 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Wow64DisableWow64FsRedirection(oldvalue: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn Wow64DisableWow64FsRedirection(oldvalue: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn Wow64DisableWow64FsRedirection(oldvalue : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - Wow64DisableWow64FsRedirection(oldvalue) + Wow64DisableWow64FsRedirection(oldvalue).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3884,9 +3887,9 @@ where #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Wow64RevertWow64FsRedirection(olvalue: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn Wow64RevertWow64FsRedirection(olvalue: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn Wow64RevertWow64FsRedirection(olvalue : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - Wow64RevertWow64FsRedirection(olvalue) + Wow64RevertWow64FsRedirection(olvalue).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`*"] #[inline] @@ -3897,39 +3900,39 @@ pub unsafe fn WriteEncryptedFileRaw(pfimportcallback: PFE_IMPORT_FUNC, pvcallbac #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WriteFile(hfile: P0, lpbuffer: ::core::option::Option<&[u8]>, lpnumberofbyteswritten: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn WriteFile(hfile: P0, lpbuffer: ::core::option::Option<&[u8]>, lpnumberofbyteswritten: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteFile(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpnumberofbyteswritten : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WriteFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + WriteFile(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WriteFileEx(hfile: P0, lpbuffer: ::core::option::Option<&[u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation::BOOL +pub unsafe fn WriteFileEx(hfile: P0, lpbuffer: ::core::option::Option<&[u8]>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED, lpcompletionroutine: super::super::System::IO::LPOVERLAPPED_COMPLETION_ROUTINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteFileEx(hfile : super::super::Foundation:: HANDLE, lpbuffer : *const u8, nnumberofbytestowrite : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : super::super::System::IO:: LPOVERLAPPED_COMPLETION_ROUTINE) -> super::super::Foundation:: BOOL); - WriteFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpoverlapped, lpcompletionroutine) + WriteFileEx(hfile.into_param().abi(), ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), lpoverlapped, lpcompletionroutine).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WriteFileGather(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestowrite: u32, lpreserved: ::core::option::Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL +pub unsafe fn WriteFileGather(hfile: P0, asegmentarray: *const FILE_SEGMENT_ELEMENT, nnumberofbytestowrite: u32, lpreserved: ::core::option::Option<*const u32>, lpoverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteFileGather(hfile : super::super::Foundation:: HANDLE, asegmentarray : *const FILE_SEGMENT_ELEMENT, nnumberofbytestowrite : u32, lpreserved : *const u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WriteFileGather(hfile.into_param().abi(), asegmentarray, nnumberofbytestowrite, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lpoverlapped) + WriteFileGather(hfile.into_param().abi(), asegmentarray, nnumberofbytestowrite, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), lpoverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn WriteLogRestartArea(pvmarshal: *mut ::core::ffi::c_void, pvrestartbuffer: *mut ::core::ffi::c_void, cbrestartbuffer: u32, plsnbase: *mut CLS_LSN, fflags: CLFS_FLAG, pcbwritten: *mut u32, plsnnext: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::BOOL { +pub unsafe fn WriteLogRestartArea(pvmarshal: *mut ::core::ffi::c_void, pvrestartbuffer: *mut ::core::ffi::c_void, cbrestartbuffer: u32, plsnbase: *mut CLS_LSN, fflags: CLFS_FLAG, pcbwritten: *mut u32, plsnnext: *mut CLS_LSN, poverlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> { ::windows_targets::link!("clfsw32.dll" "system" fn WriteLogRestartArea(pvmarshal : *mut ::core::ffi::c_void, pvrestartbuffer : *mut ::core::ffi::c_void, cbrestartbuffer : u32, plsnbase : *mut CLS_LSN, fflags : CLFS_FLAG, pcbwritten : *mut u32, plsnnext : *mut CLS_LSN, poverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WriteLogRestartArea(pvmarshal, pvrestartbuffer, cbrestartbuffer, plsnbase, fflags, pcbwritten, plsnnext, poverlapped) + WriteLogRestartArea(pvmarshal, pvrestartbuffer, cbrestartbuffer, plsnbase, fflags, pcbwritten, plsnnext, poverlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_FileSystem\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs index 10b177e192..29d9b2905b 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Packaging/Appx/mod.rs @@ -17,82 +17,82 @@ where #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetClrCompat(processtoken: P0, policy: *mut AppPolicyClrCompat) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetClrCompat(processtoken: P0, policy: *mut AppPolicyClrCompat) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetClrCompat(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyClrCompat) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetClrCompat(processtoken.into_param().abi(), policy) + AppPolicyGetClrCompat(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetCreateFileAccess(processtoken: P0, policy: *mut AppPolicyCreateFileAccess) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetCreateFileAccess(processtoken: P0, policy: *mut AppPolicyCreateFileAccess) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetCreateFileAccess(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyCreateFileAccess) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetCreateFileAccess(processtoken.into_param().abi(), policy) + AppPolicyGetCreateFileAccess(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetLifecycleManagement(processtoken: P0, policy: *mut AppPolicyLifecycleManagement) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetLifecycleManagement(processtoken: P0, policy: *mut AppPolicyLifecycleManagement) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetLifecycleManagement(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyLifecycleManagement) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetLifecycleManagement(processtoken.into_param().abi(), policy) + AppPolicyGetLifecycleManagement(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetMediaFoundationCodecLoading(processtoken: P0, policy: *mut AppPolicyMediaFoundationCodecLoading) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetMediaFoundationCodecLoading(processtoken: P0, policy: *mut AppPolicyMediaFoundationCodecLoading) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetMediaFoundationCodecLoading(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyMediaFoundationCodecLoading) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetMediaFoundationCodecLoading(processtoken.into_param().abi(), policy) + AppPolicyGetMediaFoundationCodecLoading(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetProcessTerminationMethod(processtoken: P0, policy: *mut AppPolicyProcessTerminationMethod) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetProcessTerminationMethod(processtoken: P0, policy: *mut AppPolicyProcessTerminationMethod) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetProcessTerminationMethod(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyProcessTerminationMethod) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetProcessTerminationMethod(processtoken.into_param().abi(), policy) + AppPolicyGetProcessTerminationMethod(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetShowDeveloperDiagnostic(processtoken: P0, policy: *mut AppPolicyShowDeveloperDiagnostic) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetShowDeveloperDiagnostic(processtoken: P0, policy: *mut AppPolicyShowDeveloperDiagnostic) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetShowDeveloperDiagnostic(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyShowDeveloperDiagnostic) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetShowDeveloperDiagnostic(processtoken.into_param().abi(), policy) + AppPolicyGetShowDeveloperDiagnostic(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetThreadInitializationType(processtoken: P0, policy: *mut AppPolicyThreadInitializationType) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetThreadInitializationType(processtoken: P0, policy: *mut AppPolicyThreadInitializationType) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetThreadInitializationType(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyThreadInitializationType) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetThreadInitializationType(processtoken.into_param().abi(), policy) + AppPolicyGetThreadInitializationType(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppPolicyGetWindowingModel(processtoken: P0, policy: *mut AppPolicyWindowingModel) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn AppPolicyGetWindowingModel(processtoken: P0, policy: *mut AppPolicyWindowingModel) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AppPolicyGetWindowingModel(processtoken : super::super::super::Foundation:: HANDLE, policy : *mut AppPolicyWindowingModel) -> super::super::super::Foundation:: WIN32_ERROR); - AppPolicyGetWindowingModel(processtoken.into_param().abi(), policy) + AppPolicyGetWindowingModel(processtoken.into_param().abi(), policy).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -108,9 +108,9 @@ where #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClosePackageInfo(packageinforeference: *const _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn ClosePackageInfo(packageinforeference: *const _PACKAGE_INFO_REFERENCE) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn ClosePackageInfo(packageinforeference : *const _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation:: WIN32_ERROR); - ClosePackageInfo(packageinforeference) + ClosePackageInfo(packageinforeference).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`*"] #[inline] @@ -147,99 +147,99 @@ pub unsafe fn DuplicatePackageVirtualizationContext(sourcecontext: *const PACKAG #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FindPackagesByPackageFamily(packagefamilyname: P0, packagefilters: u32, count: *mut u32, packagefullnames: ::core::option::Option<*mut ::windows_core::PWSTR>, bufferlength: *mut u32, buffer: ::windows_core::PWSTR, packageproperties: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FindPackagesByPackageFamily(packagefamilyname: P0, packagefilters: u32, count: *mut u32, packagefullnames: ::core::option::Option<*mut ::windows_core::PWSTR>, bufferlength: *mut u32, buffer: ::windows_core::PWSTR, packageproperties: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FindPackagesByPackageFamily(packagefamilyname : ::windows_core::PCWSTR, packagefilters : u32, count : *mut u32, packagefullnames : *mut ::windows_core::PWSTR, bufferlength : *mut u32, buffer : ::windows_core::PWSTR, packageproperties : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - FindPackagesByPackageFamily(packagefamilyname.into_param().abi(), packagefilters, count, ::core::mem::transmute(packagefullnames.unwrap_or(::std::ptr::null_mut())), bufferlength, ::core::mem::transmute(buffer), ::core::mem::transmute(packageproperties.unwrap_or(::std::ptr::null_mut()))) + FindPackagesByPackageFamily(packagefamilyname.into_param().abi(), packagefilters, count, ::core::mem::transmute(packagefullnames.unwrap_or(::std::ptr::null_mut())), bufferlength, ::core::mem::transmute(buffer), ::core::mem::transmute(packageproperties.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FormatApplicationUserModelId(packagefamilyname : ::windows_core::PCWSTR, packagerelativeapplicationid : ::windows_core::PCWSTR, applicationusermodelidlength : *mut u32, applicationusermodelid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - FormatApplicationUserModelId(packagefamilyname.into_param().abi(), packagerelativeapplicationid.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)) + FormatApplicationUserModelId(packagefamilyname.into_param().abi(), packagerelativeapplicationid.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetApplicationUserModelId(hprocess: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetApplicationUserModelId(hprocess: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetApplicationUserModelId(hprocess : super::super::super::Foundation:: HANDLE, applicationusermodelidlength : *mut u32, applicationusermodelid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetApplicationUserModelId(hprocess.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)) + GetApplicationUserModelId(hprocess.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetApplicationUserModelIdFromToken(token: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetApplicationUserModelIdFromToken(token: P0, applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetApplicationUserModelIdFromToken(token : super::super::super::Foundation:: HANDLE, applicationusermodelidlength : *mut u32, applicationusermodelid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetApplicationUserModelIdFromToken(token.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)) + GetApplicationUserModelIdFromToken(token.into_param().abi(), applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentApplicationUserModelId(applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentApplicationUserModelId(applicationusermodelidlength: *mut u32, applicationusermodelid: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentApplicationUserModelId(applicationusermodelidlength : *mut u32, applicationusermodelid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentApplicationUserModelId(applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)) + GetCurrentApplicationUserModelId(applicationusermodelidlength, ::core::mem::transmute(applicationusermodelid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackageFamilyName(packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageFamilyName(packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageFamilyName(packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageFamilyName(packagefamilynamelength, ::core::mem::transmute(packagefamilyname)) + GetCurrentPackageFamilyName(packagefamilynamelength, ::core::mem::transmute(packagefamilyname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackageFullName(packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageFullName(packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageFullName(packagefullnamelength : *mut u32, packagefullname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageFullName(packagefullnamelength, ::core::mem::transmute(packagefullname)) + GetCurrentPackageFullName(packagefullnamelength, ::core::mem::transmute(packagefullname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackageId(bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageId(bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageId(bufferlength : *mut u32, buffer : *mut u8) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageId(bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))) + GetCurrentPackageId(bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackageInfo(flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageInfo(flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageInfo(flags : u32, bufferlength : *mut u32, buffer : *mut u8, count : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageInfo(flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))) + GetCurrentPackageInfo(flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackageInfo2(flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackageInfo2(flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetCurrentPackageInfo2(flags : u32, packagepathtype : PackagePathType, bufferlength : *mut u32, buffer : *mut u8, count : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackageInfo2(flags, packagepathtype, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))) + GetCurrentPackageInfo2(flags, packagepathtype, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackagePath(pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackagePath(pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackagePath(pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackagePath(pathlength, ::core::mem::transmute(path)) + GetCurrentPackagePath(pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentPackagePath2(packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetCurrentPackagePath2(packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetCurrentPackagePath2(packagepathtype : PackagePathType, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetCurrentPackagePath2(packagepathtype, pathlength, ::core::mem::transmute(path)) + GetCurrentPackagePath2(packagepathtype, pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`*"] #[inline] @@ -257,110 +257,110 @@ pub unsafe fn GetIdForPackageDependencyContext(packagedependencycontext: *const #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageApplicationIds(packageinforeference: *const _PACKAGE_INFO_REFERENCE, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetPackageApplicationIds(packageinforeference: *const _PACKAGE_INFO_REFERENCE, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetPackageApplicationIds(packageinforeference : *const _PACKAGE_INFO_REFERENCE, bufferlength : *mut u32, buffer : *mut u8, count : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageApplicationIds(packageinforeference, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))) + GetPackageApplicationIds(packageinforeference, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageFamilyName(hprocess: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackageFamilyName(hprocess: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetPackageFamilyName(hprocess : super::super::super::Foundation:: HANDLE, packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFamilyName(hprocess.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)) + GetPackageFamilyName(hprocess.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageFamilyNameFromToken(token: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackageFamilyNameFromToken(token: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetPackageFamilyNameFromToken(token : super::super::super::Foundation:: HANDLE, packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFamilyNameFromToken(token.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)) + GetPackageFamilyNameFromToken(token.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageFullName(hprocess: P0, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackageFullName(hprocess: P0, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetPackageFullName(hprocess : super::super::super::Foundation:: HANDLE, packagefullnamelength : *mut u32, packagefullname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFullName(hprocess.into_param().abi(), packagefullnamelength, ::core::mem::transmute(packagefullname)) + GetPackageFullName(hprocess.into_param().abi(), packagefullnamelength, ::core::mem::transmute(packagefullname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageFullNameFromToken(token: P0, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackageFullNameFromToken(token: P0, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetPackageFullNameFromToken(token : super::super::super::Foundation:: HANDLE, packagefullnamelength : *mut u32, packagefullname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageFullNameFromToken(token.into_param().abi(), packagefullnamelength, ::core::mem::transmute(packagefullname)) + GetPackageFullNameFromToken(token.into_param().abi(), packagefullnamelength, ::core::mem::transmute(packagefullname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageId(hprocess: P0, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackageId(hprocess: P0, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetPackageId(hprocess : super::super::super::Foundation:: HANDLE, bufferlength : *mut u32, buffer : *mut u8) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageId(hprocess.into_param().abi(), bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))) + GetPackageId(hprocess.into_param().abi(), bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageInfo(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetPackageInfo(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetPackageInfo(packageinforeference : *const _PACKAGE_INFO_REFERENCE, flags : u32, bufferlength : *mut u32, buffer : *mut u8, count : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageInfo(packageinforeference, flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))) + GetPackageInfo(packageinforeference, flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackageInfo2(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetPackageInfo2(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>, count: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetPackageInfo2(packageinforeference : *const _PACKAGE_INFO_REFERENCE, flags : u32, packagepathtype : PackagePathType, bufferlength : *mut u32, buffer : *mut u8, count : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackageInfo2(packageinforeference, flags, packagepathtype, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))) + GetPackageInfo2(packageinforeference, flags, packagepathtype, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(count.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackagePath(packageid: *const PACKAGE_ID, reserved: u32, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetPackagePath(packageid: *const PACKAGE_ID, reserved: u32, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetPackagePath(packageid : *const PACKAGE_ID, reserved : u32, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePath(packageid, reserved, pathlength, ::core::mem::transmute(path)) + GetPackagePath(packageid, reserved, pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPackagePathByFullName(packagefullname : ::windows_core::PCWSTR, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePathByFullName(packagefullname.into_param().abi(), pathlength, ::core::mem::transmute(path)) + GetPackagePathByFullName(packagefullname.into_param().abi(), pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetPackagePathByFullName2(packagefullname : ::windows_core::PCWSTR, packagepathtype : PackagePathType, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagePathByFullName2(packagefullname.into_param().abi(), packagepathtype, pathlength, ::core::mem::transmute(path)) + GetPackagePathByFullName2(packagefullname.into_param().abi(), packagepathtype, pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPackagesByPackageFamily(packagefamilyname: P0, count: *mut u32, packagefullnames: ::core::option::Option<*mut ::windows_core::PWSTR>, bufferlength: *mut u32, buffer: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetPackagesByPackageFamily(packagefamilyname: P0, count: *mut u32, packagefullnames: ::core::option::Option<*mut ::windows_core::PWSTR>, bufferlength: *mut u32, buffer: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetPackagesByPackageFamily(packagefamilyname : ::windows_core::PCWSTR, count : *mut u32, packagefullnames : *mut ::windows_core::PWSTR, bufferlength : *mut u32, buffer : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetPackagesByPackageFamily(packagefamilyname.into_param().abi(), count, ::core::mem::transmute(packagefullnames.unwrap_or(::std::ptr::null_mut())), bufferlength, ::core::mem::transmute(buffer)) + GetPackagesByPackageFamily(packagefamilyname.into_param().abi(), count, ::core::mem::transmute(packagefullnames.unwrap_or(::std::ptr::null_mut())), bufferlength, ::core::mem::transmute(buffer)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -385,107 +385,107 @@ where #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStagedPackageOrigin(packagefullname: P0, origin: *mut PackageOrigin) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStagedPackageOrigin(packagefullname: P0, origin: *mut PackageOrigin) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn GetStagedPackageOrigin(packagefullname : ::windows_core::PCWSTR, origin : *mut PackageOrigin) -> super::super::super::Foundation:: WIN32_ERROR); - GetStagedPackageOrigin(packagefullname.into_param().abi(), origin) + GetStagedPackageOrigin(packagefullname.into_param().abi(), origin).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStagedPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStagedPackagePathByFullName(packagefullname: P0, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetStagedPackagePathByFullName(packagefullname : ::windows_core::PCWSTR, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetStagedPackagePathByFullName(packagefullname.into_param().abi(), pathlength, ::core::mem::transmute(path)) + GetStagedPackagePathByFullName(packagefullname.into_param().abi(), pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStagedPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStagedPackagePathByFullName2(packagefullname: P0, packagepathtype: PackagePathType, pathlength: *mut u32, path: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-3.dll" "system" fn GetStagedPackagePathByFullName2(packagefullname : ::windows_core::PCWSTR, packagepathtype : PackagePathType, pathlength : *mut u32, path : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - GetStagedPackagePathByFullName2(packagefullname.into_param().abi(), packagepathtype, pathlength, ::core::mem::transmute(path)) + GetStagedPackagePathByFullName2(packagefullname.into_param().abi(), packagepathtype, pathlength, ::core::mem::transmute(path)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OpenPackageInfoByFullName(packagefullname: P0, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn OpenPackageInfoByFullName(packagefullname: P0, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn OpenPackageInfoByFullName(packagefullname : ::windows_core::PCWSTR, reserved : u32, packageinforeference : *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation:: WIN32_ERROR); - OpenPackageInfoByFullName(packagefullname.into_param().abi(), reserved, packageinforeference) + OpenPackageInfoByFullName(packagefullname.into_param().abi(), reserved, packageinforeference).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OpenPackageInfoByFullNameForUser(usersid: P0, packagefullname: P1, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn OpenPackageInfoByFullNameForUser(usersid: P0, packagefullname: P1, reserved: u32, packageinforeference: *mut *mut _PACKAGE_INFO_REFERENCE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn OpenPackageInfoByFullNameForUser(usersid : super::super::super::Foundation:: PSID, packagefullname : ::windows_core::PCWSTR, reserved : u32, packageinforeference : *mut *mut _PACKAGE_INFO_REFERENCE) -> super::super::super::Foundation:: WIN32_ERROR); - OpenPackageInfoByFullNameForUser(usersid.into_param().abi(), packagefullname.into_param().abi(), reserved, packageinforeference) + OpenPackageInfoByFullNameForUser(usersid.into_param().abi(), packagefullname.into_param().abi(), reserved, packageinforeference).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PackageFamilyNameFromFullName(packagefullname: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn PackageFamilyNameFromFullName(packagefullname: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn PackageFamilyNameFromFullName(packagefullname : ::windows_core::PCWSTR, packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFamilyNameFromFullName(packagefullname.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)) + PackageFamilyNameFromFullName(packagefullname.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PackageFamilyNameFromId(packageid: *const PACKAGE_ID, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn PackageFamilyNameFromId(packageid: *const PACKAGE_ID, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn PackageFamilyNameFromId(packageid : *const PACKAGE_ID, packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFamilyNameFromId(packageid, packagefamilynamelength, ::core::mem::transmute(packagefamilyname)) + PackageFamilyNameFromId(packageid, packagefamilynamelength, ::core::mem::transmute(packagefamilyname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PackageFullNameFromId(packageid: *const PACKAGE_ID, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn PackageFullNameFromId(packageid: *const PACKAGE_ID, packagefullnamelength: *mut u32, packagefullname: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn PackageFullNameFromId(packageid : *const PACKAGE_ID, packagefullnamelength : *mut u32, packagefullname : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageFullNameFromId(packageid, packagefullnamelength, ::core::mem::transmute(packagefullname)) + PackageFullNameFromId(packageid, packagefullnamelength, ::core::mem::transmute(packagefullname)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PackageIdFromFullName(packagefullname: P0, flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn PackageIdFromFullName(packagefullname: P0, flags: u32, bufferlength: *mut u32, buffer: ::core::option::Option<*mut u8>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn PackageIdFromFullName(packagefullname : ::windows_core::PCWSTR, flags : u32, bufferlength : *mut u32, buffer : *mut u8) -> super::super::super::Foundation:: WIN32_ERROR); - PackageIdFromFullName(packagefullname.into_param().abi(), flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))) + PackageIdFromFullName(packagefullname.into_param().abi(), flags, bufferlength, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname: P0, packagenamelength: *mut u32, packagename: ::windows_core::PWSTR, packagepublisheridlength: *mut u32, packagepublisherid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname: P0, packagenamelength: *mut u32, packagename: ::windows_core::PWSTR, packagepublisheridlength: *mut u32, packagepublisherid: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn PackageNameAndPublisherIdFromFamilyName(packagefamilyname : ::windows_core::PCWSTR, packagenamelength : *mut u32, packagename : ::windows_core::PWSTR, packagepublisheridlength : *mut u32, packagepublisherid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - PackageNameAndPublisherIdFromFamilyName(packagefamilyname.into_param().abi(), packagenamelength, ::core::mem::transmute(packagename), packagepublisheridlength, ::core::mem::transmute(packagepublisherid)) + PackageNameAndPublisherIdFromFamilyName(packagefamilyname.into_param().abi(), packagenamelength, ::core::mem::transmute(packagename), packagepublisheridlength, ::core::mem::transmute(packagepublisherid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ParseApplicationUserModelId(applicationusermodelid: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR, packagerelativeapplicationidlength: *mut u32, packagerelativeapplicationid: ::windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn ParseApplicationUserModelId(applicationusermodelid: P0, packagefamilynamelength: *mut u32, packagefamilyname: ::windows_core::PWSTR, packagerelativeapplicationidlength: *mut u32, packagerelativeapplicationid: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn ParseApplicationUserModelId(applicationusermodelid : ::windows_core::PCWSTR, packagefamilynamelength : *mut u32, packagefamilyname : ::windows_core::PWSTR, packagerelativeapplicationidlength : *mut u32, packagerelativeapplicationid : ::windows_core::PWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - ParseApplicationUserModelId(applicationusermodelid.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname), packagerelativeapplicationidlength, ::core::mem::transmute(packagerelativeapplicationid)) + ParseApplicationUserModelId(applicationusermodelid.into_param().abi(), packagefamilynamelength, ::core::mem::transmute(packagefamilyname), packagerelativeapplicationidlength, ::core::mem::transmute(packagerelativeapplicationid)).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`*"] #[inline] @@ -515,49 +515,49 @@ where #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyApplicationUserModelId(applicationusermodelid: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn VerifyApplicationUserModelId(applicationusermodelid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn VerifyApplicationUserModelId(applicationusermodelid : ::windows_core::PCWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - VerifyApplicationUserModelId(applicationusermodelid.into_param().abi()) + VerifyApplicationUserModelId(applicationusermodelid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyPackageFamilyName(packagefamilyname: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn VerifyPackageFamilyName(packagefamilyname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn VerifyPackageFamilyName(packagefamilyname : ::windows_core::PCWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - VerifyPackageFamilyName(packagefamilyname.into_param().abi()) + VerifyPackageFamilyName(packagefamilyname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyPackageFullName(packagefullname: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn VerifyPackageFullName(packagefullname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn VerifyPackageFullName(packagefullname : ::windows_core::PCWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - VerifyPackageFullName(packagefullname.into_param().abi()) + VerifyPackageFullName(packagefullname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyPackageId(packageid: *const PACKAGE_ID) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn VerifyPackageId(packageid: *const PACKAGE_ID) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn VerifyPackageId(packageid : *const PACKAGE_ID) -> super::super::super::Foundation:: WIN32_ERROR); - VerifyPackageId(packageid) + VerifyPackageId(packageid).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyPackageRelativeApplicationId(packagerelativeapplicationid: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn VerifyPackageRelativeApplicationId(packagerelativeapplicationid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-appmodel-runtime-l1-1-1.dll" "system" fn VerifyPackageRelativeApplicationId(packagerelativeapplicationid : ::windows_core::PCWSTR) -> super::super::super::Foundation:: WIN32_ERROR); - VerifyPackageRelativeApplicationId(packagerelativeapplicationid.into_param().abi()) + VerifyPackageRelativeApplicationId(packagerelativeapplicationid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Packaging_Appx\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs index e24432550e..c77876e708 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs @@ -1,293 +1,293 @@ #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddVirtualDiskParent(virtualdiskhandle: P0, parentpath: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn AddVirtualDiskParent(virtualdiskhandle: P0, parentpath: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("virtdisk.dll" "system" fn AddVirtualDiskParent(virtualdiskhandle : super::super::Foundation:: HANDLE, parentpath : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - AddVirtualDiskParent(virtualdiskhandle.into_param().abi(), parentpath.into_param().abi()) + AddVirtualDiskParent(virtualdiskhandle.into_param().abi(), parentpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ApplySnapshotVhdSet(virtualdiskhandle: P0, parameters: *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags: APPLY_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ApplySnapshotVhdSet(virtualdiskhandle: P0, parameters: *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags: APPLY_SNAPSHOT_VHDSET_FLAG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn ApplySnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const APPLY_SNAPSHOT_VHDSET_PARAMETERS, flags : APPLY_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - ApplySnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags) + ApplySnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn AttachVirtualDisk(virtualdiskhandle: P0, securitydescriptor: P1, flags: ATTACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: ::core::option::Option<*const ATTACH_VIRTUAL_DISK_PARAMETERS>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn AttachVirtualDisk(virtualdiskhandle: P0, securitydescriptor: P1, flags: ATTACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: ::core::option::Option<*const ATTACH_VIRTUAL_DISK_PARAMETERS>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn AttachVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, securitydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, flags : ATTACH_VIRTUAL_DISK_FLAG, providerspecificflags : u32, parameters : *const ATTACH_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - AttachVirtualDisk(virtualdiskhandle.into_param().abi(), securitydescriptor.into_param().abi(), flags, providerspecificflags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + AttachVirtualDisk(virtualdiskhandle.into_param().abi(), securitydescriptor.into_param().abi(), flags, providerspecificflags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn BreakMirrorVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - BreakMirrorVirtualDisk(virtualdiskhandle.into_param().abi()) + BreakMirrorVirtualDisk(virtualdiskhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn CompactVirtualDisk(virtualdiskhandle: P0, flags: COMPACT_VIRTUAL_DISK_FLAG, parameters: ::core::option::Option<*const COMPACT_VIRTUAL_DISK_PARAMETERS>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn CompactVirtualDisk(virtualdiskhandle: P0, flags: COMPACT_VIRTUAL_DISK_FLAG, parameters: ::core::option::Option<*const COMPACT_VIRTUAL_DISK_PARAMETERS>, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn CompactVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : COMPACT_VIRTUAL_DISK_FLAG, parameters : *const COMPACT_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - CompactVirtualDisk(virtualdiskhandle.into_param().abi(), flags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + CompactVirtualDisk(virtualdiskhandle.into_param().abi(), flags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn CompleteForkVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - CompleteForkVirtualDisk(virtualdiskhandle.into_param().abi()) + CompleteForkVirtualDisk(virtualdiskhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn CreateVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P0, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, securitydescriptor: P1, flags: CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>, handle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn CreateVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P0, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, securitydescriptor: P1, flags: CREATE_VIRTUAL_DISK_FLAG, providerspecificflags: u32, parameters: *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>, handle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn CreateVirtualDisk(virtualstoragetype : *const VIRTUAL_STORAGE_TYPE, path : ::windows_core::PCWSTR, virtualdiskaccessmask : VIRTUAL_DISK_ACCESS_MASK, securitydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, flags : CREATE_VIRTUAL_DISK_FLAG, providerspecificflags : u32, parameters : *const CREATE_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED, handle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - CreateVirtualDisk(virtualstoragetype, path.into_param().abi(), virtualdiskaccessmask, securitydescriptor.into_param().abi(), flags, providerspecificflags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null())), handle) + CreateVirtualDisk(virtualstoragetype, path.into_param().abi(), virtualdiskaccessmask, securitydescriptor.into_param().abi(), flags, providerspecificflags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null())), handle).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags: DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DeleteSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags: DELETE_SNAPSHOT_VHDSET_FLAG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn DeleteSnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags : DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - DeleteSnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags) + DeleteSnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DeleteVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn DeleteVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - DeleteVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item) + DeleteVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DetachVirtualDisk(virtualdiskhandle: P0, flags: DETACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn DetachVirtualDisk(virtualdiskhandle: P0, flags: DETACH_VIRTUAL_DISK_FLAG, providerspecificflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn DetachVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : DETACH_VIRTUAL_DISK_FLAG, providerspecificflags : u32) -> super::super::Foundation:: WIN32_ERROR); - DetachVirtualDisk(virtualdiskhandle.into_param().abi(), flags, providerspecificflags) + DetachVirtualDisk(virtualdiskhandle.into_param().abi(), flags, providerspecificflags).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateVirtualDiskMetadata(virtualdiskhandle: P0, numberofitems: *mut u32, items: *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn EnumerateVirtualDiskMetadata(virtualdiskhandle: P0, numberofitems: *mut u32, items: *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn EnumerateVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, numberofitems : *mut u32, items : *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - EnumerateVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), numberofitems, items) + EnumerateVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), numberofitems, items).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ExpandVirtualDisk(virtualdiskhandle: P0, flags: EXPAND_VIRTUAL_DISK_FLAG, parameters: *const EXPAND_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ExpandVirtualDisk(virtualdiskhandle: P0, flags: EXPAND_VIRTUAL_DISK_FLAG, parameters: *const EXPAND_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn ExpandVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : EXPAND_VIRTUAL_DISK_FLAG, parameters : *const EXPAND_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - ExpandVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + ExpandVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ForkVirtualDisk(virtualdiskhandle: P0, flags: FORK_VIRTUAL_DISK_FLAG, parameters: *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped: *mut super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ForkVirtualDisk(virtualdiskhandle: P0, flags: FORK_VIRTUAL_DISK_FLAG, parameters: *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped: *mut super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn ForkVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : FORK_VIRTUAL_DISK_FLAG, parameters : *const FORK_VIRTUAL_DISK_PARAMETERS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - ForkVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, overlapped) + ForkVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, overlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes: *mut u32, pathsbuffer: ::windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes: *mut u32, pathsbuffer: ::windows_core::PWSTR) -> ::windows_core::Result<()> { ::windows_targets::link!("virtdisk.dll" "system" fn GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes : *mut u32, pathsbuffer : ::windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes, ::core::mem::transmute(pathsbuffer)) + GetAllAttachedVirtualDiskPhysicalPaths(pathsbuffersizeinbytes, ::core::mem::transmute(pathsbuffer)).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetStorageDependencyInformation(objecthandle: P0, flags: GET_STORAGE_DEPENDENCY_FLAG, storagedependencyinfosize: u32, storagedependencyinfo: *mut STORAGE_DEPENDENCY_INFO, sizeused: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetStorageDependencyInformation(objecthandle: P0, flags: GET_STORAGE_DEPENDENCY_FLAG, storagedependencyinfosize: u32, storagedependencyinfo: *mut STORAGE_DEPENDENCY_INFO, sizeused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn GetStorageDependencyInformation(objecthandle : super::super::Foundation:: HANDLE, flags : GET_STORAGE_DEPENDENCY_FLAG, storagedependencyinfosize : u32, storagedependencyinfo : *mut STORAGE_DEPENDENCY_INFO, sizeused : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetStorageDependencyInformation(objecthandle.into_param().abi(), flags, storagedependencyinfosize, storagedependencyinfo, ::core::mem::transmute(sizeused.unwrap_or(::std::ptr::null_mut()))) + GetStorageDependencyInformation(objecthandle.into_param().abi(), flags, storagedependencyinfosize, storagedependencyinfo, ::core::mem::transmute(sizeused.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfosize: *mut u32, virtualdiskinfo: *mut GET_VIRTUAL_DISK_INFO, sizeused: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfosize: *mut u32, virtualdiskinfo: *mut GET_VIRTUAL_DISK_INFO, sizeused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskInformation(virtualdiskhandle : super::super::Foundation:: HANDLE, virtualdiskinfosize : *mut u32, virtualdiskinfo : *mut GET_VIRTUAL_DISK_INFO, sizeused : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskInformation(virtualdiskhandle.into_param().abi(), virtualdiskinfosize, virtualdiskinfo, ::core::mem::transmute(sizeused.unwrap_or(::std::ptr::null_mut()))) + GetVirtualDiskInformation(virtualdiskhandle.into_param().abi(), virtualdiskinfosize, virtualdiskinfo, ::core::mem::transmute(sizeused.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID, metadatasize: *mut u32, metadata: *mut ::core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID, metadatasize: *mut u32, metadata: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const ::windows_core::GUID, metadatasize : *mut u32, metadata : *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item, metadatasize, metadata) + GetVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item, metadatasize, metadata).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn GetVirtualDiskOperationProgress(virtualdiskhandle: P0, overlapped: *const super::super::System::IO::OVERLAPPED, progress: *mut VIRTUAL_DISK_PROGRESS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetVirtualDiskOperationProgress(virtualdiskhandle: P0, overlapped: *const super::super::System::IO::OVERLAPPED, progress: *mut VIRTUAL_DISK_PROGRESS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskOperationProgress(virtualdiskhandle : super::super::Foundation:: HANDLE, overlapped : *const super::super::System::IO:: OVERLAPPED, progress : *mut VIRTUAL_DISK_PROGRESS) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskOperationProgress(virtualdiskhandle.into_param().abi(), overlapped, progress) + GetVirtualDiskOperationProgress(virtualdiskhandle.into_param().abi(), overlapped, progress).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVirtualDiskPhysicalPath(virtualdiskhandle: P0, diskpathsizeinbytes: *mut u32, diskpath: ::windows_core::PWSTR) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetVirtualDiskPhysicalPath(virtualdiskhandle: P0, diskpathsizeinbytes: *mut u32, diskpath: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn GetVirtualDiskPhysicalPath(virtualdiskhandle : super::super::Foundation:: HANDLE, diskpathsizeinbytes : *mut u32, diskpath : ::windows_core::PWSTR) -> super::super::Foundation:: WIN32_ERROR); - GetVirtualDiskPhysicalPath(virtualdiskhandle.into_param().abi(), diskpathsizeinbytes, ::core::mem::transmute(diskpath)) + GetVirtualDiskPhysicalPath(virtualdiskhandle.into_param().abi(), diskpathsizeinbytes, ::core::mem::transmute(diskpath)).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn MergeVirtualDisk(virtualdiskhandle: P0, flags: MERGE_VIRTUAL_DISK_FLAG, parameters: *const MERGE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn MergeVirtualDisk(virtualdiskhandle: P0, flags: MERGE_VIRTUAL_DISK_FLAG, parameters: *const MERGE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn MergeVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : MERGE_VIRTUAL_DISK_FLAG, parameters : *const MERGE_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - MergeVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + MergeVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn MirrorVirtualDisk(virtualdiskhandle: P0, flags: MIRROR_VIRTUAL_DISK_FLAG, parameters: *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped: *const super::super::System::IO::OVERLAPPED) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn MirrorVirtualDisk(virtualdiskhandle: P0, flags: MIRROR_VIRTUAL_DISK_FLAG, parameters: *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped: *const super::super::System::IO::OVERLAPPED) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn MirrorVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : MIRROR_VIRTUAL_DISK_FLAG, parameters : *const MIRROR_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - MirrorVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, overlapped) + MirrorVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, overlapped).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ModifyVhdSet(virtualdiskhandle: P0, parameters: *const MODIFY_VHDSET_PARAMETERS, flags: MODIFY_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ModifyVhdSet(virtualdiskhandle: P0, parameters: *const MODIFY_VHDSET_PARAMETERS, flags: MODIFY_VHDSET_FLAG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn ModifyVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const MODIFY_VHDSET_PARAMETERS, flags : MODIFY_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - ModifyVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags) + ModifyVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OpenVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P0, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, flags: OPEN_VIRTUAL_DISK_FLAG, parameters: ::core::option::Option<*const OPEN_VIRTUAL_DISK_PARAMETERS>, handle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn OpenVirtualDisk(virtualstoragetype: *const VIRTUAL_STORAGE_TYPE, path: P0, virtualdiskaccessmask: VIRTUAL_DISK_ACCESS_MASK, flags: OPEN_VIRTUAL_DISK_FLAG, parameters: ::core::option::Option<*const OPEN_VIRTUAL_DISK_PARAMETERS>, handle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("virtdisk.dll" "system" fn OpenVirtualDisk(virtualstoragetype : *const VIRTUAL_STORAGE_TYPE, path : ::windows_core::PCWSTR, virtualdiskaccessmask : VIRTUAL_DISK_ACCESS_MASK, flags : OPEN_VIRTUAL_DISK_FLAG, parameters : *const OPEN_VIRTUAL_DISK_PARAMETERS, handle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - OpenVirtualDisk(virtualstoragetype, path.into_param().abi(), virtualdiskaccessmask, flags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), handle) + OpenVirtualDisk(virtualstoragetype, path.into_param().abi(), virtualdiskaccessmask, flags, ::core::mem::transmute(parameters.unwrap_or(::std::ptr::null())), handle).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryChangesVirtualDisk(virtualdiskhandle: P0, changetrackingid: P1, byteoffset: u64, bytelength: u64, flags: QUERY_CHANGES_VIRTUAL_DISK_FLAG, ranges: *mut QUERY_CHANGES_VIRTUAL_DISK_RANGE, rangecount: *mut u32, processedlength: *mut u64) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn QueryChangesVirtualDisk(virtualdiskhandle: P0, changetrackingid: P1, byteoffset: u64, bytelength: u64, flags: QUERY_CHANGES_VIRTUAL_DISK_FLAG, ranges: *mut QUERY_CHANGES_VIRTUAL_DISK_RANGE, rangecount: *mut u32, processedlength: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("virtdisk.dll" "system" fn QueryChangesVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, changetrackingid : ::windows_core::PCWSTR, byteoffset : u64, bytelength : u64, flags : QUERY_CHANGES_VIRTUAL_DISK_FLAG, ranges : *mut QUERY_CHANGES_VIRTUAL_DISK_RANGE, rangecount : *mut u32, processedlength : *mut u64) -> super::super::Foundation:: WIN32_ERROR); - QueryChangesVirtualDisk(virtualdiskhandle.into_param().abi(), changetrackingid.into_param().abi(), byteoffset, bytelength, flags, ranges, rangecount, processedlength) + QueryChangesVirtualDisk(virtualdiskhandle.into_param().abi(), changetrackingid.into_param().abi(), byteoffset, bytelength, flags, ranges, rangecount, processedlength).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RawSCSIVirtualDisk(virtualdiskhandle: P0, parameters: *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags: RAW_SCSI_VIRTUAL_DISK_FLAG, response: *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RawSCSIVirtualDisk(virtualdiskhandle: P0, parameters: *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags: RAW_SCSI_VIRTUAL_DISK_FLAG, response: *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn RawSCSIVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const RAW_SCSI_VIRTUAL_DISK_PARAMETERS, flags : RAW_SCSI_VIRTUAL_DISK_FLAG, response : *mut RAW_SCSI_VIRTUAL_DISK_RESPONSE) -> super::super::Foundation:: WIN32_ERROR); - RawSCSIVirtualDisk(virtualdiskhandle.into_param().abi(), parameters, flags, response) + RawSCSIVirtualDisk(virtualdiskhandle.into_param().abi(), parameters, flags, response).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ResizeVirtualDisk(virtualdiskhandle: P0, flags: RESIZE_VIRTUAL_DISK_FLAG, parameters: *const RESIZE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn ResizeVirtualDisk(virtualdiskhandle: P0, flags: RESIZE_VIRTUAL_DISK_FLAG, parameters: *const RESIZE_VIRTUAL_DISK_PARAMETERS, overlapped: ::core::option::Option<*const super::super::System::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn ResizeVirtualDisk(virtualdiskhandle : super::super::Foundation:: HANDLE, flags : RESIZE_VIRTUAL_DISK_FLAG, parameters : *const RESIZE_VIRTUAL_DISK_PARAMETERS, overlapped : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: WIN32_ERROR); - ResizeVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))) + ResizeVirtualDisk(virtualdiskhandle.into_param().abi(), flags, parameters, ::core::mem::transmute(overlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn SetVirtualDiskInformation(virtualdiskhandle : super::super::Foundation:: HANDLE, virtualdiskinfo : *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation:: WIN32_ERROR); - SetVirtualDiskInformation(virtualdiskhandle.into_param().abi(), virtualdiskinfo) + SetVirtualDiskInformation(virtualdiskhandle.into_param().abi(), virtualdiskinfo).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID, metadatasize: u32, metadata: *const ::core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SetVirtualDiskMetadata(virtualdiskhandle: P0, item: *const ::windows_core::GUID, metadatasize: u32, metadata: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn SetVirtualDiskMetadata(virtualdiskhandle : super::super::Foundation:: HANDLE, item : *const ::windows_core::GUID, metadatasize : u32, metadata : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - SetVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item, metadatasize, metadata) + SetVirtualDiskMetadata(virtualdiskhandle.into_param().abi(), item, metadatasize, metadata).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TakeSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags: TAKE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn TakeSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags: TAKE_SNAPSHOT_VHDSET_FLAG) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("virtdisk.dll" "system" fn TakeSnapshotVhdSet(virtualdiskhandle : super::super::Foundation:: HANDLE, parameters : *const TAKE_SNAPSHOT_VHDSET_PARAMETERS, flags : TAKE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation:: WIN32_ERROR); - TakeSnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags) + TakeSnapshotVhdSet(virtualdiskhandle.into_param().abi(), parameters, flags).ok() } #[doc = "*Required features: `\"Win32_Storage_Vhd\"`*"] pub const CREATE_VIRTUAL_DISK_PARAMETERS_DEFAULT_BLOCK_SIZE: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs index 2ed91ab863..862a4dfa60 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Antimalware/mod.rs @@ -76,12 +76,12 @@ where #[doc = "*Required features: `\"Win32_System_Antimalware\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InstallELAMCertificateInfo(elamfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn InstallELAMCertificateInfo(elamfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn InstallELAMCertificateInfo(elamfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InstallELAMCertificateInfo(elamfile.into_param().abi()) + InstallELAMCertificateInfo(elamfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Antimalware\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs index 9d5ff4f567..de8a4fb1e5 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -1,12 +1,12 @@ #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ActivateActCtx(hactctx: P0, lpcookie: *mut usize) -> super::super::Foundation::BOOL +pub unsafe fn ActivateActCtx(hactctx: P0, lpcookie: *mut usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ActivateActCtx(hactctx : super::super::Foundation:: HANDLE, lpcookie : *mut usize) -> super::super::Foundation:: BOOL); - ActivateActCtx(hactctx.into_param().abi(), lpcookie) + ActivateActCtx(hactctx.into_param().abi(), lpcookie).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -277,9 +277,9 @@ where #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeactivateActCtx(dwflags: u32, ulcookie: usize) -> super::super::Foundation::BOOL { +pub unsafe fn DeactivateActCtx(dwflags: u32, ulcookie: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DeactivateActCtx(dwflags : u32, ulcookie : usize) -> super::super::Foundation:: BOOL); - DeactivateActCtx(dwflags, ulcookie) + DeactivateActCtx(dwflags, ulcookie).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -331,36 +331,36 @@ where #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`, `\"Win32_System_WindowsProgramming\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn FindActCtxSectionGuid(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpguidtofind: ::core::option::Option<*const ::windows_core::GUID>, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation::BOOL { +pub unsafe fn FindActCtxSectionGuid(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpguidtofind: ::core::option::Option<*const ::windows_core::GUID>, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FindActCtxSectionGuid(dwflags : u32, lpextensionguid : *const ::windows_core::GUID, ulsectionid : u32, lpguidtofind : *const ::windows_core::GUID, returneddata : *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation:: BOOL); - FindActCtxSectionGuid(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, ::core::mem::transmute(lpguidtofind.unwrap_or(::std::ptr::null())), returneddata) + FindActCtxSectionGuid(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, ::core::mem::transmute(lpguidtofind.unwrap_or(::std::ptr::null())), returneddata).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`, `\"Win32_System_WindowsProgramming\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn FindActCtxSectionStringA(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpstringtofind: P0, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation::BOOL +pub unsafe fn FindActCtxSectionStringA(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpstringtofind: P0, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FindActCtxSectionStringA(dwflags : u32, lpextensionguid : *const ::windows_core::GUID, ulsectionid : u32, lpstringtofind : ::windows_core::PCSTR, returneddata : *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation:: BOOL); - FindActCtxSectionStringA(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, lpstringtofind.into_param().abi(), returneddata) + FindActCtxSectionStringA(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, lpstringtofind.into_param().abi(), returneddata).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`, `\"Win32_System_WindowsProgramming\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_WindowsProgramming"))] #[inline] -pub unsafe fn FindActCtxSectionStringW(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpstringtofind: P0, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation::BOOL +pub unsafe fn FindActCtxSectionStringW(dwflags: u32, lpextensionguid: ::core::option::Option<*const ::windows_core::GUID>, ulsectionid: u32, lpstringtofind: P0, returneddata: *mut ACTCTX_SECTION_KEYED_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FindActCtxSectionStringW(dwflags : u32, lpextensionguid : *const ::windows_core::GUID, ulsectionid : u32, lpstringtofind : ::windows_core::PCWSTR, returneddata : *mut ACTCTX_SECTION_KEYED_DATA) -> super::super::Foundation:: BOOL); - FindActCtxSectionStringW(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, lpstringtofind.into_param().abi(), returneddata) + FindActCtxSectionStringW(dwflags, ::core::mem::transmute(lpextensionguid.unwrap_or(::std::ptr::null())), ulsectionid, lpstringtofind.into_param().abi(), returneddata).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentActCtx(lphactctx: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn GetCurrentActCtx(lphactctx: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentActCtx(lphactctx : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetCurrentActCtx(lphactctx) + GetCurrentActCtx(lphactctx).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3099,24 +3099,24 @@ pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut ::core::ffi::c_voi #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryActCtxSettingsW(dwflags: u32, hactctx: P0, settingsnamespace: P1, settingname: P2, pvbuffer: ::windows_core::PWSTR, dwbuffer: usize, pdwwrittenorrequired: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL +pub unsafe fn QueryActCtxSettingsW(dwflags: u32, hactctx: P0, settingsnamespace: P1, settingname: P2, pvbuffer: ::windows_core::PWSTR, dwbuffer: usize, pdwwrittenorrequired: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn QueryActCtxSettingsW(dwflags : u32, hactctx : super::super::Foundation:: HANDLE, settingsnamespace : ::windows_core::PCWSTR, settingname : ::windows_core::PCWSTR, pvbuffer : ::windows_core::PWSTR, dwbuffer : usize, pdwwrittenorrequired : *mut usize) -> super::super::Foundation:: BOOL); - QueryActCtxSettingsW(dwflags, hactctx.into_param().abi(), settingsnamespace.into_param().abi(), settingname.into_param().abi(), ::core::mem::transmute(pvbuffer), dwbuffer, ::core::mem::transmute(pdwwrittenorrequired.unwrap_or(::std::ptr::null_mut()))) + QueryActCtxSettingsW(dwflags, hactctx.into_param().abi(), settingsnamespace.into_param().abi(), settingname.into_param().abi(), ::core::mem::transmute(pvbuffer), dwbuffer, ::core::mem::transmute(pdwwrittenorrequired.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryActCtxW(dwflags: u32, hactctx: P0, pvsubinstance: ::core::option::Option<*const ::core::ffi::c_void>, ulinfoclass: u32, pvbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, cbbuffer: usize, pcbwrittenorrequired: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL +pub unsafe fn QueryActCtxW(dwflags: u32, hactctx: P0, pvsubinstance: ::core::option::Option<*const ::core::ffi::c_void>, ulinfoclass: u32, pvbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, cbbuffer: usize, pcbwrittenorrequired: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryActCtxW(dwflags : u32, hactctx : super::super::Foundation:: HANDLE, pvsubinstance : *const ::core::ffi::c_void, ulinfoclass : u32, pvbuffer : *mut ::core::ffi::c_void, cbbuffer : usize, pcbwrittenorrequired : *mut usize) -> super::super::Foundation:: BOOL); - QueryActCtxW(dwflags, hactctx.into_param().abi(), ::core::mem::transmute(pvsubinstance.unwrap_or(::std::ptr::null())), ulinfoclass, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null_mut())), cbbuffer, ::core::mem::transmute(pcbwrittenorrequired.unwrap_or(::std::ptr::null_mut()))) + QueryActCtxW(dwflags, hactctx.into_param().abi(), ::core::mem::transmute(pvsubinstance.unwrap_or(::std::ptr::null())), ulinfoclass, ::core::mem::transmute(pvbuffer.unwrap_or(::std::ptr::null_mut())), cbbuffer, ::core::mem::transmute(pcbwrittenorrequired.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3131,12 +3131,12 @@ where #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SfcGetNextProtectedFile(rpchandle: P0, protfiledata: *mut PROTECTED_FILE_DATA) -> super::super::Foundation::BOOL +pub unsafe fn SfcGetNextProtectedFile(rpchandle: P0, protfiledata: *mut PROTECTED_FILE_DATA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("sfc.dll" "system" fn SfcGetNextProtectedFile(rpchandle : super::super::Foundation:: HANDLE, protfiledata : *mut PROTECTED_FILE_DATA) -> super::super::Foundation:: BOOL); - SfcGetNextProtectedFile(rpchandle.into_param().abi(), protfiledata) + SfcGetNextProtectedFile(rpchandle.into_param().abi(), protfiledata).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3213,12 +3213,12 @@ where #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ZombifyActCtx(hactctx: P0) -> super::super::Foundation::BOOL +pub unsafe fn ZombifyActCtx(hactctx: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ZombifyActCtx(hactctx : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ZombifyActCtx(hactctx.into_param().abi()) + ZombifyActCtx(hactctx.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_ApplicationInstallationAndServicing\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs index bcb4392bf0..a5315ab7fe 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -1,40 +1,40 @@ #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddConsoleAliasA(source: P0, target: P1, exename: P2) -> super::super::Foundation::BOOL +pub unsafe fn AddConsoleAliasA(source: P0, target: P1, exename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn AddConsoleAliasA(source : ::windows_core::PCSTR, target : ::windows_core::PCSTR, exename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AddConsoleAliasA(source.into_param().abi(), target.into_param().abi(), exename.into_param().abi()) + AddConsoleAliasA(source.into_param().abi(), target.into_param().abi(), exename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddConsoleAliasW(source: P0, target: P1, exename: P2) -> super::super::Foundation::BOOL +pub unsafe fn AddConsoleAliasW(source: P0, target: P1, exename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn AddConsoleAliasW(source : ::windows_core::PCWSTR, target : ::windows_core::PCWSTR, exename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AddConsoleAliasW(source.into_param().abi(), target.into_param().abi(), exename.into_param().abi()) + AddConsoleAliasW(source.into_param().abi(), target.into_param().abi(), exename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocConsole() -> super::super::Foundation::BOOL { +pub unsafe fn AllocConsole() -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn AllocConsole() -> super::super::Foundation:: BOOL); - AllocConsole() + AllocConsole().ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AttachConsole(dwprocessid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn AttachConsole(dwprocessid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn AttachConsole(dwprocessid : u32) -> super::super::Foundation:: BOOL); - AttachConsole(dwprocessid) + AttachConsole(dwprocessid).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] #[inline] @@ -86,56 +86,56 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FillConsoleOutputAttribute(hconsoleoutput: P0, wattribute: u16, nlength: u32, dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FillConsoleOutputAttribute(hconsoleoutput: P0, wattribute: u16, nlength: u32, dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, wattribute : u16, nlength : u32, dwwritecoord : COORD, lpnumberofattrswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputAttribute(hconsoleoutput.into_param().abi(), wattribute, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten) + FillConsoleOutputAttribute(hconsoleoutput.into_param().abi(), wattribute, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FillConsoleOutputCharacterA(hconsoleoutput: P0, ccharacter: u8, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FillConsoleOutputCharacterA(hconsoleoutput: P0, ccharacter: u8, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, ccharacter : u8, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ccharacter, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten) + FillConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ccharacter, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FillConsoleOutputCharacterW(hconsoleoutput: P0, ccharacter: u16, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn FillConsoleOutputCharacterW(hconsoleoutput: P0, ccharacter: u16, nlength: u32, dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FillConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, ccharacter : u16, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - FillConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ccharacter, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten) + FillConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ccharacter, nlength, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushConsoleInputBuffer(hconsoleinput: P0) -> super::super::Foundation::BOOL +pub unsafe fn FlushConsoleInputBuffer(hconsoleinput: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FlushConsoleInputBuffer(hconsoleinput : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - FlushConsoleInputBuffer(hconsoleinput.into_param().abi()) + FlushConsoleInputBuffer(hconsoleinput.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeConsole() -> super::super::Foundation::BOOL { +pub unsafe fn FreeConsole() -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FreeConsole() -> super::super::Foundation:: BOOL); - FreeConsole() + FreeConsole().ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GenerateConsoleCtrlEvent(dwctrlevent: u32, dwprocessgroupid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn GenerateConsoleCtrlEvent(dwctrlevent: u32, dwprocessgroupid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GenerateConsoleCtrlEvent(dwctrlevent : u32, dwprocessgroupid : u32) -> super::super::Foundation:: BOOL); - GenerateConsoleCtrlEvent(dwctrlevent, dwprocessgroupid) + GenerateConsoleCtrlEvent(dwctrlevent, dwprocessgroupid).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] #[inline] @@ -262,19 +262,19 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *mut CONSOLE_CURSOR_INFO) -> super::super::Foundation::BOOL +pub unsafe fn GetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *mut CONSOLE_CURSOR_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleCursorInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolecursorinfo : *mut CONSOLE_CURSOR_INFO) -> super::super::Foundation:: BOOL); - GetConsoleCursorInfo(hconsoleoutput.into_param().abi(), lpconsolecursorinfo) + GetConsoleCursorInfo(hconsoleoutput.into_param().abi(), lpconsolecursorinfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleDisplayMode(lpmodeflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetConsoleDisplayMode(lpmodeflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleDisplayMode(lpmodeflags : *mut u32) -> super::super::Foundation:: BOOL); - GetConsoleDisplayMode(lpmodeflags) + GetConsoleDisplayMode(lpmodeflags).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -289,19 +289,19 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleHistoryInfo(lpconsolehistoryinfo: *mut CONSOLE_HISTORY_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn GetConsoleHistoryInfo(lpconsolehistoryinfo: *mut CONSOLE_HISTORY_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleHistoryInfo(lpconsolehistoryinfo : *mut CONSOLE_HISTORY_INFO) -> super::super::Foundation:: BOOL); - GetConsoleHistoryInfo(lpconsolehistoryinfo) + GetConsoleHistoryInfo(lpconsolehistoryinfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleMode(hconsolehandle: P0, lpmode: *mut CONSOLE_MODE) -> super::super::Foundation::BOOL +pub unsafe fn GetConsoleMode(hconsolehandle: P0, lpmode: *mut CONSOLE_MODE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleMode(hconsolehandle : super::super::Foundation:: HANDLE, lpmode : *mut CONSOLE_MODE) -> super::super::Foundation:: BOOL); - GetConsoleMode(hconsolehandle.into_param().abi(), lpmode) + GetConsoleMode(hconsolehandle.into_param().abi(), lpmode).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] #[inline] @@ -330,29 +330,29 @@ pub unsafe fn GetConsoleProcessList(lpdwprocesslist: &mut [u32]) -> u32 { #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleScreenBufferInfo(hconsoleoutput: P0, lpconsolescreenbufferinfo: *mut CONSOLE_SCREEN_BUFFER_INFO) -> super::super::Foundation::BOOL +pub unsafe fn GetConsoleScreenBufferInfo(hconsoleoutput: P0, lpconsolescreenbufferinfo: *mut CONSOLE_SCREEN_BUFFER_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleScreenBufferInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfo : *mut CONSOLE_SCREEN_BUFFER_INFO) -> super::super::Foundation:: BOOL); - GetConsoleScreenBufferInfo(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfo) + GetConsoleScreenBufferInfo(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation::BOOL +pub unsafe fn GetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleScreenBufferInfoEx(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfoex : *mut CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation:: BOOL); - GetConsoleScreenBufferInfoEx(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfoex) + GetConsoleScreenBufferInfoEx(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfoex).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetConsoleSelectionInfo(lpconsoleselectioninfo: *mut CONSOLE_SELECTION_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn GetConsoleSelectionInfo(lpconsoleselectioninfo: *mut CONSOLE_SELECTION_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetConsoleSelectionInfo(lpconsoleselectioninfo : *mut CONSOLE_SELECTION_INFO) -> super::super::Foundation:: BOOL); - GetConsoleSelectionInfo(lpconsoleselectioninfo) + GetConsoleSelectionInfo(lpconsoleselectioninfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] #[inline] @@ -376,24 +376,24 @@ pub unsafe fn GetConsoleWindow() -> super::super::Foundation::HWND { #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> super::super::Foundation::BOOL +pub unsafe fn GetCurrentConsoleFont(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfont: *mut CONSOLE_FONT_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFont(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfont : *mut CONSOLE_FONT_INFO) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFont(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfont) + GetCurrentConsoleFont(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfont).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> super::super::Foundation::BOOL +pub unsafe fn GetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *mut CONSOLE_FONT_INFOEX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *mut CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - GetCurrentConsoleFontEx(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfontex) + GetCurrentConsoleFontEx(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfontex).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -408,19 +408,19 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumberOfConsoleInputEvents(hconsoleinput: P0, lpnumberofevents: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNumberOfConsoleInputEvents(hconsoleinput: P0, lpnumberofevents: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNumberOfConsoleInputEvents(hconsoleinput : super::super::Foundation:: HANDLE, lpnumberofevents : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfConsoleInputEvents(hconsoleinput.into_param().abi(), lpnumberofevents) + GetNumberOfConsoleInputEvents(hconsoleinput.into_param().abi(), lpnumberofevents).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons) + GetNumberOfConsoleMouseButtons(lpnumberofmousebuttons).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -433,112 +433,112 @@ pub unsafe fn GetStdHandle(nstdhandle: STD_HANDLE) -> ::windows_core::Result(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn PeekConsoleInputA(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread) + PeekConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PeekConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn PeekConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PeekConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - PeekConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread) + PeekConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleA(hconsoleinput: P0, lpbuffer: *mut ::core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: ::core::option::Option<*const CONSOLE_READCONSOLE_CONTROL>) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleA(hconsoleinput: P0, lpbuffer: *mut ::core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: ::core::option::Option<*const CONSOLE_READCONSOLE_CONTROL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nnumberofcharstoread : u32, lpnumberofcharsread : *mut u32, pinputcontrol : *const CONSOLE_READCONSOLE_CONTROL) -> super::super::Foundation:: BOOL); - ReadConsoleA(hconsoleinput.into_param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, ::core::mem::transmute(pinputcontrol.unwrap_or(::std::ptr::null()))) + ReadConsoleA(hconsoleinput.into_param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, ::core::mem::transmute(pinputcontrol.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleInputA(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleInputA(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread) + ReadConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleInputW(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut INPUT_RECORD, nlength : u32, lpnumberofeventsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread) + ReadConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleOutputA(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleOutputA(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *mut CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpreadregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - ReadConsoleOutputA(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpreadregion) + ReadConsoleOutputA(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpreadregion).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &mut [u16], dwreadcoord: COORD, lpnumberofattrsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &mut [u16], dwreadcoord: COORD, lpnumberofattrsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *mut u16, nlength : u32, dwreadcoord : COORD, lpnumberofattrsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofattrsread) + ReadConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofattrsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &mut [u8], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &mut [u8], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread) + ReadConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &mut [u16], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &mut [u16], dwreadcoord: COORD, lpnumberofcharsread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PWSTR, nlength : u32, dwreadcoord : COORD, lpnumberofcharsread : *mut u32) -> super::super::Foundation:: BOOL); - ReadConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread) + ReadConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwreadcoord), lpnumberofcharsread).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleOutputW(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleOutputW(hconsoleoutput: P0, lpbuffer: *mut CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpreadregion: *mut SMALL_RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleOutputW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *mut CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpreadregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - ReadConsoleOutputW(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpreadregion) + ReadConsoleOutputW(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpreadregion).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadConsoleW(hconsoleinput: P0, lpbuffer: *mut ::core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: ::core::option::Option<*const CONSOLE_READCONSOLE_CONTROL>) -> super::super::Foundation::BOOL +pub unsafe fn ReadConsoleW(hconsoleinput: P0, lpbuffer: *mut ::core::ffi::c_void, nnumberofcharstoread: u32, lpnumberofcharsread: *mut u32, pinputcontrol: ::core::option::Option<*const CONSOLE_READCONSOLE_CONTROL>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadConsoleW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nnumberofcharstoread : u32, lpnumberofcharsread : *mut u32, pinputcontrol : *const CONSOLE_READCONSOLE_CONTROL) -> super::super::Foundation:: BOOL); - ReadConsoleW(hconsoleinput.into_param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, ::core::mem::transmute(pinputcontrol.unwrap_or(::std::ptr::null()))) + ReadConsoleW(hconsoleinput.into_param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, ::core::mem::transmute(pinputcontrol.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] #[inline] @@ -552,96 +552,96 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ScrollConsoleScreenBufferA(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: ::core::option::Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> super::super::Foundation::BOOL +pub unsafe fn ScrollConsoleScreenBufferA(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: ::core::option::Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ScrollConsoleScreenBufferA(hconsoleoutput : super::super::Foundation:: HANDLE, lpscrollrectangle : *const SMALL_RECT, lpcliprectangle : *const SMALL_RECT, dwdestinationorigin : COORD, lpfill : *const CHAR_INFO) -> super::super::Foundation:: BOOL); - ScrollConsoleScreenBufferA(hconsoleoutput.into_param().abi(), lpscrollrectangle, ::core::mem::transmute(lpcliprectangle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dwdestinationorigin), lpfill) + ScrollConsoleScreenBufferA(hconsoleoutput.into_param().abi(), lpscrollrectangle, ::core::mem::transmute(lpcliprectangle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dwdestinationorigin), lpfill).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ScrollConsoleScreenBufferW(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: ::core::option::Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> super::super::Foundation::BOOL +pub unsafe fn ScrollConsoleScreenBufferW(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: ::core::option::Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ScrollConsoleScreenBufferW(hconsoleoutput : super::super::Foundation:: HANDLE, lpscrollrectangle : *const SMALL_RECT, lpcliprectangle : *const SMALL_RECT, dwdestinationorigin : COORD, lpfill : *const CHAR_INFO) -> super::super::Foundation:: BOOL); - ScrollConsoleScreenBufferW(hconsoleoutput.into_param().abi(), lpscrollrectangle, ::core::mem::transmute(lpcliprectangle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dwdestinationorigin), lpfill) + ScrollConsoleScreenBufferW(hconsoleoutput.into_param().abi(), lpscrollrectangle, ::core::mem::transmute(lpcliprectangle.unwrap_or(::std::ptr::null())), ::core::mem::transmute(dwdestinationorigin), lpfill).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleActiveScreenBuffer(hconsoleoutput : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetConsoleActiveScreenBuffer(hconsoleoutput.into_param().abi()) + SetConsoleActiveScreenBuffer(hconsoleoutput.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleCP(wcodepageid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetConsoleCP(wcodepageid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleCP(wcodepageid : u32) -> super::super::Foundation:: BOOL); - SetConsoleCP(wcodepageid) + SetConsoleCP(wcodepageid).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleCtrlHandler(handlerroutine: PHANDLER_ROUTINE, add: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleCtrlHandler(handlerroutine: PHANDLER_ROUTINE, add: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleCtrlHandler(handlerroutine : PHANDLER_ROUTINE, add : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetConsoleCtrlHandler(handlerroutine, add.into_param().abi()) + SetConsoleCtrlHandler(handlerroutine, add.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleCursorInfo(hconsoleoutput: P0, lpconsolecursorinfo: *const CONSOLE_CURSOR_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleCursorInfo(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolecursorinfo : *const CONSOLE_CURSOR_INFO) -> super::super::Foundation:: BOOL); - SetConsoleCursorInfo(hconsoleoutput.into_param().abi(), lpconsolecursorinfo) + SetConsoleCursorInfo(hconsoleoutput.into_param().abi(), lpconsolecursorinfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleCursorPosition(hconsoleoutput: P0, dwcursorposition: COORD) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleCursorPosition(hconsoleoutput: P0, dwcursorposition: COORD) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleCursorPosition(hconsoleoutput : super::super::Foundation:: HANDLE, dwcursorposition : COORD) -> super::super::Foundation:: BOOL); - SetConsoleCursorPosition(hconsoleoutput.into_param().abi(), ::core::mem::transmute(dwcursorposition)) + SetConsoleCursorPosition(hconsoleoutput.into_param().abi(), ::core::mem::transmute(dwcursorposition)).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleDisplayMode(hconsoleoutput: P0, dwflags: u32, lpnewscreenbufferdimensions: ::core::option::Option<*mut COORD>) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleDisplayMode(hconsoleoutput: P0, dwflags: u32, lpnewscreenbufferdimensions: ::core::option::Option<*mut COORD>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleDisplayMode(hconsoleoutput : super::super::Foundation:: HANDLE, dwflags : u32, lpnewscreenbufferdimensions : *mut COORD) -> super::super::Foundation:: BOOL); - SetConsoleDisplayMode(hconsoleoutput.into_param().abi(), dwflags, ::core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(::std::ptr::null_mut()))) + SetConsoleDisplayMode(hconsoleoutput.into_param().abi(), dwflags, ::core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleHistoryInfo(lpconsolehistoryinfo : *const CONSOLE_HISTORY_INFO) -> super::super::Foundation:: BOOL); - SetConsoleHistoryInfo(lpconsolehistoryinfo) + SetConsoleHistoryInfo(lpconsolehistoryinfo).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleMode(hconsolehandle: P0, dwmode: CONSOLE_MODE) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleMode(hconsolehandle: P0, dwmode: CONSOLE_MODE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleMode(hconsolehandle : super::super::Foundation:: HANDLE, dwmode : CONSOLE_MODE) -> super::super::Foundation:: BOOL); - SetConsoleMode(hconsolehandle.into_param().abi(), dwmode) + SetConsoleMode(hconsolehandle.into_param().abi(), dwmode).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -666,91 +666,91 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleOutputCP(wcodepageid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetConsoleOutputCP(wcodepageid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleOutputCP(wcodepageid : u32) -> super::super::Foundation:: BOOL); - SetConsoleOutputCP(wcodepageid) + SetConsoleOutputCP(wcodepageid).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *const CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleScreenBufferInfoEx(hconsoleoutput: P0, lpconsolescreenbufferinfoex: *const CONSOLE_SCREEN_BUFFER_INFOEX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleScreenBufferInfoEx(hconsoleoutput : super::super::Foundation:: HANDLE, lpconsolescreenbufferinfoex : *const CONSOLE_SCREEN_BUFFER_INFOEX) -> super::super::Foundation:: BOOL); - SetConsoleScreenBufferInfoEx(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfoex) + SetConsoleScreenBufferInfoEx(hconsoleoutput.into_param().abi(), lpconsolescreenbufferinfoex).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleScreenBufferSize(hconsoleoutput: P0, dwsize: COORD) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleScreenBufferSize(hconsoleoutput: P0, dwsize: COORD) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleScreenBufferSize(hconsoleoutput : super::super::Foundation:: HANDLE, dwsize : COORD) -> super::super::Foundation:: BOOL); - SetConsoleScreenBufferSize(hconsoleoutput.into_param().abi(), ::core::mem::transmute(dwsize)) + SetConsoleScreenBufferSize(hconsoleoutput.into_param().abi(), ::core::mem::transmute(dwsize)).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleTextAttribute(hconsoleoutput: P0, wattributes: CONSOLE_CHARACTER_ATTRIBUTES) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleTextAttribute(hconsoleoutput: P0, wattributes: CONSOLE_CHARACTER_ATTRIBUTES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleTextAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, wattributes : CONSOLE_CHARACTER_ATTRIBUTES) -> super::super::Foundation:: BOOL); - SetConsoleTextAttribute(hconsoleoutput.into_param().abi(), wattributes) + SetConsoleTextAttribute(hconsoleoutput.into_param().abi(), wattributes).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleTitleA(lpconsoletitle: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleTitleA(lpconsoletitle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleTitleA(lpconsoletitle : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetConsoleTitleA(lpconsoletitle.into_param().abi()) + SetConsoleTitleA(lpconsoletitle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleTitleW(lpconsoletitle: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleTitleW(lpconsoletitle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleTitleW(lpconsoletitle : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetConsoleTitleW(lpconsoletitle.into_param().abi()) + SetConsoleTitleW(lpconsoletitle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: P0, babsolute: P1, lpconsolewindow: *const SMALL_RECT) -> super::super::Foundation::BOOL +pub unsafe fn SetConsoleWindowInfo(hconsoleoutput: P0, babsolute: P1, lpconsolewindow: *const SMALL_RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetConsoleWindowInfo(hconsoleoutput : super::super::Foundation:: HANDLE, babsolute : super::super::Foundation:: BOOL, lpconsolewindow : *const SMALL_RECT) -> super::super::Foundation:: BOOL); - SetConsoleWindowInfo(hconsoleoutput.into_param().abi(), babsolute.into_param().abi(), lpconsolewindow) + SetConsoleWindowInfo(hconsoleoutput.into_param().abi(), babsolute.into_param().abi(), lpconsolewindow).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> super::super::Foundation::BOOL +pub unsafe fn SetCurrentConsoleFontEx(hconsoleoutput: P0, bmaximumwindow: P1, lpconsolecurrentfontex: *const CONSOLE_FONT_INFOEX) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetCurrentConsoleFontEx(hconsoleoutput : super::super::Foundation:: HANDLE, bmaximumwindow : super::super::Foundation:: BOOL, lpconsolecurrentfontex : *const CONSOLE_FONT_INFOEX) -> super::super::Foundation:: BOOL); - SetCurrentConsoleFontEx(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfontex) + SetCurrentConsoleFontEx(hconsoleoutput.into_param().abi(), bmaximumwindow.into_param().abi(), lpconsolecurrentfontex).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetStdHandle(nstdhandle: STD_HANDLE, hhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetStdHandle(nstdhandle : STD_HANDLE, hhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetStdHandle(nstdhandle, hhandle.into_param().abi()) + SetStdHandle(nstdhandle, hhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -765,92 +765,92 @@ where #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleA(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleA(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const ::core::ffi::c_void, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + WriteConsoleA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleInputA(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleInputA(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputA(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten) + WriteConsoleInputA(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleInputW(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleInputW(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleInputW(hconsoleinput : super::super::Foundation:: HANDLE, lpbuffer : *const INPUT_RECORD, nlength : u32, lpnumberofeventswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten) + WriteConsoleInputW(hconsoleinput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, lpnumberofeventswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleOutputA(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleOutputA(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpwriteregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - WriteConsoleOutputA(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpwriteregion) + WriteConsoleOutputA(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpwriteregion).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &[u16], dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleOutputAttribute(hconsoleoutput: P0, lpattribute: &[u16], dwwritecoord: COORD, lpnumberofattrswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputAttribute(hconsoleoutput : super::super::Foundation:: HANDLE, lpattribute : *const u16, nlength : u32, dwwritecoord : COORD, lpnumberofattrswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten) + WriteConsoleOutputAttribute(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpattribute.as_ptr()), lpattribute.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofattrswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &[u8], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleOutputCharacterA(hconsoleoutput: P0, lpcharacter: &[u8], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterA(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PCSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten) + WriteConsoleOutputCharacterA(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &[u16], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleOutputCharacterW(hconsoleoutput: P0, lpcharacter: &[u16], dwwritecoord: COORD, lpnumberofcharswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputCharacterW(hconsoleoutput : super::super::Foundation:: HANDLE, lpcharacter : ::windows_core::PCWSTR, nlength : u32, dwwritecoord : COORD, lpnumberofcharswritten : *mut u32) -> super::super::Foundation:: BOOL); - WriteConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten) + WriteConsoleOutputCharacterW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpcharacter.as_ptr()), lpcharacter.len() as _, ::core::mem::transmute(dwwritecoord), lpnumberofcharswritten).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleOutputW(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleOutputW(hconsoleoutput: P0, lpbuffer: *const CHAR_INFO, dwbuffersize: COORD, dwbuffercoord: COORD, lpwriteregion: *mut SMALL_RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleOutputW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const CHAR_INFO, dwbuffersize : COORD, dwbuffercoord : COORD, lpwriteregion : *mut SMALL_RECT) -> super::super::Foundation:: BOOL); - WriteConsoleOutputW(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpwriteregion) + WriteConsoleOutputW(hconsoleoutput.into_param().abi(), lpbuffer, ::core::mem::transmute(dwbuffersize), ::core::mem::transmute(dwbuffercoord), lpwriteregion).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteConsoleW(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn WriteConsoleW(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteConsoleW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : *const ::core::ffi::c_void, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))) + WriteConsoleW(hconsoleoutput.into_param().abi(), ::core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len() as _, ::core::mem::transmute(lpnumberofcharswritten.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Console\"`*"] pub const ALTNUMPAD_BIT: u32 = 67108864u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs index 17ef1fcefc..8da2cde91f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -19,12 +19,12 @@ where #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddClipboardFormatListener(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn AddClipboardFormatListener(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn AddClipboardFormatListener(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - AddClipboardFormatListener(hwnd.into_param().abi()) + AddClipboardFormatListener(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -40,9 +40,9 @@ where #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseClipboard() -> super::super::Foundation::BOOL { +pub unsafe fn CloseClipboard() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn CloseClipboard() -> super::super::Foundation:: BOOL); - CloseClipboard() + CloseClipboard().ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`*"] #[inline] @@ -216,12 +216,12 @@ pub unsafe fn DdeGetLastError(idinst: u32) -> u32 { #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DdeImpersonateClient(hconv: P0) -> super::super::Foundation::BOOL +pub unsafe fn DdeImpersonateClient(hconv: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeImpersonateClient(hconv : HCONV) -> super::super::Foundation:: BOOL); - DdeImpersonateClient(hconv.into_param().abi()) + DdeImpersonateClient(hconv.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`*"] #[inline] @@ -316,12 +316,12 @@ where #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn DdeSetQualityOfService(hwndclient: P0, pqosnew: *const super::super::Security::SECURITY_QUALITY_OF_SERVICE, pqosprev: *mut super::super::Security::SECURITY_QUALITY_OF_SERVICE) -> super::super::Foundation::BOOL +pub unsafe fn DdeSetQualityOfService(hwndclient: P0, pqosnew: *const super::super::Security::SECURITY_QUALITY_OF_SERVICE, pqosprev: *mut super::super::Security::SECURITY_QUALITY_OF_SERVICE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DdeSetQualityOfService(hwndclient : super::super::Foundation:: HWND, pqosnew : *const super::super::Security:: SECURITY_QUALITY_OF_SERVICE, pqosprev : *mut super::super::Security:: SECURITY_QUALITY_OF_SERVICE) -> super::super::Foundation:: BOOL); - DdeSetQualityOfService(hwndclient.into_param().abi(), pqosnew, pqosprev) + DdeSetQualityOfService(hwndclient.into_param().abi(), pqosnew, pqosprev).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -359,9 +359,9 @@ pub unsafe fn DeleteAtom(natom: u16) -> u16 { #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EmptyClipboard() -> super::super::Foundation::BOOL { +pub unsafe fn EmptyClipboard() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn EmptyClipboard() -> super::super::Foundation:: BOOL); - EmptyClipboard() + EmptyClipboard().ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`*"] #[inline] @@ -465,9 +465,9 @@ pub unsafe fn GetPriorityClipboardFormat(paformatprioritylist: &[u32]) -> i32 { #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUpdatedClipboardFormats(lpuiformats: &mut [u32], pcformatsout: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetUpdatedClipboardFormats(lpuiformats: &mut [u32], pcformatsout: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetUpdatedClipboardFormats(lpuiformats : *mut u32, cformats : u32, pcformatsout : *mut u32) -> super::super::Foundation:: BOOL); - GetUpdatedClipboardFormats(::core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len() as _, pcformatsout) + GetUpdatedClipboardFormats(::core::mem::transmute(lpuiformats.as_ptr()), lpuiformats.len() as _, pcformatsout).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`*"] #[inline] @@ -544,13 +544,13 @@ pub unsafe fn GlobalGetAtomNameW(natom: u16, lpbuffer: &mut [u16]) -> u32 { #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImpersonateDdeClientWindow(hwndclient: P0, hwndserver: P1) -> super::super::Foundation::BOOL +pub unsafe fn ImpersonateDdeClientWindow(hwndclient: P0, hwndserver: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ImpersonateDdeClientWindow(hwndclient : super::super::Foundation:: HWND, hwndserver : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ImpersonateDdeClientWindow(hwndclient.into_param().abi(), hwndserver.into_param().abi()) + ImpersonateDdeClientWindow(hwndclient.into_param().abi(), hwndserver.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -562,19 +562,19 @@ pub unsafe fn InitAtomTable(nsize: u32) -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsClipboardFormatAvailable(format: u32) -> super::super::Foundation::BOOL { +pub unsafe fn IsClipboardFormatAvailable(format: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsClipboardFormatAvailable(format : u32) -> super::super::Foundation:: BOOL); - IsClipboardFormatAvailable(format) + IsClipboardFormatAvailable(format).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OpenClipboard(hwndnewowner: P0) -> super::super::Foundation::BOOL +pub unsafe fn OpenClipboard(hwndnewowner: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn OpenClipboard(hwndnewowner : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - OpenClipboard(hwndnewowner.into_param().abi()) + OpenClipboard(hwndnewowner.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -604,12 +604,12 @@ where #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveClipboardFormatListener(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn RemoveClipboardFormatListener(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RemoveClipboardFormatListener(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - RemoveClipboardFormatListener(hwnd.into_param().abi()) + RemoveClipboardFormatListener(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_DataExchange\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs index 781a196af1..2b76f33858 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/mod.rs @@ -19,43 +19,43 @@ pub unsafe fn AddVectoredExceptionHandler(first: u32, handler: PVECTORED_EXCEPTI #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Beep(dwfreq: u32, dwduration: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn Beep(dwfreq: u32, dwduration: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn Beep(dwfreq : u32, dwduration : u32) -> super::super::super::Foundation:: BOOL); - Beep(dwfreq, dwduration) + Beep(dwfreq, dwduration).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BindImage(imagename: P0, dllpath: P1, symbolpath: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn BindImage(imagename: P0, dllpath: P1, symbolpath: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("imagehlp.dll" "system" fn BindImage(imagename : ::windows_core::PCSTR, dllpath : ::windows_core::PCSTR, symbolpath : ::windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - BindImage(imagename.into_param().abi(), dllpath.into_param().abi(), symbolpath.into_param().abi()) + BindImage(imagename.into_param().abi(), dllpath.into_param().abi(), symbolpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BindImageEx(flags: u32, imagename: P0, dllpath: P1, symbolpath: P2, statusroutine: PIMAGEHLP_STATUS_ROUTINE) -> super::super::super::Foundation::BOOL +pub unsafe fn BindImageEx(flags: u32, imagename: P0, dllpath: P1, symbolpath: P2, statusroutine: PIMAGEHLP_STATUS_ROUTINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("imagehlp.dll" "system" fn BindImageEx(flags : u32, imagename : ::windows_core::PCSTR, dllpath : ::windows_core::PCSTR, symbolpath : ::windows_core::PCSTR, statusroutine : PIMAGEHLP_STATUS_ROUTINE) -> super::super::super::Foundation:: BOOL); - BindImageEx(flags, imagename.into_param().abi(), dllpath.into_param().abi(), symbolpath.into_param().abi(), statusroutine) + BindImageEx(flags, imagename.into_param().abi(), dllpath.into_param().abi(), symbolpath.into_param().abi(), statusroutine).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckRemoteDebuggerPresent(hprocess: P0, pbdebuggerpresent: *mut super::super::super::Foundation::BOOL) -> super::super::super::Foundation::BOOL +pub unsafe fn CheckRemoteDebuggerPresent(hprocess: P0, pbdebuggerpresent: *mut super::super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CheckRemoteDebuggerPresent(hprocess : super::super::super::Foundation:: HANDLE, pbdebuggerpresent : *mut super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - CheckRemoteDebuggerPresent(hprocess.into_param().abi(), pbdebuggerpresent) + CheckRemoteDebuggerPresent(hprocess.into_param().abi(), pbdebuggerpresent).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] @@ -82,19 +82,19 @@ pub unsafe fn CloseThreadWaitChainSession(wcthandle: *const ::core::ffi::c_void) #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ContinueDebugEvent(dwprocessid: u32, dwthreadid: u32, dwcontinuestatus: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn ContinueDebugEvent(dwprocessid: u32, dwthreadid: u32, dwcontinuestatus: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ContinueDebugEvent(dwprocessid : u32, dwthreadid : u32, dwcontinuestatus : super::super::super::Foundation:: NTSTATUS) -> super::super::super::Foundation:: BOOL); - ContinueDebugEvent(dwprocessid, dwthreadid, dwcontinuestatus.into_param().abi()) + ContinueDebugEvent(dwprocessid, dwthreadid, dwcontinuestatus.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn CopyContext(destination: *mut CONTEXT, contextflags: u32, source: *const CONTEXT) -> super::super::super::Foundation::BOOL { +pub unsafe fn CopyContext(destination: *mut CONTEXT, contextflags: u32, source: *const CONTEXT) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn CopyContext(destination : *mut CONTEXT, contextflags : u32, source : *const CONTEXT) -> super::super::super::Foundation:: BOOL); - CopyContext(destination, contextflags, source) + CopyContext(destination, contextflags, source).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -119,16 +119,16 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DebugActiveProcess(dwprocessid: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn DebugActiveProcess(dwprocessid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DebugActiveProcess(dwprocessid : u32) -> super::super::super::Foundation:: BOOL); - DebugActiveProcess(dwprocessid) + DebugActiveProcess(dwprocessid).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DebugActiveProcessStop(dwprocessid: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn DebugActiveProcessStop(dwprocessid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DebugActiveProcessStop(dwprocessid : u32) -> super::super::super::Foundation:: BOOL); - DebugActiveProcessStop(dwprocessid) + DebugActiveProcessStop(dwprocessid).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -139,22 +139,22 @@ pub unsafe fn DebugBreak() { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DebugBreakProcess(process: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn DebugBreakProcess(process: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DebugBreakProcess(process : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - DebugBreakProcess(process.into_param().abi()) + DebugBreakProcess(process.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DebugSetProcessKillOnExit(killonexit: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn DebugSetProcessKillOnExit(killonexit: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DebugSetProcessKillOnExit(killonexit : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - DebugSetProcessKillOnExit(killonexit.into_param().abi()) + DebugSetProcessKillOnExit(killonexit.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -203,77 +203,77 @@ pub unsafe fn EncodeSystemPointer(ptr: ::core::option::Option<*const ::core::ffi #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDirTree(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: ::windows_core::PSTR, cb: PENUMDIRTREE_CALLBACK, data: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumDirTree(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: ::windows_core::PSTR, cb: PENUMDIRTREE_CALLBACK, data: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumDirTree(hprocess : super::super::super::Foundation:: HANDLE, rootpath : ::windows_core::PCSTR, inputpathname : ::windows_core::PCSTR, outputpathbuffer : ::windows_core::PSTR, cb : PENUMDIRTREE_CALLBACK, data : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumDirTree(hprocess.into_param().abi(), rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer), cb, ::core::mem::transmute(data.unwrap_or(::std::ptr::null()))) + EnumDirTree(hprocess.into_param().abi(), rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer), cb, ::core::mem::transmute(data.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDirTreeW(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: ::windows_core::PWSTR, cb: PENUMDIRTREE_CALLBACKW, data: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumDirTreeW(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: ::windows_core::PWSTR, cb: PENUMDIRTREE_CALLBACKW, data: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumDirTreeW(hprocess : super::super::super::Foundation:: HANDLE, rootpath : ::windows_core::PCWSTR, inputpathname : ::windows_core::PCWSTR, outputpathbuffer : ::windows_core::PWSTR, cb : PENUMDIRTREE_CALLBACKW, data : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumDirTreeW(hprocess.into_param().abi(), rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer), cb, ::core::mem::transmute(data.unwrap_or(::std::ptr::null()))) + EnumDirTreeW(hprocess.into_param().abi(), rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer), cb, ::core::mem::transmute(data.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateLoadedModules(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumerateLoadedModules(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModules(hprocess : super::super::super::Foundation:: HANDLE, enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumerateLoadedModules(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + EnumerateLoadedModules(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateLoadedModules64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumerateLoadedModules64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModules64(hprocess : super::super::super::Foundation:: HANDLE, enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACK64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumerateLoadedModules64(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + EnumerateLoadedModules64(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateLoadedModulesEx(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumerateLoadedModulesEx(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModulesEx(hprocess : super::super::super::Foundation:: HANDLE, enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACK64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumerateLoadedModulesEx(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + EnumerateLoadedModulesEx(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateLoadedModulesExW(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumerateLoadedModulesExW(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModulesExW(hprocess : super::super::super::Foundation:: HANDLE, enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACKW64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumerateLoadedModulesExW(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + EnumerateLoadedModulesExW(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateLoadedModulesW64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn EnumerateLoadedModulesW64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn EnumerateLoadedModulesW64(hprocess : super::super::super::Foundation:: HANDLE, enumloadedmodulescallback : PENUMLOADED_MODULES_CALLBACKW64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - EnumerateLoadedModulesW64(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + EnumerateLoadedModulesW64(hprocess.into_param().abi(), enumloadedmodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -398,12 +398,12 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushInstructionCache(hprocess: P0, lpbaseaddress: ::core::option::Option<*const ::core::ffi::c_void>, dwsize: usize) -> super::super::super::Foundation::BOOL +pub unsafe fn FlushInstructionCache(hprocess: P0, lpbaseaddress: ::core::option::Option<*const ::core::ffi::c_void>, dwsize: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FlushInstructionCache(hprocess : super::super::super::Foundation:: HANDLE, lpbaseaddress : *const ::core::ffi::c_void, dwsize : usize) -> super::super::super::Foundation:: BOOL); - FlushInstructionCache(hprocess.into_param().abi(), ::core::mem::transmute(lpbaseaddress.unwrap_or(::std::ptr::null())), dwsize) + FlushInstructionCache(hprocess.into_param().abi(), ::core::mem::transmute(lpbaseaddress.unwrap_or(::std::ptr::null())), dwsize).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -434,17 +434,17 @@ pub unsafe fn GetErrorMode() -> u32 { #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY64) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn GetImageConfigInformation(loadedimage : *const LOADED_IMAGE, imageconfiginformation : *mut IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation:: BOOL); - GetImageConfigInformation(loadedimage, imageconfiginformation) + GetImageConfigInformation(loadedimage, imageconfiginformation).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(target_arch = "x86")] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetImageConfigInformation(loadedimage: *const LOADED_IMAGE, imageconfiginformation: *mut IMAGE_LOAD_CONFIG_DIRECTORY32) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn GetImageConfigInformation(loadedimage : *const LOADED_IMAGE, imageconfiginformation : *mut IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation:: BOOL); - GetImageConfigInformation(loadedimage, imageconfiginformation) + GetImageConfigInformation(loadedimage, imageconfiginformation).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] @@ -462,12 +462,12 @@ pub unsafe fn GetSymLoadError() -> u32 { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn GetThreadContext(hthread: P0, lpcontext: *mut CONTEXT) -> super::super::super::Foundation::BOOL +pub unsafe fn GetThreadContext(hthread: P0, lpcontext: *mut CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *mut CONTEXT) -> super::super::super::Foundation:: BOOL); - GetThreadContext(hthread.into_param().abi(), lpcontext) + GetThreadContext(hthread.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -478,19 +478,19 @@ pub unsafe fn GetThreadErrorMode() -> u32 { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut LDT_ENTRY) -> super::super::super::Foundation::BOOL +pub unsafe fn GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut LDT_ENTRY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadSelectorEntry(hthread : super::super::super::Foundation:: HANDLE, dwselector : u32, lpselectorentry : *mut LDT_ENTRY) -> super::super::super::Foundation:: BOOL); - GetThreadSelectorEntry(hthread.into_param().abi(), dwselector, lpselectorentry) + GetThreadSelectorEntry(hthread.into_param().abi(), dwselector, lpselectorentry).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadWaitChain(wcthandle: *const ::core::ffi::c_void, context: usize, flags: WAIT_CHAIN_THREAD_OPTIONS, threadid: u32, nodecount: *mut u32, nodeinfoarray: *mut WAITCHAIN_NODE_INFO, iscycle: *mut i32) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetThreadWaitChain(wcthandle: *const ::core::ffi::c_void, context: usize, flags: WAIT_CHAIN_THREAD_OPTIONS, threadid: u32, nodecount: *mut u32, nodeinfoarray: *mut WAITCHAIN_NODE_INFO, iscycle: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetThreadWaitChain(wcthandle : *const ::core::ffi::c_void, context : usize, flags : WAIT_CHAIN_THREAD_OPTIONS, threadid : u32, nodecount : *mut u32, nodeinfoarray : *mut WAITCHAIN_NODE_INFO, iscycle : *mut i32) -> super::super::super::Foundation:: BOOL); - GetThreadWaitChain(wcthandle, context, flags, threadid, nodecount, nodeinfoarray, iscycle) + GetThreadWaitChain(wcthandle, context, flags, threadid, nodecount, nodeinfoarray, iscycle).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -513,12 +513,12 @@ pub unsafe fn GetXStateFeaturesMask(context: *const CONTEXT, featuremask: *mut u #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_Security_WinTrust\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_WinTrust"))] #[inline] -pub unsafe fn ImageAddCertificate(filehandle: P0, certificate: *const super::super::super::Security::WinTrust::WIN_CERTIFICATE, index: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageAddCertificate(filehandle: P0, certificate: *const super::super::super::Security::WinTrust::WIN_CERTIFICATE, index: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageAddCertificate(filehandle : super::super::super::Foundation:: HANDLE, certificate : *const super::super::super::Security::WinTrust:: WIN_CERTIFICATE, index : *mut u32) -> super::super::super::Foundation:: BOOL); - ImageAddCertificate(filehandle.into_param().abi(), certificate, index) + ImageAddCertificate(filehandle.into_param().abi(), certificate, index).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -543,42 +543,42 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImageEnumerateCertificates(filehandle: P0, typefilter: u16, certificatecount: *mut u32, indices: ::core::option::Option<&mut [u32]>) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageEnumerateCertificates(filehandle: P0, typefilter: u16, certificatecount: *mut u32, indices: ::core::option::Option<&mut [u32]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageEnumerateCertificates(filehandle : super::super::super::Foundation:: HANDLE, typefilter : u16, certificatecount : *mut u32, indices : *mut u32, indexcount : u32) -> super::super::super::Foundation:: BOOL); - ImageEnumerateCertificates(filehandle.into_param().abi(), typefilter, certificatecount, ::core::mem::transmute(indices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len() as _)) + ImageEnumerateCertificates(filehandle.into_param().abi(), typefilter, certificatecount, ::core::mem::transmute(indices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), indices.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_Security_WinTrust\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_WinTrust"))] #[inline] -pub unsafe fn ImageGetCertificateData(filehandle: P0, certificateindex: u32, certificate: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE, requiredlength: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageGetCertificateData(filehandle: P0, certificateindex: u32, certificate: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE, requiredlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageGetCertificateData(filehandle : super::super::super::Foundation:: HANDLE, certificateindex : u32, certificate : *mut super::super::super::Security::WinTrust:: WIN_CERTIFICATE, requiredlength : *mut u32) -> super::super::super::Foundation:: BOOL); - ImageGetCertificateData(filehandle.into_param().abi(), certificateindex, certificate, requiredlength) + ImageGetCertificateData(filehandle.into_param().abi(), certificateindex, certificate, requiredlength).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_Security_WinTrust\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security_WinTrust"))] #[inline] -pub unsafe fn ImageGetCertificateHeader(filehandle: P0, certificateindex: u32, certificateheader: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageGetCertificateHeader(filehandle: P0, certificateindex: u32, certificateheader: *mut super::super::super::Security::WinTrust::WIN_CERTIFICATE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageGetCertificateHeader(filehandle : super::super::super::Foundation:: HANDLE, certificateindex : u32, certificateheader : *mut super::super::super::Security::WinTrust:: WIN_CERTIFICATE) -> super::super::super::Foundation:: BOOL); - ImageGetCertificateHeader(filehandle.into_param().abi(), certificateindex, certificateheader) + ImageGetCertificateHeader(filehandle.into_param().abi(), certificateindex, certificateheader).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImageGetDigestStream(filehandle: P0, digestlevel: u32, digestfunction: DIGEST_FUNCTION, digesthandle: *const ::core::ffi::c_void) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageGetDigestStream(filehandle: P0, digestlevel: u32, digestfunction: DIGEST_FUNCTION, digesthandle: *const ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageGetDigestStream(filehandle : super::super::super::Foundation:: HANDLE, digestlevel : u32, digestfunction : DIGEST_FUNCTION, digesthandle : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - ImageGetDigestStream(filehandle.into_param().abi(), digestlevel, digestfunction, digesthandle) + ImageGetDigestStream(filehandle.into_param().abi(), digestlevel, digestfunction, digesthandle).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] @@ -610,12 +610,12 @@ pub unsafe fn ImageNtHeader(base: *const ::core::ffi::c_void) -> *mut IMAGE_NT_H #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImageRemoveCertificate(filehandle: P0, index: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn ImageRemoveCertificate(filehandle: P0, index: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ImageRemoveCertificate(filehandle : super::super::super::Foundation:: HANDLE, index : u32) -> super::super::super::Foundation:: BOOL); - ImageRemoveCertificate(filehandle.into_param().abi(), index) + ImageRemoveCertificate(filehandle.into_param().abi(), index).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] @@ -652,9 +652,9 @@ pub unsafe fn ImageRvaToVa(ntheaders: *const IMAGE_NT_HEADERS32, base: *const :: #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn ImageUnload(loadedimage: *mut LOADED_IMAGE) -> super::super::super::Foundation::BOOL { +pub unsafe fn ImageUnload(loadedimage: *mut LOADED_IMAGE) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn ImageUnload(loadedimage : *mut LOADED_IMAGE) -> super::super::super::Foundation:: BOOL); - ImageUnload(loadedimage) + ImageUnload(loadedimage).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -671,16 +671,16 @@ pub unsafe fn ImagehlpApiVersionEx(appversion: *const API_VERSION) -> *mut API_V #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn InitializeContext(buffer: ::core::option::Option<*mut ::core::ffi::c_void>, contextflags: u32, context: *mut *mut CONTEXT, contextlength: *mut u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn InitializeContext(buffer: ::core::option::Option<*mut ::core::ffi::c_void>, contextflags: u32, context: *mut *mut CONTEXT, contextlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeContext(buffer : *mut ::core::ffi::c_void, contextflags : u32, context : *mut *mut CONTEXT, contextlength : *mut u32) -> super::super::super::Foundation:: BOOL); - InitializeContext(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), contextflags, context, contextlength) + InitializeContext(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), contextflags, context, contextlength).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn InitializeContext2(buffer: ::core::option::Option<*mut ::core::ffi::c_void>, contextflags: u32, context: *mut *mut CONTEXT, contextlength: *mut u32, xstatecompactionmask: u64) -> super::super::super::Foundation::BOOL { +pub unsafe fn InitializeContext2(buffer: ::core::option::Option<*mut ::core::ffi::c_void>, contextflags: u32, context: *mut *mut CONTEXT, contextlength: *mut u32, xstatecompactionmask: u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeContext2(buffer : *mut ::core::ffi::c_void, contextflags : u32, context : *mut *mut CONTEXT, contextlength : *mut u32, xstatecompactionmask : u64) -> super::super::super::Foundation:: BOOL); - InitializeContext2(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), contextflags, context, contextlength, xstatecompactionmask) + InitializeContext2(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), contextflags, context, contextlength, xstatecompactionmask).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -700,17 +700,17 @@ pub unsafe fn LocateXStateFeature(context: *const CONTEXT, featureid: u32, lengt #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MakeSureDirectoryPathExists(dirpath: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn MakeSureDirectoryPathExists(dirpath: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn MakeSureDirectoryPathExists(dirpath : ::windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - MakeSureDirectoryPathExists(dirpath.into_param().abi()) + MakeSureDirectoryPathExists(dirpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn MapAndLoad(imagename: P0, dllpath: P1, loadedimage: *mut LOADED_IMAGE, dotdll: P2, readonly: P3) -> super::super::super::Foundation::BOOL +pub unsafe fn MapAndLoad(imagename: P0, dllpath: P1, loadedimage: *mut LOADED_IMAGE, dotdll: P2, readonly: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -718,7 +718,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn MapAndLoad(imagename : ::windows_core::PCSTR, dllpath : ::windows_core::PCSTR, loadedimage : *mut LOADED_IMAGE, dotdll : super::super::super::Foundation:: BOOL, readonly : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - MapAndLoad(imagename.into_param().abi(), dllpath.into_param().abi(), loadedimage, dotdll.into_param().abi(), readonly.into_param().abi()) + MapAndLoad(imagename.into_param().abi(), dllpath.into_param().abi(), loadedimage, dotdll.into_param().abi(), readonly.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -741,9 +741,9 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn MessageBeep(utype: super::super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE) -> super::super::super::Foundation::BOOL { +pub unsafe fn MessageBeep(utype: super::super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn MessageBeep(utype : super::super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE) -> super::super::super::Foundation:: BOOL); - MessageBeep(utype) + MessageBeep(utype).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -755,13 +755,13 @@ pub unsafe fn MiniDumpReadDumpStream(baseofdump: *const ::core::ffi::c_void, str #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_Storage_FileSystem\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_Memory\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Storage_FileSystem", feature = "Win32_System_Kernel", feature = "Win32_System_Memory"))] #[inline] -pub unsafe fn MiniDumpWriteDump(hprocess: P0, processid: u32, hfile: P1, dumptype: MINIDUMP_TYPE, exceptionparam: ::core::option::Option<*const MINIDUMP_EXCEPTION_INFORMATION>, userstreamparam: ::core::option::Option<*const MINIDUMP_USER_STREAM_INFORMATION>, callbackparam: ::core::option::Option<*const MINIDUMP_CALLBACK_INFORMATION>) -> super::super::super::Foundation::BOOL +pub unsafe fn MiniDumpWriteDump(hprocess: P0, processid: u32, hfile: P1, dumptype: MINIDUMP_TYPE, exceptionparam: ::core::option::Option<*const MINIDUMP_EXCEPTION_INFORMATION>, userstreamparam: ::core::option::Option<*const MINIDUMP_USER_STREAM_INFORMATION>, callbackparam: ::core::option::Option<*const MINIDUMP_CALLBACK_INFORMATION>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn MiniDumpWriteDump(hprocess : super::super::super::Foundation:: HANDLE, processid : u32, hfile : super::super::super::Foundation:: HANDLE, dumptype : MINIDUMP_TYPE, exceptionparam : *const MINIDUMP_EXCEPTION_INFORMATION, userstreamparam : *const MINIDUMP_USER_STREAM_INFORMATION, callbackparam : *const MINIDUMP_CALLBACK_INFORMATION) -> super::super::super::Foundation:: BOOL); - MiniDumpWriteDump(hprocess.into_param().abi(), processid, hfile.into_param().abi(), dumptype, ::core::mem::transmute(exceptionparam.unwrap_or(::std::ptr::null())), ::core::mem::transmute(userstreamparam.unwrap_or(::std::ptr::null())), ::core::mem::transmute(callbackparam.unwrap_or(::std::ptr::null()))) + MiniDumpWriteDump(hprocess.into_param().abi(), processid, hfile.into_param().abi(), dumptype, ::core::mem::transmute(exceptionparam.unwrap_or(::std::ptr::null())), ::core::mem::transmute(userstreamparam.unwrap_or(::std::ptr::null())), ::core::mem::transmute(callbackparam.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -847,7 +847,7 @@ pub unsafe fn RangeMapWrite(rmaphandle: *const ::core::ffi::c_void, offset: u64, #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReBaseImage(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut usize, newimagesize: *mut u32, newimagebase: *mut usize, timestamp: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn ReBaseImage(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut usize, newimagesize: *mut u32, newimagebase: *mut usize, timestamp: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -856,12 +856,12 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage(currentimagename : ::windows_core::PCSTR, symbolpath : ::windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut usize, newimagesize : *mut u32, newimagebase : *mut usize, timestamp : u32) -> super::super::super::Foundation:: BOOL); - ReBaseImage(currentimagename.into_param().abi(), symbolpath.into_param().abi(), frebase.into_param().abi(), frebasesysfileok.into_param().abi(), fgoingdown.into_param().abi(), checkimagesize, oldimagesize, oldimagebase, newimagesize, newimagebase, timestamp) + ReBaseImage(currentimagename.into_param().abi(), symbolpath.into_param().abi(), frebase.into_param().abi(), frebasesysfileok.into_param().abi(), fgoingdown.into_param().abi(), checkimagesize, oldimagesize, oldimagebase, newimagesize, newimagebase, timestamp).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReBaseImage64(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut u64, newimagesize: *mut u32, newimagebase: *mut u64, timestamp: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn ReBaseImage64(currentimagename: P0, symbolpath: P1, frebase: P2, frebasesysfileok: P3, fgoingdown: P4, checkimagesize: u32, oldimagesize: *mut u32, oldimagebase: *mut u64, newimagesize: *mut u32, newimagebase: *mut u64, timestamp: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -870,17 +870,17 @@ where P4: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn ReBaseImage64(currentimagename : ::windows_core::PCSTR, symbolpath : ::windows_core::PCSTR, frebase : super::super::super::Foundation:: BOOL, frebasesysfileok : super::super::super::Foundation:: BOOL, fgoingdown : super::super::super::Foundation:: BOOL, checkimagesize : u32, oldimagesize : *mut u32, oldimagebase : *mut u64, newimagesize : *mut u32, newimagebase : *mut u64, timestamp : u32) -> super::super::super::Foundation:: BOOL); - ReBaseImage64(currentimagename.into_param().abi(), symbolpath.into_param().abi(), frebase.into_param().abi(), frebasesysfileok.into_param().abi(), fgoingdown.into_param().abi(), checkimagesize, oldimagesize, oldimagebase, newimagesize, newimagebase, timestamp) + ReBaseImage64(currentimagename.into_param().abi(), symbolpath.into_param().abi(), frebase.into_param().abi(), frebasesysfileok.into_param().abi(), fgoingdown.into_param().abi(), checkimagesize, oldimagesize, oldimagebase, newimagesize, newimagebase, timestamp).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadProcessMemory(hprocess: P0, lpbaseaddress: *const ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, nsize: usize, lpnumberofbytesread: ::core::option::Option<*mut usize>) -> super::super::super::Foundation::BOOL +pub unsafe fn ReadProcessMemory(hprocess: P0, lpbaseaddress: *const ::core::ffi::c_void, lpbuffer: *mut ::core::ffi::c_void, nsize: usize, lpnumberofbytesread: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReadProcessMemory(hprocess : super::super::super::Foundation:: HANDLE, lpbaseaddress : *const ::core::ffi::c_void, lpbuffer : *mut ::core::ffi::c_void, nsize : usize, lpnumberofbytesread : *mut usize) -> super::super::super::Foundation:: BOOL); - ReadProcessMemory(hprocess.into_param().abi(), lpbaseaddress, lpbuffer, nsize, ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut()))) + ReadProcessMemory(hprocess.into_param().abi(), lpbaseaddress, lpbuffer, nsize, ::core::mem::transmute(lpnumberofbytesread.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -1092,24 +1092,24 @@ pub unsafe fn RtlVirtualUnwind(handlertype: RTL_VIRTUAL_UNWIND_HANDLER_TYPE, ima #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SearchTreeForFile(rootpath: P0, inputpathname: P1, outputpathbuffer: ::windows_core::PSTR) -> super::super::super::Foundation::BOOL +pub unsafe fn SearchTreeForFile(rootpath: P0, inputpathname: P1, outputpathbuffer: ::windows_core::PSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SearchTreeForFile(rootpath : ::windows_core::PCSTR, inputpathname : ::windows_core::PCSTR, outputpathbuffer : ::windows_core::PSTR) -> super::super::super::Foundation:: BOOL); - SearchTreeForFile(rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer)) + SearchTreeForFile(rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer)).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SearchTreeForFileW(rootpath: P0, inputpathname: P1, outputpathbuffer: ::windows_core::PWSTR) -> super::super::super::Foundation::BOOL +pub unsafe fn SearchTreeForFileW(rootpath: P0, inputpathname: P1, outputpathbuffer: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SearchTreeForFileW(rootpath : ::windows_core::PCWSTR, inputpathname : ::windows_core::PCWSTR, outputpathbuffer : ::windows_core::PWSTR) -> super::super::super::Foundation:: BOOL); - SearchTreeForFileW(rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer)) + SearchTreeForFileW(rootpath.into_param().abi(), inputpathname.into_param().abi(), ::core::mem::transmute(outputpathbuffer)).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -1127,17 +1127,17 @@ pub unsafe fn SetErrorMode(umode: THREAD_ERROR_MODE) -> u32 { #[cfg(any(target_arch = "aarch64", target_arch = "x86_64"))] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation::BOOL { +pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY64) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn SetImageConfigInformation(loadedimage : *mut LOADED_IMAGE, imageconfiginformation : *const IMAGE_LOAD_CONFIG_DIRECTORY64) -> super::super::super::Foundation:: BOOL); - SetImageConfigInformation(loadedimage, imageconfiginformation) + SetImageConfigInformation(loadedimage, imageconfiginformation).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(target_arch = "x86")] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation::BOOL { +pub unsafe fn SetImageConfigInformation(loadedimage: *mut LOADED_IMAGE, imageconfiginformation: *const IMAGE_LOAD_CONFIG_DIRECTORY32) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn SetImageConfigInformation(loadedimage : *mut LOADED_IMAGE, imageconfiginformation : *const IMAGE_LOAD_CONFIG_DIRECTORY32) -> super::super::super::Foundation:: BOOL); - SetImageConfigInformation(loadedimage, imageconfiginformation) + SetImageConfigInformation(loadedimage, imageconfiginformation).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -1148,19 +1148,19 @@ pub unsafe fn SetSymLoadError(error: u32) { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn SetThreadContext(hthread: P0, lpcontext: *const CONTEXT) -> super::super::super::Foundation::BOOL +pub unsafe fn SetThreadContext(hthread: P0, lpcontext: *const CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *const CONTEXT) -> super::super::super::Foundation:: BOOL); - SetThreadContext(hthread.into_param().abi(), lpcontext) + SetThreadContext(hthread.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadErrorMode(dwnewmode: THREAD_ERROR_MODE, lpoldmode: ::core::option::Option<*mut THREAD_ERROR_MODE>) -> super::super::super::Foundation::BOOL { +pub unsafe fn SetThreadErrorMode(dwnewmode: THREAD_ERROR_MODE, lpoldmode: ::core::option::Option<*mut THREAD_ERROR_MODE>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadErrorMode(dwnewmode : THREAD_ERROR_MODE, lpoldmode : *mut THREAD_ERROR_MODE) -> super::super::super::Foundation:: BOOL); - SetThreadErrorMode(dwnewmode, ::core::mem::transmute(lpoldmode.unwrap_or(::std::ptr::null_mut()))) + SetThreadErrorMode(dwnewmode, ::core::mem::transmute(lpoldmode.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -1214,13 +1214,13 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymAddSourceStream(hprocess: P0, base: u64, streamfile: P1, buffer: ::core::option::Option<&[u8]>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymAddSourceStream(hprocess: P0, base: u64, streamfile: P1, buffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStream(hprocess : super::super::super::Foundation:: HANDLE, base : u64, streamfile : ::windows_core::PCSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStream(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)) + SymAddSourceStream(hprocess.into_param().abi(), base, streamfile.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1236,35 +1236,35 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymAddSourceStreamW(hprocess: P0, base: u64, filespec: P1, buffer: ::core::option::Option<&[u8]>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymAddSourceStreamW(hprocess: P0, base: u64, filespec: P1, buffer: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSourceStreamW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCWSTR, buffer : *const u8, size : usize) -> super::super::super::Foundation:: BOOL); - SymAddSourceStreamW(hprocess.into_param().abi(), base, filespec.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)) + SymAddSourceStreamW(hprocess.into_param().abi(), base, filespec.into_param().abi(), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymAddSymbol(hprocess: P0, baseofdll: u64, name: P1, address: u64, size: u32, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymAddSymbol(hprocess: P0, baseofdll: u64, name: P1, address: u64, size: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSymbol(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCSTR, address : u64, size : u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymAddSymbol(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, size, flags) + SymAddSymbol(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, size, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymAddSymbolW(hprocess: P0, baseofdll: u64, name: P1, address: u64, size: u32, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymAddSymbolW(hprocess: P0, baseofdll: u64, name: P1, address: u64, size: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymAddSymbolW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCWSTR, address : u64, size : u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymAddSymbolW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, size, flags) + SymAddSymbolW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, size, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1279,12 +1279,12 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymCleanup(hprocess: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn SymCleanup(hprocess: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymCleanup(hprocess : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - SymCleanup(hprocess.into_param().abi()) + SymCleanup(hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1299,111 +1299,111 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymDeleteSymbol(hprocess: P0, baseofdll: u64, name: P1, address: u64, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymDeleteSymbol(hprocess: P0, baseofdll: u64, name: P1, address: u64, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymDeleteSymbol(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCSTR, address : u64, flags : u32) -> super::super::super::Foundation:: BOOL); - SymDeleteSymbol(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, flags) + SymDeleteSymbol(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymDeleteSymbolW(hprocess: P0, baseofdll: u64, name: P1, address: u64, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymDeleteSymbolW(hprocess: P0, baseofdll: u64, name: P1, address: u64, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymDeleteSymbolW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCWSTR, address : u64, flags : u32) -> super::super::super::Foundation:: BOOL); - SymDeleteSymbolW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, flags) + SymDeleteSymbolW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), address, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumLines(hprocess: P0, base: u64, obj: P1, file: P2, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumLines(hprocess: P0, base: u64, obj: P1, file: P2, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumLines(hprocess : super::super::super::Foundation:: HANDLE, base : u64, obj : ::windows_core::PCSTR, file : ::windows_core::PCSTR, enumlinescallback : PSYM_ENUMLINES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumLines(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumLines(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumLinesW(hprocess: P0, base: u64, obj: P1, file: P2, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumLinesW(hprocess: P0, base: u64, obj: P1, file: P2, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumLinesW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, obj : ::windows_core::PCWSTR, file : ::windows_core::PCWSTR, enumlinescallback : PSYM_ENUMLINES_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumLinesW(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumLinesW(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBACK, usercontext: *const ::core::ffi::c_void) -> super::super::super::Foundation::BOOL { +pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBACK, usercontext: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumProcesses(enumprocessescallback : PSYM_ENUMPROCESSES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumProcesses(enumprocessescallback, usercontext) + SymEnumProcesses(enumprocessescallback, usercontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSourceFileTokens(hprocess: P0, base: u64, callback: PENUMSOURCEFILETOKENSCALLBACK) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSourceFileTokens(hprocess: P0, base: u64, callback: PENUMSOURCEFILETOKENSCALLBACK) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceFileTokens(hprocess : super::super::super::Foundation:: HANDLE, base : u64, callback : PENUMSOURCEFILETOKENSCALLBACK) -> super::super::super::Foundation:: BOOL); - SymEnumSourceFileTokens(hprocess.into_param().abi(), base, callback) + SymEnumSourceFileTokens(hprocess.into_param().abi(), base, callback).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSourceFiles(hprocess: P0, modbase: u64, mask: P1, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSourceFiles(hprocess: P0, modbase: u64, mask: P1, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceFiles(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, mask : ::windows_core::PCSTR, cbsrcfiles : PSYM_ENUMSOURCEFILES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSourceFiles(hprocess.into_param().abi(), modbase, mask.into_param().abi(), cbsrcfiles, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSourceFiles(hprocess.into_param().abi(), modbase, mask.into_param().abi(), cbsrcfiles, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSourceFilesW(hprocess: P0, modbase: u64, mask: P1, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSourceFilesW(hprocess: P0, modbase: u64, mask: P1, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceFilesW(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, mask : ::windows_core::PCWSTR, cbsrcfiles : PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSourceFilesW(hprocess.into_param().abi(), modbase, mask.into_param().abi(), cbsrcfiles, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSourceFilesW(hprocess.into_param().abi(), modbase, mask.into_param().abi(), cbsrcfiles, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSourceLines(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSourceLines(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceLines(hprocess : super::super::super::Foundation:: HANDLE, base : u64, obj : ::windows_core::PCSTR, file : ::windows_core::PCSTR, line : u32, flags : u32, enumlinescallback : PSYM_ENUMLINES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSourceLines(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), line, flags, enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSourceLines(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), line, flags, enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSourceLinesW(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSourceLinesW(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSourceLinesW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, obj : ::windows_core::PCWSTR, file : ::windows_core::PCWSTR, line : u32, flags : u32, enumlinescallback : PSYM_ENUMLINES_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSourceLinesW(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), line, flags, enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSourceLinesW(hprocess.into_param().abi(), base, obj.into_param().abi(), file.into_param().abi(), line, flags, enumlinescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1418,181 +1418,181 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbols(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbols(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbols(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSymbols(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSymbols(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbolsEx(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbolsEx(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbolsEx(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void, options : u32) -> super::super::super::Foundation:: BOOL); - SymEnumSymbolsEx(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options) + SymEnumSymbolsEx(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbolsExW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbolsExW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbolsExW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCWSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void, options : u32) -> super::super::super::Foundation:: BOOL); - SymEnumSymbolsExW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options) + SymEnumSymbolsExW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbolsForAddr(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbolsForAddr(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbolsForAddr(hprocess : super::super::super::Foundation:: HANDLE, address : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSymbolsForAddr(hprocess.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSymbolsForAddr(hprocess.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbolsForAddrW(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbolsForAddrW(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbolsForAddrW(hprocess : super::super::super::Foundation:: HANDLE, address : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSymbolsForAddrW(hprocess.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSymbolsForAddrW(hprocess.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumSymbolsW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumSymbolsW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumSymbolsW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCWSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSymbolsW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumSymbolsW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumTypes(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumTypes(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumTypes(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumTypes(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumTypes(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumTypesByName(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumTypesByName(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumTypesByName(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumTypesByName(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumTypesByName(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumTypesByNameW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumTypesByNameW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumTypesByNameW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, mask : ::windows_core::PCWSTR, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumTypesByNameW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumTypesByNameW(hprocess.into_param().abi(), baseofdll, mask.into_param().abi(), enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumTypesW(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumTypesW(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumTypesW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumTypesW(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumTypesW(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateModules(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateModules(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateModules(hprocess : super::super::super::Foundation:: HANDLE, enummodulescallback : PSYM_ENUMMODULES_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateModules(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateModules(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateModules64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateModules64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateModules64(hprocess : super::super::super::Foundation:: HANDLE, enummodulescallback : PSYM_ENUMMODULES_CALLBACK64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateModules64(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateModules64(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateModulesW64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateModulesW64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACKW64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateModulesW64(hprocess : super::super::super::Foundation:: HANDLE, enummodulescallback : PSYM_ENUMMODULES_CALLBACKW64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateModulesW64(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateModulesW64(hprocess.into_param().abi(), enummodulescallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateSymbols(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateSymbols(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateSymbols(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u32, enumsymbolscallback : PSYM_ENUMSYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateSymbols(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateSymbols(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateSymbols64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateSymbols64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateSymbols64(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, enumsymbolscallback : PSYM_ENUMSYMBOLS_CALLBACK64, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateSymbols64(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateSymbols64(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateSymbolsW(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateSymbolsW(hprocess: P0, baseofdll: u32, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateSymbolsW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u32, enumsymbolscallback : PSYM_ENUMSYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateSymbolsW(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateSymbolsW(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymEnumerateSymbolsW64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymEnumerateSymbolsW64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymEnumerateSymbolsW64(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, enumsymbolscallback : PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumerateSymbolsW64(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymEnumerateSymbolsW64(hprocess.into_param().abi(), baseofdll, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1645,128 +1645,128 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFindFileInPath(hprocess: P0, searchpatha: P1, filename: P2, id: ::core::option::Option<*const ::core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: ::windows_core::PSTR, callback: PFINDFILEINPATHCALLBACK, context: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFindFileInPath(hprocess: P0, searchpatha: P1, filename: P2, id: ::core::option::Option<*const ::core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: ::windows_core::PSTR, callback: PFINDFILEINPATHCALLBACK, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFindFileInPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PCSTR, filename : ::windows_core::PCSTR, id : *const ::core::ffi::c_void, two : u32, three : u32, flags : SYM_FIND_ID_OPTION, foundfile : ::windows_core::PSTR, callback : PFINDFILEINPATHCALLBACK, context : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymFindFileInPath(hprocess.into_param().abi(), searchpatha.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(id.unwrap_or(::std::ptr::null())), two, three, flags, ::core::mem::transmute(foundfile), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))) + SymFindFileInPath(hprocess.into_param().abi(), searchpatha.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(id.unwrap_or(::std::ptr::null())), two, three, flags, ::core::mem::transmute(foundfile), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFindFileInPathW(hprocess: P0, searchpatha: P1, filename: P2, id: ::core::option::Option<*const ::core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: ::windows_core::PWSTR, callback: PFINDFILEINPATHCALLBACKW, context: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFindFileInPathW(hprocess: P0, searchpatha: P1, filename: P2, id: ::core::option::Option<*const ::core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: ::windows_core::PWSTR, callback: PFINDFILEINPATHCALLBACKW, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFindFileInPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PCWSTR, filename : ::windows_core::PCWSTR, id : *const ::core::ffi::c_void, two : u32, three : u32, flags : SYM_FIND_ID_OPTION, foundfile : ::windows_core::PWSTR, callback : PFINDFILEINPATHCALLBACKW, context : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymFindFileInPathW(hprocess.into_param().abi(), searchpatha.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(id.unwrap_or(::std::ptr::null())), two, three, flags, ::core::mem::transmute(foundfile), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))) + SymFindFileInPathW(hprocess.into_param().abi(), searchpatha.into_param().abi(), filename.into_param().abi(), ::core::mem::transmute(id.unwrap_or(::std::ptr::null())), two, three, flags, ::core::mem::transmute(foundfile), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromAddr(hprocess: P0, address: u64, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromAddr(hprocess: P0, address: u64, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromAddr(hprocess : super::super::super::Foundation:: HANDLE, address : u64, displacement : *mut u64, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromAddr(hprocess.into_param().abi(), address, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymFromAddr(hprocess.into_param().abi(), address, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromAddrW(hprocess: P0, address: u64, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromAddrW(hprocess: P0, address: u64, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromAddrW(hprocess : super::super::super::Foundation:: HANDLE, address : u64, displacement : *mut u64, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromAddrW(hprocess.into_param().abi(), address, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymFromAddrW(hprocess.into_param().abi(), address, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromIndex(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromIndex(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromIndex(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromIndex(hprocess.into_param().abi(), baseofdll, index, symbol) + SymFromIndex(hprocess.into_param().abi(), baseofdll, index, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromIndexW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromIndexW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromIndexW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromIndexW(hprocess.into_param().abi(), baseofdll, index, symbol) + SymFromIndexW(hprocess.into_param().abi(), baseofdll, index, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromInlineContext(hprocess : super::super::super::Foundation:: HANDLE, address : u64, inlinecontext : u32, displacement : *mut u64, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromInlineContext(hprocess.into_param().abi(), address, inlinecontext, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymFromInlineContext(hprocess.into_param().abi(), address, inlinecontext, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromInlineContextW(hprocess: P0, address: u64, inlinecontext: u32, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromInlineContextW(hprocess: P0, address: u64, inlinecontext: u32, displacement: ::core::option::Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromInlineContextW(hprocess : super::super::super::Foundation:: HANDLE, address : u64, inlinecontext : u32, displacement : *mut u64, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromInlineContextW(hprocess.into_param().abi(), address, inlinecontext, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymFromInlineContextW(hprocess.into_param().abi(), address, inlinecontext, ::core::mem::transmute(displacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromName(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromName(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromName(hprocess : super::super::super::Foundation:: HANDLE, name : ::windows_core::PCSTR, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromName(hprocess.into_param().abi(), name.into_param().abi(), symbol) + SymFromName(hprocess.into_param().abi(), name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromNameW(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromNameW(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromNameW(hprocess : super::super::super::Foundation:: HANDLE, name : ::windows_core::PCWSTR, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromNameW(hprocess.into_param().abi(), name.into_param().abi(), symbol) + SymFromNameW(hprocess.into_param().abi(), name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromToken(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromToken(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromToken(hprocess : super::super::super::Foundation:: HANDLE, base : u64, token : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymFromToken(hprocess.into_param().abi(), base, token, symbol) + SymFromToken(hprocess.into_param().abi(), base, token, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymFromTokenW(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymFromTokenW(hprocess: P0, base: u64, token: u32, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, token : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymFromTokenW(hprocess.into_param().abi(), base, token, symbol) + SymFromTokenW(hprocess.into_param().abi(), base, token, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] @@ -1834,151 +1834,151 @@ pub unsafe fn SymGetHomeDirectoryW(r#type: IMAGEHLP_HD_TYPE, dir: &mut [u16]) -> #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINE) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddr(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddr(hprocess.into_param().abi(), dwaddr, pdwdisplacement, line) + SymGetLineFromAddr(hprocess.into_param().abi(), dwaddr, pdwdisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddr64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, pdwdisplacement : *mut u32, line64 : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddr64(hprocess.into_param().abi(), qwaddr, pdwdisplacement, line64) + SymGetLineFromAddr64(hprocess.into_param().abi(), qwaddr, pdwdisplacement, line64).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromAddrW64(hprocess: P0, dwaddr: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromAddrW64(hprocess: P0, dwaddr: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromAddrW64(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u64, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromAddrW64(hprocess.into_param().abi(), dwaddr, pdwdisplacement, line) + SymGetLineFromAddrW64(hprocess.into_param().abi(), dwaddr, pdwdisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromInlineContext(hprocess: P0, qwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromInlineContext(hprocess: P0, qwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line64: *mut IMAGEHLP_LINE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromInlineContext(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, inlinecontext : u32, qwmodulebaseaddress : u64, pdwdisplacement : *mut u32, line64 : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromInlineContext(hprocess.into_param().abi(), qwaddr, inlinecontext, qwmodulebaseaddress, pdwdisplacement, line64) + SymGetLineFromInlineContext(hprocess.into_param().abi(), qwaddr, inlinecontext, qwmodulebaseaddress, pdwdisplacement, line64).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromInlineContextW(hprocess: P0, dwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromInlineContextW(hprocess: P0, dwaddr: u64, inlinecontext: u32, qwmodulebaseaddress: u64, pdwdisplacement: *mut u32, line: *mut IMAGEHLP_LINEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromInlineContextW(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u64, inlinecontext : u32, qwmodulebaseaddress : u64, pdwdisplacement : *mut u32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromInlineContextW(hprocess.into_param().abi(), dwaddr, inlinecontext, qwmodulebaseaddress, pdwdisplacement, line) + SymGetLineFromInlineContextW(hprocess.into_param().abi(), dwaddr, inlinecontext, qwmodulebaseaddress, pdwdisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromName(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromName(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromName(hprocess : super::super::super::Foundation:: HANDLE, modulename : ::windows_core::PCSTR, filename : ::windows_core::PCSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineFromName(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line) + SymGetLineFromName(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromName64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromName64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromName64(hprocess : super::super::super::Foundation:: HANDLE, modulename : ::windows_core::PCSTR, filename : ::windows_core::PCSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromName64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line) + SymGetLineFromName64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineFromNameW64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineFromNameW64(hprocess: P0, modulename: P1, filename: P2, dwlinenumber: u32, pldisplacement: *mut i32, line: *mut IMAGEHLP_LINEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineFromNameW64(hprocess : super::super::super::Foundation:: HANDLE, modulename : ::windows_core::PCWSTR, filename : ::windows_core::PCWSTR, dwlinenumber : u32, pldisplacement : *mut i32, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineFromNameW64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line) + SymGetLineFromNameW64(hprocess.into_param().abi(), modulename.into_param().abi(), filename.into_param().abi(), dwlinenumber, pldisplacement, line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineNext(hprocess: P0, line: *mut IMAGEHLP_LINE) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineNext(hprocess: P0, line: *mut IMAGEHLP_LINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNext(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLineNext(hprocess.into_param().abi(), line) + SymGetLineNext(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineNext64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineNext64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNext64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLineNext64(hprocess.into_param().abi(), line) + SymGetLineNext64(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLineNextW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLineNextW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLineNextW64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLineNextW64(hprocess.into_param().abi(), line) + SymGetLineNextW64(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLinePrev(hprocess: P0, line: *mut IMAGEHLP_LINE) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLinePrev(hprocess: P0, line: *mut IMAGEHLP_LINE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrev(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE) -> super::super::super::Foundation:: BOOL); - SymGetLinePrev(hprocess.into_param().abi(), line) + SymGetLinePrev(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLinePrev64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLinePrev64(hprocess: P0, line: *mut IMAGEHLP_LINE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrev64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINE64) -> super::super::super::Foundation:: BOOL); - SymGetLinePrev64(hprocess.into_param().abi(), line) + SymGetLinePrev64(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetLinePrevW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetLinePrevW64(hprocess: P0, line: *mut IMAGEHLP_LINEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetLinePrevW64(hprocess : super::super::super::Foundation:: HANDLE, line : *mut IMAGEHLP_LINEW64) -> super::super::super::Foundation:: BOOL); - SymGetLinePrevW64(hprocess.into_param().abi(), line) + SymGetLinePrevW64(hprocess.into_param().abi(), line).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] @@ -2005,53 +2005,53 @@ where #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetModuleInfo(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULE) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetModuleInfo(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfo(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, moduleinfo : *mut IMAGEHLP_MODULE) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfo(hprocess.into_param().abi(), dwaddr, moduleinfo) + SymGetModuleInfo(hprocess.into_param().abi(), dwaddr, moduleinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetModuleInfo64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULE64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetModuleInfo64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULE64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfo64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, moduleinfo : *mut IMAGEHLP_MODULE64) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfo64(hprocess.into_param().abi(), qwaddr, moduleinfo) + SymGetModuleInfo64(hprocess.into_param().abi(), qwaddr, moduleinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetModuleInfoW(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULEW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetModuleInfoW(hprocess: P0, dwaddr: u32, moduleinfo: *mut IMAGEHLP_MODULEW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfoW(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, moduleinfo : *mut IMAGEHLP_MODULEW) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfoW(hprocess.into_param().abi(), dwaddr, moduleinfo) + SymGetModuleInfoW(hprocess.into_param().abi(), dwaddr, moduleinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetModuleInfoW64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULEW64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetModuleInfoW64(hprocess: P0, qwaddr: u64, moduleinfo: *mut IMAGEHLP_MODULEW64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetModuleInfoW64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, moduleinfo : *mut IMAGEHLP_MODULEW64) -> super::super::super::Foundation:: BOOL); - SymGetModuleInfoW64(hprocess.into_param().abi(), qwaddr, moduleinfo) + SymGetModuleInfoW64(hprocess.into_param().abi(), qwaddr, moduleinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetOmaps(hprocess: P0, baseofdll: u64, omapto: *mut *mut OMAP, comapto: *mut u64, omapfrom: *mut *mut OMAP, comapfrom: *mut u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetOmaps(hprocess: P0, baseofdll: u64, omapto: *mut *mut OMAP, comapto: *mut u64, omapfrom: *mut *mut OMAP, comapfrom: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetOmaps(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, omapto : *mut *mut OMAP, comapto : *mut u64, omapfrom : *mut *mut OMAP, comapfrom : *mut u64) -> super::super::super::Foundation:: BOOL); - SymGetOmaps(hprocess.into_param().abi(), baseofdll, omapto, comapto, omapfrom, comapfrom) + SymGetOmaps(hprocess.into_param().abi(), baseofdll, omapto, comapto, omapfrom, comapfrom).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -2062,87 +2062,87 @@ pub unsafe fn SymGetOptions() -> u32 { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetScope(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetScope(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetScope(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymGetScope(hprocess.into_param().abi(), baseofdll, index, symbol) + SymGetScope(hprocess.into_param().abi(), baseofdll, index, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetScopeW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetScopeW(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetScopeW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymGetScopeW(hprocess.into_param().abi(), baseofdll, index, symbol) + SymGetScopeW(hprocess.into_param().abi(), baseofdll, index, symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSearchPath(hprocess: P0, searchpatha: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSearchPath(hprocess: P0, searchpatha: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPath(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _) + SymGetSearchPath(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSearchPathW(hprocess: P0, searchpatha: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSearchPathW(hprocess: P0, searchpatha: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSearchPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PWSTR, searchpathlength : u32) -> super::super::super::Foundation:: BOOL); - SymGetSearchPathW(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _) + SymGetSearchPathW(hprocess.into_param().abi(), ::core::mem::transmute(searchpatha.as_ptr()), searchpatha.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFile(hprocess: P0, base: u64, params: P1, filespec: P2, filepath: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFile(hprocess: P0, base: u64, params: P1, filespec: P2, filepath: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFile(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : ::windows_core::PCSTR, filespec : ::windows_core::PCSTR, filepath : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFile(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFile(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileChecksum(hprocess: P0, base: u64, filespec: P1, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileChecksum(hprocess: P0, base: u64, filespec: P1, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksum(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksum(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten) + SymGetSourceFileChecksum(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileChecksumW(hprocess: P0, base: u64, filespec: P1, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileChecksumW(hprocess: P0, base: u64, filespec: P1, pchecksumtype: *mut u32, pchecksum: &mut [u8], pactualbyteswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileChecksumW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCWSTR, pchecksumtype : *mut u32, pchecksum : *mut u8, checksumsize : u32, pactualbyteswritten : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileChecksumW(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten) + SymGetSourceFileChecksumW(hprocess.into_param().abi(), base, filespec.into_param().abi(), pchecksumtype, ::core::mem::transmute(pchecksum.as_ptr()), pchecksum.len() as _, pactualbyteswritten).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileFromToken(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, filepath: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileFromToken(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, filepath: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCSTR, filepath : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFileFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2171,24 +2171,24 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileFromTokenW(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, filepath: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileFromTokenW(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, filepath: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCWSTR, filepath : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFileFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileToken(hprocess: P0, base: u64, filespec: P1, token: *mut *mut ::core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileToken(hprocess: P0, base: u64, filespec: P1, token: *mut *mut ::core::ffi::c_void, size: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileToken(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCSTR, token : *mut *mut ::core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileToken(hprocess.into_param().abi(), base, filespec.into_param().abi(), token, size) + SymGetSourceFileToken(hprocess.into_param().abi(), base, filespec.into_param().abi(), token, size).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2219,201 +2219,201 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileTokenW(hprocess: P0, base: u64, filespec: P1, token: *mut *mut ::core::ffi::c_void, size: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileTokenW(hprocess: P0, base: u64, filespec: P1, token: *mut *mut ::core::ffi::c_void, size: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileTokenW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, filespec : ::windows_core::PCWSTR, token : *mut *mut ::core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileTokenW(hprocess.into_param().abi(), base, filespec.into_param().abi(), token, size) + SymGetSourceFileTokenW(hprocess.into_param().abi(), base, filespec.into_param().abi(), token, size).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceFileW(hprocess: P0, base: u64, params: P1, filespec: P2, filepath: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceFileW(hprocess: P0, base: u64, params: P1, filespec: P2, filepath: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceFileW(hprocess : super::super::super::Foundation:: HANDLE, base : u64, params : ::windows_core::PCWSTR, filespec : ::windows_core::PCWSTR, filepath : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceFileW(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _) + SymGetSourceFileW(hprocess.into_param().abi(), base, params.into_param().abi(), filespec.into_param().abi(), ::core::mem::transmute(filepath.as_ptr()), filepath.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceVarFromToken(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, varname: P2, value: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceVarFromToken(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, varname: P2, value: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromToken(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCSTR, varname : ::windows_core::PCSTR, value : ::windows_core::PSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _) + SymGetSourceVarFromToken(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSourceVarFromTokenW(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, varname: P2, value: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSourceVarFromTokenW(hprocess: P0, token: *const ::core::ffi::c_void, params: P1, varname: P2, value: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSourceVarFromTokenW(hprocess : super::super::super::Foundation:: HANDLE, token : *const ::core::ffi::c_void, params : ::windows_core::PCWSTR, varname : ::windows_core::PCWSTR, value : ::windows_core::PWSTR, size : u32) -> super::super::super::Foundation:: BOOL); - SymGetSourceVarFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _) + SymGetSourceVarFromTokenW(hprocess.into_param().abi(), token, params.into_param().abi(), varname.into_param().abi(), ::core::mem::transmute(value.as_ptr()), value.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: ::core::option::Option<*mut u32>, symbol: *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymFromAddr(hprocess: P0, dwaddr: u32, pdwdisplacement: ::core::option::Option<*mut u32>, symbol: *mut IMAGEHLP_SYMBOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromAddr(hprocess : super::super::super::Foundation:: HANDLE, dwaddr : u32, pdwdisplacement : *mut u32, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymFromAddr(hprocess.into_param().abi(), dwaddr, ::core::mem::transmute(pdwdisplacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymGetSymFromAddr(hprocess.into_param().abi(), dwaddr, ::core::mem::transmute(pdwdisplacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: ::core::option::Option<*mut u64>, symbol: *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: ::core::option::Option<*mut u64>, symbol: *mut IMAGEHLP_SYMBOL64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromAddr64(hprocess : super::super::super::Foundation:: HANDLE, qwaddr : u64, pdwdisplacement : *mut u64, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymFromAddr64(hprocess.into_param().abi(), qwaddr, ::core::mem::transmute(pdwdisplacement.unwrap_or(::std::ptr::null_mut())), symbol) + SymGetSymFromAddr64(hprocess.into_param().abi(), qwaddr, ::core::mem::transmute(pdwdisplacement.unwrap_or(::std::ptr::null_mut())), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymFromName(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymFromName(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromName(hprocess : super::super::super::Foundation:: HANDLE, name : ::windows_core::PCSTR, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymFromName(hprocess.into_param().abi(), name.into_param().abi(), symbol) + SymGetSymFromName(hprocess.into_param().abi(), name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymFromName64(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymFromName64(hprocess: P0, name: P1, symbol: *mut IMAGEHLP_SYMBOL64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymFromName64(hprocess : super::super::super::Foundation:: HANDLE, name : ::windows_core::PCSTR, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymFromName64(hprocess.into_param().abi(), name.into_param().abi(), symbol) + SymGetSymFromName64(hprocess.into_param().abi(), name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymNext(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymNext(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymNext(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymNext(hprocess.into_param().abi(), symbol) + SymGetSymNext(hprocess.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymNext64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymNext64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymNext64(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymNext64(hprocess.into_param().abi(), symbol) + SymGetSymNext64(hprocess.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymPrev(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymPrev(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymPrev(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL) -> super::super::super::Foundation:: BOOL); - SymGetSymPrev(hprocess.into_param().abi(), symbol) + SymGetSymPrev(hprocess.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymPrev64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymPrev64(hprocess: P0, symbol: *mut IMAGEHLP_SYMBOL64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymPrev64(hprocess : super::super::super::Foundation:: HANDLE, symbol : *mut IMAGEHLP_SYMBOL64) -> super::super::super::Foundation:: BOOL); - SymGetSymPrev64(hprocess.into_param().abi(), symbol) + SymGetSymPrev64(hprocess.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymbolFile(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u8], dbgfile: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymbolFile(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u8], dbgfile: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFile(hprocess : super::super::super::Foundation:: HANDLE, sympath : ::windows_core::PCSTR, imagefile : ::windows_core::PCSTR, r#type : IMAGEHLP_SF_TYPE, symbolfile : ::windows_core::PSTR, csymbolfile : usize, dbgfile : ::windows_core::PSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFile(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _) + SymGetSymbolFile(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetSymbolFileW(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u16], dbgfile: &mut [u16]) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetSymbolFileW(hprocess: P0, sympath: P1, imagefile: P2, r#type: IMAGEHLP_SF_TYPE, symbolfile: &mut [u16], dbgfile: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetSymbolFileW(hprocess : super::super::super::Foundation:: HANDLE, sympath : ::windows_core::PCWSTR, imagefile : ::windows_core::PCWSTR, r#type : IMAGEHLP_SF_TYPE, symbolfile : ::windows_core::PWSTR, csymbolfile : usize, dbgfile : ::windows_core::PWSTR, cdbgfile : usize) -> super::super::super::Foundation:: BOOL); - SymGetSymbolFileW(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _) + SymGetSymbolFileW(hprocess.into_param().abi(), sympath.into_param().abi(), imagefile.into_param().abi(), r#type, ::core::mem::transmute(symbolfile.as_ptr()), symbolfile.len() as _, ::core::mem::transmute(dbgfile.as_ptr()), dbgfile.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetTypeFromName(hprocess: P0, baseofdll: u64, name: P1, symbol: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetTypeFromName(hprocess: P0, baseofdll: u64, name: P1, symbol: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeFromName(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCSTR, symbol : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymGetTypeFromName(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), symbol) + SymGetTypeFromName(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetTypeFromNameW(hprocess: P0, baseofdll: u64, name: P1, symbol: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetTypeFromNameW(hprocess: P0, baseofdll: u64, name: P1, symbol: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeFromNameW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, name : ::windows_core::PCWSTR, symbol : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymGetTypeFromNameW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), symbol) + SymGetTypeFromNameW(hprocess.into_param().abi(), baseofdll, name.into_param().abi(), symbol).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetTypeInfo(hprocess: P0, modbase: u64, typeid: u32, gettype: IMAGEHLP_SYMBOL_TYPE_INFO, pinfo: *mut ::core::ffi::c_void) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetTypeInfo(hprocess: P0, modbase: u64, typeid: u32, gettype: IMAGEHLP_SYMBOL_TYPE_INFO, pinfo: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeInfo(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, typeid : u32, gettype : IMAGEHLP_SYMBOL_TYPE_INFO, pinfo : *mut ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymGetTypeInfo(hprocess.into_param().abi(), modbase, typeid, gettype, pinfo) + SymGetTypeInfo(hprocess.into_param().abi(), modbase, typeid, gettype, pinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymGetTypeInfoEx(hprocess: P0, modbase: u64, params: *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> super::super::super::Foundation::BOOL +pub unsafe fn SymGetTypeInfoEx(hprocess: P0, modbase: u64, params: *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymGetTypeInfoEx(hprocess : super::super::super::Foundation:: HANDLE, modbase : u64, params : *mut IMAGEHLP_GET_TYPE_INFO_PARAMS) -> super::super::super::Foundation:: BOOL); - SymGetTypeInfoEx(hprocess.into_param().abi(), modbase, params) + SymGetTypeInfoEx(hprocess.into_param().abi(), modbase, params).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2428,26 +2428,26 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymInitialize(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn SymInitialize(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymInitialize(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : ::windows_core::PCSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitialize(hprocess.into_param().abi(), usersearchpath.into_param().abi(), finvadeprocess.into_param().abi()) + SymInitialize(hprocess.into_param().abi(), usersearchpath.into_param().abi(), finvadeprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymInitializeW(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn SymInitializeW(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymInitializeW(hprocess : super::super::super::Foundation:: HANDLE, usersearchpath : ::windows_core::PCWSTR, finvadeprocess : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymInitializeW(hprocess.into_param().abi(), usersearchpath.into_param().abi(), finvadeprocess.into_param().abi()) + SymInitializeW(hprocess.into_param().abi(), usersearchpath.into_param().abi(), finvadeprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] @@ -2505,36 +2505,36 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymMatchFileName(filename: P0, r#match: P1, filenamestop: ::core::option::Option<*mut ::windows_core::PSTR>, matchstop: ::core::option::Option<*mut ::windows_core::PSTR>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymMatchFileName(filename: P0, r#match: P1, filenamestop: ::core::option::Option<*mut ::windows_core::PSTR>, matchstop: ::core::option::Option<*mut ::windows_core::PSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymMatchFileName(filename : ::windows_core::PCSTR, r#match : ::windows_core::PCSTR, filenamestop : *mut ::windows_core::PSTR, matchstop : *mut ::windows_core::PSTR) -> super::super::super::Foundation:: BOOL); - SymMatchFileName(filename.into_param().abi(), r#match.into_param().abi(), ::core::mem::transmute(filenamestop.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(matchstop.unwrap_or(::std::ptr::null_mut()))) + SymMatchFileName(filename.into_param().abi(), r#match.into_param().abi(), ::core::mem::transmute(filenamestop.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(matchstop.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymMatchFileNameW(filename: P0, r#match: P1, filenamestop: ::core::option::Option<*mut ::windows_core::PWSTR>, matchstop: ::core::option::Option<*mut ::windows_core::PWSTR>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymMatchFileNameW(filename: P0, r#match: P1, filenamestop: ::core::option::Option<*mut ::windows_core::PWSTR>, matchstop: ::core::option::Option<*mut ::windows_core::PWSTR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymMatchFileNameW(filename : ::windows_core::PCWSTR, r#match : ::windows_core::PCWSTR, filenamestop : *mut ::windows_core::PWSTR, matchstop : *mut ::windows_core::PWSTR) -> super::super::super::Foundation:: BOOL); - SymMatchFileNameW(filename.into_param().abi(), r#match.into_param().abi(), ::core::mem::transmute(filenamestop.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(matchstop.unwrap_or(::std::ptr::null_mut()))) + SymMatchFileNameW(filename.into_param().abi(), r#match.into_param().abi(), ::core::mem::transmute(filenamestop.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(matchstop.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymMatchString(string : ::windows_core::PCSTR, expression : ::windows_core::PCSTR, fcase : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymMatchString(string.into_param().abi(), expression.into_param().abi(), fcase.into_param().abi()) + SymMatchString(string.into_param().abi(), expression.into_param().abi(), fcase.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2551,158 +2551,158 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymMatchStringW(string: P0, expression: P1, fcase: P2) -> super::super::super::Foundation::BOOL +pub unsafe fn SymMatchStringW(string: P0, expression: P1, fcase: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymMatchStringW(string : ::windows_core::PCWSTR, expression : ::windows_core::PCWSTR, fcase : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - SymMatchStringW(string.into_param().abi(), expression.into_param().abi(), fcase.into_param().abi()) + SymMatchStringW(string.into_param().abi(), expression.into_param().abi(), fcase.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymNext(hprocess: P0, si: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymNext(hprocess: P0, si: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymNext(hprocess : super::super::super::Foundation:: HANDLE, si : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymNext(hprocess.into_param().abi(), si) + SymNext(hprocess.into_param().abi(), si).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymNextW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymNextW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymNextW(hprocess : super::super::super::Foundation:: HANDLE, siw : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymNextW(hprocess.into_param().abi(), siw) + SymNextW(hprocess.into_param().abi(), siw).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymPrev(hprocess: P0, si: *mut SYMBOL_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn SymPrev(hprocess: P0, si: *mut SYMBOL_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymPrev(hprocess : super::super::super::Foundation:: HANDLE, si : *mut SYMBOL_INFO) -> super::super::super::Foundation:: BOOL); - SymPrev(hprocess.into_param().abi(), si) + SymPrev(hprocess.into_param().abi(), si).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymPrevW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> super::super::super::Foundation::BOOL +pub unsafe fn SymPrevW(hprocess: P0, siw: *mut SYMBOL_INFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymPrevW(hprocess : super::super::super::Foundation:: HANDLE, siw : *mut SYMBOL_INFOW) -> super::super::super::Foundation:: BOOL); - SymPrevW(hprocess.into_param().abi(), siw) + SymPrevW(hprocess.into_param().abi(), siw).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymQueryInlineTrace(hprocess: P0, startaddress: u64, startcontext: u32, startretaddress: u64, curaddress: u64, curcontext: *mut u32, curframeindex: *mut u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymQueryInlineTrace(hprocess: P0, startaddress: u64, startcontext: u32, startretaddress: u64, curaddress: u64, curcontext: *mut u32, curframeindex: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymQueryInlineTrace(hprocess : super::super::super::Foundation:: HANDLE, startaddress : u64, startcontext : u32, startretaddress : u64, curaddress : u64, curcontext : *mut u32, curframeindex : *mut u32) -> super::super::super::Foundation:: BOOL); - SymQueryInlineTrace(hprocess.into_param().abi(), startaddress, startcontext, startretaddress, curaddress, curcontext, curframeindex) + SymQueryInlineTrace(hprocess.into_param().abi(), startaddress, startcontext, startretaddress, curaddress, curcontext, curframeindex).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRefreshModuleList(hprocess: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRefreshModuleList(hprocess: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRefreshModuleList(hprocess : super::super::super::Foundation:: HANDLE) -> super::super::super::Foundation:: BOOL); - SymRefreshModuleList(hprocess.into_param().abi()) + SymRefreshModuleList(hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRegisterCallback(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRegisterCallback(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRegisterCallback(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_REGISTERED_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymRegisterCallback(hprocess.into_param().abi(), callbackfunction, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymRegisterCallback(hprocess.into_param().abi(), callbackfunction, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRegisterCallback64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRegisterCallback64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRegisterCallback64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_REGISTERED_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterCallback64(hprocess.into_param().abi(), callbackfunction, usercontext) + SymRegisterCallback64(hprocess.into_param().abi(), callbackfunction, usercontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRegisterCallbackW64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRegisterCallbackW64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRegisterCallbackW64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_REGISTERED_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterCallbackW64(hprocess.into_param().abi(), callbackfunction, usercontext) + SymRegisterCallbackW64(hprocess.into_param().abi(), callbackfunction, usercontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRegisterFunctionEntryCallback(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRegisterFunctionEntryCallback(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRegisterFunctionEntryCallback(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_FUNCENTRY_CALLBACK, usercontext : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymRegisterFunctionEntryCallback(hprocess.into_param().abi(), callbackfunction, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))) + SymRegisterFunctionEntryCallback(hprocess.into_param().abi(), callbackfunction, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymRegisterFunctionEntryCallback64(hprocess : super::super::super::Foundation:: HANDLE, callbackfunction : PSYMBOL_FUNCENTRY_CALLBACK64, usercontext : u64) -> super::super::super::Foundation:: BOOL); - SymRegisterFunctionEntryCallback64(hprocess.into_param().abi(), callbackfunction, usercontext) + SymRegisterFunctionEntryCallback64(hprocess.into_param().abi(), callbackfunction, usercontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSearch(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P1, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSearch(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P1, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSearch(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symtag : u32, mask : ::windows_core::PCSTR, address : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const ::core::ffi::c_void, options : u32) -> super::super::super::Foundation:: BOOL); - SymSearch(hprocess.into_param().abi(), baseofdll, index, symtag, mask.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options) + SymSearch(hprocess.into_param().abi(), baseofdll, index, symtag, mask.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSearchW(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P1, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSearchW(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P1, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: ::core::option::Option<*const ::core::ffi::c_void>, options: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSearchW(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32, symtag : u32, mask : ::windows_core::PCWSTR, address : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext : *const ::core::ffi::c_void, options : u32) -> super::super::super::Foundation:: BOOL); - SymSearchW(hprocess.into_param().abi(), baseofdll, index, symtag, mask.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options) + SymSearchW(hprocess.into_param().abi(), baseofdll, index, symtag, mask.into_param().abi(), address, enumsymbolscallback, ::core::mem::transmute(usercontext.unwrap_or(::std::ptr::null())), options).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetContext(hprocess: P0, stackframe: *const IMAGEHLP_STACK_FRAME, context: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetContext(hprocess: P0, stackframe: *const IMAGEHLP_STACK_FRAME, context: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetContext(hprocess : super::super::super::Foundation:: HANDLE, stackframe : *const IMAGEHLP_STACK_FRAME, context : *const ::core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymSetContext(hprocess.into_param().abi(), stackframe, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))) + SymSetContext(hprocess.into_param().abi(), stackframe, ::core::mem::transmute(context.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2745,64 +2745,64 @@ pub unsafe fn SymSetOptions(symoptions: u32) -> u32 { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetParentWindow(hwnd: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetParentWindow(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetParentWindow(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - SymSetParentWindow(hwnd.into_param().abi()) + SymSetParentWindow(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetScopeFromAddr(hprocess: P0, address: u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetScopeFromAddr(hprocess: P0, address: u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromAddr(hprocess : super::super::super::Foundation:: HANDLE, address : u64) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromAddr(hprocess.into_param().abi(), address) + SymSetScopeFromAddr(hprocess.into_param().abi(), address).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetScopeFromIndex(hprocess: P0, baseofdll: u64, index: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetScopeFromIndex(hprocess: P0, baseofdll: u64, index: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromIndex(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, index : u32) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromIndex(hprocess.into_param().abi(), baseofdll, index) + SymSetScopeFromIndex(hprocess.into_param().abi(), baseofdll, index).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetScopeFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetScopeFromInlineContext(hprocess: P0, address: u64, inlinecontext: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetScopeFromInlineContext(hprocess : super::super::super::Foundation:: HANDLE, address : u64, inlinecontext : u32) -> super::super::super::Foundation:: BOOL); - SymSetScopeFromInlineContext(hprocess.into_param().abi(), address, inlinecontext) + SymSetScopeFromInlineContext(hprocess.into_param().abi(), address, inlinecontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetSearchPath(hprocess: P0, searchpatha: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetSearchPath(hprocess: P0, searchpatha: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetSearchPath(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - SymSetSearchPath(hprocess.into_param().abi(), searchpatha.into_param().abi()) + SymSetSearchPath(hprocess.into_param().abi(), searchpatha.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSetSearchPathW(hprocess: P0, searchpatha: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSetSearchPathW(hprocess: P0, searchpatha: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSetSearchPathW(hprocess : super::super::super::Foundation:: HANDLE, searchpatha : ::windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - SymSetSearchPathW(hprocess.into_param().abi(), searchpatha.into_param().abi()) + SymSetSearchPathW(hprocess.into_param().abi(), searchpatha.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2835,66 +2835,66 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexInfo(file: P0, info: *mut SYMSRV_INDEX_INFO, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexInfo(file: P0, info: *mut SYMSRV_INDEX_INFO, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexInfo(file : ::windows_core::PCSTR, info : *mut SYMSRV_INDEX_INFO, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexInfo(file.into_param().abi(), info, flags) + SymSrvGetFileIndexInfo(file.into_param().abi(), info, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexInfoW(file: P0, info: *mut SYMSRV_INDEX_INFOW, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexInfoW(file: P0, info: *mut SYMSRV_INDEX_INFOW, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexInfoW(file : ::windows_core::PCWSTR, info : *mut SYMSRV_INDEX_INFOW, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexInfoW(file.into_param().abi(), info, flags) + SymSrvGetFileIndexInfoW(file.into_param().abi(), info, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexString(hprocess: P0, srvpath: P1, file: P2, index: &mut [u8], flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexString(hprocess: P0, srvpath: P1, file: P2, index: &mut [u8], flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexString(hprocess : super::super::super::Foundation:: HANDLE, srvpath : ::windows_core::PCSTR, file : ::windows_core::PCSTR, index : ::windows_core::PSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexString(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags) + SymSrvGetFileIndexString(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexStringW(hprocess: P0, srvpath: P1, file: P2, index: &mut [u16], flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexStringW(hprocess: P0, srvpath: P1, file: P2, index: &mut [u16], flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexStringW(hprocess : super::super::super::Foundation:: HANDLE, srvpath : ::windows_core::PCWSTR, file : ::windows_core::PCWSTR, index : ::windows_core::PWSTR, size : usize, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexStringW(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags) + SymSrvGetFileIndexStringW(hprocess.into_param().abi(), srvpath.into_param().abi(), file.into_param().abi(), ::core::mem::transmute(index.as_ptr()), index.len() as _, flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexes(file: P0, id: *mut ::windows_core::GUID, val1: *mut u32, val2: ::core::option::Option<*mut u32>, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexes(file: P0, id: *mut ::windows_core::GUID, val1: *mut u32, val2: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexes(file : ::windows_core::PCSTR, id : *mut ::windows_core::GUID, val1 : *mut u32, val2 : *mut u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexes(file.into_param().abi(), id, val1, ::core::mem::transmute(val2.unwrap_or(::std::ptr::null_mut())), flags) + SymSrvGetFileIndexes(file.into_param().abi(), id, val1, ::core::mem::transmute(val2.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvGetFileIndexesW(file: P0, id: *mut ::windows_core::GUID, val1: *mut u32, val2: ::core::option::Option<*mut u32>, flags: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvGetFileIndexesW(file: P0, id: *mut ::windows_core::GUID, val1: *mut u32, val2: ::core::option::Option<*mut u32>, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvGetFileIndexesW(file : ::windows_core::PCWSTR, id : *mut ::windows_core::GUID, val1 : *mut u32, val2 : *mut u32, flags : u32) -> super::super::super::Foundation:: BOOL); - SymSrvGetFileIndexesW(file.into_param().abi(), id, val1, ::core::mem::transmute(val2.unwrap_or(::std::ptr::null_mut())), flags) + SymSrvGetFileIndexesW(file.into_param().abi(), id, val1, ::core::mem::transmute(val2.unwrap_or(::std::ptr::null_mut())), flags).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2925,24 +2925,24 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvIsStore(hprocess: P0, path: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvIsStore(hprocess: P0, path: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvIsStore(hprocess : super::super::super::Foundation:: HANDLE, path : ::windows_core::PCSTR) -> super::super::super::Foundation:: BOOL); - SymSrvIsStore(hprocess.into_param().abi(), path.into_param().abi()) + SymSrvIsStore(hprocess.into_param().abi(), path.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymSrvIsStoreW(hprocess: P0, path: P1) -> super::super::super::Foundation::BOOL +pub unsafe fn SymSrvIsStoreW(hprocess: P0, path: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("dbghelp.dll" "system" fn SymSrvIsStoreW(hprocess : super::super::super::Foundation:: HANDLE, path : ::windows_core::PCWSTR) -> super::super::super::Foundation:: BOOL); - SymSrvIsStoreW(hprocess.into_param().abi(), path.into_param().abi()) + SymSrvIsStoreW(hprocess.into_param().abi(), path.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2998,37 +2998,37 @@ where #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymUnDName(sym: *const IMAGEHLP_SYMBOL, undecname: &mut [u8]) -> super::super::super::Foundation::BOOL { +pub unsafe fn SymUnDName(sym: *const IMAGEHLP_SYMBOL, undecname: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnDName(sym : *const IMAGEHLP_SYMBOL, undecname : ::windows_core::PSTR, undecnamelength : u32) -> super::super::super::Foundation:: BOOL); - SymUnDName(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _) + SymUnDName(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymUnDName64(sym: *const IMAGEHLP_SYMBOL64, undecname: &mut [u8]) -> super::super::super::Foundation::BOOL { +pub unsafe fn SymUnDName64(sym: *const IMAGEHLP_SYMBOL64, undecname: &mut [u8]) -> ::windows_core::Result<()> { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnDName64(sym : *const IMAGEHLP_SYMBOL64, undecname : ::windows_core::PSTR, undecnamelength : u32) -> super::super::super::Foundation:: BOOL); - SymUnDName64(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _) + SymUnDName64(sym, ::core::mem::transmute(undecname.as_ptr()), undecname.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymUnloadModule(hprocess: P0, baseofdll: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SymUnloadModule(hprocess: P0, baseofdll: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnloadModule(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u32) -> super::super::super::Foundation:: BOOL); - SymUnloadModule(hprocess.into_param().abi(), baseofdll) + SymUnloadModule(hprocess.into_param().abi(), baseofdll).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SymUnloadModule64(hprocess: P0, baseofdll: u64) -> super::super::super::Foundation::BOOL +pub unsafe fn SymUnloadModule64(hprocess: P0, baseofdll: u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("dbghelp.dll" "system" fn SymUnloadModule64(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64) -> super::super::super::Foundation:: BOOL); - SymUnloadModule64(hprocess.into_param().abi(), baseofdll) + SymUnloadModule64(hprocess.into_param().abi(), baseofdll).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -3039,12 +3039,12 @@ pub unsafe fn TerminateProcessOnMemoryExhaustion(failedallocationsize: usize) { #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TouchFileTimes(filehandle: P0, psystemtime: ::core::option::Option<*const super::super::super::Foundation::SYSTEMTIME>) -> super::super::super::Foundation::BOOL +pub unsafe fn TouchFileTimes(filehandle: P0, psystemtime: ::core::option::Option<*const super::super::super::Foundation::SYSTEMTIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("imagehlp.dll" "system" fn TouchFileTimes(filehandle : super::super::super::Foundation:: HANDLE, psystemtime : *const super::super::super::Foundation:: SYSTEMTIME) -> super::super::super::Foundation:: BOOL); - TouchFileTimes(filehandle.into_param().abi(), ::core::mem::transmute(psystemtime.unwrap_or(::std::ptr::null()))) + TouchFileTimes(filehandle.into_param().abi(), ::core::mem::transmute(psystemtime.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[inline] @@ -3067,9 +3067,9 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn UnMapAndLoad(loadedimage: *mut LOADED_IMAGE) -> super::super::super::Foundation::BOOL { +pub unsafe fn UnMapAndLoad(loadedimage: *mut LOADED_IMAGE) -> ::windows_core::Result<()> { ::windows_targets::link!("imagehlp.dll" "system" fn UnMapAndLoad(loadedimage : *mut LOADED_IMAGE) -> super::super::super::Foundation:: BOOL); - UnMapAndLoad(loadedimage) + UnMapAndLoad(loadedimage).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -3081,13 +3081,13 @@ pub unsafe fn UnhandledExceptionFilter(exceptioninfo: *const EXCEPTION_POINTERS) #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn UpdateDebugInfoFile(imagefilename: P0, symbolpath: P1, debugfilepath: ::windows_core::PSTR, ntheaders: *const IMAGE_NT_HEADERS32) -> super::super::super::Foundation::BOOL +pub unsafe fn UpdateDebugInfoFile(imagefilename: P0, symbolpath: P1, debugfilepath: ::windows_core::PSTR, ntheaders: *const IMAGE_NT_HEADERS32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("imagehlp.dll" "system" fn UpdateDebugInfoFile(imagefilename : ::windows_core::PCSTR, symbolpath : ::windows_core::PCSTR, debugfilepath : ::windows_core::PSTR, ntheaders : *const IMAGE_NT_HEADERS32) -> super::super::super::Foundation:: BOOL); - UpdateDebugInfoFile(imagefilename.into_param().abi(), symbolpath.into_param().abi(), ::core::mem::transmute(debugfilepath), ntheaders) + UpdateDebugInfoFile(imagefilename.into_param().abi(), symbolpath.into_param().abi(), ::core::mem::transmute(debugfilepath), ntheaders).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -3103,56 +3103,56 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn WaitForDebugEvent(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn WaitForDebugEvent(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn WaitForDebugEvent(lpdebugevent : *mut DEBUG_EVENT, dwmilliseconds : u32) -> super::super::super::Foundation:: BOOL); - WaitForDebugEvent(lpdebugevent, dwmilliseconds) + WaitForDebugEvent(lpdebugevent, dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn WaitForDebugEventEx(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn WaitForDebugEventEx(lpdebugevent: *mut DEBUG_EVENT, dwmilliseconds: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn WaitForDebugEventEx(lpdebugevent : *mut DEBUG_EVENT, dwmilliseconds : u32) -> super::super::super::Foundation:: BOOL); - WaitForDebugEventEx(lpdebugevent, dwmilliseconds) + WaitForDebugEventEx(lpdebugevent, dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Wow64GetThreadContext(hthread: P0, lpcontext: *mut WOW64_CONTEXT) -> super::super::super::Foundation::BOOL +pub unsafe fn Wow64GetThreadContext(hthread: P0, lpcontext: *mut WOW64_CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Wow64GetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *mut WOW64_CONTEXT) -> super::super::super::Foundation:: BOOL); - Wow64GetThreadContext(hthread.into_param().abi(), lpcontext) + Wow64GetThreadContext(hthread.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Wow64GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut WOW64_LDT_ENTRY) -> super::super::super::Foundation::BOOL +pub unsafe fn Wow64GetThreadSelectorEntry(hthread: P0, dwselector: u32, lpselectorentry: *mut WOW64_LDT_ENTRY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Wow64GetThreadSelectorEntry(hthread : super::super::super::Foundation:: HANDLE, dwselector : u32, lpselectorentry : *mut WOW64_LDT_ENTRY) -> super::super::super::Foundation:: BOOL); - Wow64GetThreadSelectorEntry(hthread.into_param().abi(), dwselector, lpselectorentry) + Wow64GetThreadSelectorEntry(hthread.into_param().abi(), dwselector, lpselectorentry).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Wow64SetThreadContext(hthread: P0, lpcontext: *const WOW64_CONTEXT) -> super::super::super::Foundation::BOOL +pub unsafe fn Wow64SetThreadContext(hthread: P0, lpcontext: *const WOW64_CONTEXT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Wow64SetThreadContext(hthread : super::super::super::Foundation:: HANDLE, lpcontext : *const WOW64_CONTEXT) -> super::super::super::Foundation:: BOOL); - Wow64SetThreadContext(hthread.into_param().abi(), lpcontext) + Wow64SetThreadContext(hthread.into_param().abi(), lpcontext).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteProcessMemory(hprocess: P0, lpbaseaddress: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, nsize: usize, lpnumberofbyteswritten: ::core::option::Option<*mut usize>) -> super::super::super::Foundation::BOOL +pub unsafe fn WriteProcessMemory(hprocess: P0, lpbaseaddress: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, nsize: usize, lpnumberofbyteswritten: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WriteProcessMemory(hprocess : super::super::super::Foundation:: HANDLE, lpbaseaddress : *const ::core::ffi::c_void, lpbuffer : *const ::core::ffi::c_void, nsize : usize, lpnumberofbyteswritten : *mut usize) -> super::super::super::Foundation:: BOOL); - WriteProcessMemory(hprocess.into_param().abi(), lpbaseaddress, lpbuffer, nsize, ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut()))) + WriteProcessMemory(hprocess.into_param().abi(), lpbaseaddress, lpbuffer, nsize, ::core::mem::transmute(lpnumberofbyteswritten.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Debug\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs index ee8d68c997..45657fbcc5 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Etw/mod.rs @@ -1,44 +1,44 @@ #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseTrace(tracehandle: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn CloseTrace(tracehandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CloseTrace(tracehandle : PROCESSTRACE_HANDLE) -> super::super::super::Foundation:: WIN32_ERROR); - CloseTrace(tracehandle.into_param().abi()) + CloseTrace(tracehandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ControlTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn ControlTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ControlTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES, controlcode : EVENT_TRACE_CONTROL) -> super::super::super::Foundation:: WIN32_ERROR); - ControlTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties, controlcode) + ControlTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties, controlcode).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ControlTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn ControlTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES, controlcode: EVENT_TRACE_CONTROL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ControlTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES, controlcode : EVENT_TRACE_CONTROL) -> super::super::super::Foundation:: WIN32_ERROR); - ControlTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties, controlcode) + ControlTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties, controlcode).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateTraceInstanceId(reghandle: P0, instinfo: *mut EVENT_INSTANCE_INFO) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn CreateTraceInstanceId(reghandle: P0, instinfo: *mut EVENT_INSTANCE_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CreateTraceInstanceId(reghandle : super::super::super::Foundation:: HANDLE, instinfo : *mut EVENT_INSTANCE_INFO) -> super::super::super::Foundation:: WIN32_ERROR); - CreateTraceInstanceId(reghandle.into_param().abi(), instinfo) + CreateTraceInstanceId(reghandle.into_param().abi(), instinfo).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`*"] #[inline] @@ -53,46 +53,46 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnableTrace(enable: u32, enableflag: u32, enablelevel: u32, controlguid: *const ::windows_core::GUID, tracehandle: P0) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn EnableTrace(enable: u32, enableflag: u32, enablelevel: u32, controlguid: *const ::windows_core::GUID, tracehandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnableTrace(enable : u32, enableflag : u32, enablelevel : u32, controlguid : *const ::windows_core::GUID, tracehandle : CONTROLTRACE_HANDLE) -> super::super::super::Foundation:: WIN32_ERROR); - EnableTrace(enable, enableflag, enablelevel, controlguid, tracehandle.into_param().abi()) + EnableTrace(enable, enableflag, enablelevel, controlguid, tracehandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnableTraceEx(providerid: *const ::windows_core::GUID, sourceid: ::core::option::Option<*const ::windows_core::GUID>, tracehandle: P0, isenabled: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, enableproperty: u32, enablefilterdesc: ::core::option::Option<*const EVENT_FILTER_DESCRIPTOR>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn EnableTraceEx(providerid: *const ::windows_core::GUID, sourceid: ::core::option::Option<*const ::windows_core::GUID>, tracehandle: P0, isenabled: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, enableproperty: u32, enablefilterdesc: ::core::option::Option<*const EVENT_FILTER_DESCRIPTOR>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnableTraceEx(providerid : *const ::windows_core::GUID, sourceid : *const ::windows_core::GUID, tracehandle : CONTROLTRACE_HANDLE, isenabled : u32, level : u8, matchanykeyword : u64, matchallkeyword : u64, enableproperty : u32, enablefilterdesc : *const EVENT_FILTER_DESCRIPTOR) -> super::super::super::Foundation:: WIN32_ERROR); - EnableTraceEx(providerid, ::core::mem::transmute(sourceid.unwrap_or(::std::ptr::null())), tracehandle.into_param().abi(), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, ::core::mem::transmute(enablefilterdesc.unwrap_or(::std::ptr::null()))) + EnableTraceEx(providerid, ::core::mem::transmute(sourceid.unwrap_or(::std::ptr::null())), tracehandle.into_param().abi(), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, ::core::mem::transmute(enablefilterdesc.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnableTraceEx2(tracehandle: P0, providerid: *const ::windows_core::GUID, controlcode: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, timeout: u32, enableparameters: ::core::option::Option<*const ENABLE_TRACE_PARAMETERS>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn EnableTraceEx2(tracehandle: P0, providerid: *const ::windows_core::GUID, controlcode: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, timeout: u32, enableparameters: ::core::option::Option<*const ENABLE_TRACE_PARAMETERS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnableTraceEx2(tracehandle : CONTROLTRACE_HANDLE, providerid : *const ::windows_core::GUID, controlcode : u32, level : u8, matchanykeyword : u64, matchallkeyword : u64, timeout : u32, enableparameters : *const ENABLE_TRACE_PARAMETERS) -> super::super::super::Foundation:: WIN32_ERROR); - EnableTraceEx2(tracehandle.into_param().abi(), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, ::core::mem::transmute(enableparameters.unwrap_or(::std::ptr::null()))) + EnableTraceEx2(tracehandle.into_param().abi(), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, ::core::mem::transmute(enableparameters.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn EnumerateTraceGuids(guidpropertiesarray : *mut *mut TRACE_GUID_PROPERTIES, propertyarraycount : u32, guidcount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - EnumerateTraceGuids(::core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len() as _, guidcount) + EnumerateTraceGuids(::core::mem::transmute(guidpropertiesarray.as_ptr()), guidpropertiesarray.len() as _, guidcount).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, inbuffer: ::core::option::Option<*const ::core::ffi::c_void>, inbuffersize: u32, outbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, inbuffer: ::core::option::Option<*const ::core::ffi::c_void>, inbuffersize: u32, outbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn EnumerateTraceGuidsEx(tracequeryinfoclass : TRACE_QUERY_INFO_CLASS, inbuffer : *const ::core::ffi::c_void, inbuffersize : u32, outbuffer : *mut ::core::ffi::c_void, outbuffersize : u32, returnlength : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - EnumerateTraceGuidsEx(tracequeryinfoclass, ::core::mem::transmute(inbuffer.unwrap_or(::std::ptr::null())), inbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut())), outbuffersize, returnlength) + EnumerateTraceGuidsEx(tracequeryinfoclass, ::core::mem::transmute(inbuffer.unwrap_or(::std::ptr::null())), inbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut())), outbuffersize, returnlength).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -186,24 +186,24 @@ pub unsafe fn EventWriteTransfer(reghandle: u64, eventdescriptor: *const EVENT_D #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FlushTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn FlushTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - FlushTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + FlushTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn FlushTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn FlushTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - FlushTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + FlushTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`*"] #[inline] @@ -240,55 +240,55 @@ pub unsafe fn OpenTraceW(logfile: *mut EVENT_TRACE_LOGFILEW) -> PROCESSTRACE_HAN #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ProcessTrace(handlearray: &[PROCESSTRACE_HANDLE], starttime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>, endtime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn ProcessTrace(handlearray: &[PROCESSTRACE_HANDLE], starttime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>, endtime: ::core::option::Option<*const super::super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn ProcessTrace(handlearray : *const PROCESSTRACE_HANDLE, handlecount : u32, starttime : *const super::super::super::Foundation:: FILETIME, endtime : *const super::super::super::Foundation:: FILETIME) -> super::super::super::Foundation:: WIN32_ERROR); - ProcessTrace(::core::mem::transmute(handlearray.as_ptr()), handlearray.len() as _, ::core::mem::transmute(starttime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(endtime.unwrap_or(::std::ptr::null()))) + ProcessTrace(::core::mem::transmute(handlearray.as_ptr()), handlearray.len() as _, ::core::mem::transmute(starttime.unwrap_or(::std::ptr::null())), ::core::mem::transmute(endtime.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryAllTracesA(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn QueryAllTracesA(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesA(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - QueryAllTracesA(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount) + QueryAllTracesA(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryAllTracesW(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn QueryAllTracesW(propertyarray: &mut [*mut EVENT_TRACE_PROPERTIES], loggercount: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn QueryAllTracesW(propertyarray : *mut *mut EVENT_TRACE_PROPERTIES, propertyarraycount : u32, loggercount : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - QueryAllTracesW(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount) + QueryAllTracesW(::core::mem::transmute(propertyarray.as_ptr()), propertyarray.len() as _, loggercount).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn QueryTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn QueryTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - QueryTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + QueryTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryTraceProcessingHandle(processinghandle: P0, informationclass: ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer: ::core::option::Option<*const ::core::ffi::c_void>, inbuffersize: u32, outbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn QueryTraceProcessingHandle(processinghandle: P0, informationclass: ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer: ::core::option::Option<*const ::core::ffi::c_void>, inbuffersize: u32, outbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryTraceProcessingHandle(processinghandle : PROCESSTRACE_HANDLE, informationclass : ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer : *const ::core::ffi::c_void, inbuffersize : u32, outbuffer : *mut ::core::ffi::c_void, outbuffersize : u32, returnlength : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - QueryTraceProcessingHandle(processinghandle.into_param().abi(), informationclass, ::core::mem::transmute(inbuffer.unwrap_or(::std::ptr::null())), inbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut())), outbuffersize, returnlength) + QueryTraceProcessingHandle(processinghandle.into_param().abi(), informationclass, ::core::mem::transmute(inbuffer.unwrap_or(::std::ptr::null())), inbuffersize, ::core::mem::transmute(outbuffer.unwrap_or(::std::ptr::null_mut())), outbuffersize, returnlength).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn QueryTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn QueryTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - QueryTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + QueryTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -315,58 +315,58 @@ where #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveTraceCallback(pguid: *const ::windows_core::GUID) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn RemoveTraceCallback(pguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn RemoveTraceCallback(pguid : *const ::windows_core::GUID) -> super::super::super::Foundation:: WIN32_ERROR); - RemoveTraceCallback(pguid) + RemoveTraceCallback(pguid).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetTraceCallback(pguid: *const ::windows_core::GUID, eventcallback: PEVENT_CALLBACK) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn SetTraceCallback(pguid: *const ::windows_core::GUID, eventcallback: PEVENT_CALLBACK) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn SetTraceCallback(pguid : *const ::windows_core::GUID, eventcallback : PEVENT_CALLBACK) -> super::super::super::Foundation:: WIN32_ERROR); - SetTraceCallback(pguid, eventcallback) + SetTraceCallback(pguid, eventcallback).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StartTraceA(tracehandle: *mut CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn StartTraceA(tracehandle: *mut CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn StartTraceA(tracehandle : *mut CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - StartTraceA(tracehandle, instancename.into_param().abi(), properties) + StartTraceA(tracehandle, instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StartTraceW(tracehandle: *mut CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn StartTraceW(tracehandle: *mut CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn StartTraceW(tracehandle : *mut CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - StartTraceW(tracehandle, instancename.into_param().abi(), properties) + StartTraceW(tracehandle, instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StopTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn StopTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn StopTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - StopTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + StopTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StopTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn StopTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn StopTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - StopTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + StopTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -566,9 +566,9 @@ pub unsafe fn TdhUnloadManifestFromMemory(pdata: *const ::core::ffi::c_void, cbd #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TraceEvent(tracehandle: u64, eventtrace: *const EVENT_TRACE_HEADER) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn TraceEvent(tracehandle: u64, eventtrace: *const EVENT_TRACE_HEADER) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn TraceEvent(tracehandle : u64, eventtrace : *const EVENT_TRACE_HEADER) -> super::super::super::Foundation:: WIN32_ERROR); - TraceEvent(tracehandle, eventtrace) + TraceEvent(tracehandle, eventtrace).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -580,36 +580,36 @@ pub unsafe fn TraceEventInstance(tracehandle: u64, eventtrace: *const EVENT_INST #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows_core::GUID, messagenumber: u16) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows_core::GUID, messagenumber: u16) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "cdecl" fn TraceMessage(loggerhandle : u64, messageflags : TRACE_MESSAGE_FLAGS, messageguid : *const ::windows_core::GUID, messagenumber : u16) -> super::super::super::Foundation:: WIN32_ERROR); - TraceMessage(loggerhandle, messageflags, messageguid, messagenumber) + TraceMessage(loggerhandle, messageflags, messageguid, messagenumber).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TraceMessageVa(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows_core::GUID, messagenumber: u16, messagearglist: *const i8) -> super::super::super::Foundation::WIN32_ERROR { +pub unsafe fn TraceMessageVa(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const ::windows_core::GUID, messagenumber: u16, messagearglist: *const i8) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn TraceMessageVa(loggerhandle : u64, messageflags : TRACE_MESSAGE_FLAGS, messageguid : *const ::windows_core::GUID, messagenumber : u16, messagearglist : *const i8) -> super::super::super::Foundation:: WIN32_ERROR); - TraceMessageVa(loggerhandle, messageflags, messageguid, messagenumber, messagearglist) + TraceMessageVa(loggerhandle, messageflags, messageguid, messagenumber, messagearglist).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TraceQueryInformation(sessionhandle: P0, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *mut ::core::ffi::c_void, informationlength: u32, returnlength: ::core::option::Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn TraceQueryInformation(sessionhandle: P0, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *mut ::core::ffi::c_void, informationlength: u32, returnlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TraceQueryInformation(sessionhandle : CONTROLTRACE_HANDLE, informationclass : TRACE_QUERY_INFO_CLASS, traceinformation : *mut ::core::ffi::c_void, informationlength : u32, returnlength : *mut u32) -> super::super::super::Foundation:: WIN32_ERROR); - TraceQueryInformation(sessionhandle.into_param().abi(), informationclass, traceinformation, informationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))) + TraceQueryInformation(sessionhandle.into_param().abi(), informationclass, traceinformation, informationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TraceSetInformation(sessionhandle: P0, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *const ::core::ffi::c_void, informationlength: u32) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn TraceSetInformation(sessionhandle: P0, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *const ::core::ffi::c_void, informationlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn TraceSetInformation(sessionhandle : CONTROLTRACE_HANDLE, informationclass : TRACE_QUERY_INFO_CLASS, traceinformation : *const ::core::ffi::c_void, informationlength : u32) -> super::super::super::Foundation:: WIN32_ERROR); - TraceSetInformation(sessionhandle.into_param().abi(), informationclass, traceinformation, informationlength) + TraceSetInformation(sessionhandle.into_param().abi(), informationclass, traceinformation, informationlength).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`*"] #[inline] @@ -620,24 +620,24 @@ pub unsafe fn UnregisterTraceGuids(registrationhandle: u64) -> u32 { #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn UpdateTraceA(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn UpdateTraceA(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - UpdateTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + UpdateTraceA(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR +pub unsafe fn UpdateTraceW(tracehandle: P0, instancename: P1, properties: *mut EVENT_TRACE_PROPERTIES) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn UpdateTraceW(tracehandle : CONTROLTRACE_HANDLE, instancename : ::windows_core::PCWSTR, properties : *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation:: WIN32_ERROR); - UpdateTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties) + UpdateTraceW(tracehandle.into_param().abi(), instancename.into_param().abi(), properties).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_Etw\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs index c6db774680..6143a89a4d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ToolHelp/mod.rs @@ -9,136 +9,136 @@ pub unsafe fn CreateToolhelp32Snapshot(dwflags: CREATE_TOOLHELP_SNAPSHOT_FLAGS, #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Heap32First(lphe: *mut HEAPENTRY32, th32processid: u32, th32heapid: usize) -> super::super::super::Foundation::BOOL { +pub unsafe fn Heap32First(lphe: *mut HEAPENTRY32, th32processid: u32, th32heapid: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn Heap32First(lphe : *mut HEAPENTRY32, th32processid : u32, th32heapid : usize) -> super::super::super::Foundation:: BOOL); - Heap32First(lphe, th32processid, th32heapid) + Heap32First(lphe, th32processid, th32heapid).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Heap32ListFirst(hsnapshot: P0, lphl: *mut HEAPLIST32) -> super::super::super::Foundation::BOOL +pub unsafe fn Heap32ListFirst(hsnapshot: P0, lphl: *mut HEAPLIST32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Heap32ListFirst(hsnapshot : super::super::super::Foundation:: HANDLE, lphl : *mut HEAPLIST32) -> super::super::super::Foundation:: BOOL); - Heap32ListFirst(hsnapshot.into_param().abi(), lphl) + Heap32ListFirst(hsnapshot.into_param().abi(), lphl).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Heap32ListNext(hsnapshot: P0, lphl: *mut HEAPLIST32) -> super::super::super::Foundation::BOOL +pub unsafe fn Heap32ListNext(hsnapshot: P0, lphl: *mut HEAPLIST32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Heap32ListNext(hsnapshot : super::super::super::Foundation:: HANDLE, lphl : *mut HEAPLIST32) -> super::super::super::Foundation:: BOOL); - Heap32ListNext(hsnapshot.into_param().abi(), lphl) + Heap32ListNext(hsnapshot.into_param().abi(), lphl).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Heap32Next(lphe: *mut HEAPENTRY32) -> super::super::super::Foundation::BOOL { +pub unsafe fn Heap32Next(lphe: *mut HEAPENTRY32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn Heap32Next(lphe : *mut HEAPENTRY32) -> super::super::super::Foundation:: BOOL); - Heap32Next(lphe) + Heap32Next(lphe).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Module32First(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Module32First(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Module32First(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32) -> super::super::super::Foundation:: BOOL); - Module32First(hsnapshot.into_param().abi(), lpme) + Module32First(hsnapshot.into_param().abi(), lpme).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Module32FirstW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> super::super::super::Foundation::BOOL +pub unsafe fn Module32FirstW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Module32FirstW(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32W) -> super::super::super::Foundation:: BOOL); - Module32FirstW(hsnapshot.into_param().abi(), lpme) + Module32FirstW(hsnapshot.into_param().abi(), lpme).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Module32Next(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Module32Next(hsnapshot: P0, lpme: *mut MODULEENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Module32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32) -> super::super::super::Foundation:: BOOL); - Module32Next(hsnapshot.into_param().abi(), lpme) + Module32Next(hsnapshot.into_param().abi(), lpme).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Module32NextW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> super::super::super::Foundation::BOOL +pub unsafe fn Module32NextW(hsnapshot: P0, lpme: *mut MODULEENTRY32W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Module32NextW(hsnapshot : super::super::super::Foundation:: HANDLE, lpme : *mut MODULEENTRY32W) -> super::super::super::Foundation:: BOOL); - Module32NextW(hsnapshot.into_param().abi(), lpme) + Module32NextW(hsnapshot.into_param().abi(), lpme).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Process32First(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Process32First(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Process32First(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32) -> super::super::super::Foundation:: BOOL); - Process32First(hsnapshot.into_param().abi(), lppe) + Process32First(hsnapshot.into_param().abi(), lppe).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Process32FirstW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> super::super::super::Foundation::BOOL +pub unsafe fn Process32FirstW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Process32FirstW(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32W) -> super::super::super::Foundation:: BOOL); - Process32FirstW(hsnapshot.into_param().abi(), lppe) + Process32FirstW(hsnapshot.into_param().abi(), lppe).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Process32Next(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Process32Next(hsnapshot: P0, lppe: *mut PROCESSENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Process32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32) -> super::super::super::Foundation:: BOOL); - Process32Next(hsnapshot.into_param().abi(), lppe) + Process32Next(hsnapshot.into_param().abi(), lppe).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Process32NextW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> super::super::super::Foundation::BOOL +pub unsafe fn Process32NextW(hsnapshot: P0, lppe: *mut PROCESSENTRY32W) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Process32NextW(hsnapshot : super::super::super::Foundation:: HANDLE, lppe : *mut PROCESSENTRY32W) -> super::super::super::Foundation:: BOOL); - Process32NextW(hsnapshot.into_param().abi(), lppe) + Process32NextW(hsnapshot.into_param().abi(), lppe).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Thread32First(hsnapshot: P0, lpte: *mut THREADENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Thread32First(hsnapshot: P0, lpte: *mut THREADENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Thread32First(hsnapshot : super::super::super::Foundation:: HANDLE, lpte : *mut THREADENTRY32) -> super::super::super::Foundation:: BOOL); - Thread32First(hsnapshot.into_param().abi(), lpte) + Thread32First(hsnapshot.into_param().abi(), lpte).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn Thread32Next(hsnapshot: P0, lpte: *mut THREADENTRY32) -> super::super::super::Foundation::BOOL +pub unsafe fn Thread32Next(hsnapshot: P0, lpte: *mut THREADENTRY32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn Thread32Next(hsnapshot : super::super::super::Foundation:: HANDLE, lpte : *mut THREADENTRY32) -> super::super::super::Foundation:: BOOL); - Thread32Next(hsnapshot.into_param().abi(), lpte) + Thread32Next(hsnapshot.into_param().abi(), lpte).ok() } #[doc = "*Required features: `\"Win32_System_Diagnostics_ToolHelp\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs index 21f5d30362..6e0d67dac3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -1,12 +1,12 @@ #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CallEnclave(lproutine: isize, lpparameter: *const ::core::ffi::c_void, fwaitforthread: P0, lpreturnvalue: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn CallEnclave(lproutine: isize, lpparameter: *const ::core::ffi::c_void, fwaitforthread: P0, lpreturnvalue: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("vertdll.dll" "system" fn CallEnclave(lproutine : isize, lpparameter : *const ::core::ffi::c_void, fwaitforthread : super::super::Foundation:: BOOL, lpreturnvalue : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CallEnclave(lproutine, lpparameter, fwaitforthread.into_param().abi(), lpreturnvalue) + CallEnclave(lproutine, lpparameter, fwaitforthread.into_param().abi(), lpreturnvalue).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -21,27 +21,27 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut ::core::ffi::c_void, htoken: P0, binherit: P1) -> super::super::Foundation::BOOL +pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut ::core::ffi::c_void, htoken: P0, binherit: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn CreateEnvironmentBlock(lpenvironment : *mut *mut ::core::ffi::c_void, htoken : super::super::Foundation:: HANDLE, binherit : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - CreateEnvironmentBlock(lpenvironment, htoken.into_param().abi(), binherit.into_param().abi()) + CreateEnvironmentBlock(lpenvironment, htoken.into_param().abi(), binherit.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteEnclave(lpaddress: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DeleteEnclave(lpaddress: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-enclave-l1-1-1.dll" "system" fn DeleteEnclave(lpaddress : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteEnclave(lpaddress) + DeleteEnclave(lpaddress).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyEnvironmentBlock(lpenvironment: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DestroyEnvironmentBlock(lpenvironment: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn DestroyEnvironmentBlock(lpenvironment : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DestroyEnvironmentBlock(lpenvironment) + DestroyEnvironmentBlock(lpenvironment).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`*"] #[inline] @@ -85,24 +85,24 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ExpandEnvironmentStringsForUserA(htoken: P0, lpsrc: P1, lpdest: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn ExpandEnvironmentStringsForUserA(htoken: P0, lpsrc: P1, lpdest: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserA(htoken : super::super::Foundation:: HANDLE, lpsrc : ::windows_core::PCSTR, lpdest : ::windows_core::PSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserA(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _) + ExpandEnvironmentStringsForUserA(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ExpandEnvironmentStringsForUserW(htoken: P0, lpsrc: P1, lpdest: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn ExpandEnvironmentStringsForUserW(htoken: P0, lpsrc: P1, lpdest: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("userenv.dll" "system" fn ExpandEnvironmentStringsForUserW(htoken : super::super::Foundation:: HANDLE, lpsrc : ::windows_core::PCWSTR, lpdest : ::windows_core::PWSTR, dwsize : u32) -> super::super::Foundation:: BOOL); - ExpandEnvironmentStringsForUserW(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _) + ExpandEnvironmentStringsForUserW(htoken.into_param().abi(), lpsrc.into_param().abi(), ::core::mem::transmute(lpdest.as_ptr()), lpdest.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`*"] #[inline] @@ -116,22 +116,22 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeEnvironmentStringsA(penv: P0) -> super::super::Foundation::BOOL +pub unsafe fn FreeEnvironmentStringsA(penv: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FreeEnvironmentStringsA(penv : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - FreeEnvironmentStringsA(penv.into_param().abi()) + FreeEnvironmentStringsA(penv.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeEnvironmentStringsW(penv: P0) -> super::super::Foundation::BOOL +pub unsafe fn FreeEnvironmentStringsW(penv: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn FreeEnvironmentStringsW(penv : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - FreeEnvironmentStringsW(penv.into_param().abi()) + FreeEnvironmentStringsW(penv.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`*"] #[inline] @@ -190,29 +190,29 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeEnclave(hprocess: P0, lpaddress: *const ::core::ffi::c_void, lpenclaveinformation: *const ::core::ffi::c_void, dwinfolength: u32, lpenclaveerror: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn InitializeEnclave(hprocess: P0, lpaddress: *const ::core::ffi::c_void, lpenclaveinformation: *const ::core::ffi::c_void, dwinfolength: u32, lpenclaveerror: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn InitializeEnclave(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const ::core::ffi::c_void, lpenclaveinformation : *const ::core::ffi::c_void, dwinfolength : u32, lpenclaveerror : *mut u32) -> super::super::Foundation:: BOOL); - InitializeEnclave(hprocess.into_param().abi(), lpaddress, lpenclaveinformation, dwinfolength, ::core::mem::transmute(lpenclaveerror.unwrap_or(::std::ptr::null_mut()))) + InitializeEnclave(hprocess.into_param().abi(), lpaddress, lpenclaveinformation, dwinfolength, ::core::mem::transmute(lpenclaveerror.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> super::super::Foundation::BOOL { +pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsEnclaveTypeSupported(flenclavetype : u32) -> super::super::Foundation:: BOOL); - IsEnclaveTypeSupported(flenclavetype) + IsEnclaveTypeSupported(flenclavetype).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LoadEnclaveData(hprocess: P0, lpaddress: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, nsize: usize, flprotect: u32, lppageinformation: *const ::core::ffi::c_void, dwinfolength: u32, lpnumberofbyteswritten: *mut usize, lpenclaveerror: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn LoadEnclaveData(hprocess: P0, lpaddress: *const ::core::ffi::c_void, lpbuffer: *const ::core::ffi::c_void, nsize: usize, flprotect: u32, lppageinformation: *const ::core::ffi::c_void, dwinfolength: u32, lpnumberofbyteswritten: *mut usize, lpenclaveerror: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn LoadEnclaveData(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const ::core::ffi::c_void, lpbuffer : *const ::core::ffi::c_void, nsize : usize, flprotect : u32, lppageinformation : *const ::core::ffi::c_void, dwinfolength : u32, lpnumberofbyteswritten : *mut usize, lpenclaveerror : *mut u32) -> super::super::Foundation:: BOOL); - LoadEnclaveData(hprocess.into_param().abi(), lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, lpnumberofbyteswritten, ::core::mem::transmute(lpenclaveerror.unwrap_or(::std::ptr::null_mut()))) + LoadEnclaveData(hprocess.into_param().abi(), lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, lpnumberofbyteswritten, ::core::mem::transmute(lpenclaveerror.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -227,12 +227,12 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LoadEnclaveImageW(lpenclaveaddress: *const ::core::ffi::c_void, lpimagename: P0) -> super::super::Foundation::BOOL +pub unsafe fn LoadEnclaveImageW(lpenclaveaddress: *const ::core::ffi::c_void, lpimagename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-enclave-l1-1-1.dll" "system" fn LoadEnclaveImageW(lpenclaveaddress : *const ::core::ffi::c_void, lpimagename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - LoadEnclaveImageW(lpenclaveaddress, lpimagename.into_param().abi()) + LoadEnclaveImageW(lpenclaveaddress, lpimagename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -287,34 +287,34 @@ where #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEnvironmentVariableA(lpname: P0, lpvalue: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetEnvironmentVariableA(lpname: P0, lpvalue: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetEnvironmentVariableA(lpname : ::windows_core::PCSTR, lpvalue : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetEnvironmentVariableA(lpname.into_param().abi(), lpvalue.into_param().abi()) + SetEnvironmentVariableA(lpname.into_param().abi(), lpvalue.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEnvironmentVariableW(lpname: P0, lpvalue: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetEnvironmentVariableW(lpname: P0, lpvalue: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetEnvironmentVariableW(lpname : ::windows_core::PCWSTR, lpvalue : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetEnvironmentVariableW(lpname.into_param().abi(), lpvalue.into_param().abi()) + SetEnvironmentVariableW(lpname.into_param().abi(), lpvalue.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateEnclave(lpaddress: *const ::core::ffi::c_void, fwait: P0) -> super::super::Foundation::BOOL +pub unsafe fn TerminateEnclave(lpaddress: *const ::core::ffi::c_void, fwait: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("vertdll.dll" "system" fn TerminateEnclave(lpaddress : *const ::core::ffi::c_void, fwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - TerminateEnclave(lpaddress, fwait.into_param().abi()) + TerminateEnclave(lpaddress, fwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Environment\"`*"] pub const ENCLAVE_FLAG_DYNAMIC_DEBUG_ACTIVE: u32 = 4u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs index 9b0e7d5c5c..760dd67a6d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs @@ -1,22 +1,22 @@ #[doc = "*Required features: `\"Win32_System_ErrorReporting\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddERExcludedApplicationA(szapplication: P0) -> super::super::Foundation::BOOL +pub unsafe fn AddERExcludedApplicationA(szapplication: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("faultrep.dll" "system" fn AddERExcludedApplicationA(szapplication : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AddERExcludedApplicationA(szapplication.into_param().abi()) + AddERExcludedApplicationA(szapplication.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_ErrorReporting\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddERExcludedApplicationW(wszapplication: P0) -> super::super::Foundation::BOOL +pub unsafe fn AddERExcludedApplicationW(wszapplication: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("faultrep.dll" "system" fn AddERExcludedApplicationW(wszapplication : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AddERExcludedApplicationW(wszapplication.into_param().abi()) + AddERExcludedApplicationW(wszapplication.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_ErrorReporting\"`, `\"Win32_Foundation\"`, `\"Win32_System_Diagnostics_Debug\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_Kernel"))] diff --git a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs index 340591ee31..e57494ba10 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -1,109 +1,109 @@ #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BackupEventLogA(heventlog: P0, lpbackupfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn BackupEventLogA(heventlog: P0, lpbackupfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn BackupEventLogA(heventlog : EventLogHandle, lpbackupfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - BackupEventLogA(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()) + BackupEventLogA(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BackupEventLogW(heventlog: P0, lpbackupfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn BackupEventLogW(heventlog: P0, lpbackupfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn BackupEventLogW(heventlog : EventLogHandle, lpbackupfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - BackupEventLogW(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()) + BackupEventLogW(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClearEventLogA(heventlog: P0, lpbackupfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn ClearEventLogA(heventlog: P0, lpbackupfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ClearEventLogA(heventlog : EventLogHandle, lpbackupfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ClearEventLogA(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()) + ClearEventLogA(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClearEventLogW(heventlog: P0, lpbackupfilename: P1) -> super::super::Foundation::BOOL +pub unsafe fn ClearEventLogW(heventlog: P0, lpbackupfilename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ClearEventLogW(heventlog : EventLogHandle, lpbackupfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ClearEventLogW(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()) + ClearEventLogW(heventlog.into_param().abi(), lpbackupfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseEventLog(heventlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseEventLog(heventlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CloseEventLog(heventlog : EventLogHandle) -> super::super::Foundation:: BOOL); - CloseEventLog(heventlog.into_param().abi()) + CloseEventLog(heventlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeregisterEventSource(heventlog: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeregisterEventSource(heventlog: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn DeregisterEventSource(heventlog : EventSourceHandle) -> super::super::Foundation:: BOOL); - DeregisterEventSource(heventlog.into_param().abi()) + DeregisterEventSource(heventlog.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtArchiveExportedLog(session: P0, logfilepath: P1, locale: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtArchiveExportedLog(session: P0, logfilepath: P1, locale: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtArchiveExportedLog(session : EVT_HANDLE, logfilepath : ::windows_core::PCWSTR, locale : u32, flags : u32) -> super::super::Foundation:: BOOL); - EvtArchiveExportedLog(session.into_param().abi(), logfilepath.into_param().abi(), locale, flags) + EvtArchiveExportedLog(session.into_param().abi(), logfilepath.into_param().abi(), locale, flags).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtCancel(object: P0) -> super::super::Foundation::BOOL +pub unsafe fn EvtCancel(object: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtCancel(object : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtCancel(object.into_param().abi()) + EvtCancel(object.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtClearLog(session: P0, channelpath: P1, targetfilepath: P2, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtClearLog(session: P0, channelpath: P1, targetfilepath: P2, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtClearLog(session : EVT_HANDLE, channelpath : ::windows_core::PCWSTR, targetfilepath : ::windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - EvtClearLog(session.into_param().abi(), channelpath.into_param().abi(), targetfilepath.into_param().abi(), flags) + EvtClearLog(session.into_param().abi(), channelpath.into_param().abi(), targetfilepath.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtClose(object: P0) -> super::super::Foundation::BOOL +pub unsafe fn EvtClose(object: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtClose(object : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtClose(object.into_param().abi()) + EvtClose(object.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -125,7 +125,7 @@ pub unsafe fn EvtCreateRenderContext(valuepaths: ::core::option::Option<&[::wind #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtExportLog(session: P0, path: P1, query: P2, targetfilepath: P3, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtExportLog(session: P0, path: P1, query: P2, targetfilepath: P3, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -133,48 +133,48 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtExportLog(session : EVT_HANDLE, path : ::windows_core::PCWSTR, query : ::windows_core::PCWSTR, targetfilepath : ::windows_core::PCWSTR, flags : u32) -> super::super::Foundation:: BOOL); - EvtExportLog(session.into_param().abi(), path.into_param().abi(), query.into_param().abi(), targetfilepath.into_param().abi(), flags) + EvtExportLog(session.into_param().abi(), path.into_param().abi(), query.into_param().abi(), targetfilepath.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtFormatMessage(publishermetadata: P0, event: P1, messageid: u32, values: ::core::option::Option<&[EVT_VARIANT]>, flags: u32, buffer: ::core::option::Option<&mut [u16]>, bufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtFormatMessage(publishermetadata: P0, event: P1, messageid: u32, values: ::core::option::Option<&[EVT_VARIANT]>, flags: u32, buffer: ::core::option::Option<&mut [u16]>, bufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtFormatMessage(publishermetadata : EVT_HANDLE, event : EVT_HANDLE, messageid : u32, valuecount : u32, values : *const EVT_VARIANT, flags : u32, buffersize : u32, buffer : ::windows_core::PWSTR, bufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtFormatMessage(publishermetadata.into_param().abi(), event.into_param().abi(), messageid, values.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(values.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags, buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bufferused) + EvtFormatMessage(publishermetadata.into_param().abi(), event.into_param().abi(), messageid, values.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(values.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), flags, buffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(buffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), bufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetChannelConfigProperty(channelconfig : EVT_HANDLE, propertyid : EVT_CHANNEL_CONFIG_PROPERTY_ID, flags : u32, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EVT_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetChannelConfigProperty(channelconfig.into_param().abi(), propertyid, flags, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused) + EvtGetChannelConfigProperty(channelconfig.into_param().abi(), propertyid, flags, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetEventInfo(event: P0, propertyid: EVT_EVENT_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetEventInfo(event: P0, propertyid: EVT_EVENT_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetEventInfo(event : EVT_HANDLE, propertyid : EVT_EVENT_PROPERTY_ID, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EVT_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetEventInfo(event.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused) + EvtGetEventInfo(event.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetEventMetadataProperty(eventmetadata: P0, propertyid: EVT_EVENT_METADATA_PROPERTY_ID, flags: u32, eventmetadatapropertybuffersize: u32, eventmetadatapropertybuffer: ::core::option::Option<*mut EVT_VARIANT>, eventmetadatapropertybufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetEventMetadataProperty(eventmetadata: P0, propertyid: EVT_EVENT_METADATA_PROPERTY_ID, flags: u32, eventmetadatapropertybuffersize: u32, eventmetadatapropertybuffer: ::core::option::Option<*mut EVT_VARIANT>, eventmetadatapropertybufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetEventMetadataProperty(eventmetadata : EVT_HANDLE, propertyid : EVT_EVENT_METADATA_PROPERTY_ID, flags : u32, eventmetadatapropertybuffersize : u32, eventmetadatapropertybuffer : *mut EVT_VARIANT, eventmetadatapropertybufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetEventMetadataProperty(eventmetadata.into_param().abi(), propertyid, flags, eventmetadatapropertybuffersize, ::core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(::std::ptr::null_mut())), eventmetadatapropertybufferused) + EvtGetEventMetadataProperty(eventmetadata.into_param().abi(), propertyid, flags, eventmetadatapropertybuffersize, ::core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(::std::ptr::null_mut())), eventmetadatapropertybufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -185,66 +185,66 @@ pub unsafe fn EvtGetExtendedStatus(buffer: ::core::option::Option<&mut [u16]>, b #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetLogInfo(log: P0, propertyid: EVT_LOG_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetLogInfo(log: P0, propertyid: EVT_LOG_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetLogInfo(log : EVT_HANDLE, propertyid : EVT_LOG_PROPERTY_ID, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EVT_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetLogInfo(log.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused) + EvtGetLogInfo(log.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetObjectArrayProperty(objectarray: isize, propertyid: u32, arrayindex: u32, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn EvtGetObjectArrayProperty(objectarray: isize, propertyid: u32, arrayindex: u32, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetObjectArrayProperty(objectarray : isize, propertyid : u32, arrayindex : u32, flags : u32, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EVT_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused) + EvtGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetObjectArraySize(objectarray : isize, objectarraysize : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetObjectArraySize(objectarray, objectarraysize) + EvtGetObjectArraySize(objectarray, objectarraysize).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetPublisherMetadataProperty(publishermetadata: P0, propertyid: EVT_PUBLISHER_METADATA_PROPERTY_ID, flags: u32, publishermetadatapropertybuffersize: u32, publishermetadatapropertybuffer: ::core::option::Option<*mut EVT_VARIANT>, publishermetadatapropertybufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetPublisherMetadataProperty(publishermetadata: P0, propertyid: EVT_PUBLISHER_METADATA_PROPERTY_ID, flags: u32, publishermetadatapropertybuffersize: u32, publishermetadatapropertybuffer: ::core::option::Option<*mut EVT_VARIANT>, publishermetadatapropertybufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetPublisherMetadataProperty(publishermetadata : EVT_HANDLE, propertyid : EVT_PUBLISHER_METADATA_PROPERTY_ID, flags : u32, publishermetadatapropertybuffersize : u32, publishermetadatapropertybuffer : *mut EVT_VARIANT, publishermetadatapropertybufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetPublisherMetadataProperty(publishermetadata.into_param().abi(), propertyid, flags, publishermetadatapropertybuffersize, ::core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(::std::ptr::null_mut())), publishermetadatapropertybufferused) + EvtGetPublisherMetadataProperty(publishermetadata.into_param().abi(), propertyid, flags, publishermetadatapropertybuffersize, ::core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(::std::ptr::null_mut())), publishermetadatapropertybufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtGetQueryInfo(queryorsubscription: P0, propertyid: EVT_QUERY_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtGetQueryInfo(queryorsubscription: P0, propertyid: EVT_QUERY_PROPERTY_ID, propertyvaluebuffersize: u32, propertyvaluebuffer: ::core::option::Option<*mut EVT_VARIANT>, propertyvaluebufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtGetQueryInfo(queryorsubscription : EVT_HANDLE, propertyid : EVT_QUERY_PROPERTY_ID, propertyvaluebuffersize : u32, propertyvaluebuffer : *mut EVT_VARIANT, propertyvaluebufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtGetQueryInfo(queryorsubscription.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused) + EvtGetQueryInfo(queryorsubscription.into_param().abi(), propertyid, propertyvaluebuffersize, ::core::mem::transmute(propertyvaluebuffer.unwrap_or(::std::ptr::null_mut())), propertyvaluebufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtNext(resultset: P0, events: &mut [isize], timeout: u32, flags: u32, returned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtNext(resultset: P0, events: &mut [isize], timeout: u32, flags: u32, returned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNext(resultset : EVT_HANDLE, eventssize : u32, events : *mut isize, timeout : u32, flags : u32, returned : *mut u32) -> super::super::Foundation:: BOOL); - EvtNext(resultset.into_param().abi(), events.len() as _, ::core::mem::transmute(events.as_ptr()), timeout, flags, returned) + EvtNext(resultset.into_param().abi(), events.len() as _, ::core::mem::transmute(events.as_ptr()), timeout, flags, returned).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtNextChannelPath(channelenum: P0, channelpathbuffer: ::core::option::Option<&mut [u16]>, channelpathbufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtNextChannelPath(channelenum: P0, channelpathbuffer: ::core::option::Option<&mut [u16]>, channelpathbufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNextChannelPath(channelenum : EVT_HANDLE, channelpathbuffersize : u32, channelpathbuffer : ::windows_core::PWSTR, channelpathbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextChannelPath(channelenum.into_param().abi(), channelpathbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(channelpathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), channelpathbufferused) + EvtNextChannelPath(channelenum.into_param().abi(), channelpathbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(channelpathbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), channelpathbufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -259,12 +259,12 @@ where #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtNextPublisherId(publisherenum: P0, publisheridbuffer: ::core::option::Option<&mut [u16]>, publisheridbufferused: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtNextPublisherId(publisherenum: P0, publisheridbuffer: ::core::option::Option<&mut [u16]>, publisheridbufferused: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtNextPublisherId(publisherenum : EVT_HANDLE, publisheridbuffersize : u32, publisheridbuffer : ::windows_core::PWSTR, publisheridbufferused : *mut u32) -> super::super::Foundation:: BOOL); - EvtNextPublisherId(publisherenum.into_param().abi(), publisheridbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(publisheridbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), publisheridbufferused) + EvtNextPublisherId(publisherenum.into_param().abi(), publisheridbuffer.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(publisheridbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), publisheridbufferused).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -352,44 +352,44 @@ where #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtRender(context: P0, fragment: P1, flags: u32, buffersize: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, bufferused: *mut u32, propertycount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtRender(context: P0, fragment: P1, flags: u32, buffersize: u32, buffer: ::core::option::Option<*mut ::core::ffi::c_void>, bufferused: *mut u32, propertycount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtRender(context : EVT_HANDLE, fragment : EVT_HANDLE, flags : u32, buffersize : u32, buffer : *mut ::core::ffi::c_void, bufferused : *mut u32, propertycount : *mut u32) -> super::super::Foundation:: BOOL); - EvtRender(context.into_param().abi(), fragment.into_param().abi(), flags, buffersize, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), bufferused, propertycount) + EvtRender(context.into_param().abi(), fragment.into_param().abi(), flags, buffersize, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), bufferused, propertycount).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtSaveChannelConfig(channelconfig: P0, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtSaveChannelConfig(channelconfig: P0, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtSaveChannelConfig(channelconfig : EVT_HANDLE, flags : u32) -> super::super::Foundation:: BOOL); - EvtSaveChannelConfig(channelconfig.into_param().abi(), flags) + EvtSaveChannelConfig(channelconfig.into_param().abi(), flags).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtSeek(resultset: P0, position: i64, bookmark: P1, timeout: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn EvtSeek(resultset: P0, position: i64, bookmark: P1, timeout: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtSeek(resultset : EVT_HANDLE, position : i64, bookmark : EVT_HANDLE, timeout : u32, flags : u32) -> super::super::Foundation:: BOOL); - EvtSeek(resultset.into_param().abi(), position, bookmark.into_param().abi(), timeout, flags) + EvtSeek(resultset.into_param().abi(), position, bookmark.into_param().abi(), timeout, flags).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtSetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvalue: *const EVT_VARIANT) -> super::super::Foundation::BOOL +pub unsafe fn EvtSetChannelConfigProperty(channelconfig: P0, propertyid: EVT_CHANNEL_CONFIG_PROPERTY_ID, flags: u32, propertyvalue: *const EVT_VARIANT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtSetChannelConfigProperty(channelconfig : EVT_HANDLE, propertyid : EVT_CHANNEL_CONFIG_PROPERTY_ID, flags : u32, propertyvalue : *const EVT_VARIANT) -> super::super::Foundation:: BOOL); - EvtSetChannelConfigProperty(channelconfig.into_param().abi(), propertyid, flags, propertyvalue) + EvtSetChannelConfigProperty(channelconfig.into_param().abi(), propertyid, flags, propertyvalue).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -409,54 +409,54 @@ where #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvtUpdateBookmark(bookmark: P0, event: P1) -> super::super::Foundation::BOOL +pub unsafe fn EvtUpdateBookmark(bookmark: P0, event: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wevtapi.dll" "system" fn EvtUpdateBookmark(bookmark : EVT_HANDLE, event : EVT_HANDLE) -> super::super::Foundation:: BOOL); - EvtUpdateBookmark(bookmark.into_param().abi(), event.into_param().abi()) + EvtUpdateBookmark(bookmark.into_param().abi(), event.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetEventLogInformation(heventlog: P0, dwinfolevel: u32, lpbuffer: *mut ::core::ffi::c_void, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetEventLogInformation(heventlog: P0, dwinfolevel: u32, lpbuffer: *mut ::core::ffi::c_void, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetEventLogInformation(heventlog : EventLogHandle, dwinfolevel : u32, lpbuffer : *mut ::core::ffi::c_void, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetEventLogInformation(heventlog.into_param().abi(), dwinfolevel, lpbuffer, cbbufsize, pcbbytesneeded) + GetEventLogInformation(heventlog.into_param().abi(), dwinfolevel, lpbuffer, cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumberOfEventLogRecords(heventlog: P0, numberofrecords: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNumberOfEventLogRecords(heventlog: P0, numberofrecords: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetNumberOfEventLogRecords(heventlog : EventLogHandle, numberofrecords : *mut u32) -> super::super::Foundation:: BOOL); - GetNumberOfEventLogRecords(heventlog.into_param().abi(), numberofrecords) + GetNumberOfEventLogRecords(heventlog.into_param().abi(), numberofrecords).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetOldestEventLogRecord(heventlog: P0, oldestrecord: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetOldestEventLogRecord(heventlog: P0, oldestrecord: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn GetOldestEventLogRecord(heventlog : EventLogHandle, oldestrecord : *mut u32) -> super::super::Foundation:: BOOL); - GetOldestEventLogRecord(heventlog.into_param().abi(), oldestrecord) + GetOldestEventLogRecord(heventlog.into_param().abi(), oldestrecord).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn NotifyChangeEventLog(heventlog: P0, hevent: P1) -> super::super::Foundation::BOOL +pub unsafe fn NotifyChangeEventLog(heventlog: P0, hevent: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn NotifyChangeEventLog(heventlog : EventLogHandle, hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - NotifyChangeEventLog(heventlog.into_param().abi(), hevent.into_param().abi()) + NotifyChangeEventLog(heventlog.into_param().abi(), hevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -505,22 +505,22 @@ where #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadEventLogA(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut ::core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadEventLogA(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut ::core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReadEventLogA(heventlog : EventLogHandle, dwreadflags : READ_EVENT_LOG_READ_FLAGS, dwrecordoffset : u32, lpbuffer : *mut ::core::ffi::c_void, nnumberofbytestoread : u32, pnbytesread : *mut u32, pnminnumberofbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - ReadEventLogA(heventlog.into_param().abi(), dwreadflags, dwrecordoffset, lpbuffer, nnumberofbytestoread, pnbytesread, pnminnumberofbytesneeded) + ReadEventLogA(heventlog.into_param().abi(), dwreadflags, dwrecordoffset, lpbuffer, nnumberofbytestoread, pnbytesread, pnminnumberofbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReadEventLogW(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut ::core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ReadEventLogW(heventlog: P0, dwreadflags: READ_EVENT_LOG_READ_FLAGS, dwrecordoffset: u32, lpbuffer: *mut ::core::ffi::c_void, nnumberofbytestoread: u32, pnbytesread: *mut u32, pnminnumberofbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReadEventLogW(heventlog : EventLogHandle, dwreadflags : READ_EVENT_LOG_READ_FLAGS, dwrecordoffset : u32, lpbuffer : *mut ::core::ffi::c_void, nnumberofbytestoread : u32, pnbytesread : *mut u32, pnminnumberofbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - ReadEventLogW(heventlog.into_param().abi(), dwreadflags, dwrecordoffset, lpbuffer, nnumberofbytestoread, pnbytesread, pnminnumberofbytesneeded) + ReadEventLogW(heventlog.into_param().abi(), dwreadflags, dwrecordoffset, lpbuffer, nnumberofbytestoread, pnbytesread, pnminnumberofbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] #[inline] @@ -547,24 +547,24 @@ where #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReportEventA(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P1, dwdatasize: u32, lpstrings: ::core::option::Option<&[::windows_core::PCSTR]>, lprawdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ReportEventA(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P1, dwdatasize: u32, lpstrings: ::core::option::Option<&[::windows_core::PCSTR]>, lprawdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReportEventA(heventlog : EventSourceHandle, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Foundation:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const ::windows_core::PCSTR, lprawdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventA(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))) + ReportEventA(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReportEventW(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P1, dwdatasize: u32, lpstrings: ::core::option::Option<&[::windows_core::PCWSTR]>, lprawdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ReportEventW(heventlog: P0, wtype: REPORT_EVENT_TYPE, wcategory: u16, dweventid: u32, lpusersid: P1, dwdatasize: u32, lpstrings: ::core::option::Option<&[::windows_core::PCWSTR]>, lprawdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ReportEventW(heventlog : EventSourceHandle, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Foundation:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const ::windows_core::PCWSTR, lprawdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventW(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))) + ReportEventW(heventlog.into_param().abi(), wtype, wcategory, dweventid, lpusersid.into_param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len() as _), dwdatasize, ::core::mem::transmute(lpstrings.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), ::core::mem::transmute(lprawdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_EventLog\"`*"] pub const EVT_ALL_ACCESS: u32 = 7u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs b/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs index e6b5245fc0..0a39d4862a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventNotificationService/mod.rs @@ -1,29 +1,29 @@ #[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsDestinationReachableA(lpszdestination: P0, lpqocinfo: *mut QOCINFO) -> super::super::Foundation::BOOL +pub unsafe fn IsDestinationReachableA(lpszdestination: P0, lpqocinfo: *mut QOCINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("sensapi.dll" "system" fn IsDestinationReachableA(lpszdestination : ::windows_core::PCSTR, lpqocinfo : *mut QOCINFO) -> super::super::Foundation:: BOOL); - IsDestinationReachableA(lpszdestination.into_param().abi(), lpqocinfo) + IsDestinationReachableA(lpszdestination.into_param().abi(), lpqocinfo).ok() } #[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsDestinationReachableW(lpszdestination: P0, lpqocinfo: *mut QOCINFO) -> super::super::Foundation::BOOL +pub unsafe fn IsDestinationReachableW(lpszdestination: P0, lpqocinfo: *mut QOCINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("sensapi.dll" "system" fn IsDestinationReachableW(lpszdestination : ::windows_core::PCWSTR, lpqocinfo : *mut QOCINFO) -> super::super::Foundation:: BOOL); - IsDestinationReachableW(lpszdestination.into_param().abi(), lpqocinfo) + IsDestinationReachableW(lpszdestination.into_param().abi(), lpqocinfo).ok() } #[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsNetworkAlive(lpdwflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn IsNetworkAlive(lpdwflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("sensapi.dll" "system" fn IsNetworkAlive(lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - IsNetworkAlive(lpdwflags) + IsNetworkAlive(lpdwflags).ok() } #[doc = "*Required features: `\"Win32_System_EventNotificationService\"`, `\"Win32_System_Com\"`*"] #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs index e9cacaecc5..5bbe6ee13e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -69,16 +69,16 @@ where #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeGPOListA(pgpolist: *const GROUP_POLICY_OBJECTA) -> super::super::Foundation::BOOL { +pub unsafe fn FreeGPOListA(pgpolist: *const GROUP_POLICY_OBJECTA) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn FreeGPOListA(pgpolist : *const GROUP_POLICY_OBJECTA) -> super::super::Foundation:: BOOL); - FreeGPOListA(pgpolist) + FreeGPOListA(pgpolist).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeGPOListW(pgpolist: *const GROUP_POLICY_OBJECTW) -> super::super::Foundation::BOOL { +pub unsafe fn FreeGPOListW(pgpolist: *const GROUP_POLICY_OBJECTW) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn FreeGPOListW(pgpolist : *const GROUP_POLICY_OBJECTW) -> super::super::Foundation:: BOOL); - FreeGPOListW(pgpolist) + FreeGPOListW(pgpolist).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -116,7 +116,7 @@ where #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGPOListA(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> super::super::Foundation::BOOL +pub unsafe fn GetGPOListA(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -124,12 +124,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("userenv.dll" "system" fn GetGPOListA(htoken : super::super::Foundation:: HANDLE, lpname : ::windows_core::PCSTR, lphostname : ::windows_core::PCSTR, lpcomputername : ::windows_core::PCSTR, dwflags : u32, pgpolist : *mut *mut GROUP_POLICY_OBJECTA) -> super::super::Foundation:: BOOL); - GetGPOListA(htoken.into_param().abi(), lpname.into_param().abi(), lphostname.into_param().abi(), lpcomputername.into_param().abi(), dwflags, pgpolist) + GetGPOListA(htoken.into_param().abi(), lpname.into_param().abi(), lphostname.into_param().abi(), lpcomputername.into_param().abi(), dwflags, pgpolist).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGPOListW(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> super::super::Foundation::BOOL +pub unsafe fn GetGPOListW(htoken: P0, lpname: P1, lphostname: P2, lpcomputername: P3, dwflags: u32, pgpolist: *mut *mut GROUP_POLICY_OBJECTW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -137,7 +137,7 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("userenv.dll" "system" fn GetGPOListW(htoken : super::super::Foundation:: HANDLE, lpname : ::windows_core::PCWSTR, lphostname : ::windows_core::PCWSTR, lpcomputername : ::windows_core::PCWSTR, dwflags : u32, pgpolist : *mut *mut GROUP_POLICY_OBJECTW) -> super::super::Foundation:: BOOL); - GetGPOListW(htoken.into_param().abi(), lpname.into_param().abi(), lphostname.into_param().abi(), lpcomputername.into_param().abi(), dwflags, pgpolist) + GetGPOListW(htoken.into_param().abi(), lpname.into_param().abi(), lphostname.into_param().abi(), lpcomputername.into_param().abi(), dwflags, pgpolist).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`*"] #[inline] @@ -191,12 +191,12 @@ pub unsafe fn InstallApplication(pinstallinfo: *const INSTALLDATA) -> u32 { #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LeaveCriticalPolicySection(hsection: P0) -> super::super::Foundation::BOOL +pub unsafe fn LeaveCriticalPolicySection(hsection: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn LeaveCriticalPolicySection(hsection : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - LeaveCriticalPolicySection(hsection.into_param().abi()) + LeaveCriticalPolicySection(hsection.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`*"] #[inline] @@ -213,33 +213,33 @@ pub unsafe fn ProcessGroupPolicyCompletedEx(extensionid: *const ::windows_core:: #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RefreshPolicy(bmachine: P0) -> super::super::Foundation::BOOL +pub unsafe fn RefreshPolicy(bmachine: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn RefreshPolicy(bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RefreshPolicy(bmachine.into_param().abi()) + RefreshPolicy(bmachine.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RefreshPolicyEx(bmachine: P0, dwoptions: u32) -> super::super::Foundation::BOOL +pub unsafe fn RefreshPolicyEx(bmachine: P0, dwoptions: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn RefreshPolicyEx(bmachine : super::super::Foundation:: BOOL, dwoptions : u32) -> super::super::Foundation:: BOOL); - RefreshPolicyEx(bmachine.into_param().abi(), dwoptions) + RefreshPolicyEx(bmachine.into_param().abi(), dwoptions).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterGPNotification(hevent: P0, bmachine: P1) -> super::super::Foundation::BOOL +pub unsafe fn RegisterGPNotification(hevent: P0, bmachine: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn RegisterGPNotification(hevent : super::super::Foundation:: HANDLE, bmachine : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterGPNotification(hevent.into_param().abi(), bmachine.into_param().abi()) + RegisterGPNotification(hevent.into_param().abi(), bmachine.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -295,12 +295,12 @@ where #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterGPNotification(hevent: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterGPNotification(hevent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn UnregisterGPNotification(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterGPNotification(hevent.into_param().abi()) + UnregisterGPNotification(hevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_GroupPolicy\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs index fd0da8aea4..5dfd790b66 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -1,42 +1,42 @@ #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BindIoCompletionCallback(filehandle: P0, function: LPOVERLAPPED_COMPLETION_ROUTINE, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn BindIoCompletionCallback(filehandle: P0, function: LPOVERLAPPED_COMPLETION_ROUTINE, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn BindIoCompletionCallback(filehandle : super::super::Foundation:: HANDLE, function : LPOVERLAPPED_COMPLETION_ROUTINE, flags : u32) -> super::super::Foundation:: BOOL); - BindIoCompletionCallback(filehandle.into_param().abi(), function, flags) + BindIoCompletionCallback(filehandle.into_param().abi(), function, flags).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CancelIo(hfile: P0) -> super::super::Foundation::BOOL +pub unsafe fn CancelIo(hfile: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CancelIo(hfile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelIo(hfile.into_param().abi()) + CancelIo(hfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CancelIoEx(hfile: P0, lpoverlapped: ::core::option::Option<*const OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn CancelIoEx(hfile: P0, lpoverlapped: ::core::option::Option<*const OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CancelIoEx(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED) -> super::super::Foundation:: BOOL); - CancelIoEx(hfile.into_param().abi(), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null()))) + CancelIoEx(hfile.into_param().abi(), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CancelSynchronousIo(hthread: P0) -> super::super::Foundation::BOOL +pub unsafe fn CancelSynchronousIo(hthread: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CancelSynchronousIo(hthread : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelSynchronousIo(hthread.into_param().abi()) + CancelSynchronousIo(hthread.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -53,65 +53,65 @@ where #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeviceIoControl(hdevice: P0, dwiocontrolcode: u32, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn DeviceIoControl(hdevice: P0, dwiocontrolcode: u32, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: ::core::option::Option<*mut u32>, lpoverlapped: ::core::option::Option<*mut OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeviceIoControl(hdevice : super::super::Foundation:: HANDLE, dwiocontrolcode : u32, lpinbuffer : *const ::core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut ::core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpoverlapped : *mut OVERLAPPED) -> super::super::Foundation:: BOOL); - DeviceIoControl(hdevice.into_param().abi(), dwiocontrolcode, ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + DeviceIoControl(hdevice.into_param().abi(), dwiocontrolcode, ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, ::core::mem::transmute(lpbytesreturned.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetOverlappedResult(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn GetOverlappedResult(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResult(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResult(hfile.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, bwait.into_param().abi()) + GetOverlappedResult(hfile.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetOverlappedResultEx(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: P1) -> super::super::Foundation::BOOL +pub unsafe fn GetOverlappedResultEx(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, dwmilliseconds: u32, balertable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetOverlappedResultEx(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED, lpnumberofbytestransferred : *mut u32, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetOverlappedResultEx(hfile.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, dwmilliseconds, balertable.into_param().abi()) + GetOverlappedResultEx(hfile.into_param().abi(), lpoverlapped, lpnumberofbytestransferred, dwmilliseconds, balertable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetQueuedCompletionStatus(completionport: P0, lpnumberofbytestransferred: *mut u32, lpcompletionkey: *mut usize, lpoverlapped: *mut *mut OVERLAPPED, dwmilliseconds: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetQueuedCompletionStatus(completionport: P0, lpnumberofbytestransferred: *mut u32, lpcompletionkey: *mut usize, lpoverlapped: *mut *mut OVERLAPPED, dwmilliseconds: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatus(completionport : super::super::Foundation:: HANDLE, lpnumberofbytestransferred : *mut u32, lpcompletionkey : *mut usize, lpoverlapped : *mut *mut OVERLAPPED, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatus(completionport.into_param().abi(), lpnumberofbytestransferred, lpcompletionkey, lpoverlapped, dwmilliseconds) + GetQueuedCompletionStatus(completionport.into_param().abi(), lpnumberofbytestransferred, lpcompletionkey, lpoverlapped, dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetQueuedCompletionStatusEx(completionport: P0, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: P1) -> super::super::Foundation::BOOL +pub unsafe fn GetQueuedCompletionStatusEx(completionport: P0, lpcompletionportentries: &mut [OVERLAPPED_ENTRY], ulnumentriesremoved: *mut u32, dwmilliseconds: u32, falertable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetQueuedCompletionStatusEx(completionport : super::super::Foundation:: HANDLE, lpcompletionportentries : *mut OVERLAPPED_ENTRY, ulcount : u32, ulnumentriesremoved : *mut u32, dwmilliseconds : u32, falertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetQueuedCompletionStatusEx(completionport.into_param().abi(), ::core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len() as _, ulnumentriesremoved, dwmilliseconds, falertable.into_param().abi()) + GetQueuedCompletionStatusEx(completionport.into_param().abi(), ::core::mem::transmute(lpcompletionportentries.as_ptr()), lpcompletionportentries.len() as _, ulnumentriesremoved, dwmilliseconds, falertable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PostQueuedCompletionStatus(completionport: P0, dwnumberofbytestransferred: u32, dwcompletionkey: usize, lpoverlapped: ::core::option::Option<*const OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn PostQueuedCompletionStatus(completionport: P0, dwnumberofbytestransferred: u32, dwcompletionkey: usize, lpoverlapped: ::core::option::Option<*const OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PostQueuedCompletionStatus(completionport : super::super::Foundation:: HANDLE, dwnumberofbytestransferred : u32, dwcompletionkey : usize, lpoverlapped : *const OVERLAPPED) -> super::super::Foundation:: BOOL); - PostQueuedCompletionStatus(completionport.into_param().abi(), dwnumberofbytestransferred, dwcompletionkey, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null()))) + PostQueuedCompletionStatus(completionport.into_param().abi(), dwnumberofbytestransferred, dwcompletionkey, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null()))).ok() } #[repr(C)] #[doc = "*Required features: `\"Win32_System_IO\"`, `\"Win32_Foundation\"`*"] diff --git a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs index fd939601bd..c25f5ae3bb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -1,13 +1,13 @@ #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AssignProcessToJobObject(hjob: P0, hprocess: P1) -> super::super::Foundation::BOOL +pub unsafe fn AssignProcessToJobObject(hjob: P0, hprocess: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AssignProcessToJobObject(hjob : super::super::Foundation:: HANDLE, hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AssignProcessToJobObject(hjob.into_param().abi(), hprocess.into_param().abi()) + AssignProcessToJobObject(hjob.into_param().abi(), hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -47,13 +47,13 @@ pub unsafe fn FreeMemoryJobObject(buffer: *const ::core::ffi::c_void) { #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsProcessInJob(processhandle: P0, jobhandle: P1, result: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn IsProcessInJob(processhandle: P0, jobhandle: P1, result: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn IsProcessInJob(processhandle : super::super::Foundation:: HANDLE, jobhandle : super::super::Foundation:: HANDLE, result : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsProcessInJob(processhandle.into_param().abi(), jobhandle.into_param().abi(), result) + IsProcessInJob(processhandle.into_param().abi(), jobhandle.into_param().abi(), result).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -82,12 +82,12 @@ where #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *mut ::core::ffi::c_void, cbjobobjectinformationlength: u32, lpreturnlength: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn QueryInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *mut ::core::ffi::c_void, cbjobobjectinformationlength: u32, lpreturnlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryInformationJobObject(hjob : super::super::Foundation:: HANDLE, jobobjectinformationclass : JOBOBJECTINFOCLASS, lpjobobjectinformation : *mut ::core::ffi::c_void, cbjobobjectinformationlength : u32, lpreturnlength : *mut u32) -> super::super::Foundation:: BOOL); - QueryInformationJobObject(hjob.into_param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength, ::core::mem::transmute(lpreturnlength.unwrap_or(::std::ptr::null_mut()))) + QueryInformationJobObject(hjob.into_param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength, ::core::mem::transmute(lpreturnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -103,12 +103,12 @@ where #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *const ::core::ffi::c_void, cbjobobjectinformationlength: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetInformationJobObject(hjob: P0, jobobjectinformationclass: JOBOBJECTINFOCLASS, lpjobobjectinformation: *const ::core::ffi::c_void, cbjobobjectinformationlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetInformationJobObject(hjob : super::super::Foundation:: HANDLE, jobobjectinformationclass : JOBOBJECTINFOCLASS, lpjobobjectinformation : *const ::core::ffi::c_void, cbjobobjectinformationlength : u32) -> super::super::Foundation:: BOOL); - SetInformationJobObject(hjob.into_param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength) + SetInformationJobObject(hjob.into_param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -123,24 +123,24 @@ where #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateJobObject(hjob: P0, uexitcode: u32) -> super::super::Foundation::BOOL +pub unsafe fn TerminateJobObject(hjob: P0, uexitcode: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn TerminateJobObject(hjob : super::super::Foundation:: HANDLE, uexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateJobObject(hjob.into_param().abi(), uexitcode) + TerminateJobObject(hjob.into_param().abi(), uexitcode).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UserHandleGrantAccess(huserhandle: P0, hjob: P1, bgrant: P2) -> super::super::Foundation::BOOL +pub unsafe fn UserHandleGrantAccess(huserhandle: P0, hjob: P1, bgrant: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UserHandleGrantAccess(huserhandle : super::super::Foundation:: HANDLE, hjob : super::super::Foundation:: HANDLE, bgrant : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UserHandleGrantAccess(huserhandle.into_param().abi(), hjob.into_param().abi(), bgrant.into_param().abi()) + UserHandleGrantAccess(huserhandle.into_param().abi(), hjob.into_param().abi(), bgrant.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_JobObjects\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs index a7f7a439b3..ef37970598 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -34,115 +34,115 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DisableThreadLibraryCalls(hlibmodule: P0) -> super::super::Foundation::BOOL +pub unsafe fn DisableThreadLibraryCalls(hlibmodule: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DisableThreadLibraryCalls(hlibmodule : super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - DisableThreadLibraryCalls(hlibmodule.into_param().abi()) + DisableThreadLibraryCalls(hlibmodule.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EndUpdateResourceA(hupdate: P0, fdiscard: P1) -> super::super::Foundation::BOOL +pub unsafe fn EndUpdateResourceA(hupdate: P0, fdiscard: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceA(hupdate : UPDATERESOURCE_HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceA(hupdate.into_param().abi(), fdiscard.into_param().abi()) + EndUpdateResourceA(hupdate.into_param().abi(), fdiscard.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EndUpdateResourceW(hupdate: P0, fdiscard: P1) -> super::super::Foundation::BOOL +pub unsafe fn EndUpdateResourceW(hupdate: P0, fdiscard: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EndUpdateResourceW(hupdate : UPDATERESOURCE_HANDLE, fdiscard : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - EndUpdateResourceW(hupdate.into_param().abi(), fdiscard.into_param().abi()) + EndUpdateResourceW(hupdate.into_param().abi(), fdiscard.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceLanguagesA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceLanguagesA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesA(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCSTR, lpname : ::windows_core::PCSTR, lpenumfunc : ENUMRESLANGPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesA(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam) + EnumResourceLanguagesA(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceLanguagesExA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceLanguagesExA(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCA, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesExA(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCSTR, lpname : ::windows_core::PCSTR, lpenumfunc : ENUMRESLANGPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesExA(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceLanguagesExA(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceLanguagesExW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceLanguagesExW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesExW(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCWSTR, lpname : ::windows_core::PCWSTR, lpenumfunc : ENUMRESLANGPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesExW(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceLanguagesExW(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceLanguagesW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceLanguagesW(hmodule: P0, lptype: P1, lpname: P2, lpenumfunc: ENUMRESLANGPROCW, lparam: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceLanguagesW(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCWSTR, lpname : ::windows_core::PCWSTR, lpenumfunc : ENUMRESLANGPROCW, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceLanguagesW(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam) + EnumResourceLanguagesW(hmodule.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), lpenumfunc, lparam).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceNamesA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceNamesA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesA(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCSTR, lpenumfunc : ENUMRESNAMEPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceNamesA(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam) + EnumResourceNamesA(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceNamesExA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceNamesExA(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCA, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesExA(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCSTR, lpenumfunc : ENUMRESNAMEPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceNamesExA(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceNamesExA(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceNamesExW(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceNamesExW(hmodule: P0, lptype: P1, lpenumfunc: ENUMRESNAMEPROCW, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceNamesExW(hmodule : super::super::Foundation:: HMODULE, lptype : ::windows_core::PCWSTR, lpenumfunc : ENUMRESNAMEPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceNamesExW(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceNamesExW(hmodule.into_param().abi(), lptype.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -158,42 +158,42 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceTypesA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceTypesA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesA(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCA, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceTypesA(hmodule.into_param().abi(), lpenumfunc, lparam) + EnumResourceTypesA(hmodule.into_param().abi(), lpenumfunc, lparam).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceTypesExA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceTypesExA(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCA, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesExA(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCA, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceTypesExA(hmodule.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceTypesExA(hmodule.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceTypesExW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize, dwflags: u32, langid: u16) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceTypesExW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize, dwflags: u32, langid: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesExW(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCW, lparam : isize, dwflags : u32, langid : u16) -> super::super::Foundation:: BOOL); - EnumResourceTypesExW(hmodule.into_param().abi(), lpenumfunc, lparam, dwflags, langid) + EnumResourceTypesExW(hmodule.into_param().abi(), lpenumfunc, lparam, dwflags, langid).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumResourceTypesW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize) -> super::super::Foundation::BOOL +pub unsafe fn EnumResourceTypesW(hmodule: P0, lpenumfunc: ENUMRESTYPEPROCW, lparam: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn EnumResourceTypesW(hmodule : super::super::Foundation:: HMODULE, lpenumfunc : ENUMRESTYPEPROCW, lparam : isize) -> super::super::Foundation:: BOOL); - EnumResourceTypesW(hmodule.into_param().abi(), lpenumfunc, lparam) + EnumResourceTypesW(hmodule.into_param().abi(), lpenumfunc, lparam).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -248,12 +248,12 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeLibrary(hlibmodule: P0) -> super::super::Foundation::BOOL +pub unsafe fn FreeLibrary(hlibmodule: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FreeLibrary(hlibmodule : super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - FreeLibrary(hlibmodule.into_param().abi()) + FreeLibrary(hlibmodule.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -321,22 +321,22 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetModuleHandleExA(dwflags: u32, lpmodulename: P0, phmodule: *mut super::super::Foundation::HMODULE) -> super::super::Foundation::BOOL +pub unsafe fn GetModuleHandleExA(dwflags: u32, lpmodulename: P0, phmodule: *mut super::super::Foundation::HMODULE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetModuleHandleExA(dwflags : u32, lpmodulename : ::windows_core::PCSTR, phmodule : *mut super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - GetModuleHandleExA(dwflags, lpmodulename.into_param().abi(), phmodule) + GetModuleHandleExA(dwflags, lpmodulename.into_param().abi(), phmodule).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetModuleHandleExW(dwflags: u32, lpmodulename: P0, phmodule: *mut super::super::Foundation::HMODULE) -> super::super::Foundation::BOOL +pub unsafe fn GetModuleHandleExW(dwflags: u32, lpmodulename: P0, phmodule: *mut super::super::Foundation::HMODULE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn GetModuleHandleExW(dwflags : u32, lpmodulename : ::windows_core::PCWSTR, phmodule : *mut super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - GetModuleHandleExW(dwflags, lpmodulename.into_param().abi(), phmodule) + GetModuleHandleExW(dwflags, lpmodulename.into_param().abi(), phmodule).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -451,36 +451,36 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveDllDirectory(cookie: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn RemoveDllDirectory(cookie: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn RemoveDllDirectory(cookie : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveDllDirectory(cookie) + RemoveDllDirectory(cookie).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDefaultDllDirectories(directoryflags: LOAD_LIBRARY_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn SetDefaultDllDirectories(directoryflags: LOAD_LIBRARY_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetDefaultDllDirectories(directoryflags : LOAD_LIBRARY_FLAGS) -> super::super::Foundation:: BOOL); - SetDefaultDllDirectories(directoryflags) + SetDefaultDllDirectories(directoryflags).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDllDirectoryA(lppathname: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetDllDirectoryA(lppathname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetDllDirectoryA(lppathname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetDllDirectoryA(lppathname.into_param().abi()) + SetDllDirectoryA(lppathname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDllDirectoryW(lppathname: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetDllDirectoryW(lppathname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetDllDirectoryW(lppathname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetDllDirectoryW(lppathname.into_param().abi()) + SetDllDirectoryW(lppathname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -496,26 +496,26 @@ where #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateResourceA(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn UpdateResourceA(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn UpdateResourceA(hupdate : UPDATERESOURCE_HANDLE, lptype : ::windows_core::PCSTR, lpname : ::windows_core::PCSTR, wlanguage : u16, lpdata : *const ::core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - UpdateResourceA(hupdate.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), wlanguage, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cb) + UpdateResourceA(hupdate.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), wlanguage, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cb).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateResourceW(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn UpdateResourceW(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn UpdateResourceW(hupdate : UPDATERESOURCE_HANDLE, lptype : ::windows_core::PCWSTR, lpname : ::windows_core::PCWSTR, wlanguage : u16, lpdata : *const ::core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - UpdateResourceW(hupdate.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), wlanguage, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cb) + UpdateResourceW(hupdate.into_param().abi(), lptype.into_param().abi(), lpname.into_param().abi(), wlanguage, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cb).ok() } #[doc = "*Required features: `\"Win32_System_LibraryLoader\"`*"] pub const CURRENT_IMPORT_REDIRECTION_VERSION: u32 = 1u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs index ae2b337c7e..b2719f6679 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs @@ -23,22 +23,22 @@ where #[doc = "*Required features: `\"Win32_System_Mailslots\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetMailslotInfo(hmailslot: P0, lpmaxmessagesize: ::core::option::Option<*mut u32>, lpnextsize: ::core::option::Option<*mut u32>, lpmessagecount: ::core::option::Option<*mut u32>, lpreadtimeout: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetMailslotInfo(hmailslot: P0, lpmaxmessagesize: ::core::option::Option<*mut u32>, lpnextsize: ::core::option::Option<*mut u32>, lpmessagecount: ::core::option::Option<*mut u32>, lpreadtimeout: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetMailslotInfo(hmailslot : super::super::Foundation:: HANDLE, lpmaxmessagesize : *mut u32, lpnextsize : *mut u32, lpmessagecount : *mut u32, lpreadtimeout : *mut u32) -> super::super::Foundation:: BOOL); - GetMailslotInfo(hmailslot.into_param().abi(), ::core::mem::transmute(lpmaxmessagesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnextsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmessagecount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreadtimeout.unwrap_or(::std::ptr::null_mut()))) + GetMailslotInfo(hmailslot.into_param().abi(), ::core::mem::transmute(lpmaxmessagesize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpnextsize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmessagecount.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreadtimeout.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Mailslots\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetMailslotInfo(hmailslot: P0, lreadtimeout: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetMailslotInfo(hmailslot: P0, lreadtimeout: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetMailslotInfo(hmailslot : super::super::Foundation:: HANDLE, lreadtimeout : u32) -> super::super::Foundation:: BOOL); - SetMailslotInfo(hmailslot.into_param().abi(), lreadtimeout) + SetMailslotInfo(hmailslot.into_param().abi(), lreadtimeout).ok() } #[cfg(feature = "implement")] ::core::include!("impl.rs"); diff --git a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs index 2b2bd258d5..6862d8da61 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -3,19 +3,19 @@ pub mod NonVolatile; #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddSecureMemoryCacheCallback(pfncallback: PSECURE_MEMORY_CACHE_CALLBACK) -> super::super::Foundation::BOOL { +pub unsafe fn AddSecureMemoryCacheCallback(pfncallback: PSECURE_MEMORY_CACHE_CALLBACK) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn AddSecureMemoryCacheCallback(pfncallback : PSECURE_MEMORY_CACHE_CALLBACK) -> super::super::Foundation:: BOOL); - AddSecureMemoryCacheCallback(pfncallback) + AddSecureMemoryCacheCallback(pfncallback).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocateUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize) -> super::super::Foundation::BOOL +pub unsafe fn AllocateUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AllocateUserPhysicalPages(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPages(hprocess.into_param().abi(), numberofpages, pagearray) + AllocateUserPhysicalPages(hprocess.into_param().abi(), numberofpages, pagearray).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -30,12 +30,12 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllocateUserPhysicalPagesNuma(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize, nndpreferred: u32) -> super::super::Foundation::BOOL +pub unsafe fn AllocateUserPhysicalPagesNuma(hprocess: P0, numberofpages: *mut usize, pagearray: *mut usize, nndpreferred: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AllocateUserPhysicalPagesNuma(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *mut usize, nndpreferred : u32) -> super::super::Foundation:: BOOL); - AllocateUserPhysicalPagesNuma(hprocess.into_param().abi(), numberofpages, pagearray, nndpreferred) + AllocateUserPhysicalPagesNuma(hprocess.into_param().abi(), numberofpages, pagearray, nndpreferred).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -126,19 +126,19 @@ pub unsafe fn DiscardVirtualMemory(virtualaddress: &mut [u8]) -> u32 { #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlushViewOfFile(lpbaseaddress: *const ::core::ffi::c_void, dwnumberofbytestoflush: usize) -> super::super::Foundation::BOOL { +pub unsafe fn FlushViewOfFile(lpbaseaddress: *const ::core::ffi::c_void, dwnumberofbytestoflush: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FlushViewOfFile(lpbaseaddress : *const ::core::ffi::c_void, dwnumberofbytestoflush : usize) -> super::super::Foundation:: BOOL); - FlushViewOfFile(lpbaseaddress, dwnumberofbytestoflush) + FlushViewOfFile(lpbaseaddress, dwnumberofbytestoflush).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FreeUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *const usize) -> super::super::Foundation::BOOL +pub unsafe fn FreeUserPhysicalPages(hprocess: P0, numberofpages: *mut usize, pagearray: *const usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn FreeUserPhysicalPages(hprocess : super::super::Foundation:: HANDLE, numberofpages : *mut usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - FreeUserPhysicalPages(hprocess.into_param().abi(), numberofpages, pagearray) + FreeUserPhysicalPages(hprocess.into_param().abi(), numberofpages, pagearray).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -149,9 +149,9 @@ pub unsafe fn GetLargePageMinimum() -> usize { #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetMemoryErrorHandlingCapabilities(capabilities: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetMemoryErrorHandlingCapabilities(capabilities: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetMemoryErrorHandlingCapabilities(capabilities : *mut u32) -> super::super::Foundation:: BOOL); - GetMemoryErrorHandlingCapabilities(capabilities) + GetMemoryErrorHandlingCapabilities(capabilities).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -179,9 +179,9 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemFileCacheSize(lpminimumfilecachesize: *mut usize, lpmaximumfilecachesize: *mut usize, lpflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemFileCacheSize(lpminimumfilecachesize: *mut usize, lpmaximumfilecachesize: *mut usize, lpflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemFileCacheSize(lpminimumfilecachesize : *mut usize, lpmaximumfilecachesize : *mut usize, lpflags : *mut u32) -> super::super::Foundation:: BOOL); - GetSystemFileCacheSize(lpminimumfilecachesize, lpmaximumfilecachesize, lpflags) + GetSystemFileCacheSize(lpminimumfilecachesize, lpmaximumfilecachesize, lpflags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -260,12 +260,12 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GlobalUnlock(hmem: P0) -> super::super::Foundation::BOOL +pub unsafe fn GlobalUnlock(hmem: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GlobalUnlock(hmem : super::super::Foundation:: HGLOBAL) -> super::super::Foundation:: BOOL); - GlobalUnlock(hmem.into_param().abi()) + GlobalUnlock(hmem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -295,42 +295,42 @@ pub unsafe fn HeapCreate(floptions: HEAP_FLAGS, dwinitialsize: usize, dwmaximums #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapDestroy(hheap: P0) -> super::super::Foundation::BOOL +pub unsafe fn HeapDestroy(hheap: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapDestroy(hheap : HeapHandle) -> super::super::Foundation:: BOOL); - HeapDestroy(hheap.into_param().abi()) + HeapDestroy(hheap.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapFree(hheap: P0, dwflags: HEAP_FLAGS, lpmem: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn HeapFree(hheap: P0, dwflags: HEAP_FLAGS, lpmem: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapFree(hheap : HeapHandle, dwflags : HEAP_FLAGS, lpmem : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - HeapFree(hheap.into_param().abi(), dwflags, ::core::mem::transmute(lpmem.unwrap_or(::std::ptr::null()))) + HeapFree(hheap.into_param().abi(), dwflags, ::core::mem::transmute(lpmem.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapLock(hheap: P0) -> super::super::Foundation::BOOL +pub unsafe fn HeapLock(hheap: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapLock(hheap : HeapHandle) -> super::super::Foundation:: BOOL); - HeapLock(hheap.into_param().abi()) + HeapLock(hheap.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapQueryInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: ::core::option::Option<*mut ::core::ffi::c_void>, heapinformationlength: usize, returnlength: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL +pub unsafe fn HeapQueryInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: ::core::option::Option<*mut ::core::ffi::c_void>, heapinformationlength: usize, returnlength: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapQueryInformation(heaphandle : HeapHandle, heapinformationclass : HEAP_INFORMATION_CLASS, heapinformation : *mut ::core::ffi::c_void, heapinformationlength : usize, returnlength : *mut usize) -> super::super::Foundation:: BOOL); - HeapQueryInformation(heaphandle.into_param().abi(), heapinformationclass, ::core::mem::transmute(heapinformation.unwrap_or(::std::ptr::null_mut())), heapinformationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))) + HeapQueryInformation(heaphandle.into_param().abi(), heapinformationclass, ::core::mem::transmute(heapinformation.unwrap_or(::std::ptr::null_mut())), heapinformationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -344,12 +344,12 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapSetInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: ::core::option::Option<*const ::core::ffi::c_void>, heapinformationlength: usize) -> super::super::Foundation::BOOL +pub unsafe fn HeapSetInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: ::core::option::Option<*const ::core::ffi::c_void>, heapinformationlength: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapSetInformation(heaphandle : HeapHandle, heapinformationclass : HEAP_INFORMATION_CLASS, heapinformation : *const ::core::ffi::c_void, heapinformationlength : usize) -> super::super::Foundation:: BOOL); - HeapSetInformation(heaphandle.into_param().abi(), heapinformationclass, ::core::mem::transmute(heapinformation.unwrap_or(::std::ptr::null())), heapinformationlength) + HeapSetInformation(heaphandle.into_param().abi(), heapinformationclass, ::core::mem::transmute(heapinformation.unwrap_or(::std::ptr::null())), heapinformationlength).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -373,12 +373,12 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapUnlock(hheap: P0) -> super::super::Foundation::BOOL +pub unsafe fn HeapUnlock(hheap: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapUnlock(hheap : HeapHandle) -> super::super::Foundation:: BOOL); - HeapUnlock(hheap.into_param().abi()) + HeapUnlock(hheap.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -393,19 +393,19 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HeapWalk(hheap: P0, lpentry: *mut PROCESS_HEAP_ENTRY) -> super::super::Foundation::BOOL +pub unsafe fn HeapWalk(hheap: P0, lpentry: *mut PROCESS_HEAP_ENTRY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn HeapWalk(hheap : HeapHandle, lpentry : *mut PROCESS_HEAP_ENTRY) -> super::super::Foundation:: BOOL); - HeapWalk(hheap.into_param().abi(), lpentry) + HeapWalk(hheap.into_param().abi(), lpentry).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsBadCodePtr(lpfn: super::super::Foundation::FARPROC) -> super::super::Foundation::BOOL { +pub unsafe fn IsBadCodePtr(lpfn: super::super::Foundation::FARPROC) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsBadCodePtr(lpfn : super::super::Foundation:: FARPROC) -> super::super::Foundation:: BOOL); - IsBadCodePtr(lpfn) + IsBadCodePtr(lpfn).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -512,26 +512,26 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LocalUnlock(hmem: P0) -> super::super::Foundation::BOOL +pub unsafe fn LocalUnlock(hmem: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn LocalUnlock(hmem : super::super::Foundation:: HLOCAL) -> super::super::Foundation:: BOOL); - LocalUnlock(hmem.into_param().abi()) + LocalUnlock(hmem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MapUserPhysicalPages(virtualaddress: *const ::core::ffi::c_void, pagearray: ::core::option::Option<&[usize]>) -> super::super::Foundation::BOOL { +pub unsafe fn MapUserPhysicalPages(virtualaddress: *const ::core::ffi::c_void, pagearray: ::core::option::Option<&[usize]>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn MapUserPhysicalPages(virtualaddress : *const ::core::ffi::c_void, numberofpages : usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - MapUserPhysicalPages(virtualaddress, pagearray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pagearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + MapUserPhysicalPages(virtualaddress, pagearray.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pagearray.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MapUserPhysicalPagesScatter(virtualaddresses: *const *const ::core::ffi::c_void, numberofpages: usize, pagearray: ::core::option::Option<*const usize>) -> super::super::Foundation::BOOL { +pub unsafe fn MapUserPhysicalPagesScatter(virtualaddresses: *const *const ::core::ffi::c_void, numberofpages: usize, pagearray: ::core::option::Option<*const usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn MapUserPhysicalPagesScatter(virtualaddresses : *const *const ::core::ffi::c_void, numberofpages : usize, pagearray : *const usize) -> super::super::Foundation:: BOOL); - MapUserPhysicalPagesScatter(virtualaddresses, numberofpages, ::core::mem::transmute(pagearray.unwrap_or(::std::ptr::null()))) + MapUserPhysicalPagesScatter(virtualaddresses, numberofpages, ::core::mem::transmute(pagearray.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -662,22 +662,22 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PrefetchVirtualMemory(hprocess: P0, virtualaddresses: &[WIN32_MEMORY_RANGE_ENTRY], flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn PrefetchVirtualMemory(hprocess: P0, virtualaddresses: &[WIN32_MEMORY_RANGE_ENTRY], flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PrefetchVirtualMemory(hprocess : super::super::Foundation:: HANDLE, numberofentries : usize, virtualaddresses : *const WIN32_MEMORY_RANGE_ENTRY, flags : u32) -> super::super::Foundation:: BOOL); - PrefetchVirtualMemory(hprocess.into_param().abi(), virtualaddresses.len() as _, ::core::mem::transmute(virtualaddresses.as_ptr()), flags) + PrefetchVirtualMemory(hprocess.into_param().abi(), virtualaddresses.len() as _, ::core::mem::transmute(virtualaddresses.as_ptr()), flags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryMemoryResourceNotification(resourcenotificationhandle: P0, resourcestate: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn QueryMemoryResourceNotification(resourcenotificationhandle: P0, resourcestate: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryMemoryResourceNotification(resourcenotificationhandle : super::super::Foundation:: HANDLE, resourcestate : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - QueryMemoryResourceNotification(resourcenotificationhandle.into_param().abi(), resourcestate) + QueryMemoryResourceNotification(resourcenotificationhandle.into_param().abi(), resourcestate).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -692,12 +692,12 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryVirtualMemoryInformation(process: P0, virtualaddress: *const ::core::ffi::c_void, memoryinformationclass: WIN32_MEMORY_INFORMATION_CLASS, memoryinformation: *mut ::core::ffi::c_void, memoryinformationsize: usize, returnsize: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL +pub unsafe fn QueryVirtualMemoryInformation(process: P0, virtualaddress: *const ::core::ffi::c_void, memoryinformationclass: WIN32_MEMORY_INFORMATION_CLASS, memoryinformation: *mut ::core::ffi::c_void, memoryinformationsize: usize, returnsize: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-4.dll" "system" fn QueryVirtualMemoryInformation(process : super::super::Foundation:: HANDLE, virtualaddress : *const ::core::ffi::c_void, memoryinformationclass : WIN32_MEMORY_INFORMATION_CLASS, memoryinformation : *mut ::core::ffi::c_void, memoryinformationsize : usize, returnsize : *mut usize) -> super::super::Foundation:: BOOL); - QueryVirtualMemoryInformation(process.into_param().abi(), virtualaddress, memoryinformationclass, memoryinformation, memoryinformationsize, ::core::mem::transmute(returnsize.unwrap_or(::std::ptr::null_mut()))) + QueryVirtualMemoryInformation(process.into_param().abi(), virtualaddress, memoryinformationclass, memoryinformation, memoryinformationsize, ::core::mem::transmute(returnsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -752,12 +752,12 @@ pub unsafe fn RtlIsZeroMemory(buffer: *const ::core::ffi::c_void, length: usize) #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessValidCallTargets(hprocess: P0, virtualaddress: *const ::core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO]) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessValidCallTargets(hprocess: P0, virtualaddress: *const ::core::ffi::c_void, regionsize: usize, offsetinformation: &mut [CFG_CALL_TARGET_INFO]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn SetProcessValidCallTargets(hprocess : super::super::Foundation:: HANDLE, virtualaddress : *const ::core::ffi::c_void, regionsize : usize, numberofoffsets : u32, offsetinformation : *mut CFG_CALL_TARGET_INFO) -> super::super::Foundation:: BOOL); - SetProcessValidCallTargets(hprocess.into_param().abi(), virtualaddress, regionsize, offsetinformation.len() as _, ::core::mem::transmute(offsetinformation.as_ptr())) + SetProcessValidCallTargets(hprocess.into_param().abi(), virtualaddress, regionsize, offsetinformation.len() as _, ::core::mem::transmute(offsetinformation.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -773,50 +773,50 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessWorkingSetSizeEx(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessWorkingSetSizeEx(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessWorkingSetSizeEx(hprocess : super::super::Foundation:: HANDLE, dwminimumworkingsetsize : usize, dwmaximumworkingsetsize : usize, flags : u32) -> super::super::Foundation:: BOOL); - SetProcessWorkingSetSizeEx(hprocess.into_param().abi(), dwminimumworkingsetsize, dwmaximumworkingsetsize, flags) + SetProcessWorkingSetSizeEx(hprocess.into_param().abi(), dwminimumworkingsetsize, dwmaximumworkingsetsize, flags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemFileCacheSize(minimumfilecachesize: usize, maximumfilecachesize: usize, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetSystemFileCacheSize(minimumfilecachesize: usize, maximumfilecachesize: usize, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetSystemFileCacheSize(minimumfilecachesize : usize, maximumfilecachesize : usize, flags : u32) -> super::super::Foundation:: BOOL); - SetSystemFileCacheSize(minimumfilecachesize, maximumfilecachesize, flags) + SetSystemFileCacheSize(minimumfilecachesize, maximumfilecachesize, flags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnmapViewOfFile(lpbaseaddress: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn UnmapViewOfFile(lpbaseaddress: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UnmapViewOfFile(lpbaseaddress : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - UnmapViewOfFile(lpbaseaddress) + UnmapViewOfFile(lpbaseaddress).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnmapViewOfFile2(process: P0, baseaddress: *const ::core::ffi::c_void, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn UnmapViewOfFile2(process: P0, baseaddress: *const ::core::ffi::c_void, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-memory-l1-1-5.dll" "system" fn UnmapViewOfFile2(process : super::super::Foundation:: HANDLE, baseaddress : *const ::core::ffi::c_void, unmapflags : UNMAP_VIEW_OF_FILE_FLAGS) -> super::super::Foundation:: BOOL); - UnmapViewOfFile2(process.into_param().abi(), baseaddress, unmapflags) + UnmapViewOfFile2(process.into_param().abi(), baseaddress, unmapflags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnmapViewOfFileEx(baseaddress: *const ::core::ffi::c_void, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn UnmapViewOfFileEx(baseaddress: *const ::core::ffi::c_void, unmapflags: UNMAP_VIEW_OF_FILE_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UnmapViewOfFileEx(baseaddress : *const ::core::ffi::c_void, unmapflags : UNMAP_VIEW_OF_FILE_FLAGS) -> super::super::Foundation:: BOOL); - UnmapViewOfFileEx(baseaddress, unmapflags) + UnmapViewOfFileEx(baseaddress, unmapflags).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterBadMemoryNotification(registrationhandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn UnregisterBadMemoryNotification(registrationhandle: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UnregisterBadMemoryNotification(registrationhandle : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - UnregisterBadMemoryNotification(registrationhandle) + UnregisterBadMemoryNotification(registrationhandle).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -873,50 +873,50 @@ pub unsafe fn VirtualAllocFromApp(baseaddress: ::core::option::Option<*const ::c #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualFree(lpaddress: *mut ::core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> super::super::Foundation::BOOL { +pub unsafe fn VirtualFree(lpaddress: *mut ::core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VirtualFree(lpaddress : *mut ::core::ffi::c_void, dwsize : usize, dwfreetype : VIRTUAL_FREE_TYPE) -> super::super::Foundation:: BOOL); - VirtualFree(lpaddress, dwsize, dwfreetype) + VirtualFree(lpaddress, dwsize, dwfreetype).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualFreeEx(hprocess: P0, lpaddress: *mut ::core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn VirtualFreeEx(hprocess: P0, lpaddress: *mut ::core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn VirtualFreeEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *mut ::core::ffi::c_void, dwsize : usize, dwfreetype : VIRTUAL_FREE_TYPE) -> super::super::Foundation:: BOOL); - VirtualFreeEx(hprocess.into_param().abi(), lpaddress, dwsize, dwfreetype) + VirtualFreeEx(hprocess.into_param().abi(), lpaddress, dwsize, dwfreetype).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualLock(lpaddress: *const ::core::ffi::c_void, dwsize: usize) -> super::super::Foundation::BOOL { +pub unsafe fn VirtualLock(lpaddress: *const ::core::ffi::c_void, dwsize: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VirtualLock(lpaddress : *const ::core::ffi::c_void, dwsize : usize) -> super::super::Foundation:: BOOL); - VirtualLock(lpaddress, dwsize) + VirtualLock(lpaddress, dwsize).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualProtect(lpaddress: *const ::core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn VirtualProtect(lpaddress: *const ::core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VirtualProtect(lpaddress : *const ::core::ffi::c_void, dwsize : usize, flnewprotect : PAGE_PROTECTION_FLAGS, lpfloldprotect : *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation:: BOOL); - VirtualProtect(lpaddress, dwsize, flnewprotect, lpfloldprotect) + VirtualProtect(lpaddress, dwsize, flnewprotect, lpfloldprotect).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualProtectEx(hprocess: P0, lpaddress: *const ::core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn VirtualProtectEx(hprocess: P0, lpaddress: *const ::core::ffi::c_void, dwsize: usize, flnewprotect: PAGE_PROTECTION_FLAGS, lpfloldprotect: *mut PAGE_PROTECTION_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn VirtualProtectEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const ::core::ffi::c_void, dwsize : usize, flnewprotect : PAGE_PROTECTION_FLAGS, lpfloldprotect : *mut PAGE_PROTECTION_FLAGS) -> super::super::Foundation:: BOOL); - VirtualProtectEx(hprocess.into_param().abi(), lpaddress, dwsize, flnewprotect, lpfloldprotect) + VirtualProtectEx(hprocess.into_param().abi(), lpaddress, dwsize, flnewprotect, lpfloldprotect).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualProtectFromApp(address: *const ::core::ffi::c_void, size: usize, newprotection: u32, oldprotection: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn VirtualProtectFromApp(address: *const ::core::ffi::c_void, size: usize, newprotection: u32, oldprotection: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn VirtualProtectFromApp(address : *const ::core::ffi::c_void, size : usize, newprotection : u32, oldprotection : *mut u32) -> super::super::Foundation:: BOOL); - VirtualProtectFromApp(address, size, newprotection, oldprotection) + VirtualProtectFromApp(address, size, newprotection, oldprotection).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`*"] #[inline] @@ -937,9 +937,9 @@ where #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VirtualUnlock(lpaddress: *const ::core::ffi::c_void, dwsize: usize) -> super::super::Foundation::BOOL { +pub unsafe fn VirtualUnlock(lpaddress: *const ::core::ffi::c_void, dwsize: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VirtualUnlock(lpaddress : *const ::core::ffi::c_void, dwsize : usize) -> super::super::Foundation:: BOOL); - VirtualUnlock(lpaddress, dwsize) + VirtualUnlock(lpaddress, dwsize).ok() } #[doc = "*Required features: `\"Win32_System_Memory\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs index 18d3872841..22312f3b3a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -1093,16 +1093,16 @@ where #[doc = "*Required features: `\"Win32_System_Performance\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryPerformanceCounter(lpperformancecount: *mut i64) -> super::super::Foundation::BOOL { +pub unsafe fn QueryPerformanceCounter(lpperformancecount: *mut i64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn QueryPerformanceCounter(lpperformancecount : *mut i64) -> super::super::Foundation:: BOOL); - QueryPerformanceCounter(lpperformancecount) + QueryPerformanceCounter(lpperformancecount).ok() } #[doc = "*Required features: `\"Win32_System_Performance\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryPerformanceFrequency(lpfrequency: *mut i64) -> super::super::Foundation::BOOL { +pub unsafe fn QueryPerformanceFrequency(lpfrequency: *mut i64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn QueryPerformanceFrequency(lpfrequency : *mut i64) -> super::super::Foundation:: BOOL); - QueryPerformanceFrequency(lpfrequency) + QueryPerformanceFrequency(lpfrequency).ok() } #[doc = "*Required features: `\"Win32_System_Performance\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs index 1dc0732eac..98557d0231 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs @@ -1,12 +1,12 @@ #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CallNamedPipeA(lpnamedpipename: P0, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, ntimeout: u32) -> super::super::Foundation::BOOL +pub unsafe fn CallNamedPipeA(lpnamedpipename: P0, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, ntimeout: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CallNamedPipeA(lpnamedpipename : ::windows_core::PCSTR, lpinbuffer : *const ::core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut ::core::ffi::c_void, noutbuffersize : u32, lpbytesread : *mut u32, ntimeout : u32) -> super::super::Foundation:: BOOL); - CallNamedPipeA(lpnamedpipename.into_param().abi(), ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, lpbytesread, ntimeout) + CallNamedPipeA(lpnamedpipename.into_param().abi(), ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, lpbytesread, ntimeout).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -21,12 +21,12 @@ where #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn ConnectNamedPipe(hnamedpipe: P0, lpoverlapped: ::core::option::Option<*mut super::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn ConnectNamedPipe(hnamedpipe: P0, lpoverlapped: ::core::option::Option<*mut super::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ConnectNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE, lpoverlapped : *mut super::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ConnectNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + ConnectNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_Storage_FileSystem\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] @@ -52,29 +52,29 @@ where #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreatePipe(hreadpipe: *mut super::super::Foundation::HANDLE, hwritepipe: *mut super::super::Foundation::HANDLE, lppipeattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, nsize: u32) -> super::super::Foundation::BOOL { +pub unsafe fn CreatePipe(hreadpipe: *mut super::super::Foundation::HANDLE, hwritepipe: *mut super::super::Foundation::HANDLE, lppipeattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, nsize: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn CreatePipe(hreadpipe : *mut super::super::Foundation:: HANDLE, hwritepipe : *mut super::super::Foundation:: HANDLE, lppipeattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, nsize : u32) -> super::super::Foundation:: BOOL); - CreatePipe(hreadpipe, hwritepipe, ::core::mem::transmute(lppipeattributes.unwrap_or(::std::ptr::null())), nsize) + CreatePipe(hreadpipe, hwritepipe, ::core::mem::transmute(lppipeattributes.unwrap_or(::std::ptr::null())), nsize).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DisconnectNamedPipe(hnamedpipe: P0) -> super::super::Foundation::BOOL +pub unsafe fn DisconnectNamedPipe(hnamedpipe: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DisconnectNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DisconnectNamedPipe(hnamedpipe.into_param().abi()) + DisconnectNamedPipe(hnamedpipe.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeClientComputerNameA(pipe: P0, clientcomputername: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeClientComputerNameA(pipe: P0, clientcomputername: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientComputerNameA(pipe : super::super::Foundation:: HANDLE, clientcomputername : ::windows_core::PSTR, clientcomputernamelength : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientComputerNameA(pipe.into_param().abi(), ::core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len() as _) + GetNamedPipeClientComputerNameA(pipe.into_param().abi(), ::core::mem::transmute(clientcomputername.as_ptr()), clientcomputername.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -89,27 +89,27 @@ where #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeClientProcessId(pipe: P0, clientprocessid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeClientProcessId(pipe: P0, clientprocessid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientProcessId(pipe : super::super::Foundation:: HANDLE, clientprocessid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientProcessId(pipe.into_param().abi(), clientprocessid) + GetNamedPipeClientProcessId(pipe.into_param().abi(), clientprocessid).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeClientSessionId(pipe: P0, clientsessionid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeClientSessionId(pipe: P0, clientsessionid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeClientSessionId(pipe : super::super::Foundation:: HANDLE, clientsessionid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeClientSessionId(pipe.into_param().abi(), clientsessionid) + GetNamedPipeClientSessionId(pipe.into_param().abi(), clientsessionid).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeHandleStateA(hnamedpipe: P0, lpstate: ::core::option::Option<*mut NAMED_PIPE_MODE>, lpcurinstances: ::core::option::Option<*mut u32>, lpmaxcollectioncount: ::core::option::Option<*mut u32>, lpcollectdatatimeout: ::core::option::Option<*mut u32>, lpusername: ::core::option::Option<&mut [u8]>) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeHandleStateA(hnamedpipe: P0, lpstate: ::core::option::Option<*mut NAMED_PIPE_MODE>, lpcurinstances: ::core::option::Option<*mut u32>, lpmaxcollectioncount: ::core::option::Option<*mut u32>, lpcollectdatatimeout: ::core::option::Option<*mut u32>, lpusername: ::core::option::Option<&mut [u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -123,6 +123,7 @@ where ::core::mem::transmute(lpusername.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpusername.as_deref().map_or(0, |slice| slice.len() as _), ) + .ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -145,82 +146,82 @@ where #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeInfo(hnamedpipe: P0, lpflags: ::core::option::Option<*mut NAMED_PIPE_MODE>, lpoutbuffersize: ::core::option::Option<*mut u32>, lpinbuffersize: ::core::option::Option<*mut u32>, lpmaxinstances: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeInfo(hnamedpipe: P0, lpflags: ::core::option::Option<*mut NAMED_PIPE_MODE>, lpoutbuffersize: ::core::option::Option<*mut u32>, lpinbuffersize: ::core::option::Option<*mut u32>, lpmaxinstances: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeInfo(hnamedpipe : super::super::Foundation:: HANDLE, lpflags : *mut NAMED_PIPE_MODE, lpoutbuffersize : *mut u32, lpinbuffersize : *mut u32, lpmaxinstances : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeInfo(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoutbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpinbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmaxinstances.unwrap_or(::std::ptr::null_mut()))) + GetNamedPipeInfo(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpflags.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpoutbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpinbuffersize.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpmaxinstances.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeServerProcessId(pipe: P0, serverprocessid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeServerProcessId(pipe: P0, serverprocessid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeServerProcessId(pipe : super::super::Foundation:: HANDLE, serverprocessid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeServerProcessId(pipe.into_param().abi(), serverprocessid) + GetNamedPipeServerProcessId(pipe.into_param().abi(), serverprocessid).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNamedPipeServerSessionId(pipe: P0, serversessionid: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetNamedPipeServerSessionId(pipe: P0, serversessionid: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeServerSessionId(pipe : super::super::Foundation:: HANDLE, serversessionid : *mut u32) -> super::super::Foundation:: BOOL); - GetNamedPipeServerSessionId(pipe.into_param().abi(), serversessionid) + GetNamedPipeServerSessionId(pipe.into_param().abi(), serversessionid).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: P0) -> super::super::Foundation::BOOL +pub unsafe fn ImpersonateNamedPipeClient(hnamedpipe: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ImpersonateNamedPipeClient(hnamedpipe : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ImpersonateNamedPipeClient(hnamedpipe.into_param().abi()) + ImpersonateNamedPipeClient(hnamedpipe.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PeekNamedPipe(hnamedpipe: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nbuffersize: u32, lpbytesread: ::core::option::Option<*mut u32>, lptotalbytesavail: ::core::option::Option<*mut u32>, lpbytesleftthismessage: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn PeekNamedPipe(hnamedpipe: P0, lpbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, nbuffersize: u32, lpbytesread: ::core::option::Option<*mut u32>, lptotalbytesavail: ::core::option::Option<*mut u32>, lpbytesleftthismessage: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PeekNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE, lpbuffer : *mut ::core::ffi::c_void, nbuffersize : u32, lpbytesread : *mut u32, lptotalbytesavail : *mut u32, lpbytesleftthismessage : *mut u32) -> super::super::Foundation:: BOOL); - PeekNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nbuffersize, ::core::mem::transmute(lpbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalbytesavail.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytesleftthismessage.unwrap_or(::std::ptr::null_mut()))) + PeekNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpbuffer.unwrap_or(::std::ptr::null_mut())), nbuffersize, ::core::mem::transmute(lpbytesread.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lptotalbytesavail.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpbytesleftthismessage.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetNamedPipeHandleState(hnamedpipe: P0, lpmode: ::core::option::Option<*const NAMED_PIPE_MODE>, lpmaxcollectioncount: ::core::option::Option<*const u32>, lpcollectdatatimeout: ::core::option::Option<*const u32>) -> super::super::Foundation::BOOL +pub unsafe fn SetNamedPipeHandleState(hnamedpipe: P0, lpmode: ::core::option::Option<*const NAMED_PIPE_MODE>, lpmaxcollectioncount: ::core::option::Option<*const u32>, lpcollectdatatimeout: ::core::option::Option<*const u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetNamedPipeHandleState(hnamedpipe : super::super::Foundation:: HANDLE, lpmode : *const NAMED_PIPE_MODE, lpmaxcollectioncount : *const u32, lpcollectdatatimeout : *const u32) -> super::super::Foundation:: BOOL); - SetNamedPipeHandleState(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpmode.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpmaxcollectioncount.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcollectdatatimeout.unwrap_or(::std::ptr::null()))) + SetNamedPipeHandleState(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpmode.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpmaxcollectioncount.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcollectdatatimeout.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`, `\"Win32_System_IO\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_IO"))] #[inline] -pub unsafe fn TransactNamedPipe(hnamedpipe: P0, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, lpoverlapped: ::core::option::Option<*mut super::IO::OVERLAPPED>) -> super::super::Foundation::BOOL +pub unsafe fn TransactNamedPipe(hnamedpipe: P0, lpinbuffer: ::core::option::Option<*const ::core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: ::core::option::Option<*mut ::core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, lpoverlapped: ::core::option::Option<*mut super::IO::OVERLAPPED>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn TransactNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE, lpinbuffer : *const ::core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut ::core::ffi::c_void, noutbuffersize : u32, lpbytesread : *mut u32, lpoverlapped : *mut super::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - TransactNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, lpbytesread, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))) + TransactNamedPipe(hnamedpipe.into_param().abi(), ::core::mem::transmute(lpinbuffer.unwrap_or(::std::ptr::null())), ninbuffersize, ::core::mem::transmute(lpoutbuffer.unwrap_or(::std::ptr::null_mut())), noutbuffersize, lpbytesread, ::core::mem::transmute(lpoverlapped.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitNamedPipeA(lpnamedpipename: P0, ntimeout: u32) -> super::super::Foundation::BOOL +pub unsafe fn WaitNamedPipeA(lpnamedpipename: P0, ntimeout: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WaitNamedPipeA(lpnamedpipename : ::windows_core::PCSTR, ntimeout : u32) -> super::super::Foundation:: BOOL); - WaitNamedPipeA(lpnamedpipename.into_param().abi(), ntimeout) + WaitNamedPipeA(lpnamedpipename.into_param().abi(), ntimeout).ok() } #[doc = "*Required features: `\"Win32_System_Pipes\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs index de368d9446..ab7ea15eeb 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs @@ -100,9 +100,9 @@ pub unsafe fn GetPwrDiskSpindownRange(puimax: *mut u32, puimin: *mut u32) -> sup #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemPowerStatus(lpsystempowerstatus: *mut SYSTEM_POWER_STATUS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemPowerStatus(lpsystempowerstatus : *mut SYSTEM_POWER_STATUS) -> super::super::Foundation:: BOOL); - GetSystemPowerStatus(lpsystempowerstatus) + GetSystemPowerStatus(lpsystempowerstatus).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -142,29 +142,29 @@ pub unsafe fn IsSystemResumeAutomatic() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerCanRestoreIndividualDefaultPowerScheme(schemeguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerCanRestoreIndividualDefaultPowerScheme(schemeguid) + PowerCanRestoreIndividualDefaultPowerScheme(schemeguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerClearRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn PowerClearRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PowerClearRequest(powerrequest : super::super::Foundation:: HANDLE, requesttype : POWER_REQUEST_TYPE) -> super::super::Foundation:: BOOL); - PowerClearRequest(powerrequest.into_param().abi(), requesttype) + PowerClearRequest(powerrequest.into_param().abi(), requesttype).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerCreatePossibleSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID, possiblesettingindex: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerCreatePossibleSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID, possiblesettingindex: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerCreatePossibleSetting(rootsystempowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerCreatePossibleSetting(rootsystempowerkey.into_param().abi(), subgroupofpowersettingsguid, powersettingguid, possiblesettingindex) + PowerCreatePossibleSetting(rootsystempowerkey.into_param().abi(), subgroupofpowersettingsguid, powersettingguid, possiblesettingindex).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] @@ -177,22 +177,22 @@ pub unsafe fn PowerCreateRequest(context: *const super::Threading::REASON_CONTEX #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerCreateSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerCreateSetting(rootsystempowerkey: P0, subgroupofpowersettingsguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerCreateSetting(rootsystempowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerCreateSetting(rootsystempowerkey.into_param().abi(), subgroupofpowersettingsguid, powersettingguid) + PowerCreateSetting(rootsystempowerkey.into_param().abi(), subgroupofpowersettingsguid, powersettingguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerDeleteScheme(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerDeleteScheme(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerDeleteScheme(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerDeleteScheme(rootpowerkey.into_param().abi(), schemeguid) + PowerDeleteScheme(rootpowerkey.into_param().abi(), schemeguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -209,43 +209,43 @@ pub unsafe fn PowerDeterminePlatformRoleEx(version: POWER_PLATFORM_ROLE_VERSION) #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerDuplicateScheme(rootpowerkey: P0, sourceschemeguid: *const ::windows_core::GUID, destinationschemeguid: *mut *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerDuplicateScheme(rootpowerkey: P0, sourceschemeguid: *const ::windows_core::GUID, destinationschemeguid: *mut *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerDuplicateScheme(rootpowerkey : super::Registry:: HKEY, sourceschemeguid : *const ::windows_core::GUID, destinationschemeguid : *mut *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerDuplicateScheme(rootpowerkey.into_param().abi(), sourceschemeguid, destinationschemeguid) + PowerDuplicateScheme(rootpowerkey.into_param().abi(), sourceschemeguid, destinationschemeguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerEnumerate(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerEnumerate(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, accessflags: POWER_DATA_ACCESSOR, index: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerEnumerate(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, accessflags : POWER_DATA_ACCESSOR, index : u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerEnumerate(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), accessflags, index, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerEnumerate(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), accessflags, index, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerGetActiveScheme(userrootpowerkey: P0, activepolicyguid: *mut *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerGetActiveScheme(userrootpowerkey: P0, activepolicyguid: *mut *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerGetActiveScheme(userrootpowerkey : super::Registry:: HKEY, activepolicyguid : *mut *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerGetActiveScheme(userrootpowerkey.into_param().abi(), activepolicyguid) + PowerGetActiveScheme(userrootpowerkey.into_param().abi(), activepolicyguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerImportPowerScheme(rootpowerkey: P0, importfilenamepath: P1, destinationschemeguid: *mut *mut ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerImportPowerScheme(rootpowerkey: P0, importfilenamepath: P1, destinationschemeguid: *mut *mut ::windows_core::GUID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("powrprof.dll" "system" fn PowerImportPowerScheme(rootpowerkey : super::Registry:: HKEY, importfilenamepath : ::windows_core::PCWSTR, destinationschemeguid : *mut *mut ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerImportPowerScheme(rootpowerkey.into_param().abi(), importfilenamepath.into_param().abi(), destinationschemeguid) + PowerImportPowerScheme(rootpowerkey.into_param().abi(), importfilenamepath.into_param().abi(), destinationschemeguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -287,12 +287,12 @@ where #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadACValue(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, buffer: ::core::option::Option<*mut u8>, buffersize: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadACValue(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, buffer: ::core::option::Option<*mut u8>, buffersize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadACValue(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, r#type : *mut u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadACValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffersize.unwrap_or(::std::ptr::null_mut()))) + PowerReadACValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffersize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -317,12 +317,12 @@ where #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadDCValue(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadDCValue(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadDCValue(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, r#type : *mut u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadDCValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadDCValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -337,62 +337,62 @@ where #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadDescription(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadDescription(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadDescription(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadFriendlyName(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadFriendlyName(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadFriendlyName(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadIconResourceSpecifier(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadIconResourceSpecifier(rootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadIconResourceSpecifier(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadIconResourceSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadIconResourceSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadPossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadPossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadPossibleDescription(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadPossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadPossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadPossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadPossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadPossibleFriendlyName(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadPossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadPossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadPossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadPossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: ::core::option::Option<*mut u32>, possiblesettingindex: u32, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadPossibleValue(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, r#type : *mut u32, possiblesettingindex : u32, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadPossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadPossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(r#type.unwrap_or(::std::ptr::null_mut())), possiblesettingindex, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -403,42 +403,42 @@ pub unsafe fn PowerReadSettingAttributes(subgroupguid: ::core::option::Option<*c #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueincrement: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueincrement: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadValueIncrement(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valueincrement : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadValueIncrement(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueincrement) + PowerReadValueIncrement(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueincrement).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valuemaximum: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valuemaximum: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadValueMax(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valuemaximum : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadValueMax(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valuemaximum) + PowerReadValueMax(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valuemaximum).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueminimum: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueminimum: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadValueMin(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valueminimum : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadValueMin(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueminimum) + PowerReadValueMin(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueminimum).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerReadValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerReadValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: ::core::option::Option<*mut u8>, buffersize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerReadValueUnitsSpecifier(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *mut u8, buffersize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize) + PowerReadValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), buffersize).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -449,19 +449,19 @@ pub unsafe fn PowerRegisterForEffectivePowerModeNotifications(version: u32, call #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn PowerRegisterSuspendResumeNotification(flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P0, registrationhandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerRegisterSuspendResumeNotification(flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P0, registrationhandle: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerRegisterSuspendResumeNotification(flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS, recipient : super::super::Foundation:: HANDLE, registrationhandle : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - PowerRegisterSuspendResumeNotification(flags, recipient.into_param().abi(), registrationhandle) + PowerRegisterSuspendResumeNotification(flags, recipient.into_param().abi(), registrationhandle).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerRemovePowerSetting(powersettingsubkeyguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerRemovePowerSetting(powersettingsubkeyguid: *const ::windows_core::GUID, powersettingguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerRemovePowerSetting(powersettingsubkeyguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerRemovePowerSetting(powersettingsubkeyguid, powersettingguid) + PowerRemovePowerSetting(powersettingsubkeyguid, powersettingguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -472,77 +472,77 @@ pub unsafe fn PowerReplaceDefaultPowerSchemes() -> u32 { #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerReportThermalEvent(event: *const THERMAL_EVENT) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerReportThermalEvent(event: *const THERMAL_EVENT) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerReportThermalEvent(event : *const THERMAL_EVENT) -> super::super::Foundation:: WIN32_ERROR); - PowerReportThermalEvent(event) + PowerReportThermalEvent(event).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerRestoreDefaultPowerSchemes() -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerRestoreDefaultPowerSchemes() -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerRestoreDefaultPowerSchemes() -> super::super::Foundation:: WIN32_ERROR); - PowerRestoreDefaultPowerSchemes() + PowerRestoreDefaultPowerSchemes().ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_core::GUID) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerRestoreIndividualDefaultPowerScheme(schemeguid: *const ::windows_core::GUID) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerRestoreIndividualDefaultPowerScheme(schemeguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerRestoreIndividualDefaultPowerScheme(schemeguid) + PowerRestoreIndividualDefaultPowerScheme(schemeguid).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerSetActiveScheme(userrootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerSetActiveScheme(userrootpowerkey: P0, schemeguid: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerSetActiveScheme(userrootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerSetActiveScheme(userrootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null()))) + PowerSetActiveScheme(userrootpowerkey.into_param().abi(), ::core::mem::transmute(schemeguid.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerSetRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn PowerSetRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PowerSetRequest(powerrequest : super::super::Foundation:: HANDLE, requesttype : POWER_REQUEST_TYPE) -> super::super::Foundation:: BOOL); - PowerSetRequest(powerrequest.into_param().abi(), requesttype) + PowerSetRequest(powerrequest.into_param().abi(), requesttype).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: ::core::option::Option<*const ::windows_core::GUID>) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: ::core::option::Option<*const ::windows_core::GUID>) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerSettingAccessCheck(accessflags : POWER_DATA_ACCESSOR, powerguid : *const ::windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingAccessCheck(accessflags, ::core::mem::transmute(powerguid.unwrap_or(::std::ptr::null()))) + PowerSettingAccessCheck(accessflags, ::core::mem::transmute(powerguid.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: ::core::option::Option<*const ::windows_core::GUID>, accesstype: super::Registry::REG_SAM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: ::core::option::Option<*const ::windows_core::GUID>, accesstype: super::Registry::REG_SAM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerSettingAccessCheckEx(accessflags : POWER_DATA_ACCESSOR, powerguid : *const ::windows_core::GUID, accesstype : super::Registry:: REG_SAM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingAccessCheckEx(accessflags, ::core::mem::transmute(powerguid.unwrap_or(::std::ptr::null())), accesstype) + PowerSettingAccessCheckEx(accessflags, ::core::mem::transmute(powerguid.unwrap_or(::std::ptr::null())), accesstype).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn PowerSettingRegisterNotification(settingguid: *const ::windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P0, registrationhandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerSettingRegisterNotification(settingguid: *const ::windows_core::GUID, flags: super::super::UI::WindowsAndMessaging::REGISTER_NOTIFICATION_FLAGS, recipient: P0, registrationhandle: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerSettingRegisterNotification(settingguid : *const ::windows_core::GUID, flags : super::super::UI::WindowsAndMessaging:: REGISTER_NOTIFICATION_FLAGS, recipient : super::super::Foundation:: HANDLE, registrationhandle : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingRegisterNotification(settingguid, flags, recipient.into_param().abi(), registrationhandle) + PowerSettingRegisterNotification(settingguid, flags, recipient.into_param().abi(), registrationhandle).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerSettingUnregisterNotification(registrationhandle: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerSettingUnregisterNotification(registrationhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerSettingUnregisterNotification(registrationhandle : HPOWERNOTIFY) -> super::super::Foundation:: WIN32_ERROR); - PowerSettingUnregisterNotification(registrationhandle.into_param().abi()) + PowerSettingUnregisterNotification(registrationhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -553,12 +553,12 @@ pub unsafe fn PowerUnregisterFromEffectivePowerModeNotifications(registrationhan #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerUnregisterSuspendResumeNotification(registrationhandle: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerUnregisterSuspendResumeNotification(registrationhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerUnregisterSuspendResumeNotification(registrationhandle : HPOWERNOTIFY) -> super::super::Foundation:: WIN32_ERROR); - PowerUnregisterSuspendResumeNotification(registrationhandle.into_param().abi()) + PowerUnregisterSuspendResumeNotification(registrationhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -603,109 +603,109 @@ where #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteDescription(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteDescription(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteDescription(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteDescription(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWriteDescription(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteFriendlyName(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteFriendlyName(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteFriendlyName(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteFriendlyName(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWriteFriendlyName(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteIconResourceSpecifier(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteIconResourceSpecifier(rootpowerkey: P0, schemeguid: *const ::windows_core::GUID, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteIconResourceSpecifier(rootpowerkey : super::Registry:: HKEY, schemeguid : *const ::windows_core::GUID, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteIconResourceSpecifier(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWriteIconResourceSpecifier(rootpowerkey.into_param().abi(), schemeguid, ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWritePossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWritePossibleDescription(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleDescription(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWritePossibleDescription(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWritePossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWritePossibleFriendlyName(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, possiblesettingindex: u32, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleFriendlyName(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWritePossibleFriendlyName(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWritePossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: u32, possiblesettingindex: u32, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWritePossibleValue(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, r#type: u32, possiblesettingindex: u32, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWritePossibleValue(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, r#type : u32, possiblesettingindex : u32, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWritePossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), r#type, possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWritePossibleValue(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), r#type, possiblesettingindex, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PowerWriteSettingAttributes(subgroupguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, attributes: u32) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn PowerWriteSettingAttributes(subgroupguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, attributes: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteSettingAttributes(subgroupguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, attributes : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteSettingAttributes(::core::mem::transmute(subgroupguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), attributes) + PowerWriteSettingAttributes(::core::mem::transmute(subgroupguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), attributes).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueincrement: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteValueIncrement(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueincrement: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteValueIncrement(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valueincrement : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteValueIncrement(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueincrement) + PowerWriteValueIncrement(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueincrement).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valuemaximum: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteValueMax(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valuemaximum: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteValueMax(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valuemaximum : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteValueMax(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valuemaximum) + PowerWriteValueMax(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valuemaximum).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueminimum: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteValueMin(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, valueminimum: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteValueMin(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, valueminimum : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteValueMin(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueminimum) + PowerWriteValueMin(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), valueminimum).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn PowerWriteValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn PowerWriteValueUnitsSpecifier(rootpowerkey: P0, subgroupofpowersettingsguid: ::core::option::Option<*const ::windows_core::GUID>, powersettingguid: ::core::option::Option<*const ::windows_core::GUID>, buffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("powrprof.dll" "system" fn PowerWriteValueUnitsSpecifier(rootpowerkey : super::Registry:: HKEY, subgroupofpowersettingsguid : *const ::windows_core::GUID, powersettingguid : *const ::windows_core::GUID, buffer : *const u8, buffersize : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _) + PowerWriteValueUnitsSpecifier(rootpowerkey.into_param().abi(), ::core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(powersettingguid.unwrap_or(::std::ptr::null())), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -779,13 +779,13 @@ where #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemPowerState(fsuspend: P0, fforce: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetSystemPowerState(fsuspend: P0, fforce: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetSystemPowerState(fsuspend : super::super::Foundation:: BOOL, fforce : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemPowerState(fsuspend.into_param().abi(), fforce.into_param().abi()) + SetSystemPowerState(fsuspend.into_param().abi(), fforce.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`*"] #[inline] @@ -796,22 +796,22 @@ pub unsafe fn SetThreadExecutionState(esflags: EXECUTION_STATE) -> EXECUTION_STA #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterPowerSettingNotification(handle: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterPowerSettingNotification(handle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterPowerSettingNotification(handle : HPOWERNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterPowerSettingNotification(handle.into_param().abi()) + UnregisterPowerSettingNotification(handle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterSuspendResumeNotification(handle: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterSuspendResumeNotification(handle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterSuspendResumeNotification(handle : HPOWERNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterSuspendResumeNotification(handle.into_param().abi()) + UnregisterSuspendResumeNotification(handle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Power\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs index 478b9a5eef..d5a652205c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ProcessStatus/mod.rs @@ -1,60 +1,60 @@ #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EmptyWorkingSet(hprocess: P0) -> super::super::Foundation::BOOL +pub unsafe fn EmptyWorkingSet(hprocess: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn EmptyWorkingSet(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - EmptyWorkingSet(hprocess.into_param().abi()) + EmptyWorkingSet(hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDeviceDrivers(lpimagebase: *mut *mut ::core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn EnumDeviceDrivers(lpimagebase: *mut *mut ::core::ffi::c_void, cb: u32, lpcbneeded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("psapi.dll" "system" fn EnumDeviceDrivers(lpimagebase : *mut *mut ::core::ffi::c_void, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - EnumDeviceDrivers(lpimagebase, cb, lpcbneeded) + EnumDeviceDrivers(lpimagebase, cb, lpcbneeded).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPageFilesA(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKA, pcontext: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn EnumPageFilesA(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKA, pcontext: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("psapi.dll" "system" fn EnumPageFilesA(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKA, pcontext : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - EnumPageFilesA(pcallbackroutine, pcontext) + EnumPageFilesA(pcallbackroutine, pcontext).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pcontext: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn EnumPageFilesW(pcallbackroutine: PENUM_PAGE_FILE_CALLBACKW, pcontext: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("psapi.dll" "system" fn EnumPageFilesW(pcallbackroutine : PENUM_PAGE_FILE_CALLBACKW, pcontext : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - EnumPageFilesW(pcallbackroutine, pcontext) + EnumPageFilesW(pcallbackroutine, pcontext).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumProcessModules(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumProcessModules(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn EnumProcessModules(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - EnumProcessModules(hprocess.into_param().abi(), lphmodule, cb, lpcbneeded) + EnumProcessModules(hprocess.into_param().abi(), lphmodule, cb, lpcbneeded).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumProcessModulesEx(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: ENUM_PROCESS_MODULES_EX_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn EnumProcessModulesEx(hprocess: P0, lphmodule: *mut super::super::Foundation::HMODULE, cb: u32, lpcbneeded: *mut u32, dwfilterflag: ENUM_PROCESS_MODULES_EX_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn EnumProcessModulesEx(hprocess : super::super::Foundation:: HANDLE, lphmodule : *mut super::super::Foundation:: HMODULE, cb : u32, lpcbneeded : *mut u32, dwfilterflag : ENUM_PROCESS_MODULES_EX_FLAGS) -> super::super::Foundation:: BOOL); - EnumProcessModulesEx(hprocess.into_param().abi(), lphmodule, cb, lpcbneeded, dwfilterflag) + EnumProcessModulesEx(hprocess.into_param().abi(), lphmodule, cb, lpcbneeded, dwfilterflag).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn EnumProcesses(lpidprocess: *mut u32, cb: u32, lpcbneeded: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("psapi.dll" "system" fn EnumProcesses(lpidprocess : *mut u32, cb : u32, lpcbneeded : *mut u32) -> super::super::Foundation:: BOOL); - EnumProcesses(lpidprocess, cb, lpcbneeded) + EnumProcesses(lpidprocess, cb, lpcbneeded).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`*"] #[inline] @@ -147,20 +147,20 @@ where #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetModuleInformation(hprocess: P0, hmodule: P1, lpmodinfo: *mut MODULEINFO, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetModuleInformation(hprocess: P0, hmodule: P1, lpmodinfo: *mut MODULEINFO, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetModuleInformation(hprocess : super::super::Foundation:: HANDLE, hmodule : super::super::Foundation:: HMODULE, lpmodinfo : *mut MODULEINFO, cb : u32) -> super::super::Foundation:: BOOL); - GetModuleInformation(hprocess.into_param().abi(), hmodule.into_param().abi(), lpmodinfo, cb) + GetModuleInformation(hprocess.into_param().abi(), hmodule.into_param().abi(), lpmodinfo, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetPerformanceInfo(pperformanceinformation: *mut PERFORMANCE_INFORMATION, cb: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("psapi.dll" "system" fn GetPerformanceInfo(pperformanceinformation : *mut PERFORMANCE_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - GetPerformanceInfo(pperformanceinformation, cb) + GetPerformanceInfo(pperformanceinformation, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -185,42 +185,42 @@ where #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessMemoryInfo(process: P0, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessMemoryInfo(process: P0, ppsmemcounters: *mut PROCESS_MEMORY_COUNTERS, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetProcessMemoryInfo(process : super::super::Foundation:: HANDLE, ppsmemcounters : *mut PROCESS_MEMORY_COUNTERS, cb : u32) -> super::super::Foundation:: BOOL); - GetProcessMemoryInfo(process.into_param().abi(), ppsmemcounters, cb) + GetProcessMemoryInfo(process.into_param().abi(), ppsmemcounters, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWsChanges(hprocess: P0, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetWsChanges(hprocess: P0, lpwatchinfo: *mut PSAPI_WS_WATCH_INFORMATION, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetWsChanges(hprocess : super::super::Foundation:: HANDLE, lpwatchinfo : *mut PSAPI_WS_WATCH_INFORMATION, cb : u32) -> super::super::Foundation:: BOOL); - GetWsChanges(hprocess.into_param().abi(), lpwatchinfo, cb) + GetWsChanges(hprocess.into_param().abi(), lpwatchinfo, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWsChangesEx(hprocess: P0, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetWsChangesEx(hprocess: P0, lpwatchinfoex: *mut PSAPI_WS_WATCH_INFORMATION_EX, cb: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn GetWsChangesEx(hprocess : super::super::Foundation:: HANDLE, lpwatchinfoex : *mut PSAPI_WS_WATCH_INFORMATION_EX, cb : *mut u32) -> super::super::Foundation:: BOOL); - GetWsChangesEx(hprocess.into_param().abi(), lpwatchinfoex, cb) + GetWsChangesEx(hprocess.into_param().abi(), lpwatchinfoex, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeProcessForWsWatch(hprocess: P0) -> super::super::Foundation::BOOL +pub unsafe fn InitializeProcessForWsWatch(hprocess: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn InitializeProcessForWsWatch(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - InitializeProcessForWsWatch(hprocess.into_param().abi()) + InitializeProcessForWsWatch(hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -469,22 +469,22 @@ where #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryWorkingSet(hprocess: P0, pv: *mut ::core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryWorkingSet(hprocess: P0, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn QueryWorkingSet(hprocess : super::super::Foundation:: HANDLE, pv : *mut ::core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - QueryWorkingSet(hprocess.into_param().abi(), pv, cb) + QueryWorkingSet(hprocess.into_param().abi(), pv, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryWorkingSetEx(hprocess: P0, pv: *mut ::core::ffi::c_void, cb: u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryWorkingSetEx(hprocess: P0, pv: *mut ::core::ffi::c_void, cb: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("psapi.dll" "system" fn QueryWorkingSetEx(hprocess : super::super::Foundation:: HANDLE, pv : *mut ::core::ffi::c_void, cb : u32) -> super::super::Foundation:: BOOL); - QueryWorkingSetEx(hprocess.into_param().abi(), pv, cb) + QueryWorkingSetEx(hprocess.into_param().abi(), pv, cb).ok() } #[doc = "*Required features: `\"Win32_System_ProcessStatus\"`*"] pub const PSAPI_VERSION: u32 = 2u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs index 8742f4aa4b..aa03fb8cc0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -1,7 +1,7 @@ #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetRegistryValueWithFallbackW(hkeyprimary: P0, pwszprimarysubkey: P1, hkeyfallback: P2, pwszfallbacksubkey: P3, pwszvalue: P4, dwflags: u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, cbdatain: u32, pcbdataout: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn GetRegistryValueWithFallbackW(hkeyprimary: P0, pwszprimarysubkey: P1, hkeyfallback: P2, pwszfallbacksubkey: P3, pwszvalue: P4, dwflags: u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, cbdatain: u32, pcbdataout: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -10,28 +10,28 @@ where P4: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("api-ms-win-core-state-helpers-l1-1-0.dll" "system" fn GetRegistryValueWithFallbackW(hkeyprimary : HKEY, pwszprimarysubkey : ::windows_core::PCWSTR, hkeyfallback : HKEY, pwszfallbacksubkey : ::windows_core::PCWSTR, pwszvalue : ::windows_core::PCWSTR, dwflags : u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, cbdatain : u32, pcbdataout : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - GetRegistryValueWithFallbackW(hkeyprimary.into_param().abi(), pwszprimarysubkey.into_param().abi(), hkeyfallback.into_param().abi(), pwszfallbacksubkey.into_param().abi(), pwszvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), cbdatain, ::core::mem::transmute(pcbdataout.unwrap_or(::std::ptr::null_mut()))) + GetRegistryValueWithFallbackW(hkeyprimary.into_param().abi(), pwszprimarysubkey.into_param().abi(), hkeyfallback.into_param().abi(), pwszfallbacksubkey.into_param().abi(), pwszvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), cbdatain, ::core::mem::transmute(pcbdataout.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegCloseKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCloseKey(hkey: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegCloseKey(hkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCloseKey(hkey.into_param().abi()) + RegCloseKey(hkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegConnectRegistryA(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegConnectRegistryA(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryA(lpmachinename : ::windows_core::PCSTR, hkey : HKEY, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegConnectRegistryA(lpmachinename.into_param().abi(), hkey.into_param().abi(), phkresult) + RegConnectRegistryA(lpmachinename.into_param().abi(), hkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`*"] #[inline] @@ -56,77 +56,77 @@ where #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegConnectRegistryW(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegConnectRegistryW(lpmachinename: P0, hkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegConnectRegistryW(lpmachinename : ::windows_core::PCWSTR, hkey : HKEY, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegConnectRegistryW(lpmachinename.into_param().abi(), hkey.into_param().abi(), phkresult) + RegConnectRegistryW(lpmachinename.into_param().abi(), hkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegCopyTreeA(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCopyTreeA(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegCopyTreeA(hkeysrc : HKEY, lpsubkey : ::windows_core::PCSTR, hkeydest : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCopyTreeA(hkeysrc.into_param().abi(), lpsubkey.into_param().abi(), hkeydest.into_param().abi()) + RegCopyTreeA(hkeysrc.into_param().abi(), lpsubkey.into_param().abi(), hkeydest.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegCopyTreeW(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCopyTreeW(hkeysrc: P0, lpsubkey: P1, hkeydest: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegCopyTreeW(hkeysrc : HKEY, lpsubkey : ::windows_core::PCWSTR, hkeydest : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCopyTreeW(hkeysrc.into_param().abi(), lpsubkey.into_param().abi(), hkeydest.into_param().abi()) + RegCopyTreeW(hkeysrc.into_param().abi(), lpsubkey.into_param().abi(), hkeydest.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegCreateKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult) + RegCreateKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegCreateKeyExA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyExA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyExA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, reserved : u32, lpclass : ::windows_core::PCSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut()))) + RegCreateKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegCreateKeyExW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyExW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyExW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, reserved : u32, lpclass : ::windows_core::PCWSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut()))) + RegCreateKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegCreateKeyTransactedA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P3, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyTransactedA(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P3, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -134,12 +134,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyTransactedA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, reserved : u32, lpclass : ::windows_core::PCSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))) + RegCreateKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegCreateKeyTransactedW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P3, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyTransactedW(hkey: P0, lpsubkey: P1, reserved: u32, lpclass: P2, dwoptions: REG_OPEN_CREATE_OPTIONS, samdesired: REG_SAM_FLAGS, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, phkresult: *mut HKEY, lpdwdisposition: ::core::option::Option<*mut REG_CREATE_KEY_DISPOSITION>, htransaction: P3, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -147,365 +147,365 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyTransactedW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, reserved : u32, lpclass : ::windows_core::PCWSTR, dwoptions : REG_OPEN_CREATE_OPTIONS, samdesired : REG_SAM_FLAGS, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut HKEY, lpdwdisposition : *mut REG_CREATE_KEY_DISPOSITION, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))) + RegCreateKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), reserved, lpclass.into_param().abi(), dwoptions, samdesired, ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), phkresult, ::core::mem::transmute(lpdwdisposition.unwrap_or(::std::ptr::null_mut())), htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegCreateKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegCreateKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegCreateKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegCreateKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult) + RegCreateKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyA(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegDeleteKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyExA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyExA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyExA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, samdesired : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved) + RegDeleteKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyExW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyExW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyExW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, samdesired : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved) + RegDeleteKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyTransactedA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P2, pextendedparameter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyTransactedA(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P2, pextendedparameter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyTransactedA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, samdesired : u32, reserved : u32, htransaction : super::super::Foundation:: HANDLE, pextendedparameter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparameter.unwrap_or(::std::ptr::null()))) + RegDeleteKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparameter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyTransactedW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P2, pextendedparameter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyTransactedW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P2, pextendedparameter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyTransactedW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, samdesired : u32, reserved : u32, htransaction : super::super::Foundation:: HANDLE, pextendedparameter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparameter.unwrap_or(::std::ptr::null()))) + RegDeleteKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), samdesired, reserved, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparameter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpvaluename : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi()) + RegDeleteKeyValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyValueW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpvaluename : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi()) + RegDeleteKeyValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteKeyW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteKeyW(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegDeleteKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteTreeA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteTreeA(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteTreeA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteTreeA(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegDeleteTreeA(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteTreeW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteTreeW(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteTreeW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteTreeW(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegDeleteTreeW(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteValueA(hkey: P0, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteValueA(hkey: P0, lpvaluename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteValueA(hkey : HKEY, lpvaluename : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteValueA(hkey.into_param().abi(), lpvaluename.into_param().abi()) + RegDeleteValueA(hkey.into_param().abi(), lpvaluename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDeleteValueW(hkey: P0, lpvaluename: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDeleteValueW(hkey: P0, lpvaluename: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegDeleteValueW(hkey : HKEY, lpvaluename : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegDeleteValueW(hkey.into_param().abi(), lpvaluename.into_param().abi()) + RegDeleteValueW(hkey.into_param().abi(), lpvaluename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDisablePredefinedCache() -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RegDisablePredefinedCache() -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn RegDisablePredefinedCache() -> super::super::Foundation:: WIN32_ERROR); - RegDisablePredefinedCache() + RegDisablePredefinedCache().ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDisablePredefinedCacheEx() -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RegDisablePredefinedCacheEx() -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn RegDisablePredefinedCacheEx() -> super::super::Foundation:: WIN32_ERROR); - RegDisablePredefinedCacheEx() + RegDisablePredefinedCacheEx().ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegDisableReflectionKey(hbase: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegDisableReflectionKey(hbase: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegDisableReflectionKey(hbase : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegDisableReflectionKey(hbase.into_param().abi()) + RegDisableReflectionKey(hbase.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnableReflectionKey(hbase: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnableReflectionKey(hbase: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnableReflectionKey(hbase : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegEnableReflectionKey(hbase.into_param().abi()) + RegEnableReflectionKey(hbase.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumKeyA(hkey: P0, dwindex: u32, lpname: ::core::option::Option<&mut [u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumKeyA(hkey: P0, dwindex: u32, lpname: ::core::option::Option<&mut [u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyA(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)) + RegEnumKeyA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumKeyExA(hkey: P0, dwindex: u32, lpname: ::windows_core::PSTR, lpcchname: *mut u32, lpreserved: ::core::option::Option<*const u32>, lpclass: ::windows_core::PSTR, lpcchclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumKeyExA(hkey: P0, dwindex: u32, lpname: ::windows_core::PSTR, lpcchname: *mut u32, lpreserved: ::core::option::Option<*const u32>, lpclass: ::windows_core::PSTR, lpcchclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyExA(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PSTR, lpcchname : *mut u32, lpreserved : *const u32, lpclass : ::windows_core::PSTR, lpcchclass : *mut u32, lpftlastwritetime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyExA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcchname, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcchclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))) + RegEnumKeyExA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcchname, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcchclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumKeyExW(hkey: P0, dwindex: u32, lpname: ::windows_core::PWSTR, lpcchname: *mut u32, lpreserved: ::core::option::Option<*const u32>, lpclass: ::windows_core::PWSTR, lpcchclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumKeyExW(hkey: P0, dwindex: u32, lpname: ::windows_core::PWSTR, lpcchname: *mut u32, lpreserved: ::core::option::Option<*const u32>, lpclass: ::windows_core::PWSTR, lpcchclass: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyExW(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PWSTR, lpcchname : *mut u32, lpreserved : *const u32, lpclass : ::windows_core::PWSTR, lpcchclass : *mut u32, lpftlastwritetime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyExW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcchname, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcchclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))) + RegEnumKeyExW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname), lpcchname, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpclass), ::core::mem::transmute(lpcchclass.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumKeyW(hkey: P0, dwindex: u32, lpname: ::core::option::Option<&mut [u16]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumKeyW(hkey: P0, dwindex: u32, lpname: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumKeyW(hkey : HKEY, dwindex : u32, lpname : ::windows_core::PWSTR, cchname : u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumKeyW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)) + RegEnumKeyW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpname.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpname.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumValueA(hkey: P0, dwindex: u32, lpvaluename: ::windows_core::PSTR, lpcchvaluename: *mut u32, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumValueA(hkey: P0, dwindex: u32, lpvaluename: ::windows_core::PSTR, lpcchvaluename: *mut u32, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumValueA(hkey : HKEY, dwindex : u32, lpvaluename : ::windows_core::PSTR, lpcchvaluename : *mut u32, lpreserved : *const u32, lptype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumValueA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcchvaluename, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegEnumValueA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcchvaluename, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegEnumValueW(hkey: P0, dwindex: u32, lpvaluename: ::windows_core::PWSTR, lpcchvaluename: *mut u32, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegEnumValueW(hkey: P0, dwindex: u32, lpvaluename: ::windows_core::PWSTR, lpcchvaluename: *mut u32, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut u32>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegEnumValueW(hkey : HKEY, dwindex : u32, lpvaluename : ::windows_core::PWSTR, lpcchvaluename : *mut u32, lpreserved : *const u32, lptype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegEnumValueW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcchvaluename, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegEnumValueW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(lpvaluename), lpcchvaluename, ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegFlushKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegFlushKey(hkey: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegFlushKey(hkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegFlushKey(hkey.into_param().abi()) + RegFlushKey(hkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegGetKeySecurity(hkey: P0, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegGetKeySecurity(hkey: P0, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegGetKeySecurity(hkey : HKEY, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, lpcbsecuritydescriptor : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegGetKeySecurity(hkey.into_param().abi(), securityinformation, psecuritydescriptor, lpcbsecuritydescriptor) + RegGetKeySecurity(hkey.into_param().abi(), securityinformation, psecuritydescriptor, lpcbsecuritydescriptor).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegGetValueA(hkey: P0, lpsubkey: P1, lpvalue: P2, dwflags: REG_ROUTINE_FLAGS, pdwtype: ::core::option::Option<*mut REG_VALUE_TYPE>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegGetValueA(hkey: P0, lpsubkey: P1, lpvalue: P2, dwflags: REG_ROUTINE_FLAGS, pdwtype: ::core::option::Option<*mut REG_VALUE_TYPE>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegGetValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpvalue : ::windows_core::PCSTR, dwflags : REG_ROUTINE_FLAGS, pdwtype : *mut REG_VALUE_TYPE, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegGetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + RegGetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegGetValueW(hkey: P0, lpsubkey: P1, lpvalue: P2, dwflags: REG_ROUTINE_FLAGS, pdwtype: ::core::option::Option<*mut REG_VALUE_TYPE>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegGetValueW(hkey: P0, lpsubkey: P1, lpvalue: P2, dwflags: REG_ROUTINE_FLAGS, pdwtype: ::core::option::Option<*mut REG_VALUE_TYPE>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegGetValueW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpvalue : ::windows_core::PCWSTR, dwflags : REG_ROUTINE_FLAGS, pdwtype : *mut REG_VALUE_TYPE, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegGetValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + RegGetValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvalue.into_param().abi(), dwflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadAppKeyA(lpfile : ::windows_core::PCSTR, phkresult : *mut HKEY, samdesired : u32, dwoptions : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegLoadAppKeyA(lpfile.into_param().abi(), phkresult, samdesired, dwoptions, reserved) + RegLoadAppKeyA(lpfile.into_param().abi(), phkresult, samdesired, dwoptions, reserved).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadAppKeyW(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadAppKeyW(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadAppKeyW(lpfile : ::windows_core::PCWSTR, phkresult : *mut HKEY, samdesired : u32, dwoptions : u32, reserved : u32) -> super::super::Foundation:: WIN32_ERROR); - RegLoadAppKeyW(lpfile.into_param().abi(), phkresult, samdesired, dwoptions, reserved) + RegLoadAppKeyW(lpfile.into_param().abi(), phkresult, samdesired, dwoptions, reserved).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadKeyA(hkey: P0, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadKeyA(hkey: P0, lpsubkey: P1, lpfile: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpfile : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpfile.into_param().abi()) + RegLoadKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadKeyW(hkey: P0, lpsubkey: P1, lpfile: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadKeyW(hkey: P0, lpsubkey: P1, lpfile: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpfile : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpfile.into_param().abi()) + RegLoadKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadMUIStringA(hkey: P0, pszvalue: P1, pszoutbuf: ::core::option::Option<&mut [u8]>, pcbdata: ::core::option::Option<*mut u32>, flags: u32, pszdirectory: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadMUIStringA(hkey: P0, pszvalue: P1, pszoutbuf: ::core::option::Option<&mut [u8]>, pcbdata: ::core::option::Option<*mut u32>, flags: u32, pszdirectory: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadMUIStringA(hkey : HKEY, pszvalue : ::windows_core::PCSTR, pszoutbuf : ::windows_core::PSTR, cboutbuf : u32, pcbdata : *mut u32, flags : u32, pszdirectory : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadMUIStringA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszoutbuf.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()) + RegLoadMUIStringA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszoutbuf.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegLoadMUIStringW(hkey: P0, pszvalue: P1, pszoutbuf: ::windows_core::PWSTR, cboutbuf: u32, pcbdata: ::core::option::Option<*mut u32>, flags: u32, pszdirectory: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegLoadMUIStringW(hkey: P0, pszvalue: P1, pszoutbuf: ::windows_core::PWSTR, cboutbuf: u32, pcbdata: ::core::option::Option<*mut u32>, flags: u32, pszdirectory: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegLoadMUIStringW(hkey : HKEY, pszvalue : ::windows_core::PCWSTR, pszoutbuf : ::windows_core::PWSTR, cboutbuf : u32, pcbdata : *mut u32, flags : u32, pszdirectory : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegLoadMUIStringW(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf), cboutbuf, ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()) + RegLoadMUIStringW(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pszoutbuf), cboutbuf, ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), flags, pszdirectory.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegNotifyChangeKeyValue(hkey: P0, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: P2, fasynchronous: P3) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegNotifyChangeKeyValue(hkey: P0, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: P2, fasynchronous: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -513,108 +513,108 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegNotifyChangeKeyValue(hkey : HKEY, bwatchsubtree : super::super::Foundation:: BOOL, dwnotifyfilter : REG_NOTIFY_FILTER, hevent : super::super::Foundation:: HANDLE, fasynchronous : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - RegNotifyChangeKeyValue(hkey.into_param().abi(), bwatchsubtree.into_param().abi(), dwnotifyfilter, hevent.into_param().abi(), fasynchronous.into_param().abi()) + RegNotifyChangeKeyValue(hkey.into_param().abi(), bwatchsubtree.into_param().abi(), dwnotifyfilter, hevent.into_param().abi(), fasynchronous.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn RegOpenCurrentUser(samdesired: u32, phkresult: *mut HKEY) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenCurrentUser(samdesired : u32, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenCurrentUser(samdesired, phkresult) + RegOpenCurrentUser(samdesired, phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyA(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult) + RegOpenKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyExA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyExA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult) + RegOpenKeyExA(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyExW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyExW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyExW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult) + RegOpenKeyExW(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyTransactedA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P2, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyTransactedA(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P2, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyTransactedA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))) + RegOpenKeyTransactedA(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyTransactedW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P2, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyTransactedW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P2, pextendedparemeter: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyTransactedW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, uloptions : u32, samdesired : REG_SAM_FLAGS, phkresult : *mut HKEY, htransaction : super::super::Foundation:: HANDLE, pextendedparemeter : *const ::core::ffi::c_void) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))) + RegOpenKeyTransactedW(hkey.into_param().abi(), lpsubkey.into_param().abi(), uloptions, samdesired, phkresult, htransaction.into_param().abi(), ::core::mem::transmute(pextendedparemeter.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult) + RegOpenKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOpenUserClassesRoot(htoken: P0, dwoptions: u32, samdesired: u32, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOpenUserClassesRoot(htoken: P0, dwoptions: u32, samdesired: u32, phkresult: *mut HKEY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegOpenUserClassesRoot(htoken : super::super::Foundation:: HANDLE, dwoptions : u32, samdesired : u32, phkresult : *mut HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOpenUserClassesRoot(htoken.into_param().abi(), dwoptions, samdesired, phkresult) + RegOpenUserClassesRoot(htoken.into_param().abi(), dwoptions, samdesired, phkresult).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegOverridePredefKey(hkey: P0, hnewhkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegOverridePredefKey(hkey: P0, hnewhkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegOverridePredefKey(hkey : HKEY, hnewhkey : HKEY) -> super::super::Foundation:: WIN32_ERROR); - RegOverridePredefKey(hkey.into_param().abi(), hnewhkey.into_param().abi()) + RegOverridePredefKey(hkey.into_param().abi(), hnewhkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryInfoKeyA(hkey: P0, lpclass: ::windows_core::PSTR, lpcchclass: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcbmaxsubkeylen: ::core::option::Option<*mut u32>, lpcbmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcbmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcbmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryInfoKeyA(hkey: P0, lpclass: ::windows_core::PSTR, lpcchclass: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcbmaxsubkeylen: ::core::option::Option<*mut u32>, lpcbmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcbmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcbmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -633,11 +633,12 @@ where ::core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryInfoKeyW(hkey: P0, lpclass: ::windows_core::PWSTR, lpcchclass: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcbmaxsubkeylen: ::core::option::Option<*mut u32>, lpcbmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcbmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcbmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryInfoKeyW(hkey: P0, lpclass: ::windows_core::PWSTR, lpcchclass: ::core::option::Option<*mut u32>, lpreserved: ::core::option::Option<*const u32>, lpcsubkeys: ::core::option::Option<*mut u32>, lpcbmaxsubkeylen: ::core::option::Option<*mut u32>, lpcbmaxclasslen: ::core::option::Option<*mut u32>, lpcvalues: ::core::option::Option<*mut u32>, lpcbmaxvaluenamelen: ::core::option::Option<*mut u32>, lpcbmaxvaluelen: ::core::option::Option<*mut u32>, lpcbsecuritydescriptor: ::core::option::Option<*mut u32>, lpftlastwritetime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { @@ -656,97 +657,98 @@ where ::core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpftlastwritetime.unwrap_or(::std::ptr::null_mut())), ) + .ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryMultipleValuesA(hkey: P0, val_list: &mut [VALENTA], lpvaluebuf: ::windows_core::PSTR, ldwtotsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryMultipleValuesA(hkey: P0, val_list: &mut [VALENTA], lpvaluebuf: ::windows_core::PSTR, ldwtotsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryMultipleValuesA(hkey : HKEY, val_list : *mut VALENTA, num_vals : u32, lpvaluebuf : ::windows_core::PSTR, ldwtotsize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryMultipleValuesA(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))) + RegQueryMultipleValuesA(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryMultipleValuesW(hkey: P0, val_list: &mut [VALENTW], lpvaluebuf: ::windows_core::PWSTR, ldwtotsize: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryMultipleValuesW(hkey: P0, val_list: &mut [VALENTW], lpvaluebuf: ::windows_core::PWSTR, ldwtotsize: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryMultipleValuesW(hkey : HKEY, val_list : *mut VALENTW, num_vals : u32, lpvaluebuf : ::windows_core::PWSTR, ldwtotsize : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryMultipleValuesW(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))) + RegQueryMultipleValuesW(hkey.into_param().abi(), ::core::mem::transmute(val_list.as_ptr()), val_list.len() as _, ::core::mem::transmute(lpvaluebuf), ::core::mem::transmute(ldwtotsize.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryReflectionKey(hbase: P0, bisreflectiondisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryReflectionKey(hbase: P0, bisreflectiondisabled: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryReflectionKey(hbase : HKEY, bisreflectiondisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - RegQueryReflectionKey(hbase.into_param().abi(), bisreflectiondisabled) + RegQueryReflectionKey(hbase.into_param().abi(), bisreflectiondisabled).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryValueA(hkey: P0, lpsubkey: P1, lpdata: ::windows_core::PSTR, lpcbdata: ::core::option::Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueA(hkey: P0, lpsubkey: P1, lpdata: ::windows_core::PSTR, lpcbdata: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpdata : ::windows_core::PSTR, lpcbdata : *mut i32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), ::core::mem::transmute(lpdata), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegQueryValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), ::core::mem::transmute(lpdata), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryValueExA(hkey: P0, lpvaluename: P1, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut REG_VALUE_TYPE>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueExA(hkey: P0, lpvaluename: P1, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut REG_VALUE_TYPE>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExA(hkey : HKEY, lpvaluename : ::windows_core::PCSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegQueryValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryValueExW(hkey: P0, lpvaluename: P1, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut REG_VALUE_TYPE>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueExW(hkey: P0, lpvaluename: P1, lpreserved: ::core::option::Option<*const u32>, lptype: ::core::option::Option<*mut REG_VALUE_TYPE>, lpdata: ::core::option::Option<*mut u8>, lpcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryValueExW(hkey : HKEY, lpvaluename : ::windows_core::PCWSTR, lpreserved : *const u32, lptype : *mut REG_VALUE_TYPE, lpdata : *mut u8, lpcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegQueryValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), ::core::mem::transmute(lpreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lptype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegQueryValueW(hkey: P0, lpsubkey: P1, lpdata: ::windows_core::PWSTR, lpcbdata: ::core::option::Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegQueryValueW(hkey: P0, lpsubkey: P1, lpdata: ::windows_core::PWSTR, lpcbdata: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegQueryValueW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpdata : ::windows_core::PWSTR, lpcbdata : *mut i32) -> super::super::Foundation:: WIN32_ERROR); - RegQueryValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), ::core::mem::transmute(lpdata), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))) + RegQueryValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), ::core::mem::transmute(lpdata), ::core::mem::transmute(lpcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegRenameKey(hkey: P0, lpsubkeyname: P1, lpnewkeyname: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRenameKey(hkey: P0, lpsubkeyname: P1, lpnewkeyname: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegRenameKey(hkey : HKEY, lpsubkeyname : ::windows_core::PCWSTR, lpnewkeyname : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegRenameKey(hkey.into_param().abi(), lpsubkeyname.into_param().abi(), lpnewkeyname.into_param().abi()) + RegRenameKey(hkey.into_param().abi(), lpsubkeyname.into_param().abi(), lpnewkeyname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegReplaceKeyA(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegReplaceKeyA(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -754,12 +756,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegReplaceKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpnewfile : ::windows_core::PCSTR, lpoldfile : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegReplaceKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpnewfile.into_param().abi(), lpoldfile.into_param().abi()) + RegReplaceKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpnewfile.into_param().abi(), lpoldfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegReplaceKeyW(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegReplaceKeyW(hkey: P0, lpsubkey: P1, lpnewfile: P2, lpoldfile: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -767,175 +769,175 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegReplaceKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpnewfile : ::windows_core::PCWSTR, lpoldfile : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegReplaceKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpnewfile.into_param().abi(), lpoldfile.into_param().abi()) + RegReplaceKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpnewfile.into_param().abi(), lpoldfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegRestoreKeyA(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRestoreKeyA(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegRestoreKeyA(hkey : HKEY, lpfile : ::windows_core::PCSTR, dwflags : REG_RESTORE_KEY_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - RegRestoreKeyA(hkey.into_param().abi(), lpfile.into_param().abi(), dwflags) + RegRestoreKeyA(hkey.into_param().abi(), lpfile.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegRestoreKeyW(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegRestoreKeyW(hkey: P0, lpfile: P1, dwflags: REG_RESTORE_KEY_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegRestoreKeyW(hkey : HKEY, lpfile : ::windows_core::PCWSTR, dwflags : REG_RESTORE_KEY_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - RegRestoreKeyW(hkey.into_param().abi(), lpfile.into_param().abi(), dwflags) + RegRestoreKeyW(hkey.into_param().abi(), lpfile.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegSaveKeyA(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyA(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyA(hkey : HKEY, lpfile : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: WIN32_ERROR); - RegSaveKeyA(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + RegSaveKeyA(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegSaveKeyExA(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyExA(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyExA(hkey : HKEY, lpfile : ::windows_core::PCSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flags : REG_SAVE_FORMAT) -> super::super::Foundation:: WIN32_ERROR); - RegSaveKeyExA(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), flags) + RegSaveKeyExA(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), flags).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegSaveKeyExW(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyExW(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, flags: REG_SAVE_FORMAT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyExW(hkey : HKEY, lpfile : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flags : REG_SAVE_FORMAT) -> super::super::Foundation:: WIN32_ERROR); - RegSaveKeyExW(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), flags) + RegSaveKeyExW(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null())), flags).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegSaveKeyW(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSaveKeyW(hkey: P0, lpfile: P1, lpsecurityattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSaveKeyW(hkey : HKEY, lpfile : ::windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: WIN32_ERROR); - RegSaveKeyW(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))) + RegSaveKeyW(hkey.into_param().abi(), lpfile.into_param().abi(), ::core::mem::transmute(lpsecurityattributes.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn RegSetKeySecurity(hkey: P0, securityinformation: u32, psecuritydescriptor: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetKeySecurity(hkey: P0, securityinformation: u32, psecuritydescriptor: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetKeySecurity(hkey : HKEY, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - RegSetKeySecurity(hkey.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()) + RegSetKeySecurity(hkey.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetKeyValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, lpvaluename : ::windows_core::PCSTR, dwtype : u32, lpdata : *const ::core::ffi::c_void, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetKeyValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cbdata) + RegSetKeyValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cbdata).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetKeyValueW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, lpvaluename : ::windows_core::PCWSTR, dwtype : u32, lpdata : *const ::core::ffi::c_void, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetKeyValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cbdata) + RegSetKeyValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), lpvaluename.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.unwrap_or(::std::ptr::null())), cbdata).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetValueA(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueA(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR, dwtype : REG_VALUE_TYPE, lpdata : ::windows_core::PCSTR, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)) + RegSetValueA(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetValueExA(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueExA(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueExA(hkey : HKEY, lpvaluename : ::windows_core::PCSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)) + RegSetValueExA(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetValueExW(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueExW(hkey: P0, lpvaluename: P1, reserved: u32, dwtype: REG_VALUE_TYPE, lpdata: ::core::option::Option<&[u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueExW(hkey : HKEY, lpvaluename : ::windows_core::PCWSTR, reserved : u32, dwtype : REG_VALUE_TYPE, lpdata : *const u8, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)) + RegSetValueExW(hkey.into_param().abi(), lpvaluename.into_param().abi(), reserved, dwtype, ::core::mem::transmute(lpdata.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpdata.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegSetValueW(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: P2, cbdata: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegSetValueW(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: P2, cbdata: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegSetValueW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR, dwtype : REG_VALUE_TYPE, lpdata : ::windows_core::PCWSTR, cbdata : u32) -> super::super::Foundation:: WIN32_ERROR); - RegSetValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, lpdata.into_param().abi(), cbdata) + RegSetValueW(hkey.into_param().abi(), lpsubkey.into_param().abi(), dwtype, lpdata.into_param().abi(), cbdata).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegUnLoadKeyA(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegUnLoadKeyA(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegUnLoadKeyA(hkey : HKEY, lpsubkey : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - RegUnLoadKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegUnLoadKeyA(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegUnLoadKeyW(hkey: P0, lpsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn RegUnLoadKeyW(hkey: P0, lpsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn RegUnLoadKeyW(hkey : HKEY, lpsubkey : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RegUnLoadKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi()) + RegUnLoadKeyW(hkey.into_param().abi(), lpsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Registry\"`*"] pub const AGP_FLAG_NO_1X_RATE: i32 = 1i32; diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs index 2c5c4cb57c..ec5f7fcaf5 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -1,9 +1,9 @@ #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ProcessIdToSessionId(dwprocessid: u32, psessionid: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn ProcessIdToSessionId(dwprocessid: u32, psessionid: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn ProcessIdToSessionId(dwprocessid : u32, psessionid : *mut u32) -> super::super::Foundation:: BOOL); - ProcessIdToSessionId(dwprocessid, psessionid) + ProcessIdToSessionId(dwprocessid, psessionid).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -18,57 +18,57 @@ where #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSConnectSessionA(logonid: u32, targetlogonid: u32, ppassword: P0, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSConnectSessionA(logonid: u32, targetlogonid: u32, ppassword: P0, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSConnectSessionA(logonid : u32, targetlogonid : u32, ppassword : ::windows_core::PCSTR, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSConnectSessionA(logonid, targetlogonid, ppassword.into_param().abi(), bwait.into_param().abi()) + WTSConnectSessionA(logonid, targetlogonid, ppassword.into_param().abi(), bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSConnectSessionW(logonid: u32, targetlogonid: u32, ppassword: P0, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSConnectSessionW(logonid: u32, targetlogonid: u32, ppassword: P0, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSConnectSessionW(logonid : u32, targetlogonid : u32, ppassword : ::windows_core::PCWSTR, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSConnectSessionW(logonid, targetlogonid, ppassword.into_param().abi(), bwait.into_param().abi()) + WTSConnectSessionW(logonid, targetlogonid, ppassword.into_param().abi(), bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSCreateListenerA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *const WTSLISTENERCONFIGA, flag: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSCreateListenerA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *const WTSLISTENERCONFIGA, flag: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSCreateListenerA(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCSTR, pbuffer : *const WTSLISTENERCONFIGA, flag : u32) -> super::super::Foundation:: BOOL); - WTSCreateListenerA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer, flag) + WTSCreateListenerA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer, flag).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSCreateListenerW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *const WTSLISTENERCONFIGW, flag: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSCreateListenerW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *const WTSLISTENERCONFIGW, flag: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSCreateListenerW(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCWSTR, pbuffer : *const WTSLISTENERCONFIGW, flag : u32) -> super::super::Foundation:: BOOL); - WTSCreateListenerW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer, flag) + WTSCreateListenerW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer, flag).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSDisconnectSession(hserver: P0, sessionid: u32, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSDisconnectSession(hserver: P0, sessionid: u32, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSDisconnectSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSDisconnectSession(hserver.into_param().abi(), sessionid, bwait.into_param().abi()) + WTSDisconnectSession(hserver.into_param().abi(), sessionid, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -83,122 +83,122 @@ where #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateListenersA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plisteners: ::core::option::Option<*mut *mut i8>, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateListenersA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plisteners: ::core::option::Option<*mut *mut i8>, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateListenersA(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plisteners : *mut *mut i8, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateListenersA(hserver.into_param().abi(), preserved, reserved, ::core::mem::transmute(plisteners.unwrap_or(::std::ptr::null_mut())), pcount) + WTSEnumerateListenersA(hserver.into_param().abi(), preserved, reserved, ::core::mem::transmute(plisteners.unwrap_or(::std::ptr::null_mut())), pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateListenersW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plisteners: ::core::option::Option<*mut *mut u16>, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateListenersW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plisteners: ::core::option::Option<*mut *mut u16>, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateListenersW(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plisteners : *mut *mut u16, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateListenersW(hserver.into_param().abi(), preserved, reserved, ::core::mem::transmute(plisteners.unwrap_or(::std::ptr::null_mut())), pcount) + WTSEnumerateListenersW(hserver.into_param().abi(), preserved, reserved, ::core::mem::transmute(plisteners.unwrap_or(::std::ptr::null_mut())), pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateProcessesA(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOA, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateProcessesA(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOA, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesA(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppprocessinfo : *mut *mut WTS_PROCESS_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesA(hserver.into_param().abi(), reserved, version, ppprocessinfo, pcount) + WTSEnumerateProcessesA(hserver.into_param().abi(), reserved, version, ppprocessinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateProcessesExA(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut ::windows_core::PSTR, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateProcessesExA(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut ::windows_core::PSTR, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesExA(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, sessionid : u32, ppprocessinfo : *mut ::windows_core::PSTR, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesExA(hserver.into_param().abi(), plevel, sessionid, ppprocessinfo, pcount) + WTSEnumerateProcessesExA(hserver.into_param().abi(), plevel, sessionid, ppprocessinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateProcessesExW(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut ::windows_core::PWSTR, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateProcessesExW(hserver: P0, plevel: *mut u32, sessionid: u32, ppprocessinfo: *mut ::windows_core::PWSTR, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesExW(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, sessionid : u32, ppprocessinfo : *mut ::windows_core::PWSTR, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesExW(hserver.into_param().abi(), plevel, sessionid, ppprocessinfo, pcount) + WTSEnumerateProcessesExW(hserver.into_param().abi(), plevel, sessionid, ppprocessinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateProcessesW(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOW, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateProcessesW(hserver: P0, reserved: u32, version: u32, ppprocessinfo: *mut *mut WTS_PROCESS_INFOW, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateProcessesW(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppprocessinfo : *mut *mut WTS_PROCESS_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateProcessesW(hserver.into_param().abi(), reserved, version, ppprocessinfo, pcount) + WTSEnumerateProcessesW(hserver.into_param().abi(), reserved, version, ppprocessinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateServersA(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOA, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateServersA(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOA, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateServersA(pdomainname : ::windows_core::PCSTR, reserved : u32, version : u32, ppserverinfo : *mut *mut WTS_SERVER_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateServersA(pdomainname.into_param().abi(), reserved, version, ppserverinfo, pcount) + WTSEnumerateServersA(pdomainname.into_param().abi(), reserved, version, ppserverinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateServersW(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOW, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateServersW(pdomainname: P0, reserved: u32, version: u32, ppserverinfo: *mut *mut WTS_SERVER_INFOW, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateServersW(pdomainname : ::windows_core::PCWSTR, reserved : u32, version : u32, ppserverinfo : *mut *mut WTS_SERVER_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateServersW(pdomainname.into_param().abi(), reserved, version, ppserverinfo, pcount) + WTSEnumerateServersW(pdomainname.into_param().abi(), reserved, version, ppserverinfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateSessionsA(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOA, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateSessionsA(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOA, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsA(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFOA, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsA(hserver.into_param().abi(), reserved, version, ppsessioninfo, pcount) + WTSEnumerateSessionsA(hserver.into_param().abi(), reserved, version, ppsessioninfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateSessionsExA(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1A, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateSessionsExA(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1A, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsExA(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, filter : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFO_1A, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsExA(hserver.into_param().abi(), plevel, filter, ppsessioninfo, pcount) + WTSEnumerateSessionsExA(hserver.into_param().abi(), plevel, filter, ppsessioninfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateSessionsExW(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1W, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateSessionsExW(hserver: P0, plevel: *mut u32, filter: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFO_1W, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsExW(hserver : super::super::Foundation:: HANDLE, plevel : *mut u32, filter : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFO_1W, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsExW(hserver.into_param().abi(), plevel, filter, ppsessioninfo, pcount) + WTSEnumerateSessionsExW(hserver.into_param().abi(), plevel, filter, ppsessioninfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSEnumerateSessionsW(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOW, pcount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSEnumerateSessionsW(hserver: P0, reserved: u32, version: u32, ppsessioninfo: *mut *mut WTS_SESSION_INFOW, pcount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSEnumerateSessionsW(hserver : super::super::Foundation:: HANDLE, reserved : u32, version : u32, ppsessioninfo : *mut *mut WTS_SESSION_INFOW, pcount : *mut u32) -> super::super::Foundation:: BOOL); - WTSEnumerateSessionsW(hserver.into_param().abi(), reserved, version, ppsessioninfo, pcount) + WTSEnumerateSessionsW(hserver.into_param().abi(), reserved, version, ppsessioninfo, pcount).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`*"] #[inline] @@ -209,16 +209,16 @@ pub unsafe fn WTSFreeMemory(pmemory: *mut ::core::ffi::c_void) { #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSFreeMemoryExA(wtstypeclass: WTS_TYPE_CLASS, pmemory: *const ::core::ffi::c_void, numberofentries: u32) -> super::super::Foundation::BOOL { +pub unsafe fn WTSFreeMemoryExA(wtstypeclass: WTS_TYPE_CLASS, pmemory: *const ::core::ffi::c_void, numberofentries: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSFreeMemoryExA(wtstypeclass : WTS_TYPE_CLASS, pmemory : *const ::core::ffi::c_void, numberofentries : u32) -> super::super::Foundation:: BOOL); - WTSFreeMemoryExA(wtstypeclass, pmemory, numberofentries) + WTSFreeMemoryExA(wtstypeclass, pmemory, numberofentries).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSFreeMemoryExW(wtstypeclass: WTS_TYPE_CLASS, pmemory: *const ::core::ffi::c_void, numberofentries: u32) -> super::super::Foundation::BOOL { +pub unsafe fn WTSFreeMemoryExW(wtstypeclass: WTS_TYPE_CLASS, pmemory: *const ::core::ffi::c_void, numberofentries: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSFreeMemoryExW(wtstypeclass : WTS_TYPE_CLASS, pmemory : *const ::core::ffi::c_void, numberofentries : u32) -> super::super::Foundation:: BOOL); - WTSFreeMemoryExW(wtstypeclass, pmemory, numberofentries) + WTSFreeMemoryExW(wtstypeclass, pmemory, numberofentries).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`*"] #[inline] @@ -236,24 +236,24 @@ pub unsafe fn WTSGetChildSessionId(psessionid: *mut u32) -> super::super::Founda #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn WTSGetListenerSecurityA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSGetListenerSecurityA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSGetListenerSecurityA(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - WTSGetListenerSecurityA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor, nlength, lpnlengthneeded) + WTSGetListenerSecurityA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor, nlength, lpnlengthneeded).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn WTSGetListenerSecurityW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSGetListenerSecurityW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSGetListenerSecurityW(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCWSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - WTSGetListenerSecurityW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor, nlength, lpnlengthneeded) + WTSGetListenerSecurityW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor, nlength, lpnlengthneeded).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -265,13 +265,13 @@ pub unsafe fn WTSIsChildSessionsEnabled(pbenabled: *mut super::super::Foundation #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSLogoffSession(hserver: P0, sessionid: u32, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSLogoffSession(hserver: P0, sessionid: u32, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSLogoffSession(hserver : super::super::Foundation:: HANDLE, sessionid : u32, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSLogoffSession(hserver.into_param().abi(), sessionid, bwait.into_param().abi()) + WTSLogoffSession(hserver.into_param().abi(), sessionid, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -316,110 +316,110 @@ where #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQueryListenerConfigA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *mut WTSLISTENERCONFIGA) -> super::super::Foundation::BOOL +pub unsafe fn WTSQueryListenerConfigA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *mut WTSLISTENERCONFIGA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryListenerConfigA(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCSTR, pbuffer : *mut WTSLISTENERCONFIGA) -> super::super::Foundation:: BOOL); - WTSQueryListenerConfigA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer) + WTSQueryListenerConfigA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQueryListenerConfigW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *mut WTSLISTENERCONFIGW) -> super::super::Foundation::BOOL +pub unsafe fn WTSQueryListenerConfigW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, pbuffer: *mut WTSLISTENERCONFIGW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryListenerConfigW(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCWSTR, pbuffer : *mut WTSLISTENERCONFIGW) -> super::super::Foundation:: BOOL); - WTSQueryListenerConfigW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer) + WTSQueryListenerConfigW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), pbuffer).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQuerySessionInformationA(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut ::windows_core::PSTR, pbytesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSQuerySessionInformationA(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut ::windows_core::PSTR, pbytesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQuerySessionInformationA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, wtsinfoclass : WTS_INFO_CLASS, ppbuffer : *mut ::windows_core::PSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQuerySessionInformationA(hserver.into_param().abi(), sessionid, wtsinfoclass, ppbuffer, pbytesreturned) + WTSQuerySessionInformationA(hserver.into_param().abi(), sessionid, wtsinfoclass, ppbuffer, pbytesreturned).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQuerySessionInformationW(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut ::windows_core::PWSTR, pbytesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSQuerySessionInformationW(hserver: P0, sessionid: u32, wtsinfoclass: WTS_INFO_CLASS, ppbuffer: *mut ::windows_core::PWSTR, pbytesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQuerySessionInformationW(hserver : super::super::Foundation:: HANDLE, sessionid : u32, wtsinfoclass : WTS_INFO_CLASS, ppbuffer : *mut ::windows_core::PWSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQuerySessionInformationW(hserver.into_param().abi(), sessionid, wtsinfoclass, ppbuffer, pbytesreturned) + WTSQuerySessionInformationW(hserver.into_param().abi(), sessionid, wtsinfoclass, ppbuffer, pbytesreturned).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQueryUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut ::windows_core::PSTR, pbytesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSQueryUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut ::windows_core::PSTR, pbytesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserConfigA(pservername : ::windows_core::PCSTR, pusername : ::windows_core::PCSTR, wtsconfigclass : WTS_CONFIG_CLASS, ppbuffer : *mut ::windows_core::PSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQueryUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ppbuffer, pbytesreturned) + WTSQueryUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ppbuffer, pbytesreturned).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQueryUserConfigW(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut ::windows_core::PWSTR, pbytesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSQueryUserConfigW(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, ppbuffer: *mut ::windows_core::PWSTR, pbytesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserConfigW(pservername : ::windows_core::PCWSTR, pusername : ::windows_core::PCWSTR, wtsconfigclass : WTS_CONFIG_CLASS, ppbuffer : *mut ::windows_core::PWSTR, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSQueryUserConfigW(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ppbuffer, pbytesreturned) + WTSQueryUserConfigW(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ppbuffer, pbytesreturned).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSQueryUserToken(sessionid: u32, phtoken: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn WTSQueryUserToken(sessionid: u32, phtoken: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSQueryUserToken(sessionid : u32, phtoken : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSQueryUserToken(sessionid, phtoken) + WTSQueryUserToken(sessionid, phtoken).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSRegisterSessionNotification(hwnd: P0, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSRegisterSessionNotification(hwnd: P0, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSRegisterSessionNotification(hwnd : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - WTSRegisterSessionNotification(hwnd.into_param().abi(), dwflags) + WTSRegisterSessionNotification(hwnd.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSRegisterSessionNotificationEx(hserver: P0, hwnd: P1, dwflags: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSRegisterSessionNotificationEx(hserver: P0, hwnd: P1, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSRegisterSessionNotificationEx(hserver : super::super::Foundation:: HANDLE, hwnd : super::super::Foundation:: HWND, dwflags : u32) -> super::super::Foundation:: BOOL); - WTSRegisterSessionNotificationEx(hserver.into_param().abi(), hwnd.into_param().abi(), dwflags) + WTSRegisterSessionNotificationEx(hserver.into_param().abi(), hwnd.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn WTSSendMessageA(hserver: P0, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSSendMessageA(hserver: P0, sessionid: u32, ptitle: &[u8], pmessage: &[u8], style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageA(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : ::windows_core::PCSTR, titlelength : u32, pmessage : ::windows_core::PCSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageA(hserver.into_param().abi(), sessionid, ::core::mem::transmute(ptitle.as_ptr()), ptitle.len() as _, ::core::mem::transmute(pmessage.as_ptr()), pmessage.len() as _, style, timeout, presponse, bwait.into_param().abi()) + WTSSendMessageA(hserver.into_param().abi(), sessionid, ::core::mem::transmute(ptitle.as_ptr()), ptitle.len() as _, ::core::mem::transmute(pmessage.as_ptr()), pmessage.len() as _, style, timeout, presponse, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn WTSSendMessageW(hserver: P0, sessionid: u32, ptitle: P1, titlelength: u32, pmessage: P2, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P3) -> super::super::Foundation::BOOL +pub unsafe fn WTSSendMessageW(hserver: P0, sessionid: u32, ptitle: P1, titlelength: u32, pmessage: P2, messagelength: u32, style: super::super::UI::WindowsAndMessaging::MESSAGEBOX_STYLE, timeout: u32, presponse: *mut super::super::UI::WindowsAndMessaging::MESSAGEBOX_RESULT, bwait: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -427,31 +427,31 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSendMessageW(hserver : super::super::Foundation:: HANDLE, sessionid : u32, ptitle : ::windows_core::PCWSTR, titlelength : u32, pmessage : ::windows_core::PCWSTR, messagelength : u32, style : super::super::UI::WindowsAndMessaging:: MESSAGEBOX_STYLE, timeout : u32, presponse : *mut super::super::UI::WindowsAndMessaging:: MESSAGEBOX_RESULT, bwait : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - WTSSendMessageW(hserver.into_param().abi(), sessionid, ptitle.into_param().abi(), titlelength, pmessage.into_param().abi(), messagelength, style, timeout, presponse, bwait.into_param().abi()) + WTSSendMessageW(hserver.into_param().abi(), sessionid, ptitle.into_param().abi(), titlelength, pmessage.into_param().abi(), messagelength, style, timeout, presponse, bwait.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn WTSSetListenerSecurityA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: P2) -> super::super::Foundation::BOOL +pub unsafe fn WTSSetListenerSecurityA(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetListenerSecurityA(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WTSSetListenerSecurityA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()) + WTSSetListenerSecurityA(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn WTSSetListenerSecurityW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: P2) -> super::super::Foundation::BOOL +pub unsafe fn WTSSetListenerSecurityW(hserver: P0, preserved: *const ::core::ffi::c_void, reserved: u32, plistenername: P1, securityinformation: u32, psecuritydescriptor: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetListenerSecurityW(hserver : super::super::Foundation:: HANDLE, preserved : *const ::core::ffi::c_void, reserved : u32, plistenername : ::windows_core::PCWSTR, securityinformation : u32, psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - WTSSetListenerSecurityW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()) + WTSSetListenerSecurityW(hserver.into_param().abi(), preserved, reserved, plistenername.into_param().abi(), securityinformation, psecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -466,103 +466,103 @@ where #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSSetUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, pbuffer: &[u8]) -> super::super::Foundation::BOOL +pub unsafe fn WTSSetUserConfigA(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, pbuffer: &[u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetUserConfigA(pservername : ::windows_core::PCSTR, pusername : ::windows_core::PCSTR, wtsconfigclass : WTS_CONFIG_CLASS, pbuffer : ::windows_core::PCSTR, datalength : u32) -> super::super::Foundation:: BOOL); - WTSSetUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _) + WTSSetUserConfigA(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, ::core::mem::transmute(pbuffer.as_ptr()), pbuffer.len() as _).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSSetUserConfigW(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, pbuffer: P2, datalength: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSSetUserConfigW(pservername: P0, pusername: P1, wtsconfigclass: WTS_CONFIG_CLASS, pbuffer: P2, datalength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSSetUserConfigW(pservername : ::windows_core::PCWSTR, pusername : ::windows_core::PCWSTR, wtsconfigclass : WTS_CONFIG_CLASS, pbuffer : ::windows_core::PCWSTR, datalength : u32) -> super::super::Foundation:: BOOL); - WTSSetUserConfigW(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, pbuffer.into_param().abi(), datalength) + WTSSetUserConfigW(pservername.into_param().abi(), pusername.into_param().abi(), wtsconfigclass, pbuffer.into_param().abi(), datalength).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSShutdownSystem(hserver: P0, shutdownflag: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSShutdownSystem(hserver: P0, shutdownflag: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSShutdownSystem(hserver : super::super::Foundation:: HANDLE, shutdownflag : u32) -> super::super::Foundation:: BOOL); - WTSShutdownSystem(hserver.into_param().abi(), shutdownflag) + WTSShutdownSystem(hserver.into_param().abi(), shutdownflag).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSStartRemoteControlSessionA(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> super::super::Foundation::BOOL +pub unsafe fn WTSStartRemoteControlSessionA(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSStartRemoteControlSessionA(ptargetservername : ::windows_core::PCSTR, targetlogonid : u32, hotkeyvk : u8, hotkeymodifiers : u16) -> super::super::Foundation:: BOOL); - WTSStartRemoteControlSessionA(ptargetservername.into_param().abi(), targetlogonid, hotkeyvk, hotkeymodifiers) + WTSStartRemoteControlSessionA(ptargetservername.into_param().abi(), targetlogonid, hotkeyvk, hotkeymodifiers).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSStartRemoteControlSessionW(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> super::super::Foundation::BOOL +pub unsafe fn WTSStartRemoteControlSessionW(ptargetservername: P0, targetlogonid: u32, hotkeyvk: u8, hotkeymodifiers: u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSStartRemoteControlSessionW(ptargetservername : ::windows_core::PCWSTR, targetlogonid : u32, hotkeyvk : u8, hotkeymodifiers : u16) -> super::super::Foundation:: BOOL); - WTSStartRemoteControlSessionW(ptargetservername.into_param().abi(), targetlogonid, hotkeyvk, hotkeymodifiers) + WTSStartRemoteControlSessionW(ptargetservername.into_param().abi(), targetlogonid, hotkeyvk, hotkeymodifiers).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSStopRemoteControlSession(logonid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn WTSStopRemoteControlSession(logonid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSStopRemoteControlSession(logonid : u32) -> super::super::Foundation:: BOOL); - WTSStopRemoteControlSession(logonid) + WTSStopRemoteControlSession(logonid).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSTerminateProcess(hserver: P0, processid: u32, exitcode: u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSTerminateProcess(hserver: P0, processid: u32, exitcode: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSTerminateProcess(hserver : super::super::Foundation:: HANDLE, processid : u32, exitcode : u32) -> super::super::Foundation:: BOOL); - WTSTerminateProcess(hserver.into_param().abi(), processid, exitcode) + WTSTerminateProcess(hserver.into_param().abi(), processid, exitcode).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSUnRegisterSessionNotification(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn WTSUnRegisterSessionNotification(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSUnRegisterSessionNotification(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - WTSUnRegisterSessionNotification(hwnd.into_param().abi()) + WTSUnRegisterSessionNotification(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSUnRegisterSessionNotificationEx(hserver: P0, hwnd: P1) -> super::super::Foundation::BOOL +pub unsafe fn WTSUnRegisterSessionNotificationEx(hserver: P0, hwnd: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSUnRegisterSessionNotificationEx(hserver : super::super::Foundation:: HANDLE, hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - WTSUnRegisterSessionNotificationEx(hserver.into_param().abi(), hwnd.into_param().abi()) + WTSUnRegisterSessionNotificationEx(hserver.into_param().abi(), hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelClose(hchannelhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelClose(hchannelhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelClose(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelClose(hchannelhandle.into_param().abi()) + WTSVirtualChannelClose(hchannelhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -589,62 +589,62 @@ where #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelPurgeInput(hchannelhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelPurgeInput(hchannelhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelPurgeInput(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelPurgeInput(hchannelhandle.into_param().abi()) + WTSVirtualChannelPurgeInput(hchannelhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelPurgeOutput(hchannelhandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelPurgeOutput(hchannelhandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelPurgeOutput(hchannelhandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - WTSVirtualChannelPurgeOutput(hchannelhandle.into_param().abi()) + WTSVirtualChannelPurgeOutput(hchannelhandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelQuery(hchannelhandle: P0, param1: WTS_VIRTUAL_CLASS, ppbuffer: *mut *mut ::core::ffi::c_void, pbytesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelQuery(hchannelhandle: P0, param1: WTS_VIRTUAL_CLASS, ppbuffer: *mut *mut ::core::ffi::c_void, pbytesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelQuery(hchannelhandle : super::super::Foundation:: HANDLE, param1 : WTS_VIRTUAL_CLASS, ppbuffer : *mut *mut ::core::ffi::c_void, pbytesreturned : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelQuery(hchannelhandle.into_param().abi(), param1, ppbuffer, pbytesreturned) + WTSVirtualChannelQuery(hchannelhandle.into_param().abi(), param1, ppbuffer, pbytesreturned).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelRead(hchannelhandle: P0, timeout: u32, buffer: &mut [u8], pbytesread: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelRead(hchannelhandle: P0, timeout: u32, buffer: &mut [u8], pbytesread: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelRead(hchannelhandle : super::super::Foundation:: HANDLE, timeout : u32, buffer : ::windows_core::PSTR, buffersize : u32, pbytesread : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelRead(hchannelhandle.into_param().abi(), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbytesread) + WTSVirtualChannelRead(hchannelhandle.into_param().abi(), timeout, ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbytesread).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSVirtualChannelWrite(hchannelhandle: P0, buffer: &[u8], pbyteswritten: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSVirtualChannelWrite(hchannelhandle: P0, buffer: &[u8], pbyteswritten: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSVirtualChannelWrite(hchannelhandle : super::super::Foundation:: HANDLE, buffer : ::windows_core::PCSTR, length : u32, pbyteswritten : *mut u32) -> super::super::Foundation:: BOOL); - WTSVirtualChannelWrite(hchannelhandle.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbyteswritten) + WTSVirtualChannelWrite(hchannelhandle.into_param().abi(), ::core::mem::transmute(buffer.as_ptr()), buffer.len() as _, pbyteswritten).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WTSWaitSystemEvent(hserver: P0, eventmask: u32, peventflags: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn WTSWaitSystemEvent(hserver: P0, eventmask: u32, peventflags: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("wtsapi32.dll" "system" fn WTSWaitSystemEvent(hserver : super::super::Foundation:: HANDLE, eventmask : u32, peventflags : *mut u32) -> super::super::Foundation:: BOOL); - WTSWaitSystemEvent(hserver.into_param().abi(), eventmask, peventflags) + WTSWaitSystemEvent(hserver.into_param().abi(), eventmask, peventflags).ok() } #[doc = "*Required features: `\"Win32_System_RemoteDesktop\"`, `\"Win32_System_Com\"`*"] #[cfg(feature = "Win32_System_Com")] diff --git a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs index e054246061..06d821b8ee 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -1,27 +1,27 @@ #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ChangeServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ChangeServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfig2A(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpinfo : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ChangeServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpinfo.unwrap_or(::std::ptr::null()))) + ChangeServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpinfo.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ChangeServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL +pub unsafe fn ChangeServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfig2W(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpinfo : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ChangeServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpinfo.unwrap_or(::std::ptr::null()))) + ChangeServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpinfo.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ChangeServiceConfigA(hservice: P0, dwservicetype: u32, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: ::core::option::Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> super::super::Foundation::BOOL +pub unsafe fn ChangeServiceConfigA(hservice: P0, dwservicetype: u32, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: ::core::option::Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -32,12 +32,12 @@ where P6: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfigA(hservice : super::super::Security:: SC_HANDLE, dwservicetype : u32, dwstarttype : SERVICE_START_TYPE, dwerrorcontrol : SERVICE_ERROR, lpbinarypathname : ::windows_core::PCSTR, lploadordergroup : ::windows_core::PCSTR, lpdwtagid : *mut u32, lpdependencies : ::windows_core::PCSTR, lpservicestartname : ::windows_core::PCSTR, lppassword : ::windows_core::PCSTR, lpdisplayname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ChangeServiceConfigA(hservice.into_param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.into_param().abi(), lploadordergroup.into_param().abi(), ::core::mem::transmute(lpdwtagid.unwrap_or(::std::ptr::null_mut())), lpdependencies.into_param().abi(), lpservicestartname.into_param().abi(), lppassword.into_param().abi(), lpdisplayname.into_param().abi()) + ChangeServiceConfigA(hservice.into_param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.into_param().abi(), lploadordergroup.into_param().abi(), ::core::mem::transmute(lpdwtagid.unwrap_or(::std::ptr::null_mut())), lpdependencies.into_param().abi(), lpservicestartname.into_param().abi(), lppassword.into_param().abi(), lpdisplayname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ChangeServiceConfigW(hservice: P0, dwservicetype: u32, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: ::core::option::Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> super::super::Foundation::BOOL +pub unsafe fn ChangeServiceConfigW(hservice: P0, dwservicetype: u32, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: ::core::option::Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -48,47 +48,47 @@ where P6: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfigW(hservice : super::super::Security:: SC_HANDLE, dwservicetype : u32, dwstarttype : SERVICE_START_TYPE, dwerrorcontrol : SERVICE_ERROR, lpbinarypathname : ::windows_core::PCWSTR, lploadordergroup : ::windows_core::PCWSTR, lpdwtagid : *mut u32, lpdependencies : ::windows_core::PCWSTR, lpservicestartname : ::windows_core::PCWSTR, lppassword : ::windows_core::PCWSTR, lpdisplayname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ChangeServiceConfigW(hservice.into_param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.into_param().abi(), lploadordergroup.into_param().abi(), ::core::mem::transmute(lpdwtagid.unwrap_or(::std::ptr::null_mut())), lpdependencies.into_param().abi(), lpservicestartname.into_param().abi(), lppassword.into_param().abi(), lpdisplayname.into_param().abi()) + ChangeServiceConfigW(hservice.into_param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.into_param().abi(), lploadordergroup.into_param().abi(), ::core::mem::transmute(lpdwtagid.unwrap_or(::std::ptr::null_mut())), lpdependencies.into_param().abi(), lpservicestartname.into_param().abi(), lppassword.into_param().abi(), lpdisplayname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CloseServiceHandle(hscobject: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseServiceHandle(hscobject: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn CloseServiceHandle(hscobject : super::super::Security:: SC_HANDLE) -> super::super::Foundation:: BOOL); - CloseServiceHandle(hscobject.into_param().abi()) + CloseServiceHandle(hscobject.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ControlService(hservice: P0, dwcontrol: u32, lpservicestatus: *mut SERVICE_STATUS) -> super::super::Foundation::BOOL +pub unsafe fn ControlService(hservice: P0, dwcontrol: u32, lpservicestatus: *mut SERVICE_STATUS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ControlService(hservice : super::super::Security:: SC_HANDLE, dwcontrol : u32, lpservicestatus : *mut SERVICE_STATUS) -> super::super::Foundation:: BOOL); - ControlService(hservice.into_param().abi(), dwcontrol, lpservicestatus) + ControlService(hservice.into_param().abi(), dwcontrol, lpservicestatus).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ControlServiceExA(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn ControlServiceExA(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ControlServiceExA(hservice : super::super::Security:: SC_HANDLE, dwcontrol : u32, dwinfolevel : u32, pcontrolparams : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ControlServiceExA(hservice.into_param().abi(), dwcontrol, dwinfolevel, pcontrolparams) + ControlServiceExA(hservice.into_param().abi(), dwcontrol, dwinfolevel, pcontrolparams).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn ControlServiceExW(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn ControlServiceExW(hservice: P0, dwcontrol: u32, dwinfolevel: u32, pcontrolparams: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn ControlServiceExW(hservice : super::super::Security:: SC_HANDLE, dwcontrol : u32, dwinfolevel : u32, pcontrolparams : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ControlServiceExW(hservice.into_param().abi(), dwcontrol, dwinfolevel, pcontrolparams) + ControlServiceExW(hservice.into_param().abi(), dwcontrol, dwinfolevel, pcontrolparams).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -129,74 +129,74 @@ where #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn DeleteService(hservice: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteService(hservice: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn DeleteService(hservice : super::super::Security:: SC_HANDLE) -> super::super::Foundation:: BOOL); - DeleteService(hservice.into_param().abi()) + DeleteService(hservice.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumDependentServicesA(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumDependentServicesA(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnumDependentServicesA(hservice : super::super::Security:: SC_HANDLE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut ENUM_SERVICE_STATUSA, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumDependentServicesA(hservice.into_param().abi(), dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned) + EnumDependentServicesA(hservice.into_param().abi(), dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumDependentServicesW(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn EnumDependentServicesW(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnumDependentServicesW(hservice : super::super::Security:: SC_HANDLE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut ENUM_SERVICE_STATUSW, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32) -> super::super::Foundation:: BOOL); - EnumDependentServicesW(hservice.into_param().abi(), dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned) + EnumDependentServicesW(hservice.into_param().abi(), dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumServicesStatusA(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn EnumServicesStatusA(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusA(hscmanager : super::super::Security:: SC_HANDLE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut ENUM_SERVICE_STATUSA, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32) -> super::super::Foundation:: BOOL); - EnumServicesStatusA(hscmanager.into_param().abi(), dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut()))) + EnumServicesStatusA(hscmanager.into_param().abi(), dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumServicesStatusExA(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>, pszgroupname: P1) -> super::super::Foundation::BOOL +pub unsafe fn EnumServicesStatusExA(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>, pszgroupname: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExA(hscmanager : super::super::Security:: SC_HANDLE, infolevel : SC_ENUM_TYPE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32, pszgroupname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - EnumServicesStatusExA(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()) + EnumServicesStatusExA(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumServicesStatusExW(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>, pszgroupname: P1) -> super::super::Foundation::BOOL +pub unsafe fn EnumServicesStatusExW(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>, pszgroupname: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExW(hscmanager : super::super::Security:: SC_HANDLE, infolevel : SC_ENUM_TYPE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32, pszgroupname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - EnumServicesStatusExW(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()) + EnumServicesStatusExW(hscmanager.into_param().abi(), infolevel, dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpservices.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut())), pszgroupname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn EnumServicesStatusW(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn EnumServicesStatusW(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: ::core::option::Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusW(hscmanager : super::super::Security:: SC_HANDLE, dwservicetype : ENUM_SERVICE_TYPE, dwservicestate : ENUM_SERVICE_STATE, lpservices : *mut ENUM_SERVICE_STATUSW, cbbufsize : u32, pcbbytesneeded : *mut u32, lpservicesreturned : *mut u32, lpresumehandle : *mut u32) -> super::super::Foundation:: BOOL); - EnumServicesStatusW(hscmanager.into_param().abi(), dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut()))) + EnumServicesStatusW(hscmanager.into_param().abi(), dwservicetype, dwservicestate, ::core::mem::transmute(lpservices.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, ::core::mem::transmute(lpresumehandle.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`*"] #[inline] @@ -210,46 +210,46 @@ where #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn GetServiceDisplayNameA(hscmanager: P0, lpservicename: P1, lpdisplayname: ::windows_core::PSTR, lpcchbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetServiceDisplayNameA(hscmanager: P0, lpservicename: P1, lpdisplayname: ::windows_core::PSTR, lpcchbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetServiceDisplayNameA(hscmanager : super::super::Security:: SC_HANDLE, lpservicename : ::windows_core::PCSTR, lpdisplayname : ::windows_core::PSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceDisplayNameA(hscmanager.into_param().abi(), lpservicename.into_param().abi(), ::core::mem::transmute(lpdisplayname), lpcchbuffer) + GetServiceDisplayNameA(hscmanager.into_param().abi(), lpservicename.into_param().abi(), ::core::mem::transmute(lpdisplayname), lpcchbuffer).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn GetServiceDisplayNameW(hscmanager: P0, lpservicename: P1, lpdisplayname: ::windows_core::PWSTR, lpcchbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetServiceDisplayNameW(hscmanager: P0, lpservicename: P1, lpdisplayname: ::windows_core::PWSTR, lpcchbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetServiceDisplayNameW(hscmanager : super::super::Security:: SC_HANDLE, lpservicename : ::windows_core::PCWSTR, lpdisplayname : ::windows_core::PWSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceDisplayNameW(hscmanager.into_param().abi(), lpservicename.into_param().abi(), ::core::mem::transmute(lpdisplayname), lpcchbuffer) + GetServiceDisplayNameW(hscmanager.into_param().abi(), lpservicename.into_param().abi(), ::core::mem::transmute(lpdisplayname), lpcchbuffer).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn GetServiceKeyNameA(hscmanager: P0, lpdisplayname: P1, lpservicename: ::windows_core::PSTR, lpcchbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetServiceKeyNameA(hscmanager: P0, lpdisplayname: P1, lpservicename: ::windows_core::PSTR, lpcchbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetServiceKeyNameA(hscmanager : super::super::Security:: SC_HANDLE, lpdisplayname : ::windows_core::PCSTR, lpservicename : ::windows_core::PSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceKeyNameA(hscmanager.into_param().abi(), lpdisplayname.into_param().abi(), ::core::mem::transmute(lpservicename), lpcchbuffer) + GetServiceKeyNameA(hscmanager.into_param().abi(), lpdisplayname.into_param().abi(), ::core::mem::transmute(lpservicename), lpcchbuffer).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn GetServiceKeyNameW(hscmanager: P0, lpdisplayname: P1, lpservicename: ::windows_core::PWSTR, lpcchbuffer: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetServiceKeyNameW(hscmanager: P0, lpdisplayname: P1, lpservicename: ::windows_core::PWSTR, lpcchbuffer: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn GetServiceKeyNameW(hscmanager : super::super::Security:: SC_HANDLE, lpdisplayname : ::windows_core::PCWSTR, lpservicename : ::windows_core::PWSTR, lpcchbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetServiceKeyNameW(hscmanager.into_param().abi(), lpdisplayname.into_param().abi(), ::core::mem::transmute(lpservicename), lpcchbuffer) + GetServiceKeyNameW(hscmanager.into_param().abi(), lpdisplayname.into_param().abi(), ::core::mem::transmute(lpservicename), lpcchbuffer).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -294,12 +294,12 @@ where #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn NotifyBootConfigStatus(bootacceptable: P0) -> super::super::Foundation::BOOL +pub unsafe fn NotifyBootConfigStatus(bootacceptable: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn NotifyBootConfigStatus(bootacceptable : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - NotifyBootConfigStatus(bootacceptable.into_param().abi()) + NotifyBootConfigStatus(bootacceptable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Security\"`*"] #[cfg(feature = "Win32_Security")] @@ -372,102 +372,102 @@ where #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceConfig2A(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2A(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded) + QueryServiceConfig2A(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfig2W(hservice : super::super::Security:: SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded) + QueryServiceConfig2W(hservice.into_param().abi(), dwinfolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceConfigA(hservice: P0, lpserviceconfig: ::core::option::Option<*mut QUERY_SERVICE_CONFIGA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceConfigA(hservice: P0, lpserviceconfig: ::core::option::Option<*mut QUERY_SERVICE_CONFIGA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfigA(hservice : super::super::Security:: SC_HANDLE, lpserviceconfig : *mut QUERY_SERVICE_CONFIGA, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfigA(hservice.into_param().abi(), ::core::mem::transmute(lpserviceconfig.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded) + QueryServiceConfigA(hservice.into_param().abi(), ::core::mem::transmute(lpserviceconfig.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceConfigW(hservice: P0, lpserviceconfig: ::core::option::Option<*mut QUERY_SERVICE_CONFIGW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceConfigW(hservice: P0, lpserviceconfig: ::core::option::Option<*mut QUERY_SERVICE_CONFIGW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfigW(hservice : super::super::Security:: SC_HANDLE, lpserviceconfig : *mut QUERY_SERVICE_CONFIGW, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfigW(hservice.into_param().abi(), ::core::mem::transmute(lpserviceconfig.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded) + QueryServiceConfigW(hservice.into_param().abi(), ::core::mem::transmute(lpserviceconfig.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryServiceDynamicInformation(hservicestatus: P0, dwinfolevel: u32, ppdynamicinfo: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceDynamicInformation(hservicestatus: P0, dwinfolevel: u32, ppdynamicinfo: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceDynamicInformation(hservicestatus : SERVICE_STATUS_HANDLE, dwinfolevel : u32, ppdynamicinfo : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - QueryServiceDynamicInformation(hservicestatus.into_param().abi(), dwinfolevel, ppdynamicinfo) + QueryServiceDynamicInformation(hservicestatus.into_param().abi(), dwinfolevel, ppdynamicinfo).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceLockStatusA(hscmanager: P0, lplockstatus: ::core::option::Option<*mut QUERY_SERVICE_LOCK_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceLockStatusA(hscmanager: P0, lplockstatus: ::core::option::Option<*mut QUERY_SERVICE_LOCK_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceLockStatusA(hscmanager : super::super::Security:: SC_HANDLE, lplockstatus : *mut QUERY_SERVICE_LOCK_STATUSA, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceLockStatusA(hscmanager.into_param().abi(), ::core::mem::transmute(lplockstatus.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded) + QueryServiceLockStatusA(hscmanager.into_param().abi(), ::core::mem::transmute(lplockstatus.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceLockStatusW(hscmanager: P0, lplockstatus: ::core::option::Option<*mut QUERY_SERVICE_LOCK_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceLockStatusW(hscmanager: P0, lplockstatus: ::core::option::Option<*mut QUERY_SERVICE_LOCK_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceLockStatusW(hscmanager : super::super::Security:: SC_HANDLE, lplockstatus : *mut QUERY_SERVICE_LOCK_STATUSW, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceLockStatusW(hscmanager.into_param().abi(), ::core::mem::transmute(lplockstatus.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded) + QueryServiceLockStatusW(hscmanager.into_param().abi(), ::core::mem::transmute(lplockstatus.unwrap_or(::std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceObjectSecurity(hservice: P0, dwsecurityinformation: u32, lpsecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, cbbufsize: u32, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceObjectSecurity(hservice: P0, dwsecurityinformation: u32, lpsecuritydescriptor: super::super::Security::PSECURITY_DESCRIPTOR, cbbufsize: u32, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceObjectSecurity(hservice : super::super::Security:: SC_HANDLE, dwsecurityinformation : u32, lpsecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceObjectSecurity(hservice.into_param().abi(), dwsecurityinformation, lpsecuritydescriptor, cbbufsize, pcbbytesneeded) + QueryServiceObjectSecurity(hservice.into_param().abi(), dwsecurityinformation, lpsecuritydescriptor, cbbufsize, pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceStatus(hservice: P0, lpservicestatus: *mut SERVICE_STATUS) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceStatus(hservice: P0, lpservicestatus: *mut SERVICE_STATUS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceStatus(hservice : super::super::Security:: SC_HANDLE, lpservicestatus : *mut SERVICE_STATUS) -> super::super::Foundation:: BOOL); - QueryServiceStatus(hservice.into_param().abi(), lpservicestatus) + QueryServiceStatus(hservice.into_param().abi(), lpservicestatus).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn QueryServiceStatusEx(hservice: P0, infolevel: SC_STATUS_TYPE, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryServiceStatusEx(hservice: P0, infolevel: SC_STATUS_TYPE, lpbuffer: ::core::option::Option<&mut [u8]>, pcbbytesneeded: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn QueryServiceStatusEx(hservice : super::super::Security:: SC_HANDLE, infolevel : SC_STATUS_TYPE, lpbuffer : *mut u8, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceStatusEx(hservice.into_param().abi(), infolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded) + QueryServiceStatusEx(hservice.into_param().abi(), infolevel, ::core::mem::transmute(lpbuffer.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), lpbuffer.as_deref().map_or(0, |slice| slice.len() as _), pcbbytesneeded).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`*"] #[inline] @@ -512,76 +512,76 @@ where #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetServiceBits(hservicestatus: P0, dwservicebits: u32, bsetbitson: P1, bupdateimmediately: P2) -> super::super::Foundation::BOOL +pub unsafe fn SetServiceBits(hservicestatus: P0, dwservicebits: u32, bsetbitson: P1, bupdateimmediately: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetServiceBits(hservicestatus : SERVICE_STATUS_HANDLE, dwservicebits : u32, bsetbitson : super::super::Foundation:: BOOL, bupdateimmediately : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetServiceBits(hservicestatus.into_param().abi(), dwservicebits, bsetbitson.into_param().abi(), bupdateimmediately.into_param().abi()) + SetServiceBits(hservicestatus.into_param().abi(), dwservicebits, bsetbitson.into_param().abi(), bupdateimmediately.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn SetServiceObjectSecurity(hservice: P0, dwsecurityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetServiceObjectSecurity(hservice: P0, dwsecurityinformation: super::super::Security::OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetServiceObjectSecurity(hservice : super::super::Security:: SC_HANDLE, dwsecurityinformation : super::super::Security:: OBJECT_SECURITY_INFORMATION, lpsecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: BOOL); - SetServiceObjectSecurity(hservice.into_param().abi(), dwsecurityinformation, lpsecuritydescriptor.into_param().abi()) + SetServiceObjectSecurity(hservice.into_param().abi(), dwsecurityinformation, lpsecuritydescriptor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetServiceStatus(hservicestatus: P0, lpservicestatus: *const SERVICE_STATUS) -> super::super::Foundation::BOOL +pub unsafe fn SetServiceStatus(hservicestatus: P0, lpservicestatus: *const SERVICE_STATUS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetServiceStatus(hservicestatus : SERVICE_STATUS_HANDLE, lpservicestatus : *const SERVICE_STATUS) -> super::super::Foundation:: BOOL); - SetServiceStatus(hservicestatus.into_param().abi(), lpservicestatus) + SetServiceStatus(hservicestatus.into_param().abi(), lpservicestatus).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn StartServiceA(hservice: P0, lpserviceargvectors: ::core::option::Option<&[::windows_core::PCSTR]>) -> super::super::Foundation::BOOL +pub unsafe fn StartServiceA(hservice: P0, lpserviceargvectors: ::core::option::Option<&[::windows_core::PCSTR]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceA(hservice : super::super::Security:: SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - StartServiceA(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + StartServiceA(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StartServiceCtrlDispatcherA(lpservicestarttable: *const SERVICE_TABLE_ENTRYA) -> super::super::Foundation::BOOL { +pub unsafe fn StartServiceCtrlDispatcherA(lpservicestarttable: *const SERVICE_TABLE_ENTRYA) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceCtrlDispatcherA(lpservicestarttable : *const SERVICE_TABLE_ENTRYA) -> super::super::Foundation:: BOOL); - StartServiceCtrlDispatcherA(lpservicestarttable) + StartServiceCtrlDispatcherA(lpservicestarttable).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn StartServiceCtrlDispatcherW(lpservicestarttable: *const SERVICE_TABLE_ENTRYW) -> super::super::Foundation::BOOL { +pub unsafe fn StartServiceCtrlDispatcherW(lpservicestarttable: *const SERVICE_TABLE_ENTRYW) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceCtrlDispatcherW(lpservicestarttable : *const SERVICE_TABLE_ENTRYW) -> super::super::Foundation:: BOOL); - StartServiceCtrlDispatcherW(lpservicestarttable) + StartServiceCtrlDispatcherW(lpservicestarttable).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn StartServiceW(hservice: P0, lpserviceargvectors: ::core::option::Option<&[::windows_core::PCWSTR]>) -> super::super::Foundation::BOOL +pub unsafe fn StartServiceW(hservice: P0, lpserviceargvectors: ::core::option::Option<&[::windows_core::PCWSTR]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn StartServiceW(hservice : super::super::Security:: SC_HANDLE, dwnumserviceargs : u32, lpserviceargvectors : *const ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - StartServiceW(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))) + StartServiceW(hservice.into_param().abi(), lpserviceargvectors.as_deref().map_or(0, |slice| slice.len() as _), ::core::mem::transmute(lpserviceargvectors.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr()))).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnlockServiceDatabase(sclock: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn UnlockServiceDatabase(sclock: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn UnlockServiceDatabase(sclock : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - UnlockServiceDatabase(sclock) + UnlockServiceDatabase(sclock).ok() } #[doc = "*Required features: `\"Win32_System_Services\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] diff --git a/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs index a9b8810b7e..a046fb0861 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs @@ -1,23 +1,23 @@ #[doc = "*Required features: `\"Win32_System_SetupAndMigration\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OOBEComplete(isoobecomplete: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { +pub unsafe fn OOBEComplete(isoobecomplete: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn OOBEComplete(isoobecomplete : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - OOBEComplete(isoobecomplete) + OOBEComplete(isoobecomplete).ok() } #[doc = "*Required features: `\"Win32_System_SetupAndMigration\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterWaitUntilOOBECompleted(oobecompletedcallback: OOBE_COMPLETED_CALLBACK, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, waithandle: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn RegisterWaitUntilOOBECompleted(oobecompletedcallback: OOBE_COMPLETED_CALLBACK, callbackcontext: ::core::option::Option<*const ::core::ffi::c_void>, waithandle: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn RegisterWaitUntilOOBECompleted(oobecompletedcallback : OOBE_COMPLETED_CALLBACK, callbackcontext : *const ::core::ffi::c_void, waithandle : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - RegisterWaitUntilOOBECompleted(oobecompletedcallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), waithandle) + RegisterWaitUntilOOBECompleted(oobecompletedcallback, ::core::mem::transmute(callbackcontext.unwrap_or(::std::ptr::null())), waithandle).ok() } #[doc = "*Required features: `\"Win32_System_SetupAndMigration\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterWaitUntilOOBECompleted(waithandle: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn UnregisterWaitUntilOOBECompleted(waithandle: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UnregisterWaitUntilOOBECompleted(waithandle : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - UnregisterWaitUntilOOBECompleted(waithandle) + UnregisterWaitUntilOOBECompleted(waithandle).ok() } #[doc = "*Required features: `\"Win32_System_SetupAndMigration\"`*"] pub type OOBE_COMPLETED_CALLBACK = ::core::option::Option ()>; diff --git a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs index 38683bb4d5..70f1c987e6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Shutdown/mod.rs @@ -1,22 +1,22 @@ #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AbortSystemShutdownA(lpmachinename: P0) -> super::super::Foundation::BOOL +pub unsafe fn AbortSystemShutdownA(lpmachinename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn AbortSystemShutdownA(lpmachinename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AbortSystemShutdownA(lpmachinename.into_param().abi()) + AbortSystemShutdownA(lpmachinename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AbortSystemShutdownW(lpmachinename: P0) -> super::super::Foundation::BOOL +pub unsafe fn AbortSystemShutdownW(lpmachinename: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn AbortSystemShutdownW(lpmachinename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AbortSystemShutdownW(lpmachinename.into_param().abi()) + AbortSystemShutdownW(lpmachinename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -31,9 +31,9 @@ where #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: SHUTDOWN_REASON) -> super::super::Foundation::BOOL { +pub unsafe fn ExitWindowsEx(uflags: EXIT_WINDOWS_FLAGS, dwreason: SHUTDOWN_REASON) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn ExitWindowsEx(uflags : EXIT_WINDOWS_FLAGS, dwreason : SHUTDOWN_REASON) -> super::super::Foundation:: BOOL); - ExitWindowsEx(uflags, dwreason) + ExitWindowsEx(uflags, dwreason).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`*"] #[inline] @@ -58,7 +58,7 @@ where #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitiateSystemShutdownA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3) -> super::super::Foundation::BOOL +pub unsafe fn InitiateSystemShutdownA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -66,12 +66,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownA(lpmachinename : ::windows_core::PCSTR, lpmessage : ::windows_core::PCSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()) + InitiateSystemShutdownA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitiateSystemShutdownExA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3, dwreason: SHUTDOWN_REASON) -> super::super::Foundation::BOOL +pub unsafe fn InitiateSystemShutdownExA(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3, dwreason: SHUTDOWN_REASON) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -79,12 +79,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownExA(lpmachinename : ::windows_core::PCSTR, lpmessage : ::windows_core::PCSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL, dwreason : SHUTDOWN_REASON) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownExA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), dwreason) + InitiateSystemShutdownExA(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), dwreason).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitiateSystemShutdownExW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3, dwreason: SHUTDOWN_REASON) -> super::super::Foundation::BOOL +pub unsafe fn InitiateSystemShutdownExW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3, dwreason: SHUTDOWN_REASON) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -92,12 +92,12 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownExW(lpmachinename : ::windows_core::PCWSTR, lpmessage : ::windows_core::PCWSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL, dwreason : SHUTDOWN_REASON) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownExW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), dwreason) + InitiateSystemShutdownExW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi(), dwreason).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitiateSystemShutdownW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3) -> super::super::Foundation::BOOL +pub unsafe fn InitiateSystemShutdownW(lpmachinename: P0, lpmessage: P1, dwtimeout: u32, bforceappsclosed: P2, brebootaftershutdown: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -105,45 +105,45 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn InitiateSystemShutdownW(lpmachinename : ::windows_core::PCWSTR, lpmessage : ::windows_core::PCWSTR, dwtimeout : u32, bforceappsclosed : super::super::Foundation:: BOOL, brebootaftershutdown : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InitiateSystemShutdownW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()) + InitiateSystemShutdownW(lpmachinename.into_param().abi(), lpmessage.into_param().abi(), dwtimeout, bforceappsclosed.into_param().abi(), brebootaftershutdown.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LockWorkStation() -> super::super::Foundation::BOOL { +pub unsafe fn LockWorkStation() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn LockWorkStation() -> super::super::Foundation:: BOOL); - LockWorkStation() + LockWorkStation().ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ShutdownBlockReasonCreate(hwnd: P0, pwszreason: P1) -> super::super::Foundation::BOOL +pub unsafe fn ShutdownBlockReasonCreate(hwnd: P0, pwszreason: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonCreate(hwnd : super::super::Foundation:: HWND, pwszreason : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonCreate(hwnd.into_param().abi(), pwszreason.into_param().abi()) + ShutdownBlockReasonCreate(hwnd.into_param().abi(), pwszreason.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ShutdownBlockReasonDestroy(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn ShutdownBlockReasonDestroy(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonDestroy(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonDestroy(hwnd.into_param().abi()) + ShutdownBlockReasonDestroy(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ShutdownBlockReasonQuery(hwnd: P0, pwszbuff: ::windows_core::PWSTR, pcchbuff: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn ShutdownBlockReasonQuery(hwnd: P0, pwszbuff: ::windows_core::PWSTR, pcchbuff: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ShutdownBlockReasonQuery(hwnd : super::super::Foundation:: HWND, pwszbuff : ::windows_core::PWSTR, pcchbuff : *mut u32) -> super::super::Foundation:: BOOL); - ShutdownBlockReasonQuery(hwnd.into_param().abi(), ::core::mem::transmute(pwszbuff), pcchbuff) + ShutdownBlockReasonQuery(hwnd.into_param().abi(), ::core::mem::transmute(pwszbuff), pcchbuff).ok() } #[doc = "*Required features: `\"Win32_System_Shutdown\"`*"] pub const MAX_NUM_REASONS: u32 = 256u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs index d4578d3275..571685bd3d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs @@ -45,22 +45,22 @@ where #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseDesktop(hdesktop: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseDesktop(hdesktop: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CloseDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - CloseDesktop(hdesktop.into_param().abi()) + CloseDesktop(hdesktop.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseWindowStation(hwinsta: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseWindowStation(hwinsta: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CloseWindowStation(hwinsta : HWINSTA) -> super::super::Foundation:: BOOL); - CloseWindowStation(hwinsta.into_param().abi()) + CloseWindowStation(hwinsta.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -135,55 +135,55 @@ where #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn EnumDesktopWindows(hdesktop: P0, lpfn: super::super::UI::WindowsAndMessaging::WNDENUMPROC, lparam: P1) -> super::super::Foundation::BOOL +pub unsafe fn EnumDesktopWindows(hdesktop: P0, lpfn: super::super::UI::WindowsAndMessaging::WNDENUMPROC, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumDesktopWindows(hdesktop : HDESK, lpfn : super::super::UI::WindowsAndMessaging:: WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopWindows(hdesktop.into_param().abi(), lpfn, lparam.into_param().abi()) + EnumDesktopWindows(hdesktop.into_param().abi(), lpfn, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDesktopsA(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCA, lparam: P1) -> super::super::Foundation::BOOL +pub unsafe fn EnumDesktopsA(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCA, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumDesktopsA(hwinsta : HWINSTA, lpenumfunc : DESKTOPENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopsA(hwinsta.into_param().abi(), lpenumfunc, lparam.into_param().abi()) + EnumDesktopsA(hwinsta.into_param().abi(), lpenumfunc, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumDesktopsW(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCW, lparam: P1) -> super::super::Foundation::BOOL +pub unsafe fn EnumDesktopsW(hwinsta: P0, lpenumfunc: DESKTOPENUMPROCW, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumDesktopsW(hwinsta : HWINSTA, lpenumfunc : DESKTOPENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDesktopsW(hwinsta.into_param().abi(), lpenumfunc, lparam.into_param().abi()) + EnumDesktopsW(hwinsta.into_param().abi(), lpenumfunc, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumWindowStationsA(lpenumfunc: WINSTAENUMPROCA, lparam: P0) -> super::super::Foundation::BOOL +pub unsafe fn EnumWindowStationsA(lpenumfunc: WINSTAENUMPROCA, lparam: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumWindowStationsA(lpenumfunc : WINSTAENUMPROCA, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindowStationsA(lpenumfunc, lparam.into_param().abi()) + EnumWindowStationsA(lpenumfunc, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumWindowStationsW(lpenumfunc: WINSTAENUMPROCW, lparam: P0) -> super::super::Foundation::BOOL +pub unsafe fn EnumWindowStationsW(lpenumfunc: WINSTAENUMPROCW, lparam: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumWindowStationsW(lpenumfunc : WINSTAENUMPROCW, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindowStationsW(lpenumfunc, lparam.into_param().abi()) + EnumWindowStationsW(lpenumfunc, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`*"] #[inline] @@ -202,22 +202,22 @@ pub unsafe fn GetThreadDesktop(dwthreadid: u32) -> ::windows_core::Result #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserObjectInformationA(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: ::core::option::Option<*mut ::core::ffi::c_void>, nlength: u32, lpnlengthneeded: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetUserObjectInformationA(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: ::core::option::Option<*mut ::core::ffi::c_void>, nlength: u32, lpnlengthneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetUserObjectInformationA(hobj : super::super::Foundation:: HANDLE, nindex : USER_OBJECT_INFORMATION_INDEX, pvinfo : *mut ::core::ffi::c_void, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetUserObjectInformationA(hobj.into_param().abi(), nindex, ::core::mem::transmute(pvinfo.unwrap_or(::std::ptr::null_mut())), nlength, ::core::mem::transmute(lpnlengthneeded.unwrap_or(::std::ptr::null_mut()))) + GetUserObjectInformationA(hobj.into_param().abi(), nindex, ::core::mem::transmute(pvinfo.unwrap_or(::std::ptr::null_mut())), nlength, ::core::mem::transmute(lpnlengthneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserObjectInformationW(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: ::core::option::Option<*mut ::core::ffi::c_void>, nlength: u32, lpnlengthneeded: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL +pub unsafe fn GetUserObjectInformationW(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: ::core::option::Option<*mut ::core::ffi::c_void>, nlength: u32, lpnlengthneeded: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetUserObjectInformationW(hobj : super::super::Foundation:: HANDLE, nindex : USER_OBJECT_INFORMATION_INDEX, pvinfo : *mut ::core::ffi::c_void, nlength : u32, lpnlengthneeded : *mut u32) -> super::super::Foundation:: BOOL); - GetUserObjectInformationW(hobj.into_param().abi(), nindex, ::core::mem::transmute(pvinfo.unwrap_or(::std::ptr::null_mut())), nlength, ::core::mem::transmute(lpnlengthneeded.unwrap_or(::std::ptr::null_mut()))) + GetUserObjectInformationW(hobj.into_param().abi(), nindex, ::core::mem::transmute(pvinfo.unwrap_or(::std::ptr::null_mut())), nlength, ::core::mem::transmute(lpnlengthneeded.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -281,52 +281,52 @@ where #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessWindowStation(hwinsta: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessWindowStation(hwinsta: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetProcessWindowStation(hwinsta : HWINSTA) -> super::super::Foundation:: BOOL); - SetProcessWindowStation(hwinsta.into_param().abi()) + SetProcessWindowStation(hwinsta.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadDesktop(hdesktop: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadDesktop(hdesktop: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetThreadDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - SetThreadDesktop(hdesktop.into_param().abi()) + SetThreadDesktop(hdesktop.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUserObjectInformationA(hobj: P0, nindex: i32, pvinfo: *const ::core::ffi::c_void, nlength: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetUserObjectInformationA(hobj: P0, nindex: i32, pvinfo: *const ::core::ffi::c_void, nlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetUserObjectInformationA(hobj : super::super::Foundation:: HANDLE, nindex : i32, pvinfo : *const ::core::ffi::c_void, nlength : u32) -> super::super::Foundation:: BOOL); - SetUserObjectInformationA(hobj.into_param().abi(), nindex, pvinfo, nlength) + SetUserObjectInformationA(hobj.into_param().abi(), nindex, pvinfo, nlength).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUserObjectInformationW(hobj: P0, nindex: i32, pvinfo: *const ::core::ffi::c_void, nlength: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetUserObjectInformationW(hobj: P0, nindex: i32, pvinfo: *const ::core::ffi::c_void, nlength: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetUserObjectInformationW(hobj : super::super::Foundation:: HANDLE, nindex : i32, pvinfo : *const ::core::ffi::c_void, nlength : u32) -> super::super::Foundation:: BOOL); - SetUserObjectInformationW(hobj.into_param().abi(), nindex, pvinfo, nlength) + SetUserObjectInformationW(hobj.into_param().abi(), nindex, pvinfo, nlength).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SwitchDesktop(hdesktop: P0) -> super::super::Foundation::BOOL +pub unsafe fn SwitchDesktop(hdesktop: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SwitchDesktop(hdesktop : HDESK) -> super::super::Foundation:: BOOL); - SwitchDesktop(hdesktop.into_param().abi()) + SwitchDesktop(hdesktop.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_StationsAndDesktops\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs index 84870c9c47..e7b05976e1 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -17,23 +17,23 @@ pub unsafe fn EnumSystemFirmwareTables(firmwaretableprovidersignature: FIRMWARE_ #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: ::windows_core::PSTR, nsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: ::windows_core::PSTR, nsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetComputerNameExA(nametype : COMPUTER_NAME_FORMAT, lpbuffer : ::windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameExA(nametype, ::core::mem::transmute(lpbuffer), nsize) + GetComputerNameExA(nametype, ::core::mem::transmute(lpbuffer), nsize).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetComputerNameExW(nametype : COMPUTER_NAME_FORMAT, lpbuffer : ::windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameExW(nametype, ::core::mem::transmute(lpbuffer), nsize) + GetComputerNameExW(nametype, ::core::mem::transmute(lpbuffer), nsize).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetFirmwareType(firmwaretype: *mut FIRMWARE_TYPE) -> super::super::Foundation::BOOL { +pub unsafe fn GetFirmwareType(firmwaretype: *mut FIRMWARE_TYPE) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetFirmwareType(firmwaretype : *mut FIRMWARE_TYPE) -> super::super::Foundation:: BOOL); - GetFirmwareType(firmwaretype) + GetFirmwareType(firmwaretype).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`*"] #[inline] @@ -54,16 +54,16 @@ pub unsafe fn GetLocalTime() -> super::super::Foundation::SYSTEMTIME { #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLogicalProcessorInformation(buffer: ::core::option::Option<*mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION>, returnedlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetLogicalProcessorInformation(buffer: ::core::option::Option<*mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION>, returnedlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetLogicalProcessorInformation(buffer : *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION, returnedlength : *mut u32) -> super::super::Foundation:: BOOL); - GetLogicalProcessorInformation(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength) + GetLogicalProcessorInformation(::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLogicalProcessorInformationEx(relationshiptype: LOGICAL_PROCESSOR_RELATIONSHIP, buffer: ::core::option::Option<*mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>, returnedlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetLogicalProcessorInformationEx(relationshiptype: LOGICAL_PROCESSOR_RELATIONSHIP, buffer: ::core::option::Option<*mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>, returnedlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetLogicalProcessorInformationEx(relationshiptype : LOGICAL_PROCESSOR_RELATIONSHIP, buffer : *mut SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, returnedlength : *mut u32) -> super::super::Foundation:: BOOL); - GetLogicalProcessorInformationEx(relationshiptype, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength) + GetLogicalProcessorInformationEx(relationshiptype, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`*"] #[inline] @@ -88,16 +88,16 @@ pub unsafe fn GetOsSafeBootMode(flags: *mut u32) -> super::super::Foundation::BO #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes: *mut u64) -> super::super::Foundation::BOOL { +pub unsafe fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes: *mut u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes : *mut u64) -> super::super::Foundation:: BOOL); - GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes) + GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessorSystemCycleTime(group: u16, buffer: ::core::option::Option<*mut SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION>, returnedlength: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProcessorSystemCycleTime(group: u16, buffer: ::core::option::Option<*mut SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION>, returnedlength: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessorSystemCycleTime(group : u16, buffer : *mut SYSTEM_PROCESSOR_CYCLE_TIME_INFORMATION, returnedlength : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessorSystemCycleTime(group, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength) + GetProcessorSystemCycleTime(group, ::core::mem::transmute(buffer.unwrap_or(::std::ptr::null_mut())), returnedlength).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -168,16 +168,16 @@ pub unsafe fn GetSystemTime() -> super::super::Foundation::SYSTEMTIME { #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemTimeAdjustment(lptimeadjustment: *mut u32, lptimeincrement: *mut u32, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemTimeAdjustment(lptimeadjustment: *mut u32, lptimeincrement: *mut u32, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemTimeAdjustment(lptimeadjustment : *mut u32, lptimeincrement : *mut u32, lptimeadjustmentdisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetSystemTimeAdjustment(lptimeadjustment, lptimeincrement, lptimeadjustmentdisabled) + GetSystemTimeAdjustment(lptimeadjustment, lptimeincrement, lptimeadjustmentdisabled).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemTimeAdjustmentPrecise(lptimeadjustment: *mut u64, lptimeincrement: *mut u64, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemTimeAdjustmentPrecise(lptimeadjustment: *mut u64, lptimeincrement: *mut u64, lptimeadjustmentdisabled: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-sysinfo-l1-2-4.dll" "system" fn GetSystemTimeAdjustmentPrecise(lptimeadjustment : *mut u64, lptimeincrement : *mut u64, lptimeadjustmentdisabled : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetSystemTimeAdjustmentPrecise(lptimeadjustment, lptimeincrement, lptimeadjustmentdisabled) + GetSystemTimeAdjustmentPrecise(lptimeadjustment, lptimeincrement, lptimeadjustmentdisabled).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -254,16 +254,16 @@ pub unsafe fn GetVersion() -> u32 { #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVersionExA(lpversioninformation: *mut OSVERSIONINFOA) -> super::super::Foundation::BOOL { +pub unsafe fn GetVersionExA(lpversioninformation: *mut OSVERSIONINFOA) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetVersionExA(lpversioninformation : *mut OSVERSIONINFOA) -> super::super::Foundation:: BOOL); - GetVersionExA(lpversioninformation) + GetVersionExA(lpversioninformation).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetVersionExW(lpversioninformation: *mut OSVERSIONINFOW) -> super::super::Foundation::BOOL { +pub unsafe fn GetVersionExW(lpversioninformation: *mut OSVERSIONINFOW) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetVersionExW(lpversioninformation : *mut OSVERSIONINFOW) -> super::super::Foundation:: BOOL); - GetVersionExW(lpversioninformation) + GetVersionExW(lpversioninformation).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`*"] #[inline] @@ -286,9 +286,9 @@ pub unsafe fn GlobalMemoryStatus(lpbuffer: *mut MEMORYSTATUS) { #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GlobalMemoryStatusEx(lpbuffer: *mut MEMORYSTATUSEX) -> super::super::Foundation::BOOL { +pub unsafe fn GlobalMemoryStatusEx(lpbuffer: *mut MEMORYSTATUSEX) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GlobalMemoryStatusEx(lpbuffer : *mut MEMORYSTATUSEX) -> super::super::Foundation:: BOOL); - GlobalMemoryStatusEx(lpbuffer) + GlobalMemoryStatusEx(lpbuffer).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -345,12 +345,12 @@ pub unsafe fn RtlSwitchedVVI(versioninfo: *const OSVERSIONINFOEXW, typemask: u32 #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetComputerNameA(lpcomputername: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetComputerNameA(lpcomputername: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetComputerNameA(lpcomputername : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetComputerNameA(lpcomputername.into_param().abi()) + SetComputerNameA(lpcomputername.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -365,66 +365,66 @@ where #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetComputerNameExA(nametype: COMPUTER_NAME_FORMAT, lpbuffer: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetComputerNameExA(nametype : COMPUTER_NAME_FORMAT, lpbuffer : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetComputerNameExA(nametype, lpbuffer.into_param().abi()) + SetComputerNameExA(nametype, lpbuffer.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetComputerNameExW(nametype: COMPUTER_NAME_FORMAT, lpbuffer: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetComputerNameExW(nametype : COMPUTER_NAME_FORMAT, lpbuffer : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetComputerNameExW(nametype, lpbuffer.into_param().abi()) + SetComputerNameExW(nametype, lpbuffer.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetComputerNameW(lpcomputername: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetComputerNameW(lpcomputername: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetComputerNameW(lpcomputername : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetComputerNameW(lpcomputername.into_param().abi()) + SetComputerNameW(lpcomputername.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLocalTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn SetLocalTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetLocalTime(lpsystemtime : *const super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - SetLocalTime(lpsystemtime) + SetLocalTime(lpsystemtime).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn SetSystemTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetSystemTime(lpsystemtime : *const super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - SetSystemTime(lpsystemtime) + SetSystemTime(lpsystemtime).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemTimeAdjustment(dwtimeadjustment: u32, btimeadjustmentdisabled: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetSystemTimeAdjustment(dwtimeadjustment: u32, btimeadjustmentdisabled: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetSystemTimeAdjustment(dwtimeadjustment : u32, btimeadjustmentdisabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemTimeAdjustment(dwtimeadjustment, btimeadjustmentdisabled.into_param().abi()) + SetSystemTimeAdjustment(dwtimeadjustment, btimeadjustmentdisabled.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment: u64, btimeadjustmentdisabled: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment: u64, btimeadjustmentdisabled: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("api-ms-win-core-sysinfo-l1-2-4.dll" "system" fn SetSystemTimeAdjustmentPrecise(dwtimeadjustment : u64, btimeadjustmentdisabled : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetSystemTimeAdjustmentPrecise(dwtimeadjustment, btimeadjustmentdisabled.into_param().abi()) + SetSystemTimeAdjustmentPrecise(dwtimeadjustment, btimeadjustmentdisabled.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`*"] #[inline] @@ -435,16 +435,16 @@ pub unsafe fn VerSetConditionMask(conditionmask: u64, typemask: VER_FLAGS, condi #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyVersionInfoA(lpversioninformation: *mut OSVERSIONINFOEXA, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> super::super::Foundation::BOOL { +pub unsafe fn VerifyVersionInfoA(lpversioninformation: *mut OSVERSIONINFOEXA, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VerifyVersionInfoA(lpversioninformation : *mut OSVERSIONINFOEXA, dwtypemask : VER_FLAGS, dwlconditionmask : u64) -> super::super::Foundation:: BOOL); - VerifyVersionInfoA(lpversioninformation, dwtypemask, dwlconditionmask) + VerifyVersionInfoA(lpversioninformation, dwtypemask, dwlconditionmask).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn VerifyVersionInfoW(lpversioninformation: *mut OSVERSIONINFOEXW, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> super::super::Foundation::BOOL { +pub unsafe fn VerifyVersionInfoW(lpversioninformation: *mut OSVERSIONINFOEXW, dwtypemask: VER_FLAGS, dwlconditionmask: u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn VerifyVersionInfoW(lpversioninformation : *mut OSVERSIONINFOEXW, dwtypemask : VER_FLAGS, dwlconditionmask : u64) -> super::super::Foundation:: BOOL); - VerifyVersionInfoW(lpversioninformation, dwtypemask, dwlconditionmask) + VerifyVersionInfoW(lpversioninformation, dwtypemask, dwlconditionmask).ok() } #[doc = "*Required features: `\"Win32_System_SystemInformation\"`*"] pub const NTDDI_LONGHORN: u32 = 100663296u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs index b15c2eb4f5..8da493fb56 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -13,22 +13,22 @@ pub unsafe fn AcquireSRWLockShared(srwlock: *mut RTL_SRWLOCK) { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, integritylabel: P0) -> super::super::Foundation::BOOL +pub unsafe fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, integritylabel: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor : *mut super::super::Foundation:: HANDLE, integritylabel : super::super::Foundation:: PSID) -> super::super::Foundation:: BOOL); - AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor, integritylabel.into_param().abi()) + AddIntegrityLabelToBoundaryDescriptor(boundarydescriptor, integritylabel.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AddSIDToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, requiredsid: P0) -> super::super::Foundation::BOOL +pub unsafe fn AddSIDToBoundaryDescriptor(boundarydescriptor: *mut super::super::Foundation::HANDLE, requiredsid: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn AddSIDToBoundaryDescriptor(boundarydescriptor : *mut super::super::Foundation:: HANDLE, requiredsid : super::super::Foundation:: PSID) -> super::super::Foundation:: BOOL); - AddSIDToBoundaryDescriptor(boundarydescriptor, requiredsid.into_param().abi()) + AddSIDToBoundaryDescriptor(boundarydescriptor, requiredsid.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -43,89 +43,89 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvQuerySystemResponsiveness(avrthandle: P0, systemresponsivenessvalue: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn AvQuerySystemResponsiveness(avrthandle: P0, systemresponsivenessvalue: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvQuerySystemResponsiveness(avrthandle : super::super::Foundation:: HANDLE, systemresponsivenessvalue : *mut u32) -> super::super::Foundation:: BOOL); - AvQuerySystemResponsiveness(avrthandle.into_param().abi(), systemresponsivenessvalue) + AvQuerySystemResponsiveness(avrthandle.into_param().abi(), systemresponsivenessvalue).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRevertMmThreadCharacteristics(avrthandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvRevertMmThreadCharacteristics(avrthandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRevertMmThreadCharacteristics(avrthandle.into_param().abi()) + AvRevertMmThreadCharacteristics(avrthandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtCreateThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>) -> super::super::Foundation::BOOL { +pub unsafe fn AvRtCreateThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>) -> ::windows_core::Result<()> { ::windows_targets::link!("avrt.dll" "system" fn AvRtCreateThreadOrderingGroup(context : *mut super::super::Foundation:: HANDLE, period : *const i64, threadorderingguid : *mut ::windows_core::GUID, timeout : *const i64) -> super::super::Foundation:: BOOL); - AvRtCreateThreadOrderingGroup(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null()))) + AvRtCreateThreadOrderingGroup(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtCreateThreadOrderingGroupExA(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>, taskname: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtCreateThreadOrderingGroupExA(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>, taskname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("avrt.dll" "system" fn AvRtCreateThreadOrderingGroupExA(context : *mut super::super::Foundation:: HANDLE, period : *const i64, threadorderingguid : *mut ::windows_core::GUID, timeout : *const i64, taskname : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AvRtCreateThreadOrderingGroupExA(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), taskname.into_param().abi()) + AvRtCreateThreadOrderingGroupExA(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), taskname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtCreateThreadOrderingGroupExW(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>, taskname: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtCreateThreadOrderingGroupExW(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut ::windows_core::GUID, timeout: ::core::option::Option<*const i64>, taskname: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("avrt.dll" "system" fn AvRtCreateThreadOrderingGroupExW(context : *mut super::super::Foundation:: HANDLE, period : *const i64, threadorderingguid : *mut ::windows_core::GUID, timeout : *const i64, taskname : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AvRtCreateThreadOrderingGroupExW(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), taskname.into_param().abi()) + AvRtCreateThreadOrderingGroupExW(context, period, threadorderingguid, ::core::mem::transmute(timeout.unwrap_or(::std::ptr::null())), taskname.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtDeleteThreadOrderingGroup(context: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtDeleteThreadOrderingGroup(context: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvRtDeleteThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtDeleteThreadOrderingGroup(context.into_param().abi()) + AvRtDeleteThreadOrderingGroup(context.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const ::windows_core::GUID, before: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtJoinThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, threadorderingguid: *const ::windows_core::GUID, before: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvRtJoinThreadOrderingGroup(context : *mut super::super::Foundation:: HANDLE, threadorderingguid : *const ::windows_core::GUID, before : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AvRtJoinThreadOrderingGroup(context, threadorderingguid, before.into_param().abi()) + AvRtJoinThreadOrderingGroup(context, threadorderingguid, before.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtLeaveThreadOrderingGroup(context: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtLeaveThreadOrderingGroup(context: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvRtLeaveThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtLeaveThreadOrderingGroup(context.into_param().abi()) + AvRtLeaveThreadOrderingGroup(context.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvRtWaitOnThreadOrderingGroup(context: P0) -> super::super::Foundation::BOOL +pub unsafe fn AvRtWaitOnThreadOrderingGroup(context: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvRtWaitOnThreadOrderingGroup(context : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - AvRtWaitOnThreadOrderingGroup(context.into_param().abi()) + AvRtWaitOnThreadOrderingGroup(context.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -176,12 +176,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AvSetMmThreadPriority(avrthandle: P0, priority: AVRT_PRIORITY) -> super::super::Foundation::BOOL +pub unsafe fn AvSetMmThreadPriority(avrthandle: P0, priority: AVRT_PRIORITY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("avrt.dll" "system" fn AvSetMmThreadPriority(avrthandle : super::super::Foundation:: HANDLE, priority : AVRT_PRIORITY) -> super::super::Foundation:: BOOL); - AvSetMmThreadPriority(avrthandle.into_param().abi(), priority) + AvSetMmThreadPriority(avrthandle.into_param().abi(), priority).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -205,23 +205,23 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CancelWaitableTimer(htimer: P0) -> super::super::Foundation::BOOL +pub unsafe fn CancelWaitableTimer(htimer: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CancelWaitableTimer(htimer : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CancelWaitableTimer(htimer.into_param().abi()) + CancelWaitableTimer(htimer.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ChangeTimerQueueTimer(timerqueue: P0, timer: P1, duetime: u32, period: u32) -> super::super::Foundation::BOOL +pub unsafe fn ChangeTimerQueueTimer(timerqueue: P0, timer: P1, duetime: u32, period: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ChangeTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, timer : super::super::Foundation:: HANDLE, duetime : u32, period : u32) -> super::super::Foundation:: BOOL); - ChangeTimerQueueTimer(timerqueue.into_param().abi(), timer.into_param().abi(), duetime, period) + ChangeTimerQueueTimer(timerqueue.into_param().abi(), timer.into_param().abi(), duetime, period).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -297,9 +297,9 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ConvertFiberToThread() -> super::super::Foundation::BOOL { +pub unsafe fn ConvertFiberToThread() -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn ConvertFiberToThread() -> super::super::Foundation:: BOOL); - ConvertFiberToThread() + ConvertFiberToThread().ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -462,19 +462,19 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: ::windows_core::PSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P1, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessA(lpapplicationname: P0, lpcommandline: ::windows_core::PSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P1, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateProcessA(lpapplicationname : ::windows_core::PCSTR, lpcommandline : ::windows_core::PSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCSTR, lpstartupinfo : *const STARTUPINFOA, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessA(lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessA(lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateProcessAsUserA(htoken: P0, lpapplicationname: P1, lpcommandline: ::windows_core::PSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P2, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P3, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessAsUserA(htoken: P0, lpapplicationname: P1, lpcommandline: ::windows_core::PSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P2, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P3, lpstartupinfo: *const STARTUPINFOA, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -482,12 +482,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CreateProcessAsUserA(htoken : super::super::Foundation:: HANDLE, lpapplicationname : ::windows_core::PCSTR, lpcommandline : ::windows_core::PSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCSTR, lpstartupinfo : *const STARTUPINFOA, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessAsUserA(htoken.into_param().abi(), lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessAsUserA(htoken.into_param().abi(), lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateProcessAsUserW(htoken: P0, lpapplicationname: P1, lpcommandline: ::windows_core::PWSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P2, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P3, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessAsUserW(htoken: P0, lpapplicationname: P1, lpcommandline: ::windows_core::PWSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P2, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P3, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -495,24 +495,24 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CreateProcessAsUserW(htoken : super::super::Foundation:: HANDLE, lpapplicationname : ::windows_core::PCWSTR, lpcommandline : ::windows_core::PWSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessAsUserW(htoken.into_param().abi(), lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessAsUserW(htoken.into_param().abi(), lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: ::windows_core::PWSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P1, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessW(lpapplicationname: P0, lpcommandline: ::windows_core::PWSTR, lpprocessattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, lpthreadattributes: ::core::option::Option<*const super::super::Security::SECURITY_ATTRIBUTES>, binherithandles: P1, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn CreateProcessW(lpapplicationname : ::windows_core::PCWSTR, lpcommandline : ::windows_core::PWSTR, lpprocessattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binherithandles : super::super::Foundation:: BOOL, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessW(lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessW(lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), ::core::mem::transmute(lpprocessattributes.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpthreadattributes.unwrap_or(::std::ptr::null())), binherithandles.into_param().abi(), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateProcessWithLogonW(lpusername: P0, lpdomain: P1, lppassword: P2, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P3, lpcommandline: ::windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P4, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessWithLogonW(lpusername: P0, lpdomain: P1, lppassword: P2, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P3, lpcommandline: ::windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P4, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -521,19 +521,19 @@ where P4: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CreateProcessWithLogonW(lpusername : ::windows_core::PCWSTR, lpdomain : ::windows_core::PCWSTR, lppassword : ::windows_core::PCWSTR, dwlogonflags : CREATE_PROCESS_LOGON_FLAGS, lpapplicationname : ::windows_core::PCWSTR, lpcommandline : ::windows_core::PWSTR, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessWithLogonW(lpusername.into_param().abi(), lpdomain.into_param().abi(), lppassword.into_param().abi(), dwlogonflags, lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessWithLogonW(lpusername.into_param().abi(), lpdomain.into_param().abi(), lppassword.into_param().abi(), dwlogonflags, lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateProcessWithTokenW(htoken: P0, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P1, lpcommandline: ::windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn CreateProcessWithTokenW(htoken: P0, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P1, lpcommandline: ::windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: ::core::option::Option<*const ::core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("advapi32.dll" "system" fn CreateProcessWithTokenW(htoken : super::super::Foundation:: HANDLE, dwlogonflags : CREATE_PROCESS_LOGON_FLAGS, lpapplicationname : ::windows_core::PCWSTR, lpcommandline : ::windows_core::PWSTR, dwcreationflags : PROCESS_CREATION_FLAGS, lpenvironment : *const ::core::ffi::c_void, lpcurrentdirectory : ::windows_core::PCWSTR, lpstartupinfo : *const STARTUPINFOW, lpprocessinformation : *mut PROCESS_INFORMATION) -> super::super::Foundation:: BOOL); - CreateProcessWithTokenW(htoken.into_param().abi(), dwlogonflags, lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation) + CreateProcessWithTokenW(htoken.into_param().abi(), dwlogonflags, lpapplicationname.into_param().abi(), ::core::mem::transmute(lpcommandline), dwcreationflags, ::core::mem::transmute(lpenvironment.unwrap_or(::std::ptr::null())), lpcurrentdirectory.into_param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -665,26 +665,26 @@ pub unsafe fn CreateTimerQueue() -> ::windows_core::Result(phnewtimer: *mut super::super::Foundation::HANDLE, timerqueue: P0, callback: WAITORTIMERCALLBACK, parameter: ::core::option::Option<*const ::core::ffi::c_void>, duetime: u32, period: u32, flags: WORKER_THREAD_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn CreateTimerQueueTimer(phnewtimer: *mut super::super::Foundation::HANDLE, timerqueue: P0, callback: WAITORTIMERCALLBACK, parameter: ::core::option::Option<*const ::core::ffi::c_void>, duetime: u32, period: u32, flags: WORKER_THREAD_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn CreateTimerQueueTimer(phnewtimer : *mut super::super::Foundation:: HANDLE, timerqueue : super::super::Foundation:: HANDLE, callback : WAITORTIMERCALLBACK, parameter : *const ::core::ffi::c_void, duetime : u32, period : u32, flags : WORKER_THREAD_FLAGS) -> super::super::Foundation:: BOOL); - CreateTimerQueueTimer(phnewtimer, timerqueue.into_param().abi(), callback, ::core::mem::transmute(parameter.unwrap_or(::std::ptr::null())), duetime, period, flags) + CreateTimerQueueTimer(phnewtimer, timerqueue.into_param().abi(), callback, ::core::mem::transmute(parameter.unwrap_or(::std::ptr::null())), duetime, period, flags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUmsCompletionList(umscompletionlist: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn CreateUmsCompletionList(umscompletionlist: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn CreateUmsCompletionList(umscompletionlist : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreateUmsCompletionList(umscompletionlist) + CreateUmsCompletionList(umscompletionlist).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CreateUmsThreadContext(lpumsthread: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn CreateUmsThreadContext(lpumsthread: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn CreateUmsThreadContext(lpumsthread : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreateUmsThreadContext(lpumsthread) + CreateUmsThreadContext(lpumsthread).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] @@ -747,56 +747,56 @@ pub unsafe fn DeleteSynchronizationBarrier(lpbarrier: *mut RTL_BARRIER) -> super #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteTimerQueue(timerqueue: P0) -> super::super::Foundation::BOOL +pub unsafe fn DeleteTimerQueue(timerqueue: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueue(timerqueue : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueue(timerqueue.into_param().abi()) + DeleteTimerQueue(timerqueue.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteTimerQueueEx(timerqueue: P0, completionevent: P1) -> super::super::Foundation::BOOL +pub unsafe fn DeleteTimerQueueEx(timerqueue: P0, completionevent: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueueEx(timerqueue : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueueEx(timerqueue.into_param().abi(), completionevent.into_param().abi()) + DeleteTimerQueueEx(timerqueue.into_param().abi(), completionevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteTimerQueueTimer(timerqueue: P0, timer: P1, completionevent: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeleteTimerQueueTimer(timerqueue: P0, timer: P1, completionevent: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn DeleteTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, timer : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - DeleteTimerQueueTimer(timerqueue.into_param().abi(), timer.into_param().abi(), completionevent.into_param().abi()) + DeleteTimerQueueTimer(timerqueue.into_param().abi(), timer.into_param().abi(), completionevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUmsCompletionList(umscompletionlist: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DeleteUmsCompletionList(umscompletionlist: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DeleteUmsCompletionList(umscompletionlist : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteUmsCompletionList(umscompletionlist) + DeleteUmsCompletionList(umscompletionlist).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteUmsThreadContext(umsthread: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DeleteUmsThreadContext(umsthread: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DeleteUmsThreadContext(umsthread : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DeleteUmsThreadContext(umsthread) + DeleteUmsThreadContext(umsthread).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DequeueUmsCompletionListItems(umscompletionlist: *const ::core::ffi::c_void, waittimeout: u32, umsthreadlist: *mut *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn DequeueUmsCompletionListItems(umscompletionlist: *const ::core::ffi::c_void, waittimeout: u32, umsthreadlist: *mut *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DequeueUmsCompletionListItems(umscompletionlist : *const ::core::ffi::c_void, waittimeout : u32, umsthreadlist : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - DequeueUmsCompletionListItems(umscompletionlist, waittimeout, umsthreadlist) + DequeueUmsCompletionListItems(umscompletionlist, waittimeout, umsthreadlist).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -824,16 +824,16 @@ pub unsafe fn EnterSynchronizationBarrier(lpbarrier: *mut RTL_BARRIER, dwflags: #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemServices\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemServices"))] #[inline] -pub unsafe fn EnterUmsSchedulingMode(schedulerstartupinfo: *const UMS_SCHEDULER_STARTUP_INFO) -> super::super::Foundation::BOOL { +pub unsafe fn EnterUmsSchedulingMode(schedulerstartupinfo: *const UMS_SCHEDULER_STARTUP_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn EnterUmsSchedulingMode(schedulerstartupinfo : *const UMS_SCHEDULER_STARTUP_INFO) -> super::super::Foundation:: BOOL); - EnterUmsSchedulingMode(schedulerstartupinfo) + EnterUmsSchedulingMode(schedulerstartupinfo).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ExecuteUmsThread(umsthread: *mut ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn ExecuteUmsThread(umsthread: *mut ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn ExecuteUmsThread(umsthread : *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - ExecuteUmsThread(umsthread) + ExecuteUmsThread(umsthread).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -856,9 +856,9 @@ pub unsafe fn FlsAlloc(lpcallback: PFLS_CALLBACK_FUNCTION) -> u32 { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlsFree(dwflsindex: u32) -> super::super::Foundation::BOOL { +pub unsafe fn FlsFree(dwflsindex: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FlsFree(dwflsindex : u32) -> super::super::Foundation:: BOOL); - FlsFree(dwflsindex) + FlsFree(dwflsindex).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -869,9 +869,9 @@ pub unsafe fn FlsGetValue(dwflsindex: u32) -> *mut ::core::ffi::c_void { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FlsSetValue(dwflsindex: u32, lpflsdata: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn FlsSetValue(dwflsindex: u32, lpflsdata: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FlsSetValue(dwflsindex : u32, lpflsdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - FlsSetValue(dwflsindex, ::core::mem::transmute(lpflsdata.unwrap_or(::std::ptr::null()))) + FlsSetValue(dwflsindex, ::core::mem::transmute(lpflsdata.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -958,22 +958,22 @@ pub unsafe fn GetCurrentUmsThread() -> *mut ::core::ffi::c_void { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetExitCodeProcess(hprocess: P0, lpexitcode: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetExitCodeProcess(hprocess: P0, lpexitcode: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetExitCodeProcess(hprocess : super::super::Foundation:: HANDLE, lpexitcode : *mut u32) -> super::super::Foundation:: BOOL); - GetExitCodeProcess(hprocess.into_param().abi(), lpexitcode) + GetExitCodeProcess(hprocess.into_param().abi(), lpexitcode).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetExitCodeThread(hthread: P0, lpexitcode: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetExitCodeThread(hthread: P0, lpexitcode: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetExitCodeThread(hthread : super::super::Foundation:: HANDLE, lpexitcode : *mut u32) -> super::super::Foundation:: BOOL); - GetExitCodeThread(hthread.into_param().abi(), lpexitcode) + GetExitCodeThread(hthread.into_param().abi(), lpexitcode).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1013,40 +1013,40 @@ pub unsafe fn GetNextUmsListItem(umscontext: *mut ::core::ffi::c_void) -> *mut : #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaAvailableMemoryNode(node: u8, availablebytes: *mut u64) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaAvailableMemoryNode(node: u8, availablebytes: *mut u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaAvailableMemoryNode(node : u8, availablebytes : *mut u64) -> super::super::Foundation:: BOOL); - GetNumaAvailableMemoryNode(node, availablebytes) + GetNumaAvailableMemoryNode(node, availablebytes).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaAvailableMemoryNodeEx(node: u16, availablebytes: *mut u64) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaAvailableMemoryNodeEx(node: u16, availablebytes: *mut u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaAvailableMemoryNodeEx(node : u16, availablebytes : *mut u64) -> super::super::Foundation:: BOOL); - GetNumaAvailableMemoryNodeEx(node, availablebytes) + GetNumaAvailableMemoryNodeEx(node, availablebytes).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaHighestNodeNumber(highestnodenumber: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaHighestNodeNumber(highestnodenumber: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaHighestNodeNumber(highestnodenumber : *mut u32) -> super::super::Foundation:: BOOL); - GetNumaHighestNodeNumber(highestnodenumber) + GetNumaHighestNodeNumber(highestnodenumber).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaNodeNumberFromHandle(hfile: P0, nodenumber: *mut u16) -> super::super::Foundation::BOOL +pub unsafe fn GetNumaNodeNumberFromHandle(hfile: P0, nodenumber: *mut u16) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeNumberFromHandle(hfile : super::super::Foundation:: HANDLE, nodenumber : *mut u16) -> super::super::Foundation:: BOOL); - GetNumaNodeNumberFromHandle(hfile.into_param().abi(), nodenumber) + GetNumaNodeNumberFromHandle(hfile.into_param().abi(), nodenumber).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaNodeProcessorMask(node: u8, processormask: *mut u64) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaNodeProcessorMask(node: u8, processormask: *mut u64) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaNodeProcessorMask(node : u8, processormask : *mut u64) -> super::super::Foundation:: BOOL); - GetNumaNodeProcessorMask(node, processormask) + GetNumaNodeProcessorMask(node, processormask).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -1065,23 +1065,23 @@ pub unsafe fn GetNumaNodeProcessorMaskEx(node: u16, processormask: *mut super::S #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaProcessorNode(processor: u8, nodenumber: *mut u8) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaProcessorNode(processor: u8, nodenumber: *mut u8) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaProcessorNode(processor : u8, nodenumber : *mut u8) -> super::super::Foundation:: BOOL); - GetNumaProcessorNode(processor, nodenumber) + GetNumaProcessorNode(processor, nodenumber).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn GetNumaProcessorNodeEx(processor: *const super::Kernel::PROCESSOR_NUMBER, nodenumber: *mut u16) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaProcessorNodeEx(processor: *const super::Kernel::PROCESSOR_NUMBER, nodenumber: *mut u16) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaProcessorNodeEx(processor : *const super::Kernel:: PROCESSOR_NUMBER, nodenumber : *mut u16) -> super::super::Foundation:: BOOL); - GetNumaProcessorNodeEx(processor, nodenumber) + GetNumaProcessorNodeEx(processor, nodenumber).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetNumaProximityNode(proximityid: u32, nodenumber: *mut u8) -> super::super::Foundation::BOOL { +pub unsafe fn GetNumaProximityNode(proximityid: u32, nodenumber: *mut u8) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetNumaProximityNode(proximityid : u32, nodenumber : *mut u8) -> super::super::Foundation:: BOOL); - GetNumaProximityNode(proximityid, nodenumber) + GetNumaProximityNode(proximityid, nodenumber).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1103,22 +1103,22 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessAffinityMask(hprocess: P0, lpprocessaffinitymask: *mut usize, lpsystemaffinitymask: *mut usize) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessAffinityMask(hprocess: P0, lpprocessaffinitymask: *mut usize, lpsystemaffinitymask: *mut usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessAffinityMask(hprocess : super::super::Foundation:: HANDLE, lpprocessaffinitymask : *mut usize, lpsystemaffinitymask : *mut usize) -> super::super::Foundation:: BOOL); - GetProcessAffinityMask(hprocess.into_param().abi(), lpprocessaffinitymask, lpsystemaffinitymask) + GetProcessAffinityMask(hprocess.into_param().abi(), lpprocessaffinitymask, lpsystemaffinitymask).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessDEPPolicy(hprocess: P0, lpflags: *mut u32, lppermanent: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessDEPPolicy(hprocess: P0, lpflags: *mut u32, lppermanent: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessDEPPolicy(hprocess : super::super::Foundation:: HANDLE, lpflags : *mut u32, lppermanent : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetProcessDEPPolicy(hprocess.into_param().abi(), lpflags, lppermanent) + GetProcessDEPPolicy(hprocess.into_param().abi(), lpflags, lppermanent).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -1153,12 +1153,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessHandleCount(hprocess: P0, pdwhandlecount: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessHandleCount(hprocess: P0, pdwhandlecount: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessHandleCount(hprocess : super::super::Foundation:: HANDLE, pdwhandlecount : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessHandleCount(hprocess.into_param().abi(), pdwhandlecount) + GetProcessHandleCount(hprocess.into_param().abi(), pdwhandlecount).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1183,59 +1183,59 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *mut ::core::ffi::c_void, processinformationsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *mut ::core::ffi::c_void, processinformationsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessInformation(hprocess : super::super::Foundation:: HANDLE, processinformationclass : PROCESS_INFORMATION_CLASS, processinformation : *mut ::core::ffi::c_void, processinformationsize : u32) -> super::super::Foundation:: BOOL); - GetProcessInformation(hprocess.into_param().abi(), processinformationclass, processinformation, processinformationsize) + GetProcessInformation(hprocess.into_param().abi(), processinformationclass, processinformation, processinformationsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessIoCounters(hprocess: P0, lpiocounters: *mut IO_COUNTERS) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessIoCounters(hprocess: P0, lpiocounters: *mut IO_COUNTERS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessIoCounters(hprocess : super::super::Foundation:: HANDLE, lpiocounters : *mut IO_COUNTERS) -> super::super::Foundation:: BOOL); - GetProcessIoCounters(hprocess.into_param().abi(), lpiocounters) + GetProcessIoCounters(hprocess.into_param().abi(), lpiocounters).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessMitigationPolicy(hprocess: P0, mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *mut ::core::ffi::c_void, dwlength: usize) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessMitigationPolicy(hprocess: P0, mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *mut ::core::ffi::c_void, dwlength: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessMitigationPolicy(hprocess : super::super::Foundation:: HANDLE, mitigationpolicy : PROCESS_MITIGATION_POLICY, lpbuffer : *mut ::core::ffi::c_void, dwlength : usize) -> super::super::Foundation:: BOOL); - GetProcessMitigationPolicy(hprocess.into_param().abi(), mitigationpolicy, lpbuffer, dwlength) + GetProcessMitigationPolicy(hprocess.into_param().abi(), mitigationpolicy, lpbuffer, dwlength).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessPriorityBoost(hprocess: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessPriorityBoost(hprocess: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessPriorityBoost(hprocess : super::super::Foundation:: HANDLE, pdisablepriorityboost : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetProcessPriorityBoost(hprocess.into_param().abi(), pdisablepriorityboost) + GetProcessPriorityBoost(hprocess.into_param().abi(), pdisablepriorityboost).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessShutdownParameters(lpdwlevel: *mut u32, lpdwflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProcessShutdownParameters(lpdwlevel: *mut u32, lpdwflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessShutdownParameters(lpdwlevel : *mut u32, lpdwflags : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessShutdownParameters(lpdwlevel, lpdwflags) + GetProcessShutdownParameters(lpdwlevel, lpdwflags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessTimes(hprocess: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessTimes(hprocess: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessTimes(hprocess : super::super::Foundation:: HANDLE, lpcreationtime : *mut super::super::Foundation:: FILETIME, lpexittime : *mut super::super::Foundation:: FILETIME, lpkerneltime : *mut super::super::Foundation:: FILETIME, lpusertime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetProcessTimes(hprocess.into_param().abi(), lpcreationtime, lpexittime, lpkerneltime, lpusertime) + GetProcessTimes(hprocess.into_param().abi(), lpcreationtime, lpexittime, lpkerneltime, lpusertime).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -1246,12 +1246,12 @@ pub unsafe fn GetProcessVersion(processid: u32) -> u32 { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessWorkingSetSize(hprocess: P0, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize) -> super::super::Foundation::BOOL +pub unsafe fn GetProcessWorkingSetSize(hprocess: P0, lpminimumworkingsetsize: *mut usize, lpmaximumworkingsetsize: *mut usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetProcessWorkingSetSize(hprocess : super::super::Foundation:: HANDLE, lpminimumworkingsetsize : *mut usize, lpmaximumworkingsetsize : *mut usize) -> super::super::Foundation:: BOOL); - GetProcessWorkingSetSize(hprocess.into_param().abi(), lpminimumworkingsetsize, lpmaximumworkingsetsize) + GetProcessWorkingSetSize(hprocess.into_param().abi(), lpminimumworkingsetsize, lpmaximumworkingsetsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1270,9 +1270,9 @@ pub unsafe fn GetStartupInfoW(lpstartupinfo: *mut STARTUPINFOW) { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemTimes(lpidletime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lpkerneltime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lpusertime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemTimes(lpidletime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lpkerneltime: ::core::option::Option<*mut super::super::Foundation::FILETIME>, lpusertime: ::core::option::Option<*mut super::super::Foundation::FILETIME>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemTimes(lpidletime : *mut super::super::Foundation:: FILETIME, lpkerneltime : *mut super::super::Foundation:: FILETIME, lpusertime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetSystemTimes(::core::mem::transmute(lpidletime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpkerneltime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpusertime.unwrap_or(::std::ptr::null_mut()))) + GetSystemTimes(::core::mem::transmute(lpidletime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpkerneltime.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpusertime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1298,12 +1298,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadIOPendingFlag(hthread: P0, lpioispending: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn GetThreadIOPendingFlag(hthread: P0, lpioispending: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadIOPendingFlag(hthread : super::super::Foundation:: HANDLE, lpioispending : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetThreadIOPendingFlag(hthread.into_param().abi(), lpioispending) + GetThreadIOPendingFlag(hthread.into_param().abi(), lpioispending).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1318,22 +1318,22 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn GetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *mut super::Kernel::PROCESSOR_NUMBER) -> super::super::Foundation::BOOL +pub unsafe fn GetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *mut super::Kernel::PROCESSOR_NUMBER) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadIdealProcessorEx(hthread : super::super::Foundation:: HANDLE, lpidealprocessor : *mut super::Kernel:: PROCESSOR_NUMBER) -> super::super::Foundation:: BOOL); - GetThreadIdealProcessorEx(hthread.into_param().abi(), lpidealprocessor) + GetThreadIdealProcessorEx(hthread.into_param().abi(), lpidealprocessor).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *mut ::core::ffi::c_void, threadinformationsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn GetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *mut ::core::ffi::c_void, threadinformationsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadInformation(hthread : super::super::Foundation:: HANDLE, threadinformationclass : THREAD_INFORMATION_CLASS, threadinformation : *mut ::core::ffi::c_void, threadinformationsize : u32) -> super::super::Foundation:: BOOL); - GetThreadInformation(hthread.into_param().abi(), threadinformationclass, threadinformation, threadinformationsize) + GetThreadInformation(hthread.into_param().abi(), threadinformationclass, threadinformation, threadinformationsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1348,12 +1348,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadPriorityBoost(hthread: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn GetThreadPriorityBoost(hthread: P0, pdisablepriorityboost: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadPriorityBoost(hthread : super::super::Foundation:: HANDLE, pdisablepriorityboost : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetThreadPriorityBoost(hthread.into_param().abi(), pdisablepriorityboost) + GetThreadPriorityBoost(hthread.into_param().abi(), pdisablepriorityboost).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -1378,19 +1378,19 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetThreadTimes(hthread: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL +pub unsafe fn GetThreadTimes(hthread: P0, lpcreationtime: *mut super::super::Foundation::FILETIME, lpexittime: *mut super::super::Foundation::FILETIME, lpkerneltime: *mut super::super::Foundation::FILETIME, lpusertime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn GetThreadTimes(hthread : super::super::Foundation:: HANDLE, lpcreationtime : *mut super::super::Foundation:: FILETIME, lpexittime : *mut super::super::Foundation:: FILETIME, lpkerneltime : *mut super::super::Foundation:: FILETIME, lpusertime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - GetThreadTimes(hthread.into_param().abi(), lpcreationtime, lpexittime, lpkerneltime, lpusertime) + GetThreadTimes(hthread.into_param().abi(), lpcreationtime, lpexittime, lpkerneltime, lpusertime).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUmsCompletionListEvent(umscompletionlist: *const ::core::ffi::c_void, umscompletionevent: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL { +pub unsafe fn GetUmsCompletionListEvent(umscompletionlist: *const ::core::ffi::c_void, umscompletionevent: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetUmsCompletionListEvent(umscompletionlist : *const ::core::ffi::c_void, umscompletionevent : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - GetUmsCompletionListEvent(umscompletionlist, umscompletionevent) + GetUmsCompletionListEvent(umscompletionlist, umscompletionevent).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1405,23 +1405,23 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitOnceBeginInitialize(lpinitonce: *mut RTL_RUN_ONCE, dwflags: u32, fpending: *mut super::super::Foundation::BOOL, lpcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn InitOnceBeginInitialize(lpinitonce: *mut RTL_RUN_ONCE, dwflags: u32, fpending: *mut super::super::Foundation::BOOL, lpcontext: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitOnceBeginInitialize(lpinitonce : *mut RTL_RUN_ONCE, dwflags : u32, fpending : *mut super::super::Foundation:: BOOL, lpcontext : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InitOnceBeginInitialize(lpinitonce, dwflags, fpending, ::core::mem::transmute(lpcontext.unwrap_or(::std::ptr::null_mut()))) + InitOnceBeginInitialize(lpinitonce, dwflags, fpending, ::core::mem::transmute(lpcontext.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitOnceComplete(lpinitonce: *mut RTL_RUN_ONCE, dwflags: u32, lpcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn InitOnceComplete(lpinitonce: *mut RTL_RUN_ONCE, dwflags: u32, lpcontext: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitOnceComplete(lpinitonce : *mut RTL_RUN_ONCE, dwflags : u32, lpcontext : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InitOnceComplete(lpinitonce, dwflags, ::core::mem::transmute(lpcontext.unwrap_or(::std::ptr::null()))) + InitOnceComplete(lpinitonce, dwflags, ::core::mem::transmute(lpcontext.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitOnceExecuteOnce(initonce: *mut RTL_RUN_ONCE, initfn: PINIT_ONCE_FN, parameter: ::core::option::Option<*mut ::core::ffi::c_void>, context: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn InitOnceExecuteOnce(initonce: *mut RTL_RUN_ONCE, initfn: PINIT_ONCE_FN, parameter: ::core::option::Option<*mut ::core::ffi::c_void>, context: ::core::option::Option<*mut *mut ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitOnceExecuteOnce(initonce : *mut RTL_RUN_ONCE, initfn : PINIT_ONCE_FN, parameter : *mut ::core::ffi::c_void, context : *mut *mut ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - InitOnceExecuteOnce(initonce, initfn, ::core::mem::transmute(parameter.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut()))) + InitOnceExecuteOnce(initonce, initfn, ::core::mem::transmute(parameter.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(context.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -1449,23 +1449,23 @@ pub unsafe fn InitializeCriticalSection(lpcriticalsection: *mut RTL_CRITICAL_SEC #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn InitializeCriticalSectionAndSpinCount(lpcriticalsection: *mut RTL_CRITICAL_SECTION, dwspincount: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InitializeCriticalSectionAndSpinCount(lpcriticalsection: *mut RTL_CRITICAL_SECTION, dwspincount: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeCriticalSectionAndSpinCount(lpcriticalsection : *mut RTL_CRITICAL_SECTION, dwspincount : u32) -> super::super::Foundation:: BOOL); - InitializeCriticalSectionAndSpinCount(lpcriticalsection, dwspincount) + InitializeCriticalSectionAndSpinCount(lpcriticalsection, dwspincount).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn InitializeCriticalSectionEx(lpcriticalsection: *mut RTL_CRITICAL_SECTION, dwspincount: u32, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn InitializeCriticalSectionEx(lpcriticalsection: *mut RTL_CRITICAL_SECTION, dwspincount: u32, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeCriticalSectionEx(lpcriticalsection : *mut RTL_CRITICAL_SECTION, dwspincount : u32, flags : u32) -> super::super::Foundation:: BOOL); - InitializeCriticalSectionEx(lpcriticalsection, dwspincount, flags) + InitializeCriticalSectionEx(lpcriticalsection, dwspincount, flags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwattributecount: u32, dwflags: u32, lpsize: *mut usize) -> super::super::Foundation::BOOL { +pub unsafe fn InitializeProcThreadAttributeList(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwattributecount: u32, dwflags: u32, lpsize: *mut usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeProcThreadAttributeList(lpattributelist : LPPROC_THREAD_ATTRIBUTE_LIST, dwattributecount : u32, dwflags : u32, lpsize : *mut usize) -> super::super::Foundation:: BOOL); - InitializeProcThreadAttributeList(lpattributelist, dwattributecount, dwflags, lpsize) + InitializeProcThreadAttributeList(lpattributelist, dwattributecount, dwflags, lpsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_System_Kernel\"`*"] #[cfg(feature = "Win32_System_Kernel")] @@ -1487,9 +1487,9 @@ pub unsafe fn InitializeSRWLock() -> RTL_SRWLOCK { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeSynchronizationBarrier(lpbarrier: *mut RTL_BARRIER, ltotalthreads: i32, lspincount: i32) -> super::super::Foundation::BOOL { +pub unsafe fn InitializeSynchronizationBarrier(lpbarrier: *mut RTL_BARRIER, ltotalthreads: i32, lspincount: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn InitializeSynchronizationBarrier(lpbarrier : *mut RTL_BARRIER, ltotalthreads : i32, lspincount : i32) -> super::super::Foundation:: BOOL); - InitializeSynchronizationBarrier(lpbarrier, ltotalthreads, lspincount) + InitializeSynchronizationBarrier(lpbarrier, ltotalthreads, lspincount).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_System_Kernel\"`*"] #[cfg(feature = "Win32_System_Kernel")] @@ -1522,22 +1522,22 @@ pub unsafe fn InterlockedPushListSListEx(listhead: *mut super::Kernel::SLIST_HEA #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsImmersiveProcess(hprocess: P0) -> super::super::Foundation::BOOL +pub unsafe fn IsImmersiveProcess(hprocess: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn IsImmersiveProcess(hprocess : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - IsImmersiveProcess(hprocess.into_param().abi()) + IsImmersiveProcess(hprocess.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsProcessCritical(hprocess: P0, critical: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn IsProcessCritical(hprocess: P0, critical: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn IsProcessCritical(hprocess : super::super::Foundation:: HANDLE, critical : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsProcessCritical(hprocess.into_param().abi(), critical) + IsProcessCritical(hprocess.into_param().abi(), critical).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1566,22 +1566,22 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsWow64Process(hprocess: P0, wow64process: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL +pub unsafe fn IsWow64Process(hprocess: P0, wow64process: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn IsWow64Process(hprocess : super::super::Foundation:: HANDLE, wow64process : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsWow64Process(hprocess.into_param().abi(), wow64process) + IsWow64Process(hprocess.into_param().abi(), wow64process).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] #[inline] -pub unsafe fn IsWow64Process2(hprocess: P0, pprocessmachine: *mut super::SystemInformation::IMAGE_FILE_MACHINE, pnativemachine: ::core::option::Option<*mut super::SystemInformation::IMAGE_FILE_MACHINE>) -> super::super::Foundation::BOOL +pub unsafe fn IsWow64Process2(hprocess: P0, pprocessmachine: *mut super::SystemInformation::IMAGE_FILE_MACHINE, pnativemachine: ::core::option::Option<*mut super::SystemInformation::IMAGE_FILE_MACHINE>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn IsWow64Process2(hprocess : super::super::Foundation:: HANDLE, pprocessmachine : *mut super::SystemInformation:: IMAGE_FILE_MACHINE, pnativemachine : *mut super::SystemInformation:: IMAGE_FILE_MACHINE) -> super::super::Foundation:: BOOL); - IsWow64Process2(hprocess.into_param().abi(), pprocessmachine, ::core::mem::transmute(pnativemachine.unwrap_or(::std::ptr::null_mut()))) + IsWow64Process2(hprocess.into_param().abi(), pprocessmachine, ::core::mem::transmute(pnativemachine.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] @@ -1698,12 +1698,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn OpenProcessToken(processhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, tokenhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn OpenProcessToken(processhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, tokenhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn OpenProcessToken(processhandle : super::super::Foundation:: HANDLE, desiredaccess : super::super::Security:: TOKEN_ACCESS_MASK, tokenhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - OpenProcessToken(processhandle.into_param().abi(), desiredaccess, tokenhandle) + OpenProcessToken(processhandle.into_param().abi(), desiredaccess, tokenhandle).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1731,13 +1731,13 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security"))] #[inline] -pub unsafe fn OpenThreadToken(threadhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: P1, tokenhandle: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::BOOL +pub unsafe fn OpenThreadToken(threadhandle: P0, desiredaccess: super::super::Security::TOKEN_ACCESS_MASK, openasself: P1, tokenhandle: *mut super::super::Foundation::HANDLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn OpenThreadToken(threadhandle : super::super::Foundation:: HANDLE, desiredaccess : super::super::Security:: TOKEN_ACCESS_MASK, openasself : super::super::Foundation:: BOOL, tokenhandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - OpenThreadToken(threadhandle.into_param().abi(), desiredaccess, openasself.into_param().abi(), tokenhandle) + OpenThreadToken(threadhandle.into_param().abi(), desiredaccess, openasself.into_param().abi(), tokenhandle).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1754,12 +1754,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PulseEvent(hevent: P0) -> super::super::Foundation::BOOL +pub unsafe fn PulseEvent(hevent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn PulseEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - PulseEvent(hevent.into_param().abi()) + PulseEvent(hevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_System_Kernel\"`*"] #[cfg(feature = "Win32_System_Kernel")] @@ -1771,32 +1771,32 @@ pub unsafe fn QueryDepthSList(listhead: *const super::Kernel::SLIST_HEADER) -> u #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryFullProcessImageNameA(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: ::windows_core::PSTR, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryFullProcessImageNameA(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: ::windows_core::PSTR, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryFullProcessImageNameA(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_NAME_FORMAT, lpexename : ::windows_core::PSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - QueryFullProcessImageNameA(hprocess.into_param().abi(), dwflags, ::core::mem::transmute(lpexename), lpdwsize) + QueryFullProcessImageNameA(hprocess.into_param().abi(), dwflags, ::core::mem::transmute(lpexename), lpdwsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryFullProcessImageNameW(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: ::windows_core::PWSTR, lpdwsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn QueryFullProcessImageNameW(hprocess: P0, dwflags: PROCESS_NAME_FORMAT, lpexename: ::windows_core::PWSTR, lpdwsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryFullProcessImageNameW(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_NAME_FORMAT, lpexename : ::windows_core::PWSTR, lpdwsize : *mut u32) -> super::super::Foundation:: BOOL); - QueryFullProcessImageNameW(hprocess.into_param().abi(), dwflags, ::core::mem::transmute(lpexename), lpdwsize) + QueryFullProcessImageNameW(hprocess.into_param().abi(), dwflags, ::core::mem::transmute(lpexename), lpdwsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryProcessAffinityUpdateMode(hprocess: P0, lpdwflags: ::core::option::Option<*mut PROCESS_AFFINITY_AUTO_UPDATE_FLAGS>) -> super::super::Foundation::BOOL +pub unsafe fn QueryProcessAffinityUpdateMode(hprocess: P0, lpdwflags: ::core::option::Option<*mut PROCESS_AFFINITY_AUTO_UPDATE_FLAGS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryProcessAffinityUpdateMode(hprocess : super::super::Foundation:: HANDLE, lpdwflags : *mut PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> super::super::Foundation:: BOOL); - QueryProcessAffinityUpdateMode(hprocess.into_param().abi(), ::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut()))) + QueryProcessAffinityUpdateMode(hprocess.into_param().abi(), ::core::mem::transmute(lpdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1808,19 +1808,19 @@ pub unsafe fn QueryProtectedPolicy(policyguid: *const ::windows_core::GUID, poli #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryThreadpoolStackInformation(ptpp: P0, ptpsi: *mut TP_POOL_STACK_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn QueryThreadpoolStackInformation(ptpp: P0, ptpsi: *mut TP_POOL_STACK_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryThreadpoolStackInformation(ptpp : PTP_POOL, ptpsi : *mut TP_POOL_STACK_INFORMATION) -> super::super::Foundation:: BOOL); - QueryThreadpoolStackInformation(ptpp.into_param().abi(), ptpsi) + QueryThreadpoolStackInformation(ptpp.into_param().abi(), ptpsi).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryUmsThreadInformation(umsthread: *const ::core::ffi::c_void, umsthreadinfoclass: RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation: *mut ::core::ffi::c_void, umsthreadinformationlength: u32, returnlength: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn QueryUmsThreadInformation(umsthread: *const ::core::ffi::c_void, umsthreadinfoclass: RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation: *mut ::core::ffi::c_void, umsthreadinformationlength: u32, returnlength: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn QueryUmsThreadInformation(umsthread : *const ::core::ffi::c_void, umsthreadinfoclass : RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation : *mut ::core::ffi::c_void, umsthreadinformationlength : u32, returnlength : *mut u32) -> super::super::Foundation:: BOOL); - QueryUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation, umsthreadinformationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))) + QueryUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation, umsthreadinformationlength, ::core::mem::transmute(returnlength.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1845,29 +1845,29 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueueUserWorkItem(function: LPTHREAD_START_ROUTINE, context: ::core::option::Option<*const ::core::ffi::c_void>, flags: WORKER_THREAD_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn QueueUserWorkItem(function: LPTHREAD_START_ROUTINE, context: ::core::option::Option<*const ::core::ffi::c_void>, flags: WORKER_THREAD_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn QueueUserWorkItem(function : LPTHREAD_START_ROUTINE, context : *const ::core::ffi::c_void, flags : WORKER_THREAD_FLAGS) -> super::super::Foundation:: BOOL); - QueueUserWorkItem(function, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), flags) + QueueUserWorkItem(function, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), flags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterWaitForSingleObject(phnewwaitobject: *mut super::super::Foundation::HANDLE, hobject: P0, callback: WAITORTIMERCALLBACK, context: ::core::option::Option<*const ::core::ffi::c_void>, dwmilliseconds: u32, dwflags: WORKER_THREAD_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn RegisterWaitForSingleObject(phnewwaitobject: *mut super::super::Foundation::HANDLE, hobject: P0, callback: WAITORTIMERCALLBACK, context: ::core::option::Option<*const ::core::ffi::c_void>, dwmilliseconds: u32, dwflags: WORKER_THREAD_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn RegisterWaitForSingleObject(phnewwaitobject : *mut super::super::Foundation:: HANDLE, hobject : super::super::Foundation:: HANDLE, callback : WAITORTIMERCALLBACK, context : *const ::core::ffi::c_void, dwmilliseconds : u32, dwflags : WORKER_THREAD_FLAGS) -> super::super::Foundation:: BOOL); - RegisterWaitForSingleObject(phnewwaitobject, hobject.into_param().abi(), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), dwmilliseconds, dwflags) + RegisterWaitForSingleObject(phnewwaitobject, hobject.into_param().abi(), callback, ::core::mem::transmute(context.unwrap_or(::std::ptr::null())), dwmilliseconds, dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReleaseMutex(hmutex: P0) -> super::super::Foundation::BOOL +pub unsafe fn ReleaseMutex(hmutex: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReleaseMutex(hmutex : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ReleaseMutex(hmutex.into_param().abi()) + ReleaseMutex(hmutex.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1895,12 +1895,12 @@ pub unsafe fn ReleaseSRWLockShared(srwlock: *mut RTL_SRWLOCK) { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReleaseSemaphore(hsemaphore: P0, lreleasecount: i32, lppreviouscount: ::core::option::Option<*mut i32>) -> super::super::Foundation::BOOL +pub unsafe fn ReleaseSemaphore(hsemaphore: P0, lreleasecount: i32, lppreviouscount: ::core::option::Option<*mut i32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ReleaseSemaphore(hsemaphore : super::super::Foundation:: HANDLE, lreleasecount : i32, lppreviouscount : *mut i32) -> super::super::Foundation:: BOOL); - ReleaseSemaphore(hsemaphore.into_param().abi(), lreleasecount, ::core::mem::transmute(lppreviouscount.unwrap_or(::std::ptr::null_mut()))) + ReleaseSemaphore(hsemaphore.into_param().abi(), lreleasecount, ::core::mem::transmute(lppreviouscount.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1916,12 +1916,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ResetEvent(hevent: P0) -> super::super::Foundation::BOOL +pub unsafe fn ResetEvent(hevent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn ResetEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - ResetEvent(hevent.into_param().abi()) + ResetEvent(hevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1943,12 +1943,12 @@ pub unsafe fn SetCriticalSectionSpinCount(lpcriticalsection: *mut RTL_CRITICAL_S #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetEvent(hevent: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetEvent(hevent: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetEvent(hevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetEvent(hevent.into_param().abi()) + SetEvent(hevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1964,39 +1964,39 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPriorityClass(hprocess: P0, dwpriorityclass: PROCESS_CREATION_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn SetPriorityClass(hprocess: P0, dwpriorityclass: PROCESS_CREATION_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetPriorityClass(hprocess : super::super::Foundation:: HANDLE, dwpriorityclass : PROCESS_CREATION_FLAGS) -> super::super::Foundation:: BOOL); - SetPriorityClass(hprocess.into_param().abi(), dwpriorityclass) + SetPriorityClass(hprocess.into_param().abi(), dwpriorityclass).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessAffinityMask(hprocess: P0, dwprocessaffinitymask: usize) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessAffinityMask(hprocess: P0, dwprocessaffinitymask: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessAffinityMask(hprocess : super::super::Foundation:: HANDLE, dwprocessaffinitymask : usize) -> super::super::Foundation:: BOOL); - SetProcessAffinityMask(hprocess.into_param().abi(), dwprocessaffinitymask) + SetProcessAffinityMask(hprocess.into_param().abi(), dwprocessaffinitymask).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessAffinityUpdateMode(hprocess: P0, dwflags: PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessAffinityUpdateMode(hprocess: P0, dwflags: PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessAffinityUpdateMode(hprocess : super::super::Foundation:: HANDLE, dwflags : PROCESS_AFFINITY_AUTO_UPDATE_FLAGS) -> super::super::Foundation:: BOOL); - SetProcessAffinityUpdateMode(hprocess.into_param().abi(), dwflags) + SetProcessAffinityUpdateMode(hprocess.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessDEPPolicy(dwflags: PROCESS_DEP_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn SetProcessDEPPolicy(dwflags: PROCESS_DEP_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDEPPolicy(dwflags : PROCESS_DEP_FLAGS) -> super::super::Foundation:: BOOL); - SetProcessDEPPolicy(dwflags) + SetProcessDEPPolicy(dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -2021,12 +2021,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessDynamicEHContinuationTargets(process: P0, targets: &mut [PROCESS_DYNAMIC_EH_CONTINUATION_TARGET]) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessDynamicEHContinuationTargets(process: P0, targets: &mut [PROCESS_DYNAMIC_EH_CONTINUATION_TARGET]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessDynamicEHContinuationTargets(process : super::super::Foundation:: HANDLE, numberoftargets : u16, targets : *mut PROCESS_DYNAMIC_EH_CONTINUATION_TARGET) -> super::super::Foundation:: BOOL); - SetProcessDynamicEHContinuationTargets(process.into_param().abi(), targets.len() as _, ::core::mem::transmute(targets.as_ptr())) + SetProcessDynamicEHContinuationTargets(process.into_param().abi(), targets.len() as _, ::core::mem::transmute(targets.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2041,64 +2041,64 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *const ::core::ffi::c_void, processinformationsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessInformation(hprocess: P0, processinformationclass: PROCESS_INFORMATION_CLASS, processinformation: *const ::core::ffi::c_void, processinformationsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessInformation(hprocess : super::super::Foundation:: HANDLE, processinformationclass : PROCESS_INFORMATION_CLASS, processinformation : *const ::core::ffi::c_void, processinformationsize : u32) -> super::super::Foundation:: BOOL); - SetProcessInformation(hprocess.into_param().abi(), processinformationclass, processinformation, processinformationsize) + SetProcessInformation(hprocess.into_param().abi(), processinformationclass, processinformation, processinformationsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessMitigationPolicy(mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *const ::core::ffi::c_void, dwlength: usize) -> super::super::Foundation::BOOL { +pub unsafe fn SetProcessMitigationPolicy(mitigationpolicy: PROCESS_MITIGATION_POLICY, lpbuffer: *const ::core::ffi::c_void, dwlength: usize) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessMitigationPolicy(mitigationpolicy : PROCESS_MITIGATION_POLICY, lpbuffer : *const ::core::ffi::c_void, dwlength : usize) -> super::super::Foundation:: BOOL); - SetProcessMitigationPolicy(mitigationpolicy, lpbuffer, dwlength) + SetProcessMitigationPolicy(mitigationpolicy, lpbuffer, dwlength).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessPriorityBoost(hprocess: P0, bdisablepriorityboost: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessPriorityBoost(hprocess: P0, bdisablepriorityboost: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessPriorityBoost(hprocess : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetProcessPriorityBoost(hprocess.into_param().abi(), bdisablepriorityboost.into_param().abi()) + SetProcessPriorityBoost(hprocess.into_param().abi(), bdisablepriorityboost.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessRestrictionExemption(fenableexemption: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessRestrictionExemption(fenableexemption: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetProcessRestrictionExemption(fenableexemption : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetProcessRestrictionExemption(fenableexemption.into_param().abi()) + SetProcessRestrictionExemption(fenableexemption.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessShutdownParameters(dwlevel: u32, dwflags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetProcessShutdownParameters(dwlevel: u32, dwflags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessShutdownParameters(dwlevel : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - SetProcessShutdownParameters(dwlevel, dwflags) + SetProcessShutdownParameters(dwlevel, dwflags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessWorkingSetSize(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessWorkingSetSize(hprocess: P0, dwminimumworkingsetsize: usize, dwmaximumworkingsetsize: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetProcessWorkingSetSize(hprocess : super::super::Foundation:: HANDLE, dwminimumworkingsetsize : usize, dwmaximumworkingsetsize : usize) -> super::super::Foundation:: BOOL); - SetProcessWorkingSetSize(hprocess.into_param().abi(), dwminimumworkingsetsize, dwmaximumworkingsetsize) + SetProcessWorkingSetSize(hprocess.into_param().abi(), dwminimumworkingsetsize, dwmaximumworkingsetsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProtectedPolicy(policyguid: *const ::windows_core::GUID, policyvalue: usize, oldpolicyvalue: ::core::option::Option<*mut usize>) -> super::super::Foundation::BOOL { +pub unsafe fn SetProtectedPolicy(policyguid: *const ::windows_core::GUID, policyvalue: usize, oldpolicyvalue: ::core::option::Option<*mut usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetProtectedPolicy(policyguid : *const ::windows_core::GUID, policyvalue : usize, oldpolicyvalue : *mut usize) -> super::super::Foundation:: BOOL); - SetProtectedPolicy(policyguid, policyvalue, ::core::mem::transmute(oldpolicyvalue.unwrap_or(::std::ptr::null_mut()))) + SetProtectedPolicy(policyguid, policyvalue, ::core::mem::transmute(oldpolicyvalue.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2144,43 +2144,43 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn SetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *const super::Kernel::PROCESSOR_NUMBER, lppreviousidealprocessor: ::core::option::Option<*mut super::Kernel::PROCESSOR_NUMBER>) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadIdealProcessorEx(hthread: P0, lpidealprocessor: *const super::Kernel::PROCESSOR_NUMBER, lppreviousidealprocessor: ::core::option::Option<*mut super::Kernel::PROCESSOR_NUMBER>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadIdealProcessorEx(hthread : super::super::Foundation:: HANDLE, lpidealprocessor : *const super::Kernel:: PROCESSOR_NUMBER, lppreviousidealprocessor : *mut super::Kernel:: PROCESSOR_NUMBER) -> super::super::Foundation:: BOOL); - SetThreadIdealProcessorEx(hthread.into_param().abi(), lpidealprocessor, ::core::mem::transmute(lppreviousidealprocessor.unwrap_or(::std::ptr::null_mut()))) + SetThreadIdealProcessorEx(hthread.into_param().abi(), lpidealprocessor, ::core::mem::transmute(lppreviousidealprocessor.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const ::core::ffi::c_void, threadinformationsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const ::core::ffi::c_void, threadinformationsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadInformation(hthread : super::super::Foundation:: HANDLE, threadinformationclass : THREAD_INFORMATION_CLASS, threadinformation : *const ::core::ffi::c_void, threadinformationsize : u32) -> super::super::Foundation:: BOOL); - SetThreadInformation(hthread.into_param().abi(), threadinformationclass, threadinformation, threadinformationsize) + SetThreadInformation(hthread.into_param().abi(), threadinformationclass, threadinformation, threadinformationsize).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadPriority(hthread: P0, npriority: THREAD_PRIORITY) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadPriority(hthread: P0, npriority: THREAD_PRIORITY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadPriority(hthread : super::super::Foundation:: HANDLE, npriority : THREAD_PRIORITY) -> super::super::Foundation:: BOOL); - SetThreadPriority(hthread.into_param().abi(), npriority) + SetThreadPriority(hthread.into_param().abi(), npriority).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadPriorityBoost(hthread: P0, bdisablepriorityboost: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadPriorityBoost(hthread: P0, bdisablepriorityboost: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadPriorityBoost(hthread : super::super::Foundation:: HANDLE, bdisablepriorityboost : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetThreadPriorityBoost(hthread.into_param().abi(), bdisablepriorityboost.into_param().abi()) + SetThreadPriorityBoost(hthread.into_param().abi(), bdisablepriorityboost.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_SystemInformation\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_SystemInformation"))] @@ -2205,29 +2205,29 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadStackGuarantee(stacksizeinbytes: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetThreadStackGuarantee(stacksizeinbytes: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadStackGuarantee(stacksizeinbytes : *mut u32) -> super::super::Foundation:: BOOL); - SetThreadStackGuarantee(stacksizeinbytes) + SetThreadStackGuarantee(stacksizeinbytes).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadToken(thread: ::core::option::Option<*const super::super::Foundation::HANDLE>, token: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadToken(thread: ::core::option::Option<*const super::super::Foundation::HANDLE>, token: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("advapi32.dll" "system" fn SetThreadToken(thread : *const super::super::Foundation:: HANDLE, token : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetThreadToken(::core::mem::transmute(thread.unwrap_or(::std::ptr::null())), token.into_param().abi()) + SetThreadToken(::core::mem::transmute(thread.unwrap_or(::std::ptr::null())), token.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadpoolStackInformation(ptpp: P0, ptpsi: *const TP_POOL_STACK_INFORMATION) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadpoolStackInformation(ptpp: P0, ptpsi: *const TP_POOL_STACK_INFORMATION) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolStackInformation(ptpp : PTP_POOL, ptpsi : *const TP_POOL_STACK_INFORMATION) -> super::super::Foundation:: BOOL); - SetThreadpoolStackInformation(ptpp.into_param().abi(), ptpsi) + SetThreadpoolStackInformation(ptpp.into_param().abi(), ptpsi).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -2241,12 +2241,12 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetThreadpoolThreadMinimum(ptpp: P0, cthrdmic: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetThreadpoolThreadMinimum(ptpp: P0, cthrdmic: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolThreadMinimum(ptpp : PTP_POOL, cthrdmic : u32) -> super::super::Foundation:: BOOL); - SetThreadpoolThreadMinimum(ptpp.into_param().abi(), cthrdmic) + SetThreadpoolThreadMinimum(ptpp.into_param().abi(), cthrdmic).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2304,30 +2304,30 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetUmsThreadInformation(umsthread: *const ::core::ffi::c_void, umsthreadinfoclass: RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation: *const ::core::ffi::c_void, umsthreadinformationlength: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetUmsThreadInformation(umsthread: *const ::core::ffi::c_void, umsthreadinfoclass: RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation: *const ::core::ffi::c_void, umsthreadinformationlength: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetUmsThreadInformation(umsthread : *const ::core::ffi::c_void, umsthreadinfoclass : RTL_UMS_THREAD_INFO_CLASS, umsthreadinformation : *const ::core::ffi::c_void, umsthreadinformationlength : u32) -> super::super::Foundation:: BOOL); - SetUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation, umsthreadinformationlength) + SetUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation, umsthreadinformationlength).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWaitableTimer(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: ::core::option::Option<*const ::core::ffi::c_void>, fresume: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetWaitableTimer(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: ::core::option::Option<*const ::core::ffi::c_void>, fresume: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetWaitableTimer(htimer : super::super::Foundation:: HANDLE, lpduetime : *const i64, lperiod : i32, pfncompletionroutine : PTIMERAPCROUTINE, lpargtocompletionroutine : *const ::core::ffi::c_void, fresume : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetWaitableTimer(htimer.into_param().abi(), lpduetime, lperiod, pfncompletionroutine, ::core::mem::transmute(lpargtocompletionroutine.unwrap_or(::std::ptr::null())), fresume.into_param().abi()) + SetWaitableTimer(htimer.into_param().abi(), lpduetime, lperiod, pfncompletionroutine, ::core::mem::transmute(lpargtocompletionroutine.unwrap_or(::std::ptr::null())), fresume.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWaitableTimerEx(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: ::core::option::Option<*const ::core::ffi::c_void>, wakecontext: ::core::option::Option<*const REASON_CONTEXT>, tolerabledelay: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetWaitableTimerEx(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: ::core::option::Option<*const ::core::ffi::c_void>, wakecontext: ::core::option::Option<*const REASON_CONTEXT>, tolerabledelay: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SetWaitableTimerEx(htimer : super::super::Foundation:: HANDLE, lpduetime : *const i64, lperiod : i32, pfncompletionroutine : PTIMERAPCROUTINE, lpargtocompletionroutine : *const ::core::ffi::c_void, wakecontext : *const REASON_CONTEXT, tolerabledelay : u32) -> super::super::Foundation:: BOOL); - SetWaitableTimerEx(htimer.into_param().abi(), lpduetime, lperiod, pfncompletionroutine, ::core::mem::transmute(lpargtocompletionroutine.unwrap_or(::std::ptr::null())), ::core::mem::transmute(wakecontext.unwrap_or(::std::ptr::null())), tolerabledelay) + SetWaitableTimerEx(htimer.into_param().abi(), lpduetime, lperiod, pfncompletionroutine, ::core::mem::transmute(lpargtocompletionroutine.unwrap_or(::std::ptr::null())), ::core::mem::transmute(wakecontext.unwrap_or(::std::ptr::null())), tolerabledelay).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -2338,16 +2338,16 @@ pub unsafe fn Sleep(dwmilliseconds: u32) { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`, `\"Win32_System_Kernel\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Kernel"))] #[inline] -pub unsafe fn SleepConditionVariableCS(conditionvariable: *mut RTL_CONDITION_VARIABLE, criticalsection: *mut RTL_CRITICAL_SECTION, dwmilliseconds: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SleepConditionVariableCS(conditionvariable: *mut RTL_CONDITION_VARIABLE, criticalsection: *mut RTL_CRITICAL_SECTION, dwmilliseconds: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SleepConditionVariableCS(conditionvariable : *mut RTL_CONDITION_VARIABLE, criticalsection : *mut RTL_CRITICAL_SECTION, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - SleepConditionVariableCS(conditionvariable, criticalsection, dwmilliseconds) + SleepConditionVariableCS(conditionvariable, criticalsection, dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SleepConditionVariableSRW(conditionvariable: *mut RTL_CONDITION_VARIABLE, srwlock: *mut RTL_SRWLOCK, dwmilliseconds: u32, flags: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SleepConditionVariableSRW(conditionvariable: *mut RTL_CONDITION_VARIABLE, srwlock: *mut RTL_SRWLOCK, dwmilliseconds: u32, flags: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SleepConditionVariableSRW(conditionvariable : *mut RTL_CONDITION_VARIABLE, srwlock : *mut RTL_SRWLOCK, dwmilliseconds : u32, flags : u32) -> super::super::Foundation:: BOOL); - SleepConditionVariableSRW(conditionvariable, srwlock, dwmilliseconds, flags) + SleepConditionVariableSRW(conditionvariable, srwlock, dwmilliseconds, flags).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2403,22 +2403,22 @@ pub unsafe fn SwitchToThread() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateProcess(hprocess: P0, uexitcode: u32) -> super::super::Foundation::BOOL +pub unsafe fn TerminateProcess(hprocess: P0, uexitcode: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn TerminateProcess(hprocess : super::super::Foundation:: HANDLE, uexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateProcess(hprocess.into_param().abi(), uexitcode) + TerminateProcess(hprocess.into_param().abi(), uexitcode).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TerminateThread(hthread: P0, dwexitcode: u32) -> super::super::Foundation::BOOL +pub unsafe fn TerminateThread(hthread: P0, dwexitcode: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn TerminateThread(hthread : super::super::Foundation:: HANDLE, dwexitcode : u32) -> super::super::Foundation:: BOOL); - TerminateThread(hthread.into_param().abi(), dwexitcode) + TerminateThread(hthread.into_param().abi(), dwexitcode).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -2429,9 +2429,9 @@ pub unsafe fn TlsAlloc() -> u32 { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TlsFree(dwtlsindex: u32) -> super::super::Foundation::BOOL { +pub unsafe fn TlsFree(dwtlsindex: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn TlsFree(dwtlsindex : u32) -> super::super::Foundation:: BOOL); - TlsFree(dwtlsindex) + TlsFree(dwtlsindex).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] @@ -2442,9 +2442,9 @@ pub unsafe fn TlsGetValue(dwtlsindex: u32) -> *mut ::core::ffi::c_void { #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TlsSetValue(dwtlsindex: u32, lptlsvalue: ::core::option::Option<*const ::core::ffi::c_void>) -> super::super::Foundation::BOOL { +pub unsafe fn TlsSetValue(dwtlsindex: u32, lptlsvalue: ::core::option::Option<*const ::core::ffi::c_void>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn TlsSetValue(dwtlsindex : u32, lptlsvalue : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - TlsSetValue(dwtlsindex, ::core::mem::transmute(lptlsvalue.unwrap_or(::std::ptr::null()))) + TlsSetValue(dwtlsindex, ::core::mem::transmute(lptlsvalue.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2470,44 +2470,44 @@ pub unsafe fn TryEnterCriticalSection(lpcriticalsection: *mut RTL_CRITICAL_SECTI #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TrySubmitThreadpoolCallback(pfns: PTP_SIMPLE_CALLBACK, pv: ::core::option::Option<*mut ::core::ffi::c_void>, pcbe: ::core::option::Option<*const TP_CALLBACK_ENVIRON_V3>) -> super::super::Foundation::BOOL { +pub unsafe fn TrySubmitThreadpoolCallback(pfns: PTP_SIMPLE_CALLBACK, pv: ::core::option::Option<*mut ::core::ffi::c_void>, pcbe: ::core::option::Option<*const TP_CALLBACK_ENVIRON_V3>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn TrySubmitThreadpoolCallback(pfns : PTP_SIMPLE_CALLBACK, pv : *mut ::core::ffi::c_void, pcbe : *const TP_CALLBACK_ENVIRON_V3) -> super::super::Foundation:: BOOL); - TrySubmitThreadpoolCallback(pfns, ::core::mem::transmute(pv.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbe.unwrap_or(::std::ptr::null()))) + TrySubmitThreadpoolCallback(pfns, ::core::mem::transmute(pv.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbe.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UmsThreadYield(schedulerparam: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn UmsThreadYield(schedulerparam: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UmsThreadYield(schedulerparam : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - UmsThreadYield(schedulerparam) + UmsThreadYield(schedulerparam).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterWait(waithandle: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterWait(waithandle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn UnregisterWait(waithandle : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterWait(waithandle.into_param().abi()) + UnregisterWait(waithandle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterWaitEx(waithandle: P0, completionevent: P1) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterWaitEx(waithandle: P0, completionevent: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn UnregisterWaitEx(waithandle : super::super::Foundation:: HANDLE, completionevent : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnregisterWaitEx(waithandle.into_param().abi(), completionevent.into_param().abi()) + UnregisterWaitEx(waithandle.into_param().abi(), completionevent.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UpdateProcThreadAttribute(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwflags: u32, attribute: usize, lpvalue: ::core::option::Option<*const ::core::ffi::c_void>, cbsize: usize, lppreviousvalue: ::core::option::Option<*mut ::core::ffi::c_void>, lpreturnsize: ::core::option::Option<*const usize>) -> super::super::Foundation::BOOL { +pub unsafe fn UpdateProcThreadAttribute(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwflags: u32, attribute: usize, lpvalue: ::core::option::Option<*const ::core::ffi::c_void>, cbsize: usize, lppreviousvalue: ::core::option::Option<*mut ::core::ffi::c_void>, lpreturnsize: ::core::option::Option<*const usize>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn UpdateProcThreadAttribute(lpattributelist : LPPROC_THREAD_ATTRIBUTE_LIST, dwflags : u32, attribute : usize, lpvalue : *const ::core::ffi::c_void, cbsize : usize, lppreviousvalue : *mut ::core::ffi::c_void, lpreturnsize : *const usize) -> super::super::Foundation:: BOOL); - UpdateProcThreadAttribute(lpattributelist, dwflags, attribute, ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null())), cbsize, ::core::mem::transmute(lppreviousvalue.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreturnsize.unwrap_or(::std::ptr::null()))) + UpdateProcThreadAttribute(lpattributelist, dwflags, attribute, ::core::mem::transmute(lpvalue.unwrap_or(::std::ptr::null())), cbsize, ::core::mem::transmute(lppreviousvalue.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(lpreturnsize.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2522,44 +2522,44 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitForMultipleObjects(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P0, dwmilliseconds: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WaitForMultipleObjects(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P0, dwmilliseconds: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjects(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32) -> super::super::Foundation:: WIN32_ERROR); - WaitForMultipleObjects(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds) + WaitForMultipleObjects(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitForMultipleObjectsEx(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P0, dwmilliseconds: u32, balertable: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WaitForMultipleObjectsEx(lphandles: &[super::super::Foundation::HANDLE], bwaitall: P0, dwmilliseconds: u32, balertable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForMultipleObjectsEx(ncount : u32, lphandles : *const super::super::Foundation:: HANDLE, bwaitall : super::super::Foundation:: BOOL, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WaitForMultipleObjectsEx(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds, balertable.into_param().abi()) + WaitForMultipleObjectsEx(lphandles.len() as _, ::core::mem::transmute(lphandles.as_ptr()), bwaitall.into_param().abi(), dwmilliseconds, balertable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitForSingleObject(hhandle: P0, dwmilliseconds: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WaitForSingleObject(hhandle: P0, dwmilliseconds: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObject(hhandle : super::super::Foundation:: HANDLE, dwmilliseconds : u32) -> super::super::Foundation:: WIN32_ERROR); - WaitForSingleObject(hhandle.into_param().abi(), dwmilliseconds) + WaitForSingleObject(hhandle.into_param().abi(), dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitForSingleObjectEx(hhandle: P0, dwmilliseconds: u32, balertable: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn WaitForSingleObjectEx(hhandle: P0, dwmilliseconds: u32, balertable: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn WaitForSingleObjectEx(hhandle : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - WaitForSingleObjectEx(hhandle.into_param().abi(), dwmilliseconds, balertable.into_param().abi()) + WaitForSingleObjectEx(hhandle.into_param().abi(), dwmilliseconds, balertable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2608,9 +2608,9 @@ where #[doc = "*Required features: `\"Win32_System_Threading\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitOnAddress(address: *const ::core::ffi::c_void, compareaddress: *const ::core::ffi::c_void, addresssize: usize, dwmilliseconds: u32) -> super::super::Foundation::BOOL { +pub unsafe fn WaitOnAddress(address: *const ::core::ffi::c_void, compareaddress: *const ::core::ffi::c_void, addresssize: usize, dwmilliseconds: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("api-ms-win-core-synch-l1-2-0.dll" "system" fn WaitOnAddress(address : *const ::core::ffi::c_void, compareaddress : *const ::core::ffi::c_void, addresssize : usize, dwmilliseconds : u32) -> super::super::Foundation:: BOOL); - WaitOnAddress(address, compareaddress, addresssize, dwmilliseconds) + WaitOnAddress(address, compareaddress, addresssize, dwmilliseconds).ok() } #[doc = "*Required features: `\"Win32_System_Threading\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs index ebe892a537..27c5d33a0f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs @@ -8,9 +8,9 @@ pub unsafe fn EnumDynamicTimeZoneInformation(dwindex: u32, lptimezoneinformation #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn FileTimeToSystemTime(lpfiletime: *const super::super::Foundation::FILETIME, lpsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FileTimeToSystemTime(lpfiletime : *const super::super::Foundation:: FILETIME, lpsystemtime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - FileTimeToSystemTime(lpfiletime, lpsystemtime) + FileTimeToSystemTime(lpfiletime, lpsystemtime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -36,9 +36,9 @@ pub unsafe fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFOR #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, ptzi: *mut TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { +pub unsafe fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, ptzi: *mut TIME_ZONE_INFORMATION) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetTimeZoneInformationForYear(wyear : u16, pdtzi : *const DYNAMIC_TIME_ZONE_INFORMATION, ptzi : *mut TIME_ZONE_INFORMATION) -> super::super::Foundation:: BOOL); - GetTimeZoneInformationForYear(wyear, ::core::mem::transmute(pdtzi.unwrap_or(::std::ptr::null())), ptzi) + GetTimeZoneInformationForYear(wyear, ::core::mem::transmute(pdtzi.unwrap_or(::std::ptr::null())), ptzi).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -57,51 +57,51 @@ pub unsafe fn LocalSystemTimeToLocalFileTime(timezoneinformation: ::core::option #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { +pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetDynamicTimeZoneInformation(lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION) -> super::super::Foundation:: BOOL); - SetDynamicTimeZoneInformation(lptimezoneinformation) + SetDynamicTimeZoneInformation(lptimezoneinformation).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> super::super::Foundation::BOOL { +pub unsafe fn SetTimeZoneInformation(lptimezoneinformation: *const TIME_ZONE_INFORMATION) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SetTimeZoneInformation(lptimezoneinformation : *const TIME_ZONE_INFORMATION) -> super::super::Foundation:: BOOL); - SetTimeZoneInformation(lptimezoneinformation) + SetTimeZoneInformation(lptimezoneinformation).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { +pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation::SYSTEMTIME, lpfiletime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SystemTimeToFileTime(lpsystemtime : *const super::super::Foundation:: SYSTEMTIME, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - SystemTimeToFileTime(lpsystemtime, lpfiletime) + SystemTimeToFileTime(lpsystemtime, lpfiletime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lpuniversaltime : *const super::super::Foundation:: SYSTEMTIME, lplocaltime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - SystemTimeToTzSpecificLocalTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime) + SystemTimeToTzSpecificLocalTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lpuniversaltime: *const super::super::Foundation::SYSTEMTIME, lplocaltime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION, lpuniversaltime : *const super::super::Foundation:: SYSTEMTIME, lplocaltime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - SystemTimeToTzSpecificLocalTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime) + SystemTimeToTzSpecificLocalTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lpuniversaltime, lplocaltime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: ::core::option::Option<*const TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation : *const TIME_ZONE_INFORMATION, lplocaltime : *const super::super::Foundation:: SYSTEMTIME, lpuniversaltime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - TzSpecificLocalTimeToSystemTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime) + TzSpecificLocalTimeToSystemTime(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { +pub unsafe fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: ::core::option::Option<*const DYNAMIC_TIME_ZONE_INFORMATION>, lplocaltime: *const super::super::Foundation::SYSTEMTIME, lpuniversaltime: *mut super::super::Foundation::SYSTEMTIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation : *const DYNAMIC_TIME_ZONE_INFORMATION, lplocaltime : *const super::super::Foundation:: SYSTEMTIME, lpuniversaltime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - TzSpecificLocalTimeToSystemTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime) + TzSpecificLocalTimeToSystemTimeEx(::core::mem::transmute(lptimezoneinformation.unwrap_or(::std::ptr::null())), lplocaltime, lpuniversaltime).ok() } #[doc = "*Required features: `\"Win32_System_Time\"`*"] pub const TIME_ZONE_ID_INVALID: u32 = 4294967295u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs index c4ac0ed57a..c5b47c3803 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -252,29 +252,29 @@ where #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DnsHostnameToComputerNameA(hostname: P0, computername: ::windows_core::PSTR, nsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn DnsHostnameToComputerNameA(hostname: P0, computername: ::windows_core::PSTR, nsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DnsHostnameToComputerNameA(hostname : ::windows_core::PCSTR, computername : ::windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - DnsHostnameToComputerNameA(hostname.into_param().abi(), ::core::mem::transmute(computername), nsize) + DnsHostnameToComputerNameA(hostname.into_param().abi(), ::core::mem::transmute(computername), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DnsHostnameToComputerNameW(hostname: P0, computername: ::windows_core::PWSTR, nsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn DnsHostnameToComputerNameW(hostname: P0, computername: ::windows_core::PWSTR, nsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn DnsHostnameToComputerNameW(hostname : ::windows_core::PCWSTR, computername : ::windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - DnsHostnameToComputerNameW(hostname.into_param().abi(), ::core::mem::transmute(computername), nsize) + DnsHostnameToComputerNameW(hostname.into_param().abi(), ::core::mem::transmute(computername), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DosDateTimeToFileTime(wfatdate: u16, wfattime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { +pub unsafe fn DosDateTimeToFileTime(wfatdate: u16, wfattime: u16, lpfiletime: *mut super::super::Foundation::FILETIME) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn DosDateTimeToFileTime(wfatdate : u16, wfattime : u16, lpfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - DosDateTimeToFileTime(wfatdate, wfattime, lpfiletime) + DosDateTimeToFileTime(wfatdate, wfattime, lpfiletime).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] @@ -394,9 +394,9 @@ where #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn FileTimeToDosDateTime(lpfiletime: *const super::super::Foundation::FILETIME, lpfatdate: *mut u16, lpfattime: *mut u16) -> super::super::Foundation::BOOL { +pub unsafe fn FileTimeToDosDateTime(lpfiletime: *const super::super::Foundation::FILETIME, lpfatdate: *mut u16, lpfattime: *mut u16) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn FileTimeToDosDateTime(lpfiletime : *const super::super::Foundation:: FILETIME, lpfatdate : *mut u16, lpfattime : *mut u16) -> super::super::Foundation:: BOOL); - FileTimeToDosDateTime(lpfiletime, lpfatdate, lpfattime) + FileTimeToDosDateTime(lpfiletime, lpfatdate, lpfattime).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`*"] #[inline] @@ -407,30 +407,30 @@ pub unsafe fn GdiEntry13() -> u32 { #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetComputerNameA(lpbuffer: ::windows_core::PSTR, nsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetComputerNameA(lpbuffer: ::windows_core::PSTR, nsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetComputerNameA(lpbuffer : ::windows_core::PSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameA(::core::mem::transmute(lpbuffer), nsize) + GetComputerNameA(::core::mem::transmute(lpbuffer), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetComputerNameW(lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetComputerNameW(lpbuffer: ::windows_core::PWSTR, nsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetComputerNameW(lpbuffer : ::windows_core::PWSTR, nsize : *mut u32) -> super::super::Foundation:: BOOL); - GetComputerNameW(::core::mem::transmute(lpbuffer), nsize) + GetComputerNameW(::core::mem::transmute(lpbuffer), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentHwProfileA(lphwprofileinfo: *mut HW_PROFILE_INFOA) -> super::super::Foundation::BOOL { +pub unsafe fn GetCurrentHwProfileA(lphwprofileinfo: *mut HW_PROFILE_INFOA) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetCurrentHwProfileA(lphwprofileinfo : *mut HW_PROFILE_INFOA) -> super::super::Foundation:: BOOL); - GetCurrentHwProfileA(lphwprofileinfo) + GetCurrentHwProfileA(lphwprofileinfo).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentHwProfileW(lphwprofileinfo: *mut HW_PROFILE_INFOW) -> super::super::Foundation::BOOL { +pub unsafe fn GetCurrentHwProfileW(lphwprofileinfo: *mut HW_PROFILE_INFOW) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetCurrentHwProfileW(lphwprofileinfo : *mut HW_PROFILE_INFOW) -> super::super::Foundation:: BOOL); - GetCurrentHwProfileW(lphwprofileinfo) + GetCurrentHwProfileW(lphwprofileinfo).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -666,9 +666,9 @@ where #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetSystemRegistryQuota(pdwquotaallowed: ::core::option::Option<*mut u32>, pdwquotaused: ::core::option::Option<*mut u32>) -> super::super::Foundation::BOOL { +pub unsafe fn GetSystemRegistryQuota(pdwquotaallowed: ::core::option::Option<*mut u32>, pdwquotaused: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn GetSystemRegistryQuota(pdwquotaallowed : *mut u32, pdwquotaused : *mut u32) -> super::super::Foundation:: BOOL); - GetSystemRegistryQuota(::core::mem::transmute(pdwquotaallowed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwquotaused.unwrap_or(::std::ptr::null_mut()))) + GetSystemRegistryQuota(::core::mem::transmute(pdwquotaallowed.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwquotaused.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`*"] #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] @@ -680,16 +680,16 @@ pub unsafe fn GetThreadEnabledXStateFeatures() -> u64 { #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserNameA(lpbuffer: ::windows_core::PSTR, pcbbuffer: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetUserNameA(lpbuffer: ::windows_core::PSTR, pcbbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetUserNameA(lpbuffer : ::windows_core::PSTR, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetUserNameA(::core::mem::transmute(lpbuffer), pcbbuffer) + GetUserNameA(::core::mem::transmute(lpbuffer), pcbbuffer).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserNameW(lpbuffer: ::windows_core::PWSTR, pcbbuffer: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetUserNameW(lpbuffer: ::windows_core::PWSTR, pcbbuffer: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("advapi32.dll" "system" fn GetUserNameW(lpbuffer : ::windows_core::PWSTR, pcbbuffer : *mut u32) -> super::super::Foundation:: BOOL); - GetUserNameW(::core::mem::transmute(lpbuffer), pcbbuffer) + GetUserNameW(::core::mem::transmute(lpbuffer), pcbbuffer).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -879,9 +879,9 @@ pub unsafe fn IsNTAdmin(dwreserved: u32, lpdwreserved: *mut u32) -> super::super #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsNativeVhdBoot(nativevhdboot: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { +pub unsafe fn IsNativeVhdBoot(nativevhdboot: *mut super::super::Foundation::BOOL) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn IsNativeVhdBoot(nativevhdboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - IsNativeVhdBoot(nativevhdboot) + IsNativeVhdBoot(nativevhdboot).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1141,9 +1141,9 @@ pub unsafe fn QueryAuxiliaryCounterFrequency() -> ::windows_core::Result { #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryIdleProcessorCycleTime(bufferlength: *mut u32, processoridlecycletime: ::core::option::Option<*mut u64>) -> super::super::Foundation::BOOL { +pub unsafe fn QueryIdleProcessorCycleTime(bufferlength: *mut u32, processoridlecycletime: ::core::option::Option<*mut u64>) -> ::windows_core::Result<()> { ::windows_targets::link!("kernel32.dll" "system" fn QueryIdleProcessorCycleTime(bufferlength : *mut u32, processoridlecycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryIdleProcessorCycleTime(bufferlength, ::core::mem::transmute(processoridlecycletime.unwrap_or(::std::ptr::null_mut()))) + QueryIdleProcessorCycleTime(bufferlength, ::core::mem::transmute(processoridlecycletime.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1171,22 +1171,22 @@ pub unsafe fn QueryInterruptTimePrecise() -> u64 { #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryProcessCycleTime(processhandle: P0, cycletime: *mut u64) -> super::super::Foundation::BOOL +pub unsafe fn QueryProcessCycleTime(processhandle: P0, cycletime: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryProcessCycleTime(processhandle : super::super::Foundation:: HANDLE, cycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryProcessCycleTime(processhandle.into_param().abi(), cycletime) + QueryProcessCycleTime(processhandle.into_param().abi(), cycletime).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn QueryThreadCycleTime(threadhandle: P0, cycletime: *mut u64) -> super::super::Foundation::BOOL +pub unsafe fn QueryThreadCycleTime(threadhandle: P0, cycletime: *mut u64) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn QueryThreadCycleTime(threadhandle : super::super::Foundation:: HANDLE, cycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryThreadCycleTime(threadhandle.into_param().abi(), cycletime) + QueryThreadCycleTime(threadhandle.into_param().abi(), cycletime).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1583,46 +1583,46 @@ where #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFirmwareEnvironmentVariableA(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFirmwareEnvironmentVariableA(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFirmwareEnvironmentVariableA(lpname : ::windows_core::PCSTR, lpguid : ::windows_core::PCSTR, pvalue : *const ::core::ffi::c_void, nsize : u32) -> super::super::Foundation:: BOOL); - SetFirmwareEnvironmentVariableA(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize) + SetFirmwareEnvironmentVariableA(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFirmwareEnvironmentVariableExA(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32, dwattributes: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFirmwareEnvironmentVariableExA(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32, dwattributes: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFirmwareEnvironmentVariableExA(lpname : ::windows_core::PCSTR, lpguid : ::windows_core::PCSTR, pvalue : *const ::core::ffi::c_void, nsize : u32, dwattributes : u32) -> super::super::Foundation:: BOOL); - SetFirmwareEnvironmentVariableExA(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize, dwattributes) + SetFirmwareEnvironmentVariableExA(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize, dwattributes).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32, dwattributes: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32, dwattributes: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFirmwareEnvironmentVariableExW(lpname : ::windows_core::PCWSTR, lpguid : ::windows_core::PCWSTR, pvalue : *const ::core::ffi::c_void, nsize : u32, dwattributes : u32) -> super::super::Foundation:: BOOL); - SetFirmwareEnvironmentVariableExW(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize, dwattributes) + SetFirmwareEnvironmentVariableExW(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize, dwattributes).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pvalue: ::core::option::Option<*const ::core::ffi::c_void>, nsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn SetFirmwareEnvironmentVariableW(lpname : ::windows_core::PCWSTR, lpguid : ::windows_core::PCWSTR, pvalue : *const ::core::ffi::c_void, nsize : u32) -> super::super::Foundation:: BOOL); - SetFirmwareEnvironmentVariableW(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize) + SetFirmwareEnvironmentVariableW(lpname.into_param().abi(), lpguid.into_param().abi(), ::core::mem::transmute(pvalue.unwrap_or(::std::ptr::null())), nsize).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`*"] #[inline] @@ -1657,14 +1657,14 @@ pub unsafe fn SetPerUserSecValuesW(pperuser: *mut PERUSERSECTIONW) -> ::windows_ #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SignalObjectAndWait(hobjecttosignal: P0, hobjecttowaiton: P1, dwmilliseconds: u32, balertable: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SignalObjectAndWait(hobjecttosignal: P0, hobjecttowaiton: P1, dwmilliseconds: u32, balertable: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("kernel32.dll" "system" fn SignalObjectAndWait(hobjecttosignal : super::super::Foundation:: HANDLE, hobjecttowaiton : super::super::Foundation:: HANDLE, dwmilliseconds : u32, balertable : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SignalObjectAndWait(hobjecttosignal.into_param().abi(), hobjecttowaiton.into_param().abi(), dwmilliseconds, balertable.into_param().abi()) + SignalObjectAndWait(hobjecttosignal.into_param().abi(), hobjecttowaiton.into_param().abi(), dwmilliseconds, balertable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`*"] #[inline] @@ -1907,31 +1907,31 @@ where #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileSectionA(lpappname: P0, lpstring: P1, lpfilename: P2) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileSectionA(lpappname: P0, lpstring: P1, lpfilename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileSectionA(lpappname : ::windows_core::PCSTR, lpstring : ::windows_core::PCSTR, lpfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileSectionA(lpappname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()) + WritePrivateProfileSectionA(lpappname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileSectionW(lpappname: P0, lpstring: P1, lpfilename: P2) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileSectionW(lpappname: P0, lpstring: P1, lpfilename: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileSectionW(lpappname : ::windows_core::PCWSTR, lpstring : ::windows_core::PCWSTR, lpfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileSectionW(lpappname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()) + WritePrivateProfileSectionW(lpappname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileStringA(lpappname: P0, lpkeyname: P1, lpstring: P2, lpfilename: P3) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileStringA(lpappname: P0, lpkeyname: P1, lpstring: P2, lpfilename: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -1939,12 +1939,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileStringA(lpappname : ::windows_core::PCSTR, lpkeyname : ::windows_core::PCSTR, lpstring : ::windows_core::PCSTR, lpfilename : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()) + WritePrivateProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileStringW(lpappname: P0, lpkeyname: P1, lpstring: P2, lpfilename: P3) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileStringW(lpappname: P0, lpkeyname: P1, lpstring: P2, lpfilename: P3) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -1952,77 +1952,77 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileStringW(lpappname : ::windows_core::PCWSTR, lpkeyname : ::windows_core::PCWSTR, lpstring : ::windows_core::PCWSTR, lpfilename : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()) + WritePrivateProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi(), lpfilename.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileStructA(lpszsection: P0, lpszkey: P1, lpstruct: ::core::option::Option<*const ::core::ffi::c_void>, usizestruct: u32, szfile: P2) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileStructA(lpszsection: P0, lpszkey: P1, lpstruct: ::core::option::Option<*const ::core::ffi::c_void>, usizestruct: u32, szfile: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileStructA(lpszsection : ::windows_core::PCSTR, lpszkey : ::windows_core::PCSTR, lpstruct : *const ::core::ffi::c_void, usizestruct : u32, szfile : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileStructA(lpszsection.into_param().abi(), lpszkey.into_param().abi(), ::core::mem::transmute(lpstruct.unwrap_or(::std::ptr::null())), usizestruct, szfile.into_param().abi()) + WritePrivateProfileStructA(lpszsection.into_param().abi(), lpszkey.into_param().abi(), ::core::mem::transmute(lpstruct.unwrap_or(::std::ptr::null())), usizestruct, szfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WritePrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: ::core::option::Option<*const ::core::ffi::c_void>, usizestruct: u32, szfile: P2) -> super::super::Foundation::BOOL +pub unsafe fn WritePrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: ::core::option::Option<*const ::core::ffi::c_void>, usizestruct: u32, szfile: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WritePrivateProfileStructW(lpszsection : ::windows_core::PCWSTR, lpszkey : ::windows_core::PCWSTR, lpstruct : *const ::core::ffi::c_void, usizestruct : u32, szfile : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - WritePrivateProfileStructW(lpszsection.into_param().abi(), lpszkey.into_param().abi(), ::core::mem::transmute(lpstruct.unwrap_or(::std::ptr::null())), usizestruct, szfile.into_param().abi()) + WritePrivateProfileStructW(lpszsection.into_param().abi(), lpszkey.into_param().abi(), ::core::mem::transmute(lpstruct.unwrap_or(::std::ptr::null())), usizestruct, szfile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteProfileSectionA(lpappname: P0, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn WriteProfileSectionA(lpappname: P0, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WriteProfileSectionA(lpappname : ::windows_core::PCSTR, lpstring : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - WriteProfileSectionA(lpappname.into_param().abi(), lpstring.into_param().abi()) + WriteProfileSectionA(lpappname.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteProfileSectionW(lpappname: P0, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn WriteProfileSectionW(lpappname: P0, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WriteProfileSectionW(lpappname : ::windows_core::PCWSTR, lpstring : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - WriteProfileSectionW(lpappname.into_param().abi(), lpstring.into_param().abi()) + WriteProfileSectionW(lpappname.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteProfileStringA(lpappname: P0, lpkeyname: P1, lpstring: P2) -> super::super::Foundation::BOOL +pub unsafe fn WriteProfileStringA(lpappname: P0, lpkeyname: P1, lpstring: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WriteProfileStringA(lpappname : ::windows_core::PCSTR, lpkeyname : ::windows_core::PCSTR, lpstring : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - WriteProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi()) + WriteProfileStringA(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WriteProfileStringW(lpappname: P0, lpkeyname: P1, lpstring: P2) -> super::super::Foundation::BOOL +pub unsafe fn WriteProfileStringW(lpappname: P0, lpkeyname: P1, lpstring: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("kernel32.dll" "system" fn WriteProfileStringW(lpappname : ::windows_core::PCWSTR, lpkeyname : ::windows_core::PCWSTR, lpstring : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - WriteProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi()) + WriteProfileStringW(lpappname.into_param().abi(), lpkeyname.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_System_WindowsProgramming\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs index d6c2933b1d..fe666d886f 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -282,12 +282,12 @@ where #[doc = "*Required features: `\"Win32_UI_Accessibility\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn RegisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn RegisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RegisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::Foundation:: BOOL); - RegisterPointerInputTarget(hwnd.into_param().abi(), pointertype) + RegisterPointerInputTarget(hwnd.into_param().abi(), pointertype).ok() } #[doc = "*Required features: `\"Win32_UI_Accessibility\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -1064,12 +1064,12 @@ where #[doc = "*Required features: `\"Win32_UI_Accessibility\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn UnregisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterPointerInputTarget(hwnd: P0, pointertype: super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterPointerInputTarget(hwnd : super::super::Foundation:: HWND, pointertype : super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::Foundation:: BOOL); - UnregisterPointerInputTarget(hwnd.into_param().abi(), pointertype) + UnregisterPointerInputTarget(hwnd.into_param().abi(), pointertype).ok() } #[doc = "*Required features: `\"Win32_UI_Accessibility\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs index 5f0d01c175..ee2de03c4a 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -83,22 +83,22 @@ pub unsafe fn BufferedPaintUnInit() -> ::windows_core::Result<()> { #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckDlgButton(hdlg: P0, nidbutton: i32, ucheck: DLG_BUTTON_CHECK_STATE) -> super::super::Foundation::BOOL +pub unsafe fn CheckDlgButton(hdlg: P0, nidbutton: i32, ucheck: DLG_BUTTON_CHECK_STATE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CheckDlgButton(hdlg : super::super::Foundation:: HWND, nidbutton : i32, ucheck : DLG_BUTTON_CHECK_STATE) -> super::super::Foundation:: BOOL); - CheckDlgButton(hdlg.into_param().abi(), nidbutton, ucheck) + CheckDlgButton(hdlg.into_param().abi(), nidbutton, ucheck).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckRadioButton(hdlg: P0, nidfirstbutton: i32, nidlastbutton: i32, nidcheckbutton: i32) -> super::super::Foundation::BOOL +pub unsafe fn CheckRadioButton(hdlg: P0, nidfirstbutton: i32, nidlastbutton: i32, nidcheckbutton: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CheckRadioButton(hdlg : super::super::Foundation:: HWND, nidfirstbutton : i32, nidlastbutton : i32, nidcheckbutton : i32) -> super::super::Foundation:: BOOL); - CheckRadioButton(hdlg.into_param().abi(), nidfirstbutton, nidlastbutton, nidcheckbutton) + CheckRadioButton(hdlg.into_param().abi(), nidfirstbutton, nidlastbutton, nidcheckbutton).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`*"] #[inline] @@ -554,42 +554,42 @@ where #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DlgDirSelectComboBoxExA(hwnddlg: P0, lpstring: &mut [u8], idcombobox: i32) -> super::super::Foundation::BOOL +pub unsafe fn DlgDirSelectComboBoxExA(hwnddlg: P0, lpstring: &mut [u8], idcombobox: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExA(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox) + DlgDirSelectComboBoxExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DlgDirSelectComboBoxExW(hwnddlg: P0, lpstring: &mut [u16], idcombobox: i32) -> super::super::Foundation::BOOL +pub unsafe fn DlgDirSelectComboBoxExW(hwnddlg: P0, lpstring: &mut [u16], idcombobox: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectComboBoxExW(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PWSTR, cchout : i32, idcombobox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectComboBoxExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox) + DlgDirSelectComboBoxExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idcombobox).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DlgDirSelectExA(hwnddlg: P0, lpstring: &mut [u8], idlistbox: i32) -> super::super::Foundation::BOOL +pub unsafe fn DlgDirSelectExA(hwnddlg: P0, lpstring: &mut [u8], idlistbox: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectExA(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox) + DlgDirSelectExA(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DlgDirSelectExW(hwnddlg: P0, lpstring: &mut [u16], idlistbox: i32) -> super::super::Foundation::BOOL +pub unsafe fn DlgDirSelectExW(hwnddlg: P0, lpstring: &mut [u16], idlistbox: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DlgDirSelectExW(hwnddlg : super::super::Foundation:: HWND, lpstring : ::windows_core::PWSTR, chcount : i32, idlistbox : i32) -> super::super::Foundation:: BOOL); - DlgDirSelectExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox) + DlgDirSelectExW(hwnddlg.into_param().abi(), ::core::mem::transmute(lpstring.as_ptr()), lpstring.len() as _, idlistbox).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -728,12 +728,12 @@ where #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn EnableScrollBar(hwnd: P0, wsbflags: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, warrows: ENABLE_SCROLL_BAR_ARROWS) -> super::super::Foundation::BOOL +pub unsafe fn EnableScrollBar(hwnd: P0, wsbflags: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, warrows: ENABLE_SCROLL_BAR_ARROWS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnableScrollBar(hwnd : super::super::Foundation:: HWND, wsbflags : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, warrows : ENABLE_SCROLL_BAR_ARROWS) -> super::super::Foundation:: BOOL); - EnableScrollBar(hwnd.into_param().abi(), wsbflags, warrows) + EnableScrollBar(hwnd.into_param().abi(), wsbflags, warrows).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -789,16 +789,16 @@ where #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvaluateProximityToPolygon(controlpolygon: &[super::super::Foundation::POINT], phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation::BOOL { +pub unsafe fn EvaluateProximityToPolygon(controlpolygon: &[super::super::Foundation::POINT], phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn EvaluateProximityToPolygon(numvertices : u32, controlpolygon : *const super::super::Foundation:: POINT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation:: BOOL); - EvaluateProximityToPolygon(controlpolygon.len() as _, ::core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, pproximityeval) + EvaluateProximityToPolygon(controlpolygon.len() as _, ::core::mem::transmute(controlpolygon.as_ptr()), phittestinginput, pproximityeval).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EvaluateProximityToRect(controlboundingbox: *const super::super::Foundation::RECT, phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation::BOOL { +pub unsafe fn EvaluateProximityToRect(controlboundingbox: *const super::super::Foundation::RECT, phittestinginput: *const TOUCH_HIT_TESTING_INPUT, pproximityeval: *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn EvaluateProximityToRect(controlboundingbox : *const super::super::Foundation:: RECT, phittestinginput : *const TOUCH_HIT_TESTING_INPUT, pproximityeval : *mut TOUCH_HIT_TESTING_PROXIMITY_EVALUATION) -> super::super::Foundation:: BOOL); - EvaluateProximityToRect(controlboundingbox, phittestinginput, pproximityeval) + EvaluateProximityToRect(controlboundingbox, phittestinginput, pproximityeval).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -937,12 +937,12 @@ pub unsafe fn GetBufferedPaintTargetRect(hbufferedpaint: isize) -> ::windows_cor #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetComboBoxInfo(hwndcombo: P0, pcbi: *mut COMBOBOXINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetComboBoxInfo(hwndcombo: P0, pcbi: *mut COMBOBOXINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetComboBoxInfo(hwndcombo : super::super::Foundation:: HWND, pcbi : *mut COMBOBOXINFO) -> super::super::Foundation:: BOOL); - GetComboBoxInfo(hwndcombo.into_param().abi(), pcbi) + GetComboBoxInfo(hwndcombo.into_param().abi(), pcbi).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`*"] #[inline] @@ -1778,9 +1778,9 @@ pub unsafe fn IsAppThemed() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharLowerW(ch: u16) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharLowerW(ch: u16) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharLowerW(ch : u16) -> super::super::Foundation:: BOOL); - IsCharLowerW(ch) + IsCharLowerW(ch).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1941,23 +1941,23 @@ pub unsafe fn PropertySheetW(param0: *mut PROPSHEETHEADERW_V2) -> isize { #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterPointerDeviceNotifications(window: P0, notifyrange: P1) -> super::super::Foundation::BOOL +pub unsafe fn RegisterPointerDeviceNotifications(window: P0, notifyrange: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RegisterPointerDeviceNotifications(window : super::super::Foundation:: HWND, notifyrange : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - RegisterPointerDeviceNotifications(window.into_param().abi(), notifyrange.into_param().abi()) + RegisterPointerDeviceNotifications(window.into_param().abi(), notifyrange.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterTouchHitTestingWindow(hwnd: P0, value: u32) -> super::super::Foundation::BOOL +pub unsafe fn RegisterTouchHitTestingWindow(hwnd: P0, value: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RegisterTouchHitTestingWindow(hwnd : super::super::Foundation:: HWND, value : u32) -> super::super::Foundation:: BOOL); - RegisterTouchHitTestingWindow(hwnd.into_param().abi(), value) + RegisterTouchHitTestingWindow(hwnd.into_param().abi(), value).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -1984,13 +1984,13 @@ where #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetScrollRange(hwnd: P0, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetScrollRange(hwnd: P0, nbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, nminpos: i32, nmaxpos: i32, bredraw: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, nminpos : i32, nmaxpos : i32, bredraw : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetScrollRange(hwnd.into_param().abi(), nbar, nminpos, nmaxpos, bredraw.into_param().abi()) + SetScrollRange(hwnd.into_param().abi(), nbar, nminpos, nmaxpos, bredraw.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`*"] #[inline] @@ -2043,13 +2043,13 @@ where #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn ShowScrollBar(hwnd: P0, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: P1) -> super::super::Foundation::BOOL +pub unsafe fn ShowScrollBar(hwnd: P0, wbar: super::WindowsAndMessaging::SCROLLBAR_CONSTANTS, bshow: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ShowScrollBar(hwnd : super::super::Foundation:: HWND, wbar : super::WindowsAndMessaging:: SCROLLBAR_CONSTANTS, bshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowScrollBar(hwnd.into_param().abi(), wbar, bshow.into_param().abi()) + ShowScrollBar(hwnd.into_param().abi(), wbar, bshow.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Controls\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs index e59d56eab5..036f5eb8ea 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs @@ -1,12 +1,12 @@ #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn AdjustWindowRectExForDpi(lprect: *mut super::super::Foundation::RECT, dwstyle: super::WindowsAndMessaging::WINDOW_STYLE, bmenu: P0, dwexstyle: super::WindowsAndMessaging::WINDOW_EX_STYLE, dpi: u32) -> super::super::Foundation::BOOL +pub unsafe fn AdjustWindowRectExForDpi(lprect: *mut super::super::Foundation::RECT, dwstyle: super::WindowsAndMessaging::WINDOW_STYLE, bmenu: P0, dwexstyle: super::WindowsAndMessaging::WINDOW_EX_STYLE, dpi: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn AdjustWindowRectExForDpi(lprect : *mut super::super::Foundation:: RECT, dwstyle : super::WindowsAndMessaging:: WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : super::WindowsAndMessaging:: WINDOW_EX_STYLE, dpi : u32) -> super::super::Foundation:: BOOL); - AdjustWindowRectExForDpi(lprect, dwstyle, bmenu.into_param().abi(), dwexstyle, dpi) + AdjustWindowRectExForDpi(lprect, dwstyle, bmenu.into_param().abi(), dwexstyle, dpi).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -22,12 +22,12 @@ where #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnableNonClientDpiScaling(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn EnableNonClientDpiScaling(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnableNonClientDpiScaling(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - EnableNonClientDpiScaling(hwnd.into_param().abi()) + EnableNonClientDpiScaling(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`*"] #[inline] @@ -207,22 +207,22 @@ where #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDialogControlDpiChangeBehavior(hwnd: P0, mask: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation::BOOL +pub unsafe fn SetDialogControlDpiChangeBehavior(hwnd: P0, mask: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetDialogControlDpiChangeBehavior(hwnd : super::super::Foundation:: HWND, mask : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS, values : DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation:: BOOL); - SetDialogControlDpiChangeBehavior(hwnd.into_param().abi(), mask, values) + SetDialogControlDpiChangeBehavior(hwnd.into_param().abi(), mask, values).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDialogDpiChangeBehavior(hdlg: P0, mask: DIALOG_DPI_CHANGE_BEHAVIORS, values: DIALOG_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation::BOOL +pub unsafe fn SetDialogDpiChangeBehavior(hdlg: P0, mask: DIALOG_DPI_CHANGE_BEHAVIORS, values: DIALOG_DPI_CHANGE_BEHAVIORS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetDialogDpiChangeBehavior(hdlg : super::super::Foundation:: HWND, mask : DIALOG_DPI_CHANGE_BEHAVIORS, values : DIALOG_DPI_CHANGE_BEHAVIORS) -> super::super::Foundation:: BOOL); - SetDialogDpiChangeBehavior(hdlg.into_param().abi(), mask, values) + SetDialogDpiChangeBehavior(hdlg.into_param().abi(), mask, values).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`*"] #[inline] @@ -233,12 +233,12 @@ pub unsafe fn SetProcessDpiAwareness(value: PROCESS_DPI_AWARENESS) -> ::windows_ #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessDpiAwarenessContext(value: P0) -> super::super::Foundation::BOOL +pub unsafe fn SetProcessDpiAwarenessContext(value: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetProcessDpiAwarenessContext(value : DPI_AWARENESS_CONTEXT) -> super::super::Foundation:: BOOL); - SetProcessDpiAwarenessContext(value.into_param().abi()) + SetProcessDpiAwarenessContext(value.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`*"] #[inline] @@ -258,9 +258,9 @@ pub unsafe fn SetThreadDpiHostingBehavior(value: DPI_HOSTING_BEHAVIOR) -> DPI_HO #[doc = "*Required features: `\"Win32_UI_HiDpi\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemParametersInfoForDpi(uiaction: u32, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: u32, dpi: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SystemParametersInfoForDpi(uiaction: u32, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: u32, dpi: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SystemParametersInfoForDpi(uiaction : u32, uiparam : u32, pvparam : *mut ::core::ffi::c_void, fwinini : u32, dpi : u32) -> super::super::Foundation:: BOOL); - SystemParametersInfoForDpi(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini, dpi) + SystemParametersInfoForDpi(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini, dpi).ok() } #[doc = "*Required features: `\"Win32_UI_HiDpi\"`*"] pub const DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE: DPI_AWARENESS_CONTEXT = DPI_AWARENESS_CONTEXT(-3i32 as _); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs index 43500321f3..2655f3866e 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/KeyboardAndMouse/mod.rs @@ -12,12 +12,12 @@ where #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn BlockInput(fblockit: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn BlockInput(fblockit: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn BlockInput(fblockit : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - BlockInput(fblockit.into_param().abi()) + BlockInput(fblockit.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -114,23 +114,23 @@ pub unsafe fn GetKeyboardLayoutList(lplist: ::core::option::Option<&mut [super:: #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetKeyboardLayoutNameA(pwszklid: &mut [u8; 9]) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetKeyboardLayoutNameA(pwszklid: &mut [u8; 9]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetKeyboardLayoutNameA(pwszklid : ::windows_core::PSTR) -> super::super::super::Foundation:: BOOL); - GetKeyboardLayoutNameA(::core::mem::transmute(pwszklid.as_ptr())) + GetKeyboardLayoutNameA(::core::mem::transmute(pwszklid.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetKeyboardLayoutNameW(pwszklid: &mut [u16; 9]) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetKeyboardLayoutNameW(pwszklid: &mut [u16; 9]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetKeyboardLayoutNameW(pwszklid : ::windows_core::PWSTR) -> super::super::super::Foundation:: BOOL); - GetKeyboardLayoutNameW(::core::mem::transmute(pwszklid.as_ptr())) + GetKeyboardLayoutNameW(::core::mem::transmute(pwszklid.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetKeyboardState(lpkeystate: &mut [u8; 256]) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetKeyboardState(lpkeystate: &mut [u8; 256]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetKeyboardState(lpkeystate : *mut u8) -> super::super::super::Foundation:: BOOL); - GetKeyboardState(::core::mem::transmute(lpkeystate.as_ptr())) + GetKeyboardState(::core::mem::transmute(lpkeystate.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`*"] #[inline] @@ -224,19 +224,19 @@ pub unsafe fn OemKeyScan(woemchar: u16) -> u32 { #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterHotKey(hwnd: P0, id: i32, fsmodifiers: HOT_KEY_MODIFIERS, vk: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn RegisterHotKey(hwnd: P0, id: i32, fsmodifiers: HOT_KEY_MODIFIERS, vk: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RegisterHotKey(hwnd : super::super::super::Foundation:: HWND, id : i32, fsmodifiers : HOT_KEY_MODIFIERS, vk : u32) -> super::super::super::Foundation:: BOOL); - RegisterHotKey(hwnd.into_param().abi(), id, fsmodifiers, vk) + RegisterHotKey(hwnd.into_param().abi(), id, fsmodifiers, vk).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ReleaseCapture() -> super::super::super::Foundation::BOOL { +pub unsafe fn ReleaseCapture() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn ReleaseCapture() -> super::super::super::Foundation:: BOOL); - ReleaseCapture() + ReleaseCapture().ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`*"] #[inline] @@ -267,9 +267,9 @@ where #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDoubleClickTime(param0: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn SetDoubleClickTime(param0: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetDoubleClickTime(param0 : u32) -> super::super::super::Foundation:: BOOL); - SetDoubleClickTime(param0) + SetDoubleClickTime(param0).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -284,9 +284,9 @@ where #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetKeyboardState(lpkeystate: &[u8; 256]) -> super::super::super::Foundation::BOOL { +pub unsafe fn SetKeyboardState(lpkeystate: &[u8; 256]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetKeyboardState(lpkeystate : *const u8) -> super::super::super::Foundation:: BOOL); - SetKeyboardState(::core::mem::transmute(lpkeystate.as_ptr())) + SetKeyboardState(::core::mem::transmute(lpkeystate.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -333,29 +333,29 @@ where #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> super::super::super::Foundation::BOOL { +pub unsafe fn TrackMouseEvent(lpeventtrack: *mut TRACKMOUSEEVENT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn TrackMouseEvent(lpeventtrack : *mut TRACKMOUSEEVENT) -> super::super::super::Foundation:: BOOL); - TrackMouseEvent(lpeventtrack) + TrackMouseEvent(lpeventtrack).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`, `\"Win32_UI_TextServices\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_TextServices"))] #[inline] -pub unsafe fn UnloadKeyboardLayout(hkl: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn UnloadKeyboardLayout(hkl: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnloadKeyboardLayout(hkl : super::super::TextServices:: HKL) -> super::super::super::Foundation:: BOOL); - UnloadKeyboardLayout(hkl.into_param().abi()) + UnloadKeyboardLayout(hkl.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterHotKey(hwnd: P0, id: i32) -> super::super::super::Foundation::BOOL +pub unsafe fn UnregisterHotKey(hwnd: P0, id: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterHotKey(hwnd : super::super::super::Foundation:: HWND, id : i32) -> super::super::super::Foundation:: BOOL); - UnregisterHotKey(hwnd.into_param().abi(), id) + UnregisterHotKey(hwnd.into_param().abi(), id).ok() } #[doc = "*Required features: `\"Win32_UI_Input_KeyboardAndMouse\"`*"] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs index 432a9c2194..d196658507 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Pointer/mod.rs @@ -1,171 +1,171 @@ #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnableMouseInPointer(fenable: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn EnableMouseInPointer(fenable: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnableMouseInPointer(fenable : super::super::super::Foundation:: BOOL) -> super::super::super::Foundation:: BOOL); - EnableMouseInPointer(fenable.into_param().abi()) + EnableMouseInPointer(fenable.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPointerCursorId(pointerid: u32, cursorid: *mut u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerCursorId(pointerid: u32, cursorid: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerCursorId(pointerid : u32, cursorid : *mut u32) -> super::super::super::Foundation:: BOOL); - GetPointerCursorId(pointerid, cursorid) + GetPointerCursorId(pointerid, cursorid).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetPointerDevice(device: P0, pointerdevice: *mut super::super::Controls::POINTER_DEVICE_INFO) -> super::super::super::Foundation::BOOL +pub unsafe fn GetPointerDevice(device: P0, pointerdevice: *mut super::super::Controls::POINTER_DEVICE_INFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetPointerDevice(device : super::super::super::Foundation:: HANDLE, pointerdevice : *mut super::super::Controls:: POINTER_DEVICE_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerDevice(device.into_param().abi(), pointerdevice) + GetPointerDevice(device.into_param().abi(), pointerdevice).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetPointerDeviceCursors(device: P0, cursorcount: *mut u32, devicecursors: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_CURSOR_INFO>) -> super::super::super::Foundation::BOOL +pub unsafe fn GetPointerDeviceCursors(device: P0, cursorcount: *mut u32, devicecursors: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_CURSOR_INFO>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetPointerDeviceCursors(device : super::super::super::Foundation:: HANDLE, cursorcount : *mut u32, devicecursors : *mut super::super::Controls:: POINTER_DEVICE_CURSOR_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerDeviceCursors(device.into_param().abi(), cursorcount, ::core::mem::transmute(devicecursors.unwrap_or(::std::ptr::null_mut()))) + GetPointerDeviceCursors(device.into_param().abi(), cursorcount, ::core::mem::transmute(devicecursors.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetPointerDeviceProperties(device: P0, propertycount: *mut u32, pointerproperties: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_PROPERTY>) -> super::super::super::Foundation::BOOL +pub unsafe fn GetPointerDeviceProperties(device: P0, propertycount: *mut u32, pointerproperties: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_PROPERTY>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetPointerDeviceProperties(device : super::super::super::Foundation:: HANDLE, propertycount : *mut u32, pointerproperties : *mut super::super::Controls:: POINTER_DEVICE_PROPERTY) -> super::super::super::Foundation:: BOOL); - GetPointerDeviceProperties(device.into_param().abi(), propertycount, ::core::mem::transmute(pointerproperties.unwrap_or(::std::ptr::null_mut()))) + GetPointerDeviceProperties(device.into_param().abi(), propertycount, ::core::mem::transmute(pointerproperties.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPointerDeviceRects(device: P0, pointerdevicerect: *mut super::super::super::Foundation::RECT, displayrect: *mut super::super::super::Foundation::RECT) -> super::super::super::Foundation::BOOL +pub unsafe fn GetPointerDeviceRects(device: P0, pointerdevicerect: *mut super::super::super::Foundation::RECT, displayrect: *mut super::super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetPointerDeviceRects(device : super::super::super::Foundation:: HANDLE, pointerdevicerect : *mut super::super::super::Foundation:: RECT, displayrect : *mut super::super::super::Foundation:: RECT) -> super::super::super::Foundation:: BOOL); - GetPointerDeviceRects(device.into_param().abi(), pointerdevicerect, displayrect) + GetPointerDeviceRects(device.into_param().abi(), pointerdevicerect, displayrect).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetPointerDevices(devicecount: *mut u32, pointerdevices: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerDevices(devicecount: *mut u32, pointerdevices: ::core::option::Option<*mut super::super::Controls::POINTER_DEVICE_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerDevices(devicecount : *mut u32, pointerdevices : *mut super::super::Controls:: POINTER_DEVICE_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerDevices(devicecount, ::core::mem::transmute(pointerdevices.unwrap_or(::std::ptr::null_mut()))) + GetPointerDevices(devicecount, ::core::mem::transmute(pointerdevices.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFrameInfo(pointerid: u32, pointercount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFrameInfo(pointerid: u32, pointercount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFrameInfo(pointerid : u32, pointercount : *mut u32, pointerinfo : *mut POINTER_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFrameInfo(pointerid, pointercount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFrameInfo(pointerid, pointercount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFrameInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFrameInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFrameInfoHistory(pointerid : u32, entriescount : *mut u32, pointercount : *mut u32, pointerinfo : *mut POINTER_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFrameInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFrameInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFramePenInfo(pointerid: u32, pointercount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFramePenInfo(pointerid: u32, pointercount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFramePenInfo(pointerid : u32, pointercount : *mut u32, peninfo : *mut POINTER_PEN_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFramePenInfo(pointerid, pointercount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFramePenInfo(pointerid, pointercount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFramePenInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFramePenInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFramePenInfoHistory(pointerid : u32, entriescount : *mut u32, pointercount : *mut u32, peninfo : *mut POINTER_PEN_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFramePenInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFramePenInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFrameTouchInfo(pointerid: u32, pointercount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFrameTouchInfo(pointerid: u32, pointercount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFrameTouchInfo(pointerid : u32, pointercount : *mut u32, touchinfo : *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFrameTouchInfo(pointerid, pointercount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFrameTouchInfo(pointerid, pointercount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerFrameTouchInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerFrameTouchInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerFrameTouchInfoHistory(pointerid : u32, entriescount : *mut u32, pointercount : *mut u32, touchinfo : *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerFrameTouchInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerFrameTouchInfoHistory(pointerid, entriescount, pointercount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerInfo(pointerid: u32, pointerinfo: *mut POINTER_INFO) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerInfo(pointerid: u32, pointerinfo: *mut POINTER_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerInfo(pointerid : u32, pointerinfo : *mut POINTER_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerInfo(pointerid, pointerinfo) + GetPointerInfo(pointerid, pointerinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerInfoHistory(pointerid: u32, entriescount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerInfoHistory(pointerid: u32, entriescount: *mut u32, pointerinfo: ::core::option::Option<*mut POINTER_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerInfoHistory(pointerid : u32, entriescount : *mut u32, pointerinfo : *mut POINTER_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerInfoHistory(pointerid, entriescount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerInfoHistory(pointerid, entriescount, ::core::mem::transmute(pointerinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerInputTransform(pointerid : u32, historycount : u32, inputtransform : *mut INPUT_TRANSFORM) -> super::super::super::Foundation:: BOOL); - GetPointerInputTransform(pointerid, inputtransform.len() as _, ::core::mem::transmute(inputtransform.as_ptr())) + GetPointerInputTransform(pointerid, inputtransform.len() as _, ::core::mem::transmute(inputtransform.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerPenInfo(pointerid: u32, peninfo: *mut POINTER_PEN_INFO) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerPenInfo(pointerid: u32, peninfo: *mut POINTER_PEN_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerPenInfo(pointerid : u32, peninfo : *mut POINTER_PEN_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerPenInfo(pointerid, peninfo) + GetPointerPenInfo(pointerid, peninfo).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerPenInfoHistory(pointerid: u32, entriescount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerPenInfoHistory(pointerid: u32, entriescount: *mut u32, peninfo: ::core::option::Option<*mut POINTER_PEN_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerPenInfoHistory(pointerid : u32, entriescount : *mut u32, peninfo : *mut POINTER_PEN_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerPenInfoHistory(pointerid, entriescount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerPenInfoHistory(pointerid, entriescount, ::core::mem::transmute(peninfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerTouchInfo(pointerid: u32, touchinfo: *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerTouchInfo(pointerid: u32, touchinfo: *mut POINTER_TOUCH_INFO) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerTouchInfo(pointerid : u32, touchinfo : *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerTouchInfo(pointerid, touchinfo) + GetPointerTouchInfo(pointerid, touchinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerTouchInfoHistory(pointerid: u32, entriescount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerTouchInfoHistory(pointerid: u32, entriescount: *mut u32, touchinfo: ::core::option::Option<*mut POINTER_TOUCH_INFO>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerTouchInfoHistory(pointerid : u32, entriescount : *mut u32, touchinfo : *mut POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - GetPointerTouchInfoHistory(pointerid, entriescount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))) + GetPointerTouchInfoHistory(pointerid, entriescount, ::core::mem::transmute(touchinfo.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn GetPointerType(pointerid: u32, pointertype: *mut super::super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetPointerType(pointerid: u32, pointertype: *mut super::super::WindowsAndMessaging::POINTER_INPUT_TYPE) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPointerType(pointerid : u32, pointertype : *mut super::super::WindowsAndMessaging:: POINTER_INPUT_TYPE) -> super::super::super::Foundation:: BOOL); - GetPointerType(pointerid, pointertype) + GetPointerType(pointerid, pointertype).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls"))] #[inline] -pub unsafe fn GetRawPointerDeviceData(pointerid: u32, historycount: u32, pproperties: &[super::super::Controls::POINTER_DEVICE_PROPERTY], pvalues: *mut i32) -> super::super::super::Foundation::BOOL { +pub unsafe fn GetRawPointerDeviceData(pointerid: u32, historycount: u32, pproperties: &[super::super::Controls::POINTER_DEVICE_PROPERTY], pvalues: *mut i32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetRawPointerDeviceData(pointerid : u32, historycount : u32, propertiescount : u32, pproperties : *const super::super::Controls:: POINTER_DEVICE_PROPERTY, pvalues : *mut i32) -> super::super::super::Foundation:: BOOL); - GetRawPointerDeviceData(pointerid, historycount, pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr()), pvalues) + GetRawPointerDeviceData(pointerid, historycount, pproperties.len() as _, ::core::mem::transmute(pproperties.as_ptr()), pvalues).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`*"] #[inline] @@ -176,26 +176,26 @@ pub unsafe fn GetUnpredictedMessagePos() -> u32 { #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InitializeTouchInjection(maxcount: u32, dwmode: TOUCH_FEEDBACK_MODE) -> super::super::super::Foundation::BOOL { +pub unsafe fn InitializeTouchInjection(maxcount: u32, dwmode: TOUCH_FEEDBACK_MODE) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn InitializeTouchInjection(maxcount : u32, dwmode : TOUCH_FEEDBACK_MODE) -> super::super::super::Foundation:: BOOL); - InitializeTouchInjection(maxcount, dwmode) + InitializeTouchInjection(maxcount, dwmode).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_Controls\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn InjectSyntheticPointerInput(device: P0, pointerinfo: &[super::super::Controls::POINTER_TYPE_INFO]) -> super::super::super::Foundation::BOOL +pub unsafe fn InjectSyntheticPointerInput(device: P0, pointerinfo: &[super::super::Controls::POINTER_TYPE_INFO]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn InjectSyntheticPointerInput(device : super::super::Controls:: HSYNTHETICPOINTERDEVICE, pointerinfo : *const super::super::Controls:: POINTER_TYPE_INFO, count : u32) -> super::super::super::Foundation:: BOOL); - InjectSyntheticPointerInput(device.into_param().abi(), ::core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len() as _) + InjectSyntheticPointerInput(device.into_param().abi(), ::core::mem::transmute(pointerinfo.as_ptr()), pointerinfo.len() as _).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn InjectTouchInput(contacts: &[POINTER_TOUCH_INFO]) -> super::super::super::Foundation::BOOL { +pub unsafe fn InjectTouchInput(contacts: &[POINTER_TOUCH_INFO]) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn InjectTouchInput(count : u32, contacts : *const POINTER_TOUCH_INFO) -> super::super::super::Foundation:: BOOL); - InjectTouchInput(contacts.len() as _, ::core::mem::transmute(contacts.as_ptr())) + InjectTouchInput(contacts.len() as _, ::core::mem::transmute(contacts.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -207,9 +207,9 @@ pub unsafe fn IsMouseInPointerEnabled() -> super::super::super::Foundation::BOOL #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SkipPointerFrameMessages(pointerid: u32) -> super::super::super::Foundation::BOOL { +pub unsafe fn SkipPointerFrameMessages(pointerid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SkipPointerFrameMessages(pointerid : u32) -> super::super::super::Foundation:: BOOL); - SkipPointerFrameMessages(pointerid) + SkipPointerFrameMessages(pointerid).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Pointer\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs index d4a1345846..15101c1ab6 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Touch/mod.rs @@ -1,62 +1,62 @@ #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseGestureInfoHandle(hgestureinfo: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn CloseGestureInfoHandle(hgestureinfo: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CloseGestureInfoHandle(hgestureinfo : HGESTUREINFO) -> super::super::super::Foundation:: BOOL); - CloseGestureInfoHandle(hgestureinfo.into_param().abi()) + CloseGestureInfoHandle(hgestureinfo.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseTouchInputHandle(htouchinput: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn CloseTouchInputHandle(htouchinput: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CloseTouchInputHandle(htouchinput : HTOUCHINPUT) -> super::super::super::Foundation:: BOOL); - CloseTouchInputHandle(htouchinput.into_param().abi()) + CloseTouchInputHandle(htouchinput.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGestureConfig(hwnd: P0, dwreserved: u32, dwflags: u32, pcids: *const u32, pgestureconfig: *mut GESTURECONFIG, cbsize: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn GetGestureConfig(hwnd: P0, dwreserved: u32, dwflags: u32, pcids: *const u32, pgestureconfig: *mut GESTURECONFIG, cbsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetGestureConfig(hwnd : super::super::super::Foundation:: HWND, dwreserved : u32, dwflags : u32, pcids : *const u32, pgestureconfig : *mut GESTURECONFIG, cbsize : u32) -> super::super::super::Foundation:: BOOL); - GetGestureConfig(hwnd.into_param().abi(), dwreserved, dwflags, pcids, pgestureconfig, cbsize) + GetGestureConfig(hwnd.into_param().abi(), dwreserved, dwflags, pcids, pgestureconfig, cbsize).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGestureExtraArgs(hgestureinfo: P0, pextraargs: &mut [u8]) -> super::super::super::Foundation::BOOL +pub unsafe fn GetGestureExtraArgs(hgestureinfo: P0, pextraargs: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetGestureExtraArgs(hgestureinfo : HGESTUREINFO, cbextraargs : u32, pextraargs : *mut u8) -> super::super::super::Foundation:: BOOL); - GetGestureExtraArgs(hgestureinfo.into_param().abi(), pextraargs.len() as _, ::core::mem::transmute(pextraargs.as_ptr())) + GetGestureExtraArgs(hgestureinfo.into_param().abi(), pextraargs.len() as _, ::core::mem::transmute(pextraargs.as_ptr())).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGestureInfo(hgestureinfo: P0, pgestureinfo: *mut GESTUREINFO) -> super::super::super::Foundation::BOOL +pub unsafe fn GetGestureInfo(hgestureinfo: P0, pgestureinfo: *mut GESTUREINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetGestureInfo(hgestureinfo : HGESTUREINFO, pgestureinfo : *mut GESTUREINFO) -> super::super::super::Foundation:: BOOL); - GetGestureInfo(hgestureinfo.into_param().abi(), pgestureinfo) + GetGestureInfo(hgestureinfo.into_param().abi(), pgestureinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTouchInputInfo(htouchinput: P0, pinputs: &mut [TOUCHINPUT], cbsize: i32) -> super::super::super::Foundation::BOOL +pub unsafe fn GetTouchInputInfo(htouchinput: P0, pinputs: &mut [TOUCHINPUT], cbsize: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetTouchInputInfo(htouchinput : HTOUCHINPUT, cinputs : u32, pinputs : *mut TOUCHINPUT, cbsize : i32) -> super::super::super::Foundation:: BOOL); - GetTouchInputInfo(htouchinput.into_param().abi(), pinputs.len() as _, ::core::mem::transmute(pinputs.as_ptr()), cbsize) + GetTouchInputInfo(htouchinput.into_param().abi(), pinputs.len() as _, ::core::mem::transmute(pinputs.as_ptr()), cbsize).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -71,32 +71,32 @@ where #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterTouchWindow(hwnd: P0, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> super::super::super::Foundation::BOOL +pub unsafe fn RegisterTouchWindow(hwnd: P0, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RegisterTouchWindow(hwnd : super::super::super::Foundation:: HWND, ulflags : REGISTER_TOUCH_WINDOW_FLAGS) -> super::super::super::Foundation:: BOOL); - RegisterTouchWindow(hwnd.into_param().abi(), ulflags) + RegisterTouchWindow(hwnd.into_param().abi(), ulflags).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetGestureConfig(hwnd: P0, dwreserved: u32, pgestureconfig: &[GESTURECONFIG], cbsize: u32) -> super::super::super::Foundation::BOOL +pub unsafe fn SetGestureConfig(hwnd: P0, dwreserved: u32, pgestureconfig: &[GESTURECONFIG], cbsize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetGestureConfig(hwnd : super::super::super::Foundation:: HWND, dwreserved : u32, cids : u32, pgestureconfig : *const GESTURECONFIG, cbsize : u32) -> super::super::super::Foundation:: BOOL); - SetGestureConfig(hwnd.into_param().abi(), dwreserved, pgestureconfig.len() as _, ::core::mem::transmute(pgestureconfig.as_ptr()), cbsize) + SetGestureConfig(hwnd.into_param().abi(), dwreserved, pgestureconfig.len() as _, ::core::mem::transmute(pgestureconfig.as_ptr()), cbsize).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterTouchWindow(hwnd: P0) -> super::super::super::Foundation::BOOL +pub unsafe fn UnregisterTouchWindow(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterTouchWindow(hwnd : super::super::super::Foundation:: HWND) -> super::super::super::Foundation:: BOOL); - UnregisterTouchWindow(hwnd.into_param().abi()) + UnregisterTouchWindow(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Input_Touch\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs index 061ed28548..2f4d5a5479 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -29,9 +29,9 @@ pub unsafe fn GetCIMSSM(inputmessagesource: *mut INPUT_MESSAGE_SOURCE) -> super: #[doc = "*Required features: `\"Win32_UI_Input\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCurrentInputMessageSource(inputmessagesource: *mut INPUT_MESSAGE_SOURCE) -> super::super::Foundation::BOOL { +pub unsafe fn GetCurrentInputMessageSource(inputmessagesource: *mut INPUT_MESSAGE_SOURCE) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetCurrentInputMessageSource(inputmessagesource : *mut INPUT_MESSAGE_SOURCE) -> super::super::Foundation:: BOOL); - GetCurrentInputMessageSource(inputmessagesource) + GetCurrentInputMessageSource(inputmessagesource).ok() } #[doc = "*Required features: `\"Win32_UI_Input\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -86,9 +86,9 @@ pub unsafe fn GetRegisteredRawInputDevices(prawinputdevices: ::core::option::Opt #[doc = "*Required features: `\"Win32_UI_Input\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RegisterRawInputDevices(prawinputdevices: &[RAWINPUTDEVICE], cbsize: u32) -> super::super::Foundation::BOOL { +pub unsafe fn RegisterRawInputDevices(prawinputdevices: &[RAWINPUTDEVICE], cbsize: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn RegisterRawInputDevices(prawinputdevices : *const RAWINPUTDEVICE, uinumdevices : u32, cbsize : u32) -> super::super::Foundation:: BOOL); - RegisterRawInputDevices(::core::mem::transmute(prawinputdevices.as_ptr()), prawinputdevices.len() as _, cbsize) + RegisterRawInputDevices(::core::mem::transmute(prawinputdevices.as_ptr()), prawinputdevices.len() as _, cbsize).ok() } #[doc = "*Required features: `\"Win32_UI_Input\"`*"] #[repr(transparent)] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs index bfaa6f1ded..82800fe657 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Magnification/mod.rs @@ -113,12 +113,12 @@ where #[doc = "*Required features: `\"Win32_UI_Magnification\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MagSetInputTransform(fenabled: P0, prectsource: *const super::super::Foundation::RECT, prectdest: *const super::super::Foundation::RECT) -> super::super::Foundation::BOOL +pub unsafe fn MagSetInputTransform(fenabled: P0, prectsource: *const super::super::Foundation::RECT, prectdest: *const super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("magnification.dll" "system" fn MagSetInputTransform(fenabled : super::super::Foundation:: BOOL, prectsource : *const super::super::Foundation:: RECT, prectdest : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MagSetInputTransform(fenabled.into_param().abi(), prectsource, prectdest) + MagSetInputTransform(fenabled.into_param().abi(), prectsource, prectdest).ok() } #[doc = "*Required features: `\"Win32_UI_Magnification\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs index d2d65b873b..4c78a14b89 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -292,26 +292,26 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteProfileA(lpsidstring: P0, lpprofilepath: P1, lpcomputername: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeleteProfileA(lpsidstring: P0, lpprofilepath: P1, lpcomputername: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("userenv.dll" "system" fn DeleteProfileA(lpsidstring : ::windows_core::PCSTR, lpprofilepath : ::windows_core::PCSTR, lpcomputername : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - DeleteProfileA(lpsidstring.into_param().abi(), lpprofilepath.into_param().abi(), lpcomputername.into_param().abi()) + DeleteProfileA(lpsidstring.into_param().abi(), lpprofilepath.into_param().abi(), lpcomputername.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteProfileW(lpsidstring: P0, lpprofilepath: P1, lpcomputername: P2) -> super::super::Foundation::BOOL +pub unsafe fn DeleteProfileW(lpsidstring: P0, lpprofilepath: P1, lpcomputername: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("userenv.dll" "system" fn DeleteProfileW(lpsidstring : ::windows_core::PCWSTR, lpprofilepath : ::windows_core::PCWSTR, lpcomputername : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - DeleteProfileW(lpsidstring.into_param().abi(), lpprofilepath.into_param().abi(), lpcomputername.into_param().abi()) + DeleteProfileW(lpsidstring.into_param().abi(), lpprofilepath.into_param().abi(), lpcomputername.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -509,16 +509,16 @@ pub unsafe fn GetAcceptLanguagesW(pszlanguages: ::windows_core::PWSTR, pcchlangu #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAllUsersProfileDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetAllUsersProfileDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetAllUsersProfileDirectoryA(lpprofiledir : ::windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetAllUsersProfileDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize) + GetAllUsersProfileDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAllUsersProfileDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetAllUsersProfileDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetAllUsersProfileDirectoryW(lpprofiledir : ::windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetAllUsersProfileDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize) + GetAllUsersProfileDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -530,16 +530,16 @@ pub unsafe fn GetCurrentProcessExplicitAppUserModelID() -> ::windows_core::Resul #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDefaultUserProfileDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetDefaultUserProfileDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetDefaultUserProfileDirectoryA(lpprofiledir : ::windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultUserProfileDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize) + GetDefaultUserProfileDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetDefaultUserProfileDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetDefaultUserProfileDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetDefaultUserProfileDirectoryW(lpprofiledir : ::windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetDefaultUserProfileDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize) + GetDefaultUserProfileDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -584,23 +584,23 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProfileType(dwflags: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProfileType(dwflags: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetProfileType(dwflags : *mut u32) -> super::super::Foundation:: BOOL); - GetProfileType(dwflags) + GetProfileType(dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProfilesDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProfilesDirectoryA(lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetProfilesDirectoryA(lpprofiledir : ::windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetProfilesDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize) + GetProfilesDirectoryA(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProfilesDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProfilesDirectoryW(lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("userenv.dll" "system" fn GetProfilesDirectoryW(lpprofiledir : ::windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetProfilesDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize) + GetProfilesDirectoryW(::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_UI_Shell_Common\"`*"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -623,22 +623,22 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserProfileDirectoryA(htoken: P0, lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetUserProfileDirectoryA(htoken: P0, lpprofiledir: ::windows_core::PSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn GetUserProfileDirectoryA(htoken : super::super::Foundation:: HANDLE, lpprofiledir : ::windows_core::PSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetUserProfileDirectoryA(htoken.into_param().abi(), ::core::mem::transmute(lpprofiledir), lpcchsize) + GetUserProfileDirectoryA(htoken.into_param().abi(), ::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetUserProfileDirectoryW(htoken: P0, lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetUserProfileDirectoryW(htoken: P0, lpprofiledir: ::windows_core::PWSTR, lpcchsize: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn GetUserProfileDirectoryW(htoken : super::super::Foundation:: HANDLE, lpprofiledir : ::windows_core::PWSTR, lpcchsize : *mut u32) -> super::super::Foundation:: BOOL); - GetUserProfileDirectoryW(htoken.into_param().abi(), ::core::mem::transmute(lpprofiledir), lpcchsize) + GetUserProfileDirectoryW(htoken.into_param().abi(), ::core::mem::transmute(lpprofiledir), lpcchsize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1437,22 +1437,22 @@ pub unsafe fn IsUserAnAdmin() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LoadUserProfileA(htoken: P0, lpprofileinfo: *mut PROFILEINFOA) -> super::super::Foundation::BOOL +pub unsafe fn LoadUserProfileA(htoken: P0, lpprofileinfo: *mut PROFILEINFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn LoadUserProfileA(htoken : super::super::Foundation:: HANDLE, lpprofileinfo : *mut PROFILEINFOA) -> super::super::Foundation:: BOOL); - LoadUserProfileA(htoken.into_param().abi(), lpprofileinfo) + LoadUserProfileA(htoken.into_param().abi(), lpprofileinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LoadUserProfileW(htoken: P0, lpprofileinfo: *mut PROFILEINFOW) -> super::super::Foundation::BOOL +pub unsafe fn LoadUserProfileW(htoken: P0, lpprofileinfo: *mut PROFILEINFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn LoadUserProfileW(htoken : super::super::Foundation:: HANDLE, lpprofileinfo : *mut PROFILEINFOW) -> super::super::Foundation:: BOOL); - LoadUserProfileW(htoken.into_param().abi(), lpprofileinfo) + LoadUserProfileW(htoken.into_param().abi(), lpprofileinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Com\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Com"))] @@ -1584,22 +1584,22 @@ pub unsafe fn PathBuildRootW(pszroot: &mut [u16; 4], idrive: i32) -> ::windows_c #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PathCanonicalizeA(pszbuf: &mut [u8; 260], pszpath: P0) -> super::super::Foundation::BOOL +pub unsafe fn PathCanonicalizeA(pszbuf: &mut [u8; 260], pszpath: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathCanonicalizeA(pszbuf : ::windows_core::PSTR, pszpath : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - PathCanonicalizeA(::core::mem::transmute(pszbuf.as_ptr()), pszpath.into_param().abi()) + PathCanonicalizeA(::core::mem::transmute(pszbuf.as_ptr()), pszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PathCanonicalizeW(pszbuf: &mut [u16; 260], pszpath: P0) -> super::super::Foundation::BOOL +pub unsafe fn PathCanonicalizeW(pszbuf: &mut [u16; 260], pszpath: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathCanonicalizeW(pszbuf : ::windows_core::PWSTR, pszpath : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - PathCanonicalizeW(::core::mem::transmute(pszbuf.as_ptr()), pszpath.into_param().abi()) + PathCanonicalizeW(::core::mem::transmute(pszbuf.as_ptr()), pszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -1872,22 +1872,22 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PathFileExistsA(pszpath: P0) -> super::super::Foundation::BOOL +pub unsafe fn PathFileExistsA(pszpath: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathFileExistsA(pszpath : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - PathFileExistsA(pszpath.into_param().abi()) + PathFileExistsA(pszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PathFileExistsW(pszpath: P0) -> super::super::Foundation::BOOL +pub unsafe fn PathFileExistsW(pszpath: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn PathFileExistsW(pszpath : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - PathFileExistsW(pszpath.into_param().abi()) + PathFileExistsW(pszpath.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -3114,26 +3114,26 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHCopyKeyA(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHCopyKeyA(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHCopyKeyA(hkeysrc : super::super::System::Registry:: HKEY, pszsrcsubkey : ::windows_core::PCSTR, hkeydest : super::super::System::Registry:: HKEY, freserved : u32) -> super::super::Foundation:: WIN32_ERROR); - SHCopyKeyA(hkeysrc.into_param().abi(), pszsrcsubkey.into_param().abi(), hkeydest.into_param().abi(), freserved) + SHCopyKeyA(hkeysrc.into_param().abi(), pszsrcsubkey.into_param().abi(), hkeydest.into_param().abi(), freserved).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHCopyKeyW(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHCopyKeyW(hkeysrc: P0, pszsrcsubkey: P1, hkeydest: P2, freserved: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHCopyKeyW(hkeysrc : super::super::System::Registry:: HKEY, pszsrcsubkey : ::windows_core::PCWSTR, hkeydest : super::super::System::Registry:: HKEY, freserved : u32) -> super::super::Foundation:: WIN32_ERROR); - SHCopyKeyW(hkeysrc.into_param().abi(), pszsrcsubkey.into_param().abi(), hkeydest.into_param().abi(), freserved) + SHCopyKeyW(hkeysrc.into_param().abi(), pszsrcsubkey.into_param().abi(), hkeydest.into_param().abi(), freserved).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -3303,9 +3303,9 @@ pub unsafe fn SHCreateMemStream(pinit: ::core::option::Option<&[u8]>) -> ::core: #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_Security\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Security", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn SHCreateProcessAsUserW(pscpi: *mut SHCREATEPROCESSINFOW) -> super::super::Foundation::BOOL { +pub unsafe fn SHCreateProcessAsUserW(pscpi: *mut SHCREATEPROCESSINFOW) -> ::windows_core::Result<()> { ::windows_targets::link!("shell32.dll" "system" fn SHCreateProcessAsUserW(pscpi : *mut SHCREATEPROCESSINFOW) -> super::super::Foundation:: BOOL); - SHCreateProcessAsUserW(pscpi) + SHCreateProcessAsUserW(pscpi).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -3451,9 +3451,9 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn SHCreateThread(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: ::core::option::Option<*const ::core::ffi::c_void>, flags: u32, pfncallback: super::super::System::Threading::LPTHREAD_START_ROUTINE) -> super::super::Foundation::BOOL { +pub unsafe fn SHCreateThread(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: ::core::option::Option<*const ::core::ffi::c_void>, flags: u32, pfncallback: super::super::System::Threading::LPTHREAD_START_ROUTINE) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHCreateThread(pfnthreadproc : super::super::System::Threading:: LPTHREAD_START_ROUTINE, pdata : *const ::core::ffi::c_void, flags : u32, pfncallback : super::super::System::Threading:: LPTHREAD_START_ROUTINE) -> super::super::Foundation:: BOOL); - SHCreateThread(pfnthreadproc, ::core::mem::transmute(pdata.unwrap_or(::std::ptr::null())), flags, pfncallback) + SHCreateThread(pfnthreadproc, ::core::mem::transmute(pdata.unwrap_or(::std::ptr::null())), flags, pfncallback).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -3464,9 +3464,9 @@ pub unsafe fn SHCreateThreadRef(pcref: *mut i32, ppunk: *mut ::core::option::Opt #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Threading\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Threading"))] #[inline] -pub unsafe fn SHCreateThreadWithHandle(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: ::core::option::Option<*const ::core::ffi::c_void>, flags: u32, pfncallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, phandle: ::core::option::Option<*mut super::super::Foundation::HANDLE>) -> super::super::Foundation::BOOL { +pub unsafe fn SHCreateThreadWithHandle(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: ::core::option::Option<*const ::core::ffi::c_void>, flags: u32, pfncallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, phandle: ::core::option::Option<*mut super::super::Foundation::HANDLE>) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHCreateThreadWithHandle(pfnthreadproc : super::super::System::Threading:: LPTHREAD_START_ROUTINE, pdata : *const ::core::ffi::c_void, flags : u32, pfncallback : super::super::System::Threading:: LPTHREAD_START_ROUTINE, phandle : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SHCreateThreadWithHandle(pfnthreadproc, ::core::mem::transmute(pdata.unwrap_or(::std::ptr::null())), flags, pfncallback, ::core::mem::transmute(phandle.unwrap_or(::std::ptr::null_mut()))) + SHCreateThreadWithHandle(pfnthreadproc, ::core::mem::transmute(pdata.unwrap_or(::std::ptr::null())), flags, pfncallback, ::core::mem::transmute(phandle.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -3491,70 +3491,70 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteEmptyKeyA(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteEmptyKeyA(hkey: P0, pszsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteEmptyKeyA(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteEmptyKeyA(hkey.into_param().abi(), pszsubkey.into_param().abi()) + SHDeleteEmptyKeyA(hkey.into_param().abi(), pszsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteEmptyKeyW(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteEmptyKeyW(hkey: P0, pszsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteEmptyKeyW(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteEmptyKeyW(hkey.into_param().abi(), pszsubkey.into_param().abi()) + SHDeleteEmptyKeyW(hkey.into_param().abi(), pszsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteKeyA(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteKeyA(hkey: P0, pszsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteKeyA(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteKeyA(hkey.into_param().abi(), pszsubkey.into_param().abi()) + SHDeleteKeyA(hkey.into_param().abi(), pszsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteKeyW(hkey: P0, pszsubkey: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteKeyW(hkey: P0, pszsubkey: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteKeyW(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteKeyW(hkey.into_param().abi(), pszsubkey.into_param().abi()) + SHDeleteKeyW(hkey.into_param().abi(), pszsubkey.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteValueA(hkey: P0, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteValueA(hkey: P0, pszsubkey: P1, pszvalue: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCSTR, pszvalue : ::windows_core::PCSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi()) + SHDeleteValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHDeleteValueW(hkey: P0, pszsubkey: P1, pszvalue: P2) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHDeleteValueW(hkey: P0, pszsubkey: P1, pszvalue: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHDeleteValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCWSTR, pszvalue : ::windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - SHDeleteValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi()) + SHDeleteValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -3603,42 +3603,42 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHEnumKeyExA(hkey: P0, dwindex: u32, pszname: ::windows_core::PSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHEnumKeyExA(hkey: P0, dwindex: u32, pszname: ::windows_core::PSTR, pcchname: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHEnumKeyExA(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszname : ::windows_core::PSTR, pcchname : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumKeyExA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszname), pcchname) + SHEnumKeyExA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszname), pcchname).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHEnumKeyExW(hkey: P0, dwindex: u32, pszname: ::windows_core::PWSTR, pcchname: *mut u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHEnumKeyExW(hkey: P0, dwindex: u32, pszname: ::windows_core::PWSTR, pcchname: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHEnumKeyExW(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszname : ::windows_core::PWSTR, pcchname : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumKeyExW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszname), pcchname) + SHEnumKeyExW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszname), pcchname).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHEnumValueA(hkey: P0, dwindex: u32, pszvaluename: ::windows_core::PSTR, pcchvaluename: ::core::option::Option<*mut u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHEnumValueA(hkey: P0, dwindex: u32, pszvaluename: ::windows_core::PSTR, pcchvaluename: ::core::option::Option<*mut u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHEnumValueA(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszvaluename : ::windows_core::PSTR, pcchvaluename : *mut u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumValueA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszvaluename), ::core::mem::transmute(pcchvaluename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHEnumValueA(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszvaluename), ::core::mem::transmute(pcchvaluename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHEnumValueW(hkey: P0, dwindex: u32, pszvaluename: ::windows_core::PWSTR, pcchvaluename: ::core::option::Option<*mut u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHEnumValueW(hkey: P0, dwindex: u32, pszvaluename: ::windows_core::PWSTR, pcchvaluename: ::core::option::Option<*mut u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHEnumValueW(hkey : super::super::System::Registry:: HKEY, dwindex : u32, pszvaluename : ::windows_core::PWSTR, pcchvaluename : *mut u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHEnumValueW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszvaluename), ::core::mem::transmute(pcchvaluename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHEnumValueW(hkey.into_param().abi(), dwindex, ::core::mem::transmute(pszvaluename), ::core::mem::transmute(pcchvaluename.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -3740,12 +3740,12 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHFreeShared(hdata: P0, dwprocessid: u32) -> super::super::Foundation::BOOL +pub unsafe fn SHFreeShared(hdata: P0, dwprocessid: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHFreeShared(hdata : super::super::Foundation:: HANDLE, dwprocessid : u32) -> super::super::Foundation:: BOOL); - SHFreeShared(hdata.into_param().abi(), dwprocessid) + SHFreeShared(hdata.into_param().abi(), dwprocessid).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_System_Com\"`*"] #[cfg(feature = "Win32_System_Com")] @@ -4177,26 +4177,26 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHGetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCSTR, pszvalue : ::windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHGetValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHGetValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHGetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCWSTR, pszvalue : ::windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHGetValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHGetValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_UI_Shell_Common\"`*"] #[cfg(feature = "Win32_UI_Shell_Common")] @@ -4503,22 +4503,22 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHQueryInfoKeyA(hkey: P0, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryInfoKeyA(hkey: P0, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHQueryInfoKeyA(hkey : super::super::System::Registry:: HKEY, pcsubkeys : *mut u32, pcchmaxsubkeylen : *mut u32, pcvalues : *mut u32, pcchmaxvaluenamelen : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHQueryInfoKeyA(hkey.into_param().abi(), ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut()))) + SHQueryInfoKeyA(hkey.into_param().abi(), ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHQueryInfoKeyW(hkey: P0, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryInfoKeyW(hkey: P0, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHQueryInfoKeyW(hkey : super::super::System::Registry:: HKEY, pcsubkeys : *mut u32, pcchmaxsubkeylen : *mut u32, pcvalues : *mut u32, pcchmaxvaluenamelen : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHQueryInfoKeyW(hkey.into_param().abi(), ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut()))) + SHQueryInfoKeyW(hkey.into_param().abi(), ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -4548,91 +4548,91 @@ pub unsafe fn SHQueryUserNotificationState() -> ::windows_core::Result(hkey: P0, pszvalue: P1, pdwreserved: ::core::option::Option<*const u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryValueExA(hkey: P0, pszvalue: P1, pdwreserved: ::core::option::Option<*const u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHQueryValueExA(hkey : super::super::System::Registry:: HKEY, pszvalue : ::windows_core::PCSTR, pdwreserved : *const u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHQueryValueExA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHQueryValueExA(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHQueryValueExW(hkey: P0, pszvalue: P1, pdwreserved: ::core::option::Option<*const u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHQueryValueExW(hkey: P0, pszvalue: P1, pdwreserved: ::core::option::Option<*const u32>, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHQueryValueExW(hkey : super::super::System::Registry:: HKEY, pszvalue : ::windows_core::PCWSTR, pdwreserved : *const u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHQueryValueExW(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHQueryValueExW(hkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwreserved.unwrap_or(::std::ptr::null())), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegCloseUSKey(huskey: isize) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegCloseUSKey(huskey: isize) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegCloseUSKey(huskey : isize) -> super::super::Foundation:: WIN32_ERROR); - SHRegCloseUSKey(huskey) + SHRegCloseUSKey(huskey).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegCreateUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegCreateUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegCreateUSKeyA(pszpath : ::windows_core::PCSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegCreateUSKeyA(pszpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, dwflags) + SHRegCreateUSKeyA(pszpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegCreateUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegCreateUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegCreateUSKeyW(pwzpath : ::windows_core::PCWSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegCreateUSKeyW(pwzpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, dwflags) + SHRegCreateUSKeyW(pwzpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegDeleteEmptyUSKeyA(huskey: isize, pszsubkey: P0, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegDeleteEmptyUSKeyA(huskey: isize, pszsubkey: P0, delregflags: SHREGDEL_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegDeleteEmptyUSKeyA(huskey : isize, pszsubkey : ::windows_core::PCSTR, delregflags : SHREGDEL_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegDeleteEmptyUSKeyA(huskey, pszsubkey.into_param().abi(), delregflags) + SHRegDeleteEmptyUSKeyA(huskey, pszsubkey.into_param().abi(), delregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegDeleteEmptyUSKeyW(huskey: isize, pwzsubkey: P0, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegDeleteEmptyUSKeyW(huskey: isize, pwzsubkey: P0, delregflags: SHREGDEL_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegDeleteEmptyUSKeyW(huskey : isize, pwzsubkey : ::windows_core::PCWSTR, delregflags : SHREGDEL_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegDeleteEmptyUSKeyW(huskey, pwzsubkey.into_param().abi(), delregflags) + SHRegDeleteEmptyUSKeyW(huskey, pwzsubkey.into_param().abi(), delregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegDeleteUSValueA(huskey: isize, pszvalue: P0, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegDeleteUSValueA(huskey: isize, pszvalue: P0, delregflags: SHREGDEL_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegDeleteUSValueA(huskey : isize, pszvalue : ::windows_core::PCSTR, delregflags : SHREGDEL_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegDeleteUSValueA(huskey, pszvalue.into_param().abi(), delregflags) + SHRegDeleteUSValueA(huskey, pszvalue.into_param().abi(), delregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegDeleteUSValueW(huskey: isize, pwzvalue: P0, delregflags: SHREGDEL_FLAGS) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegDeleteUSValueW(huskey: isize, pwzvalue: P0, delregflags: SHREGDEL_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegDeleteUSValueW(huskey : isize, pwzvalue : ::windows_core::PCWSTR, delregflags : SHREGDEL_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegDeleteUSValueW(huskey, pwzvalue.into_param().abi(), delregflags) + SHRegDeleteUSValueW(huskey, pwzvalue.into_param().abi(), delregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_System_Registry\"`*"] #[cfg(feature = "Win32_System_Registry")] @@ -4647,30 +4647,30 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegEnumUSKeyA(huskey: isize, dwindex: u32, pszname: ::windows_core::PSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegEnumUSKeyA(huskey: isize, dwindex: u32, pszname: ::windows_core::PSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSKeyA(huskey : isize, dwindex : u32, pszname : ::windows_core::PSTR, pcchname : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegEnumUSKeyA(huskey, dwindex, ::core::mem::transmute(pszname), pcchname, enumregflags) + SHRegEnumUSKeyA(huskey, dwindex, ::core::mem::transmute(pszname), pcchname, enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegEnumUSKeyW(huskey: isize, dwindex: u32, pwzname: ::windows_core::PWSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegEnumUSKeyW(huskey: isize, dwindex: u32, pwzname: ::windows_core::PWSTR, pcchname: *mut u32, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSKeyW(huskey : isize, dwindex : u32, pwzname : ::windows_core::PWSTR, pcchname : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegEnumUSKeyW(huskey, dwindex, ::core::mem::transmute(pwzname), pcchname, enumregflags) + SHRegEnumUSKeyW(huskey, dwindex, ::core::mem::transmute(pwzname), pcchname, enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegEnumUSValueA(huskey: isize, dwindex: u32, pszvaluename: ::windows_core::PSTR, pcchvaluename: *mut u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegEnumUSValueA(huskey: isize, dwindex: u32, pszvaluename: ::windows_core::PSTR, pcchvaluename: *mut u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSValueA(huskey : isize, dwindex : u32, pszvaluename : ::windows_core::PSTR, pcchvaluename : *mut u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegEnumUSValueA(huskey, dwindex, ::core::mem::transmute(pszvaluename), pcchvaluename, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), enumregflags) + SHRegEnumUSValueA(huskey, dwindex, ::core::mem::transmute(pszvaluename), pcchvaluename, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegEnumUSValueW(huskey: isize, dwindex: u32, pszvaluename: ::windows_core::PWSTR, pcchvaluename: *mut u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegEnumUSValueW(huskey: isize, dwindex: u32, pszvaluename: ::windows_core::PWSTR, pcchvaluename: *mut u32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegEnumUSValueW(huskey : isize, dwindex : u32, pszvaluename : ::windows_core::PWSTR, pcchvaluename : *mut u32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegEnumUSValueW(huskey, dwindex, ::core::mem::transmute(pszvaluename), pcchvaluename, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), enumregflags) + SHRegEnumUSValueW(huskey, dwindex, ::core::mem::transmute(pszvaluename), pcchvaluename, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -4701,159 +4701,159 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegGetIntW(hk: P0, pwzkey: P1, idefault: i32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetIntW(hk: P0, pwzkey: P1, idefault: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetIntW(hk : super::super::System::Registry:: HKEY, pwzkey : ::windows_core::PCWSTR, idefault : i32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetIntW(hk.into_param().abi(), pwzkey.into_param().abi(), idefault) + SHRegGetIntW(hk.into_param().abi(), pwzkey.into_param().abi(), idefault).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegGetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u8; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u8; 260], dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetPathA(hkey : super::super::System::Registry:: HKEY, pcszsubkey : ::windows_core::PCSTR, pcszvalue : ::windows_core::PCSTR, pszpath : ::windows_core::PSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetPathA(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), dwflags) + SHRegGetPathA(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegGetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u16; 260], dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pszpath: &mut [u16; 260], dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetPathW(hkey : super::super::System::Registry:: HKEY, pcszsubkey : ::windows_core::PCWSTR, pcszvalue : ::windows_core::PCWSTR, pszpath : ::windows_core::PWSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetPathW(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), dwflags) + SHRegGetPathW(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), ::core::mem::transmute(pszpath.as_ptr()), dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegGetUSValueA(pszsubkey: P0, pszvalue: P1, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P2, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetUSValueA(pszsubkey: P0, pszvalue: P1, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P2, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetUSValueA(pszsubkey : ::windows_core::PCSTR, pszvalue : ::windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const ::core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetUSValueA(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize) + SHRegGetUSValueA(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegGetUSValueW(pszsubkey: P0, pszvalue: P1, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P2, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetUSValueW(pszsubkey: P0, pszvalue: P1, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P2, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetUSValueW(pszsubkey : ::windows_core::PCWSTR, pszvalue : ::windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const ::core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetUSValueW(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize) + SHRegGetUSValueW(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetValueA(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCSTR, pszvalue : ::windows_core::PCSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHRegGetValueA(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegGetValueFromHKCUHKLM(pwszkey: P0, pwszvalue: P1, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetValueFromHKCUHKLM(pwszkey: P0, pwszvalue: P1, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueFromHKCUHKLM(pwszkey : ::windows_core::PCWSTR, pwszvalue : ::windows_core::PCWSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetValueFromHKCUHKLM(pwszkey.into_param().abi(), pwszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHRegGetValueFromHKCUHKLM(pwszkey.into_param().abi(), pwszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegGetValueW(hkey: P0, pszsubkey: P1, pszvalue: P2, srrfflags: i32, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegGetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : ::windows_core::PCWSTR, pszvalue : ::windows_core::PCWSTR, srrfflags : i32, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegGetValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))) + SHRegGetValueW(hkey.into_param().abi(), pszsubkey.into_param().abi(), pszvalue.into_param().abi(), srrfflags, ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyA(pszpath : ::windows_core::PCSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyA(pszpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, fignorehkcu.into_param().abi()) + SHRegOpenUSKeyA(pszpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, fignorehkcu.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P1) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegOpenUSKeyW(pwzpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegOpenUSKeyW(pwzpath : ::windows_core::PCWSTR, samdesired : u32, hrelativeuskey : isize, phnewuskey : *mut isize, fignorehkcu : super::super::Foundation:: BOOL) -> super::super::Foundation:: WIN32_ERROR); - SHRegOpenUSKeyW(pwzpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, fignorehkcu.into_param().abi()) + SHRegOpenUSKeyW(pwzpath.into_param().abi(), samdesired, hrelativeuskey, phnewuskey, fignorehkcu.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegQueryInfoUSKeyA(huskey: isize, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegQueryInfoUSKeyA(huskey: isize, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryInfoUSKeyA(huskey : isize, pcsubkeys : *mut u32, pcchmaxsubkeylen : *mut u32, pcvalues : *mut u32, pcchmaxvaluenamelen : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryInfoUSKeyA(huskey, ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut())), enumregflags) + SHRegQueryInfoUSKeyA(huskey, ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut())), enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegQueryInfoUSKeyW(huskey: isize, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { +pub unsafe fn SHRegQueryInfoUSKeyW(huskey: isize, pcsubkeys: ::core::option::Option<*mut u32>, pcchmaxsubkeylen: ::core::option::Option<*mut u32>, pcvalues: ::core::option::Option<*mut u32>, pcchmaxvaluenamelen: ::core::option::Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryInfoUSKeyW(huskey : isize, pcsubkeys : *mut u32, pcchmaxsubkeylen : *mut u32, pcvalues : *mut u32, pcchmaxvaluenamelen : *mut u32, enumregflags : SHREGENUM_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryInfoUSKeyW(huskey, ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut())), enumregflags) + SHRegQueryInfoUSKeyW(huskey, ::core::mem::transmute(pcsubkeys.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxsubkeylen.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcvalues.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(::std::ptr::null_mut())), enumregflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P0, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P0, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueA(huskey : isize, pszvalue : ::windows_core::PCSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const ::core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryUSValueA(huskey, pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize) + SHRegQueryUSValueA(huskey, pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P0, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P0, pdwtype: ::core::option::Option<*mut u32>, pvdata: ::core::option::Option<*mut ::core::ffi::c_void>, pcbdata: ::core::option::Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: ::core::option::Option<*const ::core::ffi::c_void>, dwdefaultdatasize: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegQueryUSValueW(huskey : isize, pszvalue : ::windows_core::PCWSTR, pdwtype : *mut u32, pvdata : *mut ::core::ffi::c_void, pcbdata : *mut u32, fignorehkcu : super::super::Foundation:: BOOL, pvdefaultdata : *const ::core::ffi::c_void, dwdefaultdatasize : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegQueryUSValueW(huskey, pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize) + SHRegQueryUSValueW(huskey, pszvalue.into_param().abi(), ::core::mem::transmute(pdwtype.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pcbdata.unwrap_or(::std::ptr::null_mut())), fignorehkcu.into_param().abi(), ::core::mem::transmute(pvdefaultdata.unwrap_or(::std::ptr::null())), dwdefaultdatasize).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegSetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetPathA(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, @@ -4861,12 +4861,12 @@ where P3: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegSetPathA(hkey : super::super::System::Registry:: HKEY, pcszsubkey : ::windows_core::PCSTR, pcszvalue : ::windows_core::PCSTR, pcszpath : ::windows_core::PCSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetPathA(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), pcszpath.into_param().abi(), dwflags) + SHRegSetPathA(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), pcszpath.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn SHRegSetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetPathW(hkey: P0, pcszsubkey: P1, pcszvalue: P2, pcszpath: P3, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, @@ -4874,49 +4874,49 @@ where P3: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegSetPathW(hkey : super::super::System::Registry:: HKEY, pcszsubkey : ::windows_core::PCWSTR, pcszvalue : ::windows_core::PCWSTR, pcszpath : ::windows_core::PCWSTR, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetPathW(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), pcszpath.into_param().abi(), dwflags) + SHRegSetPathW(hkey.into_param().abi(), pcszsubkey.into_param().abi(), pcszvalue.into_param().abi(), pcszpath.into_param().abi(), dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegSetUSValueA(pszsubkey: P0, pszvalue: P1, dwtype: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetUSValueA(pszsubkey: P0, pszvalue: P1, dwtype: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegSetUSValueA(pszsubkey : ::windows_core::PCSTR, pszvalue : ::windows_core::PCSTR, dwtype : u32, pvdata : *const ::core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetUSValueA(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), dwtype, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null())), cbdata, dwflags) + SHRegSetUSValueA(pszsubkey.into_param().abi(), pszvalue.into_param().abi(), dwtype, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null())), cbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegSetUSValueW(pwzsubkey: P0, pwzvalue: P1, dwtype: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegSetUSValueW(pwzsubkey: P0, pwzvalue: P1, dwtype: u32, pvdata: ::core::option::Option<*const ::core::ffi::c_void>, cbdata: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegSetUSValueW(pwzsubkey : ::windows_core::PCWSTR, pwzvalue : ::windows_core::PCWSTR, dwtype : u32, pvdata : *const ::core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegSetUSValueW(pwzsubkey.into_param().abi(), pwzvalue.into_param().abi(), dwtype, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null())), cbdata, dwflags) + SHRegSetUSValueW(pwzsubkey.into_param().abi(), pwzvalue.into_param().abi(), dwtype, ::core::mem::transmute(pvdata.unwrap_or(::std::ptr::null())), cbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegWriteUSValueA(huskey: isize, pszvalue: P0, dwtype: u32, pvdata: *const ::core::ffi::c_void, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegWriteUSValueA(huskey: isize, pszvalue: P0, dwtype: u32, pvdata: *const ::core::ffi::c_void, cbdata: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegWriteUSValueA(huskey : isize, pszvalue : ::windows_core::PCSTR, dwtype : u32, pvdata : *const ::core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegWriteUSValueA(huskey, pszvalue.into_param().abi(), dwtype, pvdata, cbdata, dwflags) + SHRegWriteUSValueA(huskey, pszvalue.into_param().abi(), dwtype, pvdata, cbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHRegWriteUSValueW(huskey: isize, pwzvalue: P0, dwtype: u32, pvdata: *const ::core::ffi::c_void, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR +pub unsafe fn SHRegWriteUSValueW(huskey: isize, pwzvalue: P0, dwtype: u32, pvdata: *const ::core::ffi::c_void, cbdata: u32, dwflags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("shlwapi.dll" "system" fn SHRegWriteUSValueW(huskey : isize, pwzvalue : ::windows_core::PCWSTR, dwtype : u32, pvdata : *const ::core::ffi::c_void, cbdata : u32, dwflags : u32) -> super::super::Foundation:: WIN32_ERROR); - SHRegWriteUSValueW(huskey, pwzvalue.into_param().abi(), dwtype, pvdata, cbdata, dwflags) + SHRegWriteUSValueW(huskey, pwzvalue.into_param().abi(), dwtype, pvdata, cbdata, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -5216,9 +5216,9 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SHUnlockShared(pvdata: *const ::core::ffi::c_void) -> super::super::Foundation::BOOL { +pub unsafe fn SHUnlockShared(pvdata: *const ::core::ffi::c_void) -> ::windows_core::Result<()> { ::windows_targets::link!("shlwapi.dll" "system" fn SHUnlockShared(pvdata : *const ::core::ffi::c_void) -> super::super::Foundation:: BOOL); - SHUnlockShared(pvdata) + SHUnlockShared(pvdata).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -5260,22 +5260,22 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] -pub unsafe fn SetMenuContextHelpId(param0: P0, param1: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuContextHelpId(param0: P0, param1: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuContextHelpId(param0 : super::WindowsAndMessaging:: HMENU, param1 : u32) -> super::super::Foundation:: BOOL); - SetMenuContextHelpId(param0.into_param().abi(), param1) + SetMenuContextHelpId(param0.into_param().abi(), param1).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowContextHelpId(param0: P0, param1: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowContextHelpId(param0: P0, param1: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetWindowContextHelpId(param0 : super::super::Foundation:: HWND, param1 : u32) -> super::super::Foundation:: BOOL); - SetWindowContextHelpId(param0.into_param().abi(), param1) + SetWindowContextHelpId(param0.into_param().abi(), param1).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -5330,16 +5330,16 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ShellExecuteExA(pexecinfo: *mut SHELLEXECUTEINFOA) -> super::super::Foundation::BOOL { +pub unsafe fn ShellExecuteExA(pexecinfo: *mut SHELLEXECUTEINFOA) -> ::windows_core::Result<()> { ::windows_targets::link!("shell32.dll" "system" fn ShellExecuteExA(pexecinfo : *mut SHELLEXECUTEINFOA) -> super::super::Foundation:: BOOL); - ShellExecuteExA(pexecinfo) + ShellExecuteExA(pexecinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_System_Registry\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_System_Registry"))] #[inline] -pub unsafe fn ShellExecuteExW(pexecinfo: *mut SHELLEXECUTEINFOW) -> super::super::Foundation::BOOL { +pub unsafe fn ShellExecuteExW(pexecinfo: *mut SHELLEXECUTEINFOW) -> ::windows_core::Result<()> { ::windows_targets::link!("shell32.dll" "system" fn ShellExecuteExW(pexecinfo : *mut SHELLEXECUTEINFOW) -> super::super::Foundation:: BOOL); - ShellExecuteExW(pexecinfo) + ShellExecuteExW(pexecinfo).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`, `\"Win32_UI_WindowsAndMessaging\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_UI_WindowsAndMessaging"))] @@ -6163,13 +6163,13 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnloadUserProfile(htoken: P0, hprofile: P1) -> super::super::Foundation::BOOL +pub unsafe fn UnloadUserProfile(htoken: P0, hprofile: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("userenv.dll" "system" fn UnloadUserProfile(htoken : super::super::Foundation:: HANDLE, hprofile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - UnloadUserProfile(htoken.into_param().abi(), hprofile.into_param().abi()) + UnloadUserProfile(htoken.into_param().abi(), hprofile.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`*"] #[inline] @@ -6459,24 +6459,24 @@ where #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHelpA(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> super::super::Foundation::BOOL +pub unsafe fn WinHelpA(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn WinHelpA(hwndmain : super::super::Foundation:: HWND, lpszhelp : ::windows_core::PCSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: BOOL); - WinHelpA(hwndmain.into_param().abi(), lpszhelp.into_param().abi(), ucommand, dwdata) + WinHelpA(hwndmain.into_param().abi(), lpszhelp.into_param().abi(), ucommand, dwdata).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WinHelpW(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> super::super::Foundation::BOOL +pub unsafe fn WinHelpW(hwndmain: P0, lpszhelp: P1, ucommand: u32, dwdata: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn WinHelpW(hwndmain : super::super::Foundation:: HWND, lpszhelp : ::windows_core::PCWSTR, ucommand : u32, dwdata : usize) -> super::super::Foundation:: BOOL); - WinHelpW(hwndmain.into_param().abi(), lpszhelp.into_param().abi(), ucommand, dwdata) + WinHelpW(hwndmain.into_param().abi(), lpszhelp.into_param().abi(), ucommand, dwdata).ok() } #[doc = "*Required features: `\"Win32_UI_Shell\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs index 2d8ca10907..eb4b50e437 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -1,39 +1,39 @@ #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AdjustWindowRect(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P0) -> super::super::Foundation::BOOL +pub unsafe fn AdjustWindowRect(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn AdjustWindowRect(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - AdjustWindowRect(lprect, dwstyle, bmenu.into_param().abi()) + AdjustWindowRect(lprect, dwstyle, bmenu.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AdjustWindowRectEx(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P0, dwexstyle: WINDOW_EX_STYLE) -> super::super::Foundation::BOOL +pub unsafe fn AdjustWindowRectEx(lprect: *mut super::super::Foundation::RECT, dwstyle: WINDOW_STYLE, bmenu: P0, dwexstyle: WINDOW_EX_STYLE) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn AdjustWindowRectEx(lprect : *mut super::super::Foundation:: RECT, dwstyle : WINDOW_STYLE, bmenu : super::super::Foundation:: BOOL, dwexstyle : WINDOW_EX_STYLE) -> super::super::Foundation:: BOOL); - AdjustWindowRectEx(lprect, dwstyle, bmenu.into_param().abi(), dwexstyle) + AdjustWindowRectEx(lprect, dwstyle, bmenu.into_param().abi(), dwexstyle).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AllowSetForegroundWindow(dwprocessid: u32) -> super::super::Foundation::BOOL { +pub unsafe fn AllowSetForegroundWindow(dwprocessid: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn AllowSetForegroundWindow(dwprocessid : u32) -> super::super::Foundation:: BOOL); - AllowSetForegroundWindow(dwprocessid) + AllowSetForegroundWindow(dwprocessid).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AnimateWindow(hwnd: P0, dwtime: u32, dwflags: ANIMATE_WINDOW_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn AnimateWindow(hwnd: P0, dwtime: u32, dwflags: ANIMATE_WINDOW_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn AnimateWindow(hwnd : super::super::Foundation:: HWND, dwtime : u32, dwflags : ANIMATE_WINDOW_FLAGS) -> super::super::Foundation:: BOOL); - AnimateWindow(hwnd.into_param().abi(), dwtime, dwflags) + AnimateWindow(hwnd.into_param().abi(), dwtime, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -45,24 +45,24 @@ pub unsafe fn AnyPopup() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppendMenuA(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn AppendMenuA(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn AppendMenuA(hmenu : HMENU, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - AppendMenuA(hmenu.into_param().abi(), uflags, uidnewitem, lpnewitem.into_param().abi()) + AppendMenuA(hmenu.into_param().abi(), uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn AppendMenuW(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn AppendMenuW(hmenu: P0, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn AppendMenuW(hmenu : HMENU, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - AppendMenuW(hmenu.into_param().abi(), uflags, uidnewitem, lpnewitem.into_param().abi()) + AppendMenuW(hmenu.into_param().abi(), uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -84,19 +84,19 @@ pub unsafe fn BeginDeferWindowPos(nnumwindows: i32) -> ::windows_core::Result(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn BringWindowToTop(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn BringWindowToTop(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - BringWindowToTop(hwnd.into_param().abi()) + BringWindowToTop(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CalculatePopupWindowPosition(anchorpoint: *const super::super::Foundation::POINT, windowsize: *const super::super::Foundation::SIZE, flags: u32, excluderect: ::core::option::Option<*const super::super::Foundation::RECT>, popupwindowposition: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { +pub unsafe fn CalculatePopupWindowPosition(anchorpoint: *const super::super::Foundation::POINT, windowsize: *const super::super::Foundation::SIZE, flags: u32, excluderect: ::core::option::Option<*const super::super::Foundation::RECT>, popupwindowposition: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn CalculatePopupWindowPosition(anchorpoint : *const super::super::Foundation:: POINT, windowsize : *const super::super::Foundation:: SIZE, flags : u32, excluderect : *const super::super::Foundation:: RECT, popupwindowposition : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - CalculatePopupWindowPosition(anchorpoint, windowsize, flags, ::core::mem::transmute(excluderect.unwrap_or(::std::ptr::null())), popupwindowposition) + CalculatePopupWindowPosition(anchorpoint, windowsize, flags, ::core::mem::transmute(excluderect.unwrap_or(::std::ptr::null())), popupwindowposition).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -190,19 +190,19 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ChangeWindowMessageFilter(message: u32, dwflag: CHANGE_WINDOW_MESSAGE_FILTER_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn ChangeWindowMessageFilter(message: u32, dwflag: CHANGE_WINDOW_MESSAGE_FILTER_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn ChangeWindowMessageFilter(message : u32, dwflag : CHANGE_WINDOW_MESSAGE_FILTER_FLAGS) -> super::super::Foundation:: BOOL); - ChangeWindowMessageFilter(message, dwflag) + ChangeWindowMessageFilter(message, dwflag).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ChangeWindowMessageFilterEx(hwnd: P0, message: u32, action: WINDOW_MESSAGE_FILTER_ACTION, pchangefilterstruct: ::core::option::Option<*mut CHANGEFILTERSTRUCT>) -> super::super::Foundation::BOOL +pub unsafe fn ChangeWindowMessageFilterEx(hwnd: P0, message: u32, action: WINDOW_MESSAGE_FILTER_ACTION, pchangefilterstruct: ::core::option::Option<*mut CHANGEFILTERSTRUCT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ChangeWindowMessageFilterEx(hwnd : super::super::Foundation:: HWND, message : u32, action : WINDOW_MESSAGE_FILTER_ACTION, pchangefilterstruct : *mut CHANGEFILTERSTRUCT) -> super::super::Foundation:: BOOL); - ChangeWindowMessageFilterEx(hwnd.into_param().abi(), message, action, ::core::mem::transmute(pchangefilterstruct.unwrap_or(::std::ptr::null_mut()))) + ChangeWindowMessageFilterEx(hwnd.into_param().abi(), message, action, ::core::mem::transmute(pchangefilterstruct.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -288,42 +288,42 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CharToOemA(psrc: P0, pdst: ::windows_core::PSTR) -> super::super::Foundation::BOOL +pub unsafe fn CharToOemA(psrc: P0, pdst: ::windows_core::PSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemA(psrc : ::windows_core::PCSTR, pdst : ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - CharToOemA(psrc.into_param().abi(), ::core::mem::transmute(pdst)) + CharToOemA(psrc.into_param().abi(), ::core::mem::transmute(pdst)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CharToOemBuffA(lpszsrc: P0, lpszdst: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn CharToOemBuffA(lpszsrc: P0, lpszdst: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemBuffA(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - CharToOemBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _) + CharToOemBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CharToOemBuffW(lpszsrc: P0, lpszdst: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn CharToOemBuffW(lpszsrc: P0, lpszdst: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemBuffW(lpszsrc : ::windows_core::PCWSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - CharToOemBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _) + CharToOemBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CharToOemW(psrc: P0, pdst: ::windows_core::PSTR) -> super::super::Foundation::BOOL +pub unsafe fn CharToOemW(psrc: P0, pdst: ::windows_core::PSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn CharToOemW(psrc : ::windows_core::PCWSTR, pdst : ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - CharToOemW(psrc.into_param().abi(), ::core::mem::transmute(pdst)) + CharToOemW(psrc.into_param().abi(), ::core::mem::transmute(pdst)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -361,12 +361,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CheckMenuRadioItem(hmenu: P0, first: u32, last: u32, check: u32, flags: u32) -> super::super::Foundation::BOOL +pub unsafe fn CheckMenuRadioItem(hmenu: P0, first: u32, last: u32, check: u32, flags: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CheckMenuRadioItem(hmenu : HMENU, first : u32, last : u32, check : u32, flags : u32) -> super::super::Foundation:: BOOL); - CheckMenuRadioItem(hmenu.into_param().abi(), first, last, check, flags) + CheckMenuRadioItem(hmenu.into_param().abi(), first, last, check, flags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -391,19 +391,19 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ClipCursor(lprect: ::core::option::Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL { +pub unsafe fn ClipCursor(lprect: ::core::option::Option<*const super::super::Foundation::RECT>) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn ClipCursor(lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - ClipCursor(::core::mem::transmute(lprect.unwrap_or(::std::ptr::null()))) + ClipCursor(::core::mem::transmute(lprect.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn CloseWindow(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn CloseWindow(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CloseWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - CloseWindow(hwnd.into_param().abi()) + CloseWindow(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -461,13 +461,13 @@ pub unsafe fn CreateAcceleratorTableW(paccel: &[ACCEL]) -> ::windows_core::Resul #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn CreateCaret(hwnd: P0, hbitmap: P1, nwidth: i32, nheight: i32) -> super::super::Foundation::BOOL +pub unsafe fn CreateCaret(hwnd: P0, hbitmap: P1, nwidth: i32, nheight: i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn CreateCaret(hwnd : super::super::Foundation:: HWND, hbitmap : super::super::Graphics::Gdi:: HBITMAP, nwidth : i32, nheight : i32) -> super::super::Foundation:: BOOL); - CreateCaret(hwnd.into_param().abi(), hbitmap.into_param().abi(), nwidth, nheight) + CreateCaret(hwnd.into_param().abi(), hbitmap.into_param().abi(), nwidth, nheight).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -765,12 +765,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DeleteMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn DeleteMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DeleteMenu(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS) -> super::super::Foundation:: BOOL); - DeleteMenu(hmenu.into_param().abi(), uposition, uflags) + DeleteMenu(hmenu.into_param().abi(), uposition, uflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -795,29 +795,29 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyCaret() -> super::super::Foundation::BOOL { +pub unsafe fn DestroyCaret() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn DestroyCaret() -> super::super::Foundation:: BOOL); - DestroyCaret() + DestroyCaret().ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyCursor(hcursor: P0) -> super::super::Foundation::BOOL +pub unsafe fn DestroyCursor(hcursor: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DestroyCursor(hcursor : HCURSOR) -> super::super::Foundation:: BOOL); - DestroyCursor(hcursor.into_param().abi()) + DestroyCursor(hcursor.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyIcon(hicon: P0) -> super::super::Foundation::BOOL +pub unsafe fn DestroyIcon(hicon: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DestroyIcon(hicon : HICON) -> super::super::Foundation:: BOOL); - DestroyIcon(hicon.into_param().abi()) + DestroyIcon(hicon.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -831,12 +831,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyMenu(hmenu: P0) -> super::super::Foundation::BOOL +pub unsafe fn DestroyMenu(hmenu: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DestroyMenu(hmenu : HMENU) -> super::super::Foundation:: BOOL); - DestroyMenu(hmenu.into_param().abi()) + DestroyMenu(hmenu.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -847,12 +847,12 @@ pub unsafe fn DestroyResourceIndexer(resourceindexer: ::core::option::Option<*co #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DestroyWindow(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn DestroyWindow(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DestroyWindow(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - DestroyWindow(hwnd.into_param().abi()) + DestroyWindow(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -939,35 +939,35 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn DrawIcon(hdc: P0, x: i32, y: i32, hicon: P1) -> super::super::Foundation::BOOL +pub unsafe fn DrawIcon(hdc: P0, x: i32, y: i32, hicon: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawIcon(hdc : super::super::Graphics::Gdi:: HDC, x : i32, y : i32, hicon : HICON) -> super::super::Foundation:: BOOL); - DrawIcon(hdc.into_param().abi(), x, y, hicon.into_param().abi()) + DrawIcon(hdc.into_param().abi(), x, y, hicon.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn DrawIconEx(hdc: P0, xleft: i32, ytop: i32, hicon: P1, cxwidth: i32, cywidth: i32, istepifanicur: u32, hbrflickerfreedraw: P2, diflags: DI_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn DrawIconEx(hdc: P0, xleft: i32, ytop: i32, hicon: P1, cxwidth: i32, cywidth: i32, istepifanicur: u32, hbrflickerfreedraw: P2, diflags: DI_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawIconEx(hdc : super::super::Graphics::Gdi:: HDC, xleft : i32, ytop : i32, hicon : HICON, cxwidth : i32, cywidth : i32, istepifanicur : u32, hbrflickerfreedraw : super::super::Graphics::Gdi:: HBRUSH, diflags : DI_FLAGS) -> super::super::Foundation:: BOOL); - DrawIconEx(hdc.into_param().abi(), xleft, ytop, hicon.into_param().abi(), cxwidth, cywidth, istepifanicur, hbrflickerfreedraw.into_param().abi(), diflags) + DrawIconEx(hdc.into_param().abi(), xleft, ytop, hicon.into_param().abi(), cxwidth, cywidth, istepifanicur, hbrflickerfreedraw.into_param().abi(), diflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn DrawMenuBar(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn DrawMenuBar(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn DrawMenuBar(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - DrawMenuBar(hwnd.into_param().abi()) + DrawMenuBar(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -982,29 +982,29 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EndDeferWindowPos(hwinposinfo: P0) -> super::super::Foundation::BOOL +pub unsafe fn EndDeferWindowPos(hwinposinfo: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EndDeferWindowPos(hwinposinfo : HDWP) -> super::super::Foundation:: BOOL); - EndDeferWindowPos(hwinposinfo.into_param().abi()) + EndDeferWindowPos(hwinposinfo.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EndDialog(hdlg: P0, nresult: isize) -> super::super::Foundation::BOOL +pub unsafe fn EndDialog(hdlg: P0, nresult: isize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EndDialog(hdlg : super::super::Foundation:: HWND, nresult : isize) -> super::super::Foundation:: BOOL); - EndDialog(hdlg.into_param().abi(), nresult) + EndDialog(hdlg.into_param().abi(), nresult).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EndMenu() -> super::super::Foundation::BOOL { +pub unsafe fn EndMenu() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn EndMenu() -> super::super::Foundation:: BOOL); - EndMenu() + EndMenu().ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1072,12 +1072,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn EnumWindows(lpenumfunc: WNDENUMPROC, lparam: P0) -> super::super::Foundation::BOOL +pub unsafe fn EnumWindows(lpenumfunc: WNDENUMPROC, lparam: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn EnumWindows(lpenumfunc : WNDENUMPROC, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumWindows(lpenumfunc, lparam.into_param().abi()) + EnumWindows(lpenumfunc, lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1148,22 +1148,22 @@ pub unsafe fn FlashWindowEx(pfwi: *const FLASHWINFO) -> super::super::Foundation #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAltTabInfoA(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: ::core::option::Option<&mut [u8]>) -> super::super::Foundation::BOOL +pub unsafe fn GetAltTabInfoA(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: ::core::option::Option<&mut [u8]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetAltTabInfoA(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : ::windows_core::PSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoA(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)) + GetAltTabInfoA(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetAltTabInfoW(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: ::core::option::Option<&mut [u16]>) -> super::super::Foundation::BOOL +pub unsafe fn GetAltTabInfoW(hwnd: P0, iitem: i32, pati: *mut ALTTABINFO, pszitemtext: ::core::option::Option<&mut [u16]>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetAltTabInfoW(hwnd : super::super::Foundation:: HWND, iitem : i32, pati : *mut ALTTABINFO, pszitemtext : ::windows_core::PWSTR, cchitemtext : u32) -> super::super::Foundation:: BOOL); - GetAltTabInfoW(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)) + GetAltTabInfoW(hwnd.into_param().abi(), iitem, pati, ::core::mem::transmute(pszitemtext.as_deref().map_or(::core::ptr::null(), |slice| slice.as_ptr())), pszitemtext.as_deref().map_or(0, |slice| slice.len() as _)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1184,53 +1184,53 @@ pub unsafe fn GetCaretBlinkTime() -> u32 { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCaretPos(lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { +pub unsafe fn GetCaretPos(lppoint: *mut super::super::Foundation::POINT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetCaretPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetCaretPos(lppoint) + GetCaretPos(lppoint).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetClassInfoA(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSA) -> super::super::Foundation::BOOL +pub unsafe fn GetClassInfoA(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn GetClassInfoA(hinstance : super::super::Foundation:: HMODULE, lpclassname : ::windows_core::PCSTR, lpwndclass : *mut WNDCLASSA) -> super::super::Foundation:: BOOL); - GetClassInfoA(hinstance.into_param().abi(), lpclassname.into_param().abi(), lpwndclass) + GetClassInfoA(hinstance.into_param().abi(), lpclassname.into_param().abi(), lpwndclass).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetClassInfoExA(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXA) -> super::super::Foundation::BOOL +pub unsafe fn GetClassInfoExA(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn GetClassInfoExA(hinstance : super::super::Foundation:: HMODULE, lpszclass : ::windows_core::PCSTR, lpwcx : *mut WNDCLASSEXA) -> super::super::Foundation:: BOOL); - GetClassInfoExA(hinstance.into_param().abi(), lpszclass.into_param().abi(), lpwcx) + GetClassInfoExA(hinstance.into_param().abi(), lpszclass.into_param().abi(), lpwcx).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetClassInfoExW(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXW) -> super::super::Foundation::BOOL +pub unsafe fn GetClassInfoExW(hinstance: P0, lpszclass: P1, lpwcx: *mut WNDCLASSEXW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn GetClassInfoExW(hinstance : super::super::Foundation:: HMODULE, lpszclass : ::windows_core::PCWSTR, lpwcx : *mut WNDCLASSEXW) -> super::super::Foundation:: BOOL); - GetClassInfoExW(hinstance.into_param().abi(), lpszclass.into_param().abi(), lpwcx) + GetClassInfoExW(hinstance.into_param().abi(), lpszclass.into_param().abi(), lpwcx).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetClassInfoW(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSW) -> super::super::Foundation::BOOL +pub unsafe fn GetClassInfoW(hinstance: P0, lpclassname: P1, lpwndclass: *mut WNDCLASSW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn GetClassInfoW(hinstance : super::super::Foundation:: HMODULE, lpclassname : ::windows_core::PCWSTR, lpwndclass : *mut WNDCLASSW) -> super::super::Foundation:: BOOL); - GetClassInfoW(hinstance.into_param().abi(), lpclassname.into_param().abi(), lpwndclass) + GetClassInfoW(hinstance.into_param().abi(), lpclassname.into_param().abi(), lpwndclass).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1307,19 +1307,19 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetClientRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL +pub unsafe fn GetClientRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetClientRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetClientRect(hwnd.into_param().abi(), lprect) + GetClientRect(hwnd.into_param().abi(), lprect).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetClipCursor(lprect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL { +pub unsafe fn GetClipCursor(lprect: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetClipCursor(lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetClipCursor(lprect) + GetClipCursor(lprect).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -1330,16 +1330,16 @@ pub unsafe fn GetCursor() -> HCURSOR { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCursorInfo(pci: *mut CURSORINFO) -> super::super::Foundation::BOOL { +pub unsafe fn GetCursorInfo(pci: *mut CURSORINFO) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetCursorInfo(pci : *mut CURSORINFO) -> super::super::Foundation:: BOOL); - GetCursorInfo(pci) + GetCursorInfo(pci).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetCursorPos(lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { +pub unsafe fn GetCursorPos(lppoint: *mut super::super::Foundation::POINT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetCursorPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetCursorPos(lppoint) + GetCursorPos(lppoint).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1415,19 +1415,19 @@ pub unsafe fn GetForegroundWindow() -> super::super::Foundation::HWND { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetGUIThreadInfo(idthread: u32, pgui: *mut GUITHREADINFO) -> super::super::Foundation::BOOL { +pub unsafe fn GetGUIThreadInfo(idthread: u32, pgui: *mut GUITHREADINFO) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetGUIThreadInfo(idthread : u32, pgui : *mut GUITHREADINFO) -> super::super::Foundation:: BOOL); - GetGUIThreadInfo(idthread, pgui) + GetGUIThreadInfo(idthread, pgui).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetIconInfo(hicon: P0, piconinfo: *mut ICONINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetIconInfo(hicon: P0, piconinfo: *mut ICONINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetIconInfo(hicon : HICON, piconinfo : *mut ICONINFO) -> super::super::Foundation:: BOOL); - GetIconInfo(hicon.into_param().abi(), piconinfo) + GetIconInfo(hicon.into_param().abi(), piconinfo).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -1469,12 +1469,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetLayeredWindowAttributes(hwnd: P0, pcrkey: ::core::option::Option<*mut super::super::Foundation::COLORREF>, pbalpha: ::core::option::Option<*mut u8>, pdwflags: ::core::option::Option<*mut LAYERED_WINDOW_ATTRIBUTES_FLAGS>) -> super::super::Foundation::BOOL +pub unsafe fn GetLayeredWindowAttributes(hwnd: P0, pcrkey: ::core::option::Option<*mut super::super::Foundation::COLORREF>, pbalpha: ::core::option::Option<*mut u8>, pdwflags: ::core::option::Option<*mut LAYERED_WINDOW_ATTRIBUTES_FLAGS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetLayeredWindowAttributes(hwnd : super::super::Foundation:: HWND, pcrkey : *mut super::super::Foundation:: COLORREF, pbalpha : *mut u8, pdwflags : *mut LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> super::super::Foundation:: BOOL); - GetLayeredWindowAttributes(hwnd.into_param().abi(), ::core::mem::transmute(pcrkey.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbalpha.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))) + GetLayeredWindowAttributes(hwnd.into_param().abi(), ::core::mem::transmute(pcrkey.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pbalpha.unwrap_or(::std::ptr::null_mut())), ::core::mem::transmute(pdwflags.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1489,12 +1489,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetMenuBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, iditem: i32, pmbi: *mut MENUBARINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetMenuBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, iditem: i32, pmbi: *mut MENUBARINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuBarInfo(hwnd : super::super::Foundation:: HWND, idobject : OBJECT_IDENTIFIER, iditem : i32, pmbi : *mut MENUBARINFO) -> super::super::Foundation:: BOOL); - GetMenuBarInfo(hwnd.into_param().abi(), idobject, iditem, pmbi) + GetMenuBarInfo(hwnd.into_param().abi(), idobject, iditem, pmbi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -1514,12 +1514,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetMenuInfo(param0: P0, param1: *mut MENUINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetMenuInfo(param0: P0, param1: *mut MENUINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuInfo(param0 : HMENU, param1 : *mut MENUINFO) -> super::super::Foundation:: BOOL); - GetMenuInfo(param0.into_param().abi(), param1) + GetMenuInfo(param0.into_param().abi(), param1).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -1542,35 +1542,35 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetMenuItemInfoA(hmenu: P0, item: u32, fbyposition: P1, lpmii: *mut MENUITEMINFOA) -> super::super::Foundation::BOOL +pub unsafe fn GetMenuItemInfoA(hmenu: P0, item: u32, fbyposition: P1, lpmii: *mut MENUITEMINFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOA) -> super::super::Foundation:: BOOL); - GetMenuItemInfoA(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmii) + GetMenuItemInfoA(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmii).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn GetMenuItemInfoW(hmenu: P0, item: u32, fbyposition: P1, lpmii: *mut MENUITEMINFOW) -> super::super::Foundation::BOOL +pub unsafe fn GetMenuItemInfoW(hmenu: P0, item: u32, fbyposition: P1, lpmii: *mut MENUITEMINFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuItemInfoW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmii : *mut MENUITEMINFOW) -> super::super::Foundation:: BOOL); - GetMenuItemInfoW(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmii) + GetMenuItemInfoW(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmii).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetMenuItemRect(hwnd: P0, hmenu: P1, uitem: u32, lprcitem: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL +pub unsafe fn GetMenuItemRect(hwnd: P0, hmenu: P1, uitem: u32, lprcitem: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetMenuItemRect(hwnd : super::super::Foundation:: HWND, hmenu : HMENU, uitem : u32, lprcitem : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetMenuItemRect(hwnd.into_param().abi(), hmenu.into_param().abi(), uitem, lprcitem) + GetMenuItemRect(hwnd.into_param().abi(), hmenu.into_param().abi(), uitem, lprcitem).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -1675,16 +1675,16 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetPhysicalCursorPos(lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL { +pub unsafe fn GetPhysicalCursorPos(lppoint: *mut super::super::Foundation::POINT) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetPhysicalCursorPos(lppoint : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - GetPhysicalCursorPos(lppoint) + GetPhysicalCursorPos(lppoint).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetProcessDefaultLayout(pdwdefaultlayout: *mut u32) -> super::super::Foundation::BOOL { +pub unsafe fn GetProcessDefaultLayout(pdwdefaultlayout: *mut u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn GetProcessDefaultLayout(pdwdefaultlayout : *mut u32) -> super::super::Foundation:: BOOL); - GetProcessDefaultLayout(pdwdefaultlayout) + GetProcessDefaultLayout(pdwdefaultlayout).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1717,22 +1717,22 @@ pub unsafe fn GetQueueStatus(flags: QUEUE_STATUS_FLAGS) -> u32 { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetScrollBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, psbi: *mut SCROLLBARINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetScrollBarInfo(hwnd: P0, idobject: OBJECT_IDENTIFIER, psbi: *mut SCROLLBARINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetScrollBarInfo(hwnd : super::super::Foundation:: HWND, idobject : OBJECT_IDENTIFIER, psbi : *mut SCROLLBARINFO) -> super::super::Foundation:: BOOL); - GetScrollBarInfo(hwnd.into_param().abi(), idobject, psbi) + GetScrollBarInfo(hwnd.into_param().abi(), idobject, psbi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetScrollInfo(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpsi: *mut SCROLLINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetScrollInfo(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpsi: *mut SCROLLINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetScrollInfo(hwnd : super::super::Foundation:: HWND, nbar : SCROLLBAR_CONSTANTS, lpsi : *mut SCROLLINFO) -> super::super::Foundation:: BOOL); - GetScrollInfo(hwnd.into_param().abi(), nbar, lpsi) + GetScrollInfo(hwnd.into_param().abi(), nbar, lpsi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1747,12 +1747,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetScrollRange(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpminpos: *mut i32, lpmaxpos: *mut i32) -> super::super::Foundation::BOOL +pub unsafe fn GetScrollRange(hwnd: P0, nbar: SCROLLBAR_CONSTANTS, lpminpos: *mut i32, lpmaxpos: *mut i32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetScrollRange(hwnd : super::super::Foundation:: HWND, nbar : SCROLLBAR_CONSTANTS, lpminpos : *mut i32, lpmaxpos : *mut i32) -> super::super::Foundation:: BOOL); - GetScrollRange(hwnd.into_param().abi(), nbar, lpminpos, lpmaxpos) + GetScrollRange(hwnd.into_param().abi(), nbar, lpminpos, lpmaxpos).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1790,12 +1790,12 @@ pub unsafe fn GetSystemMetrics(nindex: SYSTEM_METRICS_INDEX) -> i32 { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetTitleBarInfo(hwnd: P0, pti: *mut TITLEBARINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetTitleBarInfo(hwnd: P0, pti: *mut TITLEBARINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetTitleBarInfo(hwnd : super::super::Foundation:: HWND, pti : *mut TITLEBARINFO) -> super::super::Foundation:: BOOL); - GetTitleBarInfo(hwnd.into_param().abi(), pti) + GetTitleBarInfo(hwnd.into_param().abi(), pti).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1820,22 +1820,22 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWindowDisplayAffinity(hwnd: P0, pdwaffinity: *mut u32) -> super::super::Foundation::BOOL +pub unsafe fn GetWindowDisplayAffinity(hwnd: P0, pdwaffinity: *mut u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowDisplayAffinity(hwnd : super::super::Foundation:: HWND, pdwaffinity : *mut u32) -> super::super::Foundation:: BOOL); - GetWindowDisplayAffinity(hwnd.into_param().abi(), pdwaffinity) + GetWindowDisplayAffinity(hwnd.into_param().abi(), pdwaffinity).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWindowInfo(hwnd: P0, pwi: *mut WINDOWINFO) -> super::super::Foundation::BOOL +pub unsafe fn GetWindowInfo(hwnd: P0, pwi: *mut WINDOWINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowInfo(hwnd : super::super::Foundation:: HWND, pwi : *mut WINDOWINFO) -> super::super::Foundation:: BOOL); - GetWindowInfo(hwnd.into_param().abi(), pwi) + GetWindowInfo(hwnd.into_param().abi(), pwi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1902,22 +1902,22 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWindowPlacement(hwnd: P0, lpwndpl: *mut WINDOWPLACEMENT) -> super::super::Foundation::BOOL +pub unsafe fn GetWindowPlacement(hwnd: P0, lpwndpl: *mut WINDOWPLACEMENT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowPlacement(hwnd : super::super::Foundation:: HWND, lpwndpl : *mut WINDOWPLACEMENT) -> super::super::Foundation:: BOOL); - GetWindowPlacement(hwnd.into_param().abi(), lpwndpl) + GetWindowPlacement(hwnd.into_param().abi(), lpwndpl).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn GetWindowRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL +pub unsafe fn GetWindowRect(hwnd: P0, lprect: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn GetWindowRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - GetWindowRect(hwnd.into_param().abi(), lprect) + GetWindowRect(hwnd.into_param().abi(), lprect).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -1982,12 +1982,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn HideCaret(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn HideCaret(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn HideCaret(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - HideCaret(hwnd.into_param().abi()) + HideCaret(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2036,46 +2036,46 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InsertMenuA(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn InsertMenuA(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn InsertMenuA(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - InsertMenuA(hmenu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()) + InsertMenuA(hmenu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn InsertMenuItemA(hmenu: P0, item: u32, fbyposition: P1, lpmi: *const MENUITEMINFOA) -> super::super::Foundation::BOOL +pub unsafe fn InsertMenuItemA(hmenu: P0, item: u32, fbyposition: P1, lpmi: *const MENUITEMINFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn InsertMenuItemA(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - InsertMenuItemA(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmi) + InsertMenuItemA(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn InsertMenuItemW(hmenu: P0, item: u32, fbyposition: P1, lpmi: *const MENUITEMINFOW) -> super::super::Foundation::BOOL +pub unsafe fn InsertMenuItemW(hmenu: P0, item: u32, fbyposition: P1, lpmi: *const MENUITEMINFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn InsertMenuItemW(hmenu : HMENU, item : u32, fbyposition : super::super::Foundation:: BOOL, lpmi : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - InsertMenuItemW(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmi) + InsertMenuItemW(hmenu.into_param().abi(), item, fbyposition.into_param().abi(), lpmi).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn InsertMenuW(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn InsertMenuW(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn InsertMenuW(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - InsertMenuW(hmenu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()) + InsertMenuW(hmenu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2090,51 +2090,51 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharAlphaA(ch: u8) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharAlphaA(ch: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharAlphaA(ch : u8) -> super::super::Foundation:: BOOL); - IsCharAlphaA(ch) + IsCharAlphaA(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharAlphaNumericA(ch: u8) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharAlphaNumericA(ch: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharAlphaNumericA(ch : u8) -> super::super::Foundation:: BOOL); - IsCharAlphaNumericA(ch) + IsCharAlphaNumericA(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharAlphaNumericW(ch: u16) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharAlphaNumericW(ch: u16) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharAlphaNumericW(ch : u16) -> super::super::Foundation:: BOOL); - IsCharAlphaNumericW(ch) + IsCharAlphaNumericW(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharAlphaW(ch: u16) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharAlphaW(ch: u16) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharAlphaW(ch : u16) -> super::super::Foundation:: BOOL); - IsCharAlphaW(ch) + IsCharAlphaW(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharLowerA(ch: u8) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharLowerA(ch: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharLowerA(ch : u8) -> super::super::Foundation:: BOOL); - IsCharLowerA(ch) + IsCharLowerA(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharUpperA(ch: u8) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharUpperA(ch: u8) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharUpperA(ch : u8) -> super::super::Foundation:: BOOL); - IsCharUpperA(ch) + IsCharUpperA(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn IsCharUpperW(ch: u16) -> super::super::Foundation::BOOL { +pub unsafe fn IsCharUpperW(ch: u16) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn IsCharUpperW(ch : u16) -> super::super::Foundation:: BOOL); - IsCharUpperW(ch) + IsCharUpperW(ch).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2264,12 +2264,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn KillTimer(hwnd: P0, uidevent: usize) -> super::super::Foundation::BOOL +pub unsafe fn KillTimer(hwnd: P0, uidevent: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn KillTimer(hwnd : super::super::Foundation:: HWND, uidevent : usize) -> super::super::Foundation:: BOOL); - KillTimer(hwnd.into_param().abi(), uidevent) + KillTimer(hwnd.into_param().abi(), uidevent).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2448,9 +2448,9 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> super::super::Foundation::BOOL { +pub unsafe fn LockSetForegroundWindow(ulockcode: FOREGROUND_WINDOW_LOCK_CODE) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn LockSetForegroundWindow(ulockcode : FOREGROUND_WINDOW_LOCK_CODE) -> super::super::Foundation:: BOOL); - LockSetForegroundWindow(ulockcode) + LockSetForegroundWindow(ulockcode).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2485,12 +2485,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MapDialogRect(hdlg: P0, lprect: *mut super::super::Foundation::RECT) -> super::super::Foundation::BOOL +pub unsafe fn MapDialogRect(hdlg: P0, lprect: *mut super::super::Foundation::RECT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn MapDialogRect(hdlg : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - MapDialogRect(hdlg.into_param().abi(), lprect) + MapDialogRect(hdlg.into_param().abi(), lprect).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2568,35 +2568,35 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ModifyMenuA(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn ModifyMenuA(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn ModifyMenuA(hmnu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ModifyMenuA(hmnu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()) + ModifyMenuA(hmnu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ModifyMenuW(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> super::super::Foundation::BOOL +pub unsafe fn ModifyMenuW(hmnu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, uidnewitem: usize, lpnewitem: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn ModifyMenuW(hmnu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, uidnewitem : usize, lpnewitem : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - ModifyMenuW(hmnu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()) + ModifyMenuW(hmnu.into_param().abi(), uposition, uflags, uidnewitem, lpnewitem.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn MoveWindow(hwnd: P0, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: P1) -> super::super::Foundation::BOOL +pub unsafe fn MoveWindow(hwnd: P0, x: i32, y: i32, nwidth: i32, nheight: i32, brepaint: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn MoveWindow(hwnd : super::super::Foundation:: HWND, x : i32, y : i32, nwidth : i32, nheight : i32, brepaint : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - MoveWindow(hwnd.into_param().abi(), x, y, nwidth, nheight, brepaint.into_param().abi()) + MoveWindow(hwnd.into_param().abi(), x, y, nwidth, nheight, brepaint.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -2830,52 +2830,52 @@ pub unsafe fn MsgWaitForMultipleObjectsEx(phandles: ::core::option::Option<&[sup #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OemToCharA(psrc: P0, pdst: ::windows_core::PSTR) -> super::super::Foundation::BOOL +pub unsafe fn OemToCharA(psrc: P0, pdst: ::windows_core::PSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharA(psrc : ::windows_core::PCSTR, pdst : ::windows_core::PSTR) -> super::super::Foundation:: BOOL); - OemToCharA(psrc.into_param().abi(), ::core::mem::transmute(pdst)) + OemToCharA(psrc.into_param().abi(), ::core::mem::transmute(pdst)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OemToCharBuffA(lpszsrc: P0, lpszdst: &mut [u8]) -> super::super::Foundation::BOOL +pub unsafe fn OemToCharBuffA(lpszsrc: P0, lpszdst: &mut [u8]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharBuffA(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - OemToCharBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _) + OemToCharBuffA(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OemToCharBuffW(lpszsrc: P0, lpszdst: &mut [u16]) -> super::super::Foundation::BOOL +pub unsafe fn OemToCharBuffW(lpszsrc: P0, lpszdst: &mut [u16]) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharBuffW(lpszsrc : ::windows_core::PCSTR, lpszdst : ::windows_core::PWSTR, cchdstlength : u32) -> super::super::Foundation:: BOOL); - OemToCharBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _) + OemToCharBuffW(lpszsrc.into_param().abi(), ::core::mem::transmute(lpszdst.as_ptr()), lpszdst.len() as _).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OemToCharW(psrc: P0, pdst: ::windows_core::PWSTR) -> super::super::Foundation::BOOL +pub unsafe fn OemToCharW(psrc: P0, pdst: ::windows_core::PWSTR) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn OemToCharW(psrc : ::windows_core::PCSTR, pdst : ::windows_core::PWSTR) -> super::super::Foundation:: BOOL); - OemToCharW(psrc.into_param().abi(), ::core::mem::transmute(pdst)) + OemToCharW(psrc.into_param().abi(), ::core::mem::transmute(pdst)).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn OpenIcon(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn OpenIcon(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn OpenIcon(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - OpenIcon(hwnd.into_param().abi()) + OpenIcon(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -2910,26 +2910,26 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PostMessageA(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::BOOL +pub unsafe fn PostMessageA(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn PostMessageA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostMessageA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()) + PostMessageA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PostMessageW(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::BOOL +pub unsafe fn PostMessageW(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn PostMessageW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostMessageW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()) + PostMessageW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -2940,24 +2940,24 @@ pub unsafe fn PostQuitMessage(nexitcode: i32) { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PostThreadMessageA(idthread: u32, msg: u32, wparam: P0, lparam: P1) -> super::super::Foundation::BOOL +pub unsafe fn PostThreadMessageA(idthread: u32, msg: u32, wparam: P0, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn PostThreadMessageA(idthread : u32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostThreadMessageA(idthread, msg, wparam.into_param().abi(), lparam.into_param().abi()) + PostThreadMessageA(idthread, msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn PostThreadMessageW(idthread: u32, msg: u32, wparam: P0, lparam: P1) -> super::super::Foundation::BOOL +pub unsafe fn PostThreadMessageW(idthread: u32, msg: u32, wparam: P0, lparam: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn PostThreadMessageW(idthread : u32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - PostThreadMessageW(idthread, msg, wparam.into_param().abi(), lparam.into_param().abi()) + PostThreadMessageW(idthread, msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -3082,12 +3082,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn RemoveMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn RemoveMenu(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn RemoveMenu(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS) -> super::super::Foundation:: BOOL); - RemoveMenu(hmenu.into_param().abi(), uposition, uflags) + RemoveMenu(hmenu.into_param().abi(), uposition, uflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3126,23 +3126,23 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn ScrollDC(hdc: P0, dx: i32, dy: i32, lprcscroll: ::core::option::Option<*const super::super::Foundation::RECT>, lprcclip: ::core::option::Option<*const super::super::Foundation::RECT>, hrgnupdate: P1, lprcupdate: ::core::option::Option<*mut super::super::Foundation::RECT>) -> super::super::Foundation::BOOL +pub unsafe fn ScrollDC(hdc: P0, dx: i32, dy: i32, lprcscroll: ::core::option::Option<*const super::super::Foundation::RECT>, lprcclip: ::core::option::Option<*const super::super::Foundation::RECT>, hrgnupdate: P1, lprcupdate: ::core::option::Option<*mut super::super::Foundation::RECT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ScrollDC(hdc : super::super::Graphics::Gdi:: HDC, dx : i32, dy : i32, lprcscroll : *const super::super::Foundation:: RECT, lprcclip : *const super::super::Foundation:: RECT, hrgnupdate : super::super::Graphics::Gdi:: HRGN, lprcupdate : *mut super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - ScrollDC(hdc.into_param().abi(), dx, dy, ::core::mem::transmute(lprcscroll.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lprcclip.unwrap_or(::std::ptr::null())), hrgnupdate.into_param().abi(), ::core::mem::transmute(lprcupdate.unwrap_or(::std::ptr::null_mut()))) + ScrollDC(hdc.into_param().abi(), dx, dy, ::core::mem::transmute(lprcscroll.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lprcclip.unwrap_or(::std::ptr::null())), hrgnupdate.into_param().abi(), ::core::mem::transmute(lprcupdate.unwrap_or(::std::ptr::null_mut()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ScrollWindow(hwnd: P0, xamount: i32, yamount: i32, lprect: ::core::option::Option<*const super::super::Foundation::RECT>, lpcliprect: ::core::option::Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL +pub unsafe fn ScrollWindow(hwnd: P0, xamount: i32, yamount: i32, lprect: ::core::option::Option<*const super::super::Foundation::RECT>, lpcliprect: ::core::option::Option<*const super::super::Foundation::RECT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ScrollWindow(hwnd : super::super::Foundation:: HWND, xamount : i32, yamount : i32, lprect : *const super::super::Foundation:: RECT, lpcliprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - ScrollWindow(hwnd.into_param().abi(), xamount, yamount, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcliprect.unwrap_or(::std::ptr::null()))) + ScrollWindow(hwnd.into_param().abi(), xamount, yamount, ::core::mem::transmute(lprect.unwrap_or(::std::ptr::null())), ::core::mem::transmute(lpcliprect.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -3194,26 +3194,26 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SendMessageCallbackA(hwnd: P0, msg: u32, wparam: P1, lparam: P2, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> super::super::Foundation::BOOL +pub unsafe fn SendMessageCallbackA(hwnd: P0, msg: u32, wparam: P1, lparam: P2, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SendMessageCallbackA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, lpresultcallback : SENDASYNCPROC, dwdata : usize) -> super::super::Foundation:: BOOL); - SendMessageCallbackA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi(), lpresultcallback, dwdata) + SendMessageCallbackA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi(), lpresultcallback, dwdata).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SendMessageCallbackW(hwnd: P0, msg: u32, wparam: P1, lparam: P2, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> super::super::Foundation::BOOL +pub unsafe fn SendMessageCallbackW(hwnd: P0, msg: u32, wparam: P1, lparam: P2, lpresultcallback: SENDASYNCPROC, dwdata: usize) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SendMessageCallbackW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, lpresultcallback : SENDASYNCPROC, dwdata : usize) -> super::super::Foundation:: BOOL); - SendMessageCallbackW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi(), lpresultcallback, dwdata) + SendMessageCallbackW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi(), lpresultcallback, dwdata).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3254,40 +3254,40 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SendNotifyMessageA(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::BOOL +pub unsafe fn SendNotifyMessageA(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SendNotifyMessageA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - SendNotifyMessageA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()) + SendNotifyMessageA(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SendNotifyMessageW(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::BOOL +pub unsafe fn SendNotifyMessageW(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SendNotifyMessageW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - SendNotifyMessageW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()) + SendNotifyMessageW(hwnd.into_param().abi(), msg, wparam.into_param().abi(), lparam.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCaretBlinkTime(umseconds: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetCaretBlinkTime(umseconds: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetCaretBlinkTime(umseconds : u32) -> super::super::Foundation:: BOOL); - SetCaretBlinkTime(umseconds) + SetCaretBlinkTime(umseconds).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCaretPos(x: i32, y: i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetCaretPos(x: i32, y: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetCaretPos(x : i32, y : i32) -> super::super::Foundation:: BOOL); - SetCaretPos(x, y) + SetCaretPos(x, y).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3363,9 +3363,9 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetCursorPos(x: i32, y: i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetCursorPos(x: i32, y: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetCursorPos(x : i32, y : i32) -> super::super::Foundation:: BOOL); - SetCursorPos(x, y) + SetCursorPos(x, y).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`*"] #[inline] @@ -3376,35 +3376,35 @@ pub unsafe fn SetDebugErrorLevel(dwlevel: u32) { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDlgItemInt(hdlg: P0, niddlgitem: i32, uvalue: u32, bsigned: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetDlgItemInt(hdlg: P0, niddlgitem: i32, uvalue: u32, bsigned: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetDlgItemInt(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, uvalue : u32, bsigned : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - SetDlgItemInt(hdlg.into_param().abi(), niddlgitem, uvalue, bsigned.into_param().abi()) + SetDlgItemInt(hdlg.into_param().abi(), niddlgitem, uvalue, bsigned.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDlgItemTextA(hdlg: P0, niddlgitem: i32, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetDlgItemTextA(hdlg: P0, niddlgitem: i32, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn SetDlgItemTextA(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetDlgItemTextA(hdlg.into_param().abi(), niddlgitem, lpstring.into_param().abi()) + SetDlgItemTextA(hdlg.into_param().abi(), niddlgitem, lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetDlgItemTextW(hdlg: P0, niddlgitem: i32, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetDlgItemTextW(hdlg: P0, niddlgitem: i32, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn SetDlgItemTextW(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lpstring : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetDlgItemTextW(hdlg.into_param().abi(), niddlgitem, lpstring.into_param().abi()) + SetDlgItemTextW(hdlg.into_param().abi(), niddlgitem, lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3419,78 +3419,78 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetLayeredWindowAttributes(hwnd: P0, crkey: P1, balpha: u8, dwflags: LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn SetLayeredWindowAttributes(hwnd: P0, crkey: P1, balpha: u8, dwflags: LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetLayeredWindowAttributes(hwnd : super::super::Foundation:: HWND, crkey : super::super::Foundation:: COLORREF, balpha : u8, dwflags : LAYERED_WINDOW_ATTRIBUTES_FLAGS) -> super::super::Foundation:: BOOL); - SetLayeredWindowAttributes(hwnd.into_param().abi(), crkey.into_param().abi(), balpha, dwflags) + SetLayeredWindowAttributes(hwnd.into_param().abi(), crkey.into_param().abi(), balpha, dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetMenu(hwnd: P0, hmenu: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetMenu(hwnd: P0, hmenu: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenu(hwnd : super::super::Foundation:: HWND, hmenu : HMENU) -> super::super::Foundation:: BOOL); - SetMenu(hwnd.into_param().abi(), hmenu.into_param().abi()) + SetMenu(hwnd.into_param().abi(), hmenu.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetMenuDefaultItem(hmenu: P0, uitem: u32, fbypos: u32) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuDefaultItem(hmenu: P0, uitem: u32, fbypos: u32) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuDefaultItem(hmenu : HMENU, uitem : u32, fbypos : u32) -> super::super::Foundation:: BOOL); - SetMenuDefaultItem(hmenu.into_param().abi(), uitem, fbypos) + SetMenuDefaultItem(hmenu.into_param().abi(), uitem, fbypos).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SetMenuInfo(param0: P0, param1: *const MENUINFO) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuInfo(param0: P0, param1: *const MENUINFO) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuInfo(param0 : HMENU, param1 : *const MENUINFO) -> super::super::Foundation:: BOOL); - SetMenuInfo(param0.into_param().abi(), param1) + SetMenuInfo(param0.into_param().abi(), param1).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SetMenuItemBitmaps(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, hbitmapunchecked: P1, hbitmapchecked: P2) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuItemBitmaps(hmenu: P0, uposition: u32, uflags: MENU_ITEM_FLAGS, hbitmapunchecked: P1, hbitmapchecked: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuItemBitmaps(hmenu : HMENU, uposition : u32, uflags : MENU_ITEM_FLAGS, hbitmapunchecked : super::super::Graphics::Gdi:: HBITMAP, hbitmapchecked : super::super::Graphics::Gdi:: HBITMAP) -> super::super::Foundation:: BOOL); - SetMenuItemBitmaps(hmenu.into_param().abi(), uposition, uflags, hbitmapunchecked.into_param().abi(), hbitmapchecked.into_param().abi()) + SetMenuItemBitmaps(hmenu.into_param().abi(), uposition, uflags, hbitmapunchecked.into_param().abi(), hbitmapchecked.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SetMenuItemInfoA(hmenu: P0, item: u32, fbypositon: P1, lpmii: *const MENUITEMINFOA) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuItemInfoA(hmenu: P0, item: u32, fbypositon: P1, lpmii: *const MENUITEMINFOA) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoA(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOA) -> super::super::Foundation:: BOOL); - SetMenuItemInfoA(hmenu.into_param().abi(), item, fbypositon.into_param().abi(), lpmii) + SetMenuItemInfoA(hmenu.into_param().abi(), item, fbypositon.into_param().abi(), lpmii).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn SetMenuItemInfoW(hmenu: P0, item: u32, fbypositon: P1, lpmii: *const MENUITEMINFOW) -> super::super::Foundation::BOOL +pub unsafe fn SetMenuItemInfoW(hmenu: P0, item: u32, fbypositon: P1, lpmii: *const MENUITEMINFOW) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetMenuItemInfoW(hmenu : HMENU, item : u32, fbypositon : super::super::Foundation:: BOOL, lpmii : *const MENUITEMINFOW) -> super::super::Foundation:: BOOL); - SetMenuItemInfoW(hmenu.into_param().abi(), item, fbypositon.into_param().abi(), lpmii) + SetMenuItemInfoW(hmenu.into_param().abi(), item, fbypositon.into_param().abi(), lpmii).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3523,9 +3523,9 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPhysicalCursorPos(x: i32, y: i32) -> super::super::Foundation::BOOL { +pub unsafe fn SetPhysicalCursorPos(x: i32, y: i32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetPhysicalCursorPos(x : i32, y : i32) -> super::super::Foundation:: BOOL); - SetPhysicalCursorPos(x, y) + SetPhysicalCursorPos(x, y).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3537,43 +3537,43 @@ pub unsafe fn SetProcessDPIAware() -> super::super::Foundation::BOOL { #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetProcessDefaultLayout(dwdefaultlayout: u32) -> super::super::Foundation::BOOL { +pub unsafe fn SetProcessDefaultLayout(dwdefaultlayout: u32) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SetProcessDefaultLayout(dwdefaultlayout : u32) -> super::super::Foundation:: BOOL); - SetProcessDefaultLayout(dwdefaultlayout) + SetProcessDefaultLayout(dwdefaultlayout).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPropA(hwnd: P0, lpstring: P1, hdata: P2) -> super::super::Foundation::BOOL +pub unsafe fn SetPropA(hwnd: P0, lpstring: P1, hdata: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetPropA(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PCSTR, hdata : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetPropA(hwnd.into_param().abi(), lpstring.into_param().abi(), hdata.into_param().abi()) + SetPropA(hwnd.into_param().abi(), lpstring.into_param().abi(), hdata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetPropW(hwnd: P0, lpstring: P1, hdata: P2) -> super::super::Foundation::BOOL +pub unsafe fn SetPropW(hwnd: P0, lpstring: P1, hdata: P2) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, P2: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetPropW(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PCWSTR, hdata : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetPropW(hwnd.into_param().abi(), lpstring.into_param().abi(), hdata.into_param().abi()) + SetPropW(hwnd.into_param().abi(), lpstring.into_param().abi(), hdata.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetSystemCursor(hcur: P0, id: SYSTEM_CURSOR_ID) -> super::super::Foundation::BOOL +pub unsafe fn SetSystemCursor(hcur: P0, id: SYSTEM_CURSOR_ID) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetSystemCursor(hcur : HCURSOR, id : SYSTEM_CURSOR_ID) -> super::super::Foundation:: BOOL); - SetSystemCursor(hcur.into_param().abi(), id) + SetSystemCursor(hcur.into_param().abi(), id).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3588,12 +3588,12 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowDisplayAffinity(hwnd: P0, dwaffinity: WINDOW_DISPLAY_AFFINITY) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowDisplayAffinity(hwnd: P0, dwaffinity: WINDOW_DISPLAY_AFFINITY) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetWindowDisplayAffinity(hwnd : super::super::Foundation:: HWND, dwaffinity : WINDOW_DISPLAY_AFFINITY) -> super::super::Foundation:: BOOL); - SetWindowDisplayAffinity(hwnd.into_param().abi(), dwaffinity) + SetWindowDisplayAffinity(hwnd.into_param().abi(), dwaffinity).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3640,45 +3640,45 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowPlacement(hwnd: P0, lpwndpl: *const WINDOWPLACEMENT) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowPlacement(hwnd: P0, lpwndpl: *const WINDOWPLACEMENT) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetWindowPlacement(hwnd : super::super::Foundation:: HWND, lpwndpl : *const WINDOWPLACEMENT) -> super::super::Foundation:: BOOL); - SetWindowPlacement(hwnd.into_param().abi(), lpwndpl) + SetWindowPlacement(hwnd.into_param().abi(), lpwndpl).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowPos(hwnd: P0, hwndinsertafter: P1, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowPos(hwnd: P0, hwndinsertafter: P1, x: i32, y: i32, cx: i32, cy: i32, uflags: SET_WINDOW_POS_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn SetWindowPos(hwnd : super::super::Foundation:: HWND, hwndinsertafter : super::super::Foundation:: HWND, x : i32, y : i32, cx : i32, cy : i32, uflags : SET_WINDOW_POS_FLAGS) -> super::super::Foundation:: BOOL); - SetWindowPos(hwnd.into_param().abi(), hwndinsertafter.into_param().abi(), x, y, cx, cy, uflags) + SetWindowPos(hwnd.into_param().abi(), hwndinsertafter.into_param().abi(), x, y, cx, cy, uflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowTextA(hwnd: P0, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowTextA(hwnd: P0, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCSTR>, { ::windows_targets::link!("user32.dll" "system" fn SetWindowTextA(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PCSTR) -> super::super::Foundation:: BOOL); - SetWindowTextA(hwnd.into_param().abi(), lpstring.into_param().abi()) + SetWindowTextA(hwnd.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SetWindowTextW(hwnd: P0, lpstring: P1) -> super::super::Foundation::BOOL +pub unsafe fn SetWindowTextW(hwnd: P0, lpstring: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam<::windows_core::PCWSTR>, { ::windows_targets::link!("user32.dll" "system" fn SetWindowTextW(hwnd : super::super::Foundation:: HWND, lpstring : ::windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SetWindowTextW(hwnd.into_param().abi(), lpstring.into_param().abi()) + SetWindowTextW(hwnd.into_param().abi(), lpstring.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3729,12 +3729,12 @@ pub unsafe fn SetWindowsHookW(nfiltertype: i32, pfnfilterproc: HOOKPROC) -> HHOO #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ShowCaret(hwnd: P0) -> super::super::Foundation::BOOL +pub unsafe fn ShowCaret(hwnd: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ShowCaret(hwnd : super::super::Foundation:: HWND) -> super::super::Foundation:: BOOL); - ShowCaret(hwnd.into_param().abi()) + ShowCaret(hwnd.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3749,13 +3749,13 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn ShowOwnedPopups(hwnd: P0, fshow: P1) -> super::super::Foundation::BOOL +pub unsafe fn ShowOwnedPopups(hwnd: P0, fshow: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn ShowOwnedPopups(hwnd : super::super::Foundation:: HWND, fshow : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - ShowOwnedPopups(hwnd.into_param().abi(), fshow.into_param().abi()) + ShowOwnedPopups(hwnd.into_param().abi(), fshow.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3798,16 +3798,16 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemParametersInfoA(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn SystemParametersInfoA(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SystemParametersInfoA(uiaction : SYSTEM_PARAMETERS_INFO_ACTION, uiparam : u32, pvparam : *mut ::core::ffi::c_void, fwinini : SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> super::super::Foundation:: BOOL); - SystemParametersInfoA(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini) + SystemParametersInfoA(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn SystemParametersInfoW(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> super::super::Foundation::BOOL { +pub unsafe fn SystemParametersInfoW(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: ::core::option::Option<*mut ::core::ffi::c_void>, fwinini: SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn SystemParametersInfoW(uiaction : SYSTEM_PARAMETERS_INFO_ACTION, uiparam : u32, pvparam : *mut ::core::ffi::c_void, fwinini : SYSTEM_PARAMETERS_INFO_UPDATE_FLAGS) -> super::super::Foundation:: BOOL); - SystemParametersInfoW(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini) + SystemParametersInfoW(uiaction, uiparam, ::core::mem::transmute(pvparam.unwrap_or(::std::ptr::null_mut())), fwinini).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3822,24 +3822,24 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TrackPopupMenu(hmenu: P0, uflags: TRACK_POPUP_MENU_FLAGS, x: i32, y: i32, nreserved: i32, hwnd: P1, prcrect: ::core::option::Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL +pub unsafe fn TrackPopupMenu(hmenu: P0, uflags: TRACK_POPUP_MENU_FLAGS, x: i32, y: i32, nreserved: i32, hwnd: P1, prcrect: ::core::option::Option<*const super::super::Foundation::RECT>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn TrackPopupMenu(hmenu : HMENU, uflags : TRACK_POPUP_MENU_FLAGS, x : i32, y : i32, nreserved : i32, hwnd : super::super::Foundation:: HWND, prcrect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - TrackPopupMenu(hmenu.into_param().abi(), uflags, x, y, nreserved, hwnd.into_param().abi(), ::core::mem::transmute(prcrect.unwrap_or(::std::ptr::null()))) + TrackPopupMenu(hmenu.into_param().abi(), uflags, x, y, nreserved, hwnd.into_param().abi(), ::core::mem::transmute(prcrect.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn TrackPopupMenuEx(hmenu: P0, uflags: u32, x: i32, y: i32, hwnd: P1, lptpm: ::core::option::Option<*const TPMPARAMS>) -> super::super::Foundation::BOOL +pub unsafe fn TrackPopupMenuEx(hmenu: P0, uflags: u32, x: i32, y: i32, hwnd: P1, lptpm: ::core::option::Option<*const TPMPARAMS>) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn TrackPopupMenuEx(hmenu : HMENU, uflags : u32, x : i32, y : i32, hwnd : super::super::Foundation:: HWND, lptpm : *const TPMPARAMS) -> super::super::Foundation:: BOOL); - TrackPopupMenuEx(hmenu.into_param().abi(), uflags, x, y, hwnd.into_param().abi(), ::core::mem::transmute(lptpm.unwrap_or(::std::ptr::null()))) + TrackPopupMenuEx(hmenu.into_param().abi(), uflags, x, y, hwnd.into_param().abi(), ::core::mem::transmute(lptpm.unwrap_or(::std::ptr::null()))).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] @@ -3890,49 +3890,49 @@ pub unsafe fn UnhookWindowsHook(ncode: i32, pfnfilterproc: HOOKPROC) -> super::s #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnhookWindowsHookEx(hhk: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnhookWindowsHookEx(hhk: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnhookWindowsHookEx(hhk : HHOOK) -> super::super::Foundation:: BOOL); - UnhookWindowsHookEx(hhk.into_param().abi()) + UnhookWindowsHookEx(hhk.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterClassA(lpclassname: P0, hinstance: P1) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterClassA(lpclassname: P0, hinstance: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterClassA(lpclassname : ::windows_core::PCSTR, hinstance : super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - UnregisterClassA(lpclassname.into_param().abi(), hinstance.into_param().abi()) + UnregisterClassA(lpclassname.into_param().abi(), hinstance.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterClassW(lpclassname: P0, hinstance: P1) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterClassW(lpclassname: P0, hinstance: P1) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam<::windows_core::PCWSTR>, P1: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterClassW(lpclassname : ::windows_core::PCWSTR, hinstance : super::super::Foundation:: HMODULE) -> super::super::Foundation:: BOOL); - UnregisterClassW(lpclassname.into_param().abi(), hinstance.into_param().abi()) + UnregisterClassW(lpclassname.into_param().abi(), hinstance.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn UnregisterDeviceNotification(handle: P0) -> super::super::Foundation::BOOL +pub unsafe fn UnregisterDeviceNotification(handle: P0) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UnregisterDeviceNotification(handle : HDEVNOTIFY) -> super::super::Foundation:: BOOL); - UnregisterDeviceNotification(handle.into_param().abi()) + UnregisterDeviceNotification(handle.into_param().abi()).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] #[inline] -pub unsafe fn UpdateLayeredWindow(hwnd: P0, hdcdst: P1, pptdst: ::core::option::Option<*const super::super::Foundation::POINT>, psize: ::core::option::Option<*const super::super::Foundation::SIZE>, hdcsrc: P2, pptsrc: ::core::option::Option<*const super::super::Foundation::POINT>, crkey: P3, pblend: ::core::option::Option<*const super::super::Graphics::Gdi::BLENDFUNCTION>, dwflags: UPDATE_LAYERED_WINDOW_FLAGS) -> super::super::Foundation::BOOL +pub unsafe fn UpdateLayeredWindow(hwnd: P0, hdcdst: P1, pptdst: ::core::option::Option<*const super::super::Foundation::POINT>, psize: ::core::option::Option<*const super::super::Foundation::SIZE>, hdcsrc: P2, pptsrc: ::core::option::Option<*const super::super::Foundation::POINT>, crkey: P3, pblend: ::core::option::Option<*const super::super::Graphics::Gdi::BLENDFUNCTION>, dwflags: UPDATE_LAYERED_WINDOW_FLAGS) -> ::windows_core::Result<()> where P0: ::windows_core::IntoParam, P1: ::windows_core::IntoParam, @@ -3940,7 +3940,7 @@ where P3: ::windows_core::IntoParam, { ::windows_targets::link!("user32.dll" "system" fn UpdateLayeredWindow(hwnd : super::super::Foundation:: HWND, hdcdst : super::super::Graphics::Gdi:: HDC, pptdst : *const super::super::Foundation:: POINT, psize : *const super::super::Foundation:: SIZE, hdcsrc : super::super::Graphics::Gdi:: HDC, pptsrc : *const super::super::Foundation:: POINT, crkey : super::super::Foundation:: COLORREF, pblend : *const super::super::Graphics::Gdi:: BLENDFUNCTION, dwflags : UPDATE_LAYERED_WINDOW_FLAGS) -> super::super::Foundation:: BOOL); - UpdateLayeredWindow(hwnd.into_param().abi(), hdcdst.into_param().abi(), ::core::mem::transmute(pptdst.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psize.unwrap_or(::std::ptr::null())), hdcsrc.into_param().abi(), ::core::mem::transmute(pptsrc.unwrap_or(::std::ptr::null())), crkey.into_param().abi(), ::core::mem::transmute(pblend.unwrap_or(::std::ptr::null())), dwflags) + UpdateLayeredWindow(hwnd.into_param().abi(), hdcdst.into_param().abi(), ::core::mem::transmute(pptdst.unwrap_or(::std::ptr::null())), ::core::mem::transmute(psize.unwrap_or(::std::ptr::null())), hdcsrc.into_param().abi(), ::core::mem::transmute(pptsrc.unwrap_or(::std::ptr::null())), crkey.into_param().abi(), ::core::mem::transmute(pblend.unwrap_or(::std::ptr::null())), dwflags).ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`, `\"Win32_Graphics_Gdi\"`*"] #[cfg(all(feature = "Win32_Foundation", feature = "Win32_Graphics_Gdi"))] @@ -3955,9 +3955,9 @@ where #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] #[inline] -pub unsafe fn WaitMessage() -> super::super::Foundation::BOOL { +pub unsafe fn WaitMessage() -> ::windows_core::Result<()> { ::windows_targets::link!("user32.dll" "system" fn WaitMessage() -> super::super::Foundation:: BOOL); - WaitMessage() + WaitMessage().ok() } #[doc = "*Required features: `\"Win32_UI_WindowsAndMessaging\"`, `\"Win32_Foundation\"`*"] #[cfg(feature = "Win32_Foundation")] diff --git a/crates/samples/windows/dcomp/src/main.rs b/crates/samples/windows/dcomp/src/main.rs index c7fee944ce..da30d110ea 100644 --- a/crates/samples/windows/dcomp/src/main.rs +++ b/crates/samples/windows/dcomp/src/main.rs @@ -21,7 +21,7 @@ const WINDOW_HEIGHT: f32 = CARD_ROWS as f32 * (CARD_HEIGHT + CARD_MARGIN) + CARD fn main() -> Result<()> { unsafe { CoInitializeEx(None, COINIT_MULTITHREADED)?; - SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2).ok()?; + SetProcessDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2)?; } let mut window = Window::new()?; window.run() @@ -219,8 +219,7 @@ impl Window { &mut rect, WINDOW_STYLE(GetWindowLongW(self.handle, GWL_STYLE) as _), false, - ) - .ok()?; + )?; Ok((rect.right - rect.left, rect.bottom - rect.top)) } @@ -356,8 +355,7 @@ impl Window { size.0, size.1, SWP_NOACTIVATE | SWP_NOZORDER, - ) - .ok()?; + )?; self.device = None; Ok(()) @@ -386,7 +384,6 @@ impl Window { size.1, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER, ) - .ok() } } @@ -515,7 +512,7 @@ fn create_image() -> Result { CoCreateInstance(&CLSID_WICImagingFactory, None, CLSCTX_INPROC_SERVER)?; // Just a little hack to make it simpler to run the sample from the root of the workspace. - let path = if PathFileExistsW(w!("image.jpg")).into() { + let path = if PathFileExistsW(w!("image.jpg")).is_ok() { w!("image.jpg") } else { w!("crates/samples/windows/dcomp/image.jpg") diff --git a/crates/samples/windows/direct2d/src/main.rs b/crates/samples/windows/direct2d/src/main.rs index db48fae2d6..d8a9618a61 100644 --- a/crates/samples/windows/direct2d/src/main.rs +++ b/crates/samples/windows/direct2d/src/main.rs @@ -72,7 +72,7 @@ impl Window { unsafe { factory.GetDesktopDpi(&mut dpi, &mut dpiy) }; let mut frequency = 0; - unsafe { QueryPerformanceFrequency(&mut frequency).ok()? }; + unsafe { QueryPerformanceFrequency(&mut frequency)? }; let variable = unsafe { let variable = manager.CreateAnimationVariable(0.0)?; @@ -466,7 +466,7 @@ impl Window { fn get_time(frequency: i64) -> Result { unsafe { let mut time = 0; - QueryPerformanceCounter(&mut time).ok()?; + QueryPerformanceCounter(&mut time)?; Ok(time as f64 / frequency as f64) } } diff --git a/crates/samples/windows/direct3d12/src/main.rs b/crates/samples/windows/direct3d12/src/main.rs index b437ce623e..3f62881fc1 100644 --- a/crates/samples/windows/direct3d12/src/main.rs +++ b/crates/samples/windows/direct3d12/src/main.rs @@ -75,7 +75,7 @@ where right: size.0, bottom: size.1, }; - unsafe { AdjustWindowRect(&mut window_rect, WS_OVERLAPPEDWINDOW, false) }; + unsafe { AdjustWindowRect(&mut window_rect, WS_OVERLAPPEDWINDOW, false)? }; let mut title = sample.title(); @@ -782,7 +782,7 @@ mod d3d12_hello_triangle { .ok() .unwrap(); - unsafe { WaitForSingleObject(resources.fence_event, INFINITE) }; + unsafe { WaitForSingleObject(resources.fence_event, INFINITE).unwrap() }; } resources.frame_index = unsafe { resources.swap_chain.GetCurrentBackBufferIndex() }; diff --git a/crates/samples/windows/enum_windows/src/main.rs b/crates/samples/windows/enum_windows/src/main.rs index 8c3129cdaa..7927758be1 100644 --- a/crates/samples/windows/enum_windows/src/main.rs +++ b/crates/samples/windows/enum_windows/src/main.rs @@ -1,7 +1,7 @@ use windows::{Win32::Foundation::*, Win32::UI::WindowsAndMessaging::*}; fn main() -> windows::core::Result<()> { - unsafe { EnumWindows(Some(enum_window), LPARAM(0)).ok() } + unsafe { EnumWindows(Some(enum_window), LPARAM(0)) } } extern "system" fn enum_window(window: HWND, _: LPARAM) -> BOOL { diff --git a/crates/samples/windows/kernel_event/src/main.rs b/crates/samples/windows/kernel_event/src/main.rs index e03b0c1376..77d7be232a 100644 --- a/crates/samples/windows/kernel_event/src/main.rs +++ b/crates/samples/windows/kernel_event/src/main.rs @@ -1,17 +1,13 @@ use windows::{ - Win32::Foundation::{CloseHandle, WAIT_OBJECT_0}, + Win32::Foundation::CloseHandle, Win32::System::Threading::{CreateEventW, SetEvent, WaitForSingleObject}, }; fn main() -> windows::core::Result<()> { unsafe { let event = CreateEventW(None, true, false, None)?; - - SetEvent(event).ok()?; - - let result = WaitForSingleObject(event, 0); - assert!(result == WAIT_OBJECT_0); - - CloseHandle(event).ok() + SetEvent(event)?; + WaitForSingleObject(event, 0)?; + CloseHandle(event) } } diff --git a/crates/samples/windows/overlapped/src/main.rs b/crates/samples/windows/overlapped/src/main.rs index 839c9af981..4a0e23660b 100644 --- a/crates/samples/windows/overlapped/src/main.rs +++ b/crates/samples/windows/overlapped/src/main.rs @@ -35,28 +35,23 @@ fn main() -> Result<()> { let mut buffer: [u8; 12] = Default::default(); - let read_ok = ReadFile( + if let Err(error) = ReadFile( file, Some(buffer.as_mut_ptr() as _), buffer.len() as _, None, Some(&mut overlapped), - ); - - if !read_ok.as_bool() { - assert_eq!(GetLastError(), ERROR_IO_PENDING); + ) { + assert_eq!(error.code(), ERROR_IO_PENDING.into()); } - let wait_ok = WaitForSingleObject(overlapped.hEvent, 2000); - assert!(wait_ok == WAIT_OBJECT_0); + WaitForSingleObject(overlapped.hEvent, 2000)?; let mut bytes_copied = 0; - let overlapped_ok = GetOverlappedResult(file, &overlapped, &mut bytes_copied, false); - assert!(overlapped_ok.as_bool()); + GetOverlappedResult(file, &overlapped, &mut bytes_copied, false)?; assert!(bytes_copied == 12); - let closed_ok = CloseHandle(file); - assert!(closed_ok.as_bool()); + CloseHandle(file)?; println!("{}", String::from_utf8_lossy(&buffer)); } diff --git a/crates/samples/windows/privileges/src/main.rs b/crates/samples/windows/privileges/src/main.rs index 32df7085fd..efe8af335a 100644 --- a/crates/samples/windows/privileges/src/main.rs +++ b/crates/samples/windows/privileges/src/main.rs @@ -6,10 +6,10 @@ use windows::{ fn main() -> Result<()> { unsafe { let mut token = HANDLE::default(); - OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut token).ok()?; + OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &mut token)?; let mut bytes_required = 0; - GetTokenInformation(token, TokenPrivileges, None, 0, &mut bytes_required); + _ = GetTokenInformation(token, TokenPrivileges, None, 0, &mut bytes_required); let buffer = LocalAlloc(LPTR, bytes_required as _)?; @@ -19,8 +19,7 @@ fn main() -> Result<()> { Some(buffer.0 as *mut _), bytes_required, &mut bytes_required, - ) - .ok()?; + )?; let header = &*(buffer.0 as *const TOKEN_PRIVILEGES); @@ -29,11 +28,11 @@ fn main() -> Result<()> { for privilege in privileges { let mut name_len = 0; - LookupPrivilegeNameW(None, &privilege.Luid, PWSTR::null(), &mut name_len); + _ = LookupPrivilegeNameW(None, &privilege.Luid, PWSTR::null(), &mut name_len); let mut name = vec![0u16; (name_len + 1) as usize]; let name = PWSTR(name.as_mut_ptr()); - LookupPrivilegeNameW(None, &privilege.Luid, name, &mut name_len).ok()?; + LookupPrivilegeNameW(None, &privilege.Luid, name, &mut name_len)?; println!("{}", name.display()) } diff --git a/crates/tests/calling_convention/tests/win.rs b/crates/tests/calling_convention/tests/win.rs index c750aea64d..fcaba6a292 100644 --- a/crates/tests/calling_convention/tests/win.rs +++ b/crates/tests/calling_convention/tests/win.rs @@ -6,7 +6,10 @@ use windows::{ fn calling_convention() { unsafe { // This function requires cdecl on x86. - assert_eq!(ERROR_BUSY, LdapMapErrorToWin32(LDAP_BUSY)); + assert_eq!( + LdapMapErrorToWin32(LDAP_BUSY).unwrap_err().code(), + ERROR_BUSY.into() + ); // This function requires stdcall on x86. GetTickCount(); diff --git a/crates/tests/lib/tests/win.rs b/crates/tests/lib/tests/win.rs index 889e2812b4..591df63c45 100644 --- a/crates/tests/lib/tests/win.rs +++ b/crates/tests/lib/tests/win.rs @@ -33,7 +33,7 @@ fn gdi() { #[test] fn wait_on_address() { unsafe { - WaitOnAddress(std::ptr::null(), std::ptr::null(), 0, 0); + WaitOnAddress(std::ptr::null(), std::ptr::null(), 0, 0).unwrap_err(); } } diff --git a/crates/tests/reserved/tests/win.rs b/crates/tests/reserved/tests/win.rs index a0a16c022b..48c45dbb76 100644 --- a/crates/tests/reserved/tests/win.rs +++ b/crates/tests/reserved/tests/win.rs @@ -9,23 +9,22 @@ fn test() -> Result<()> { unsafe { assert_eq!(InSendMessageEx(None), ISMEX_NOSEND); assert!(CreateThreadpool(None).0 != 0); - assert_eq!( - TrackPopupMenu( - HMENU(0), - TPM_LEFTBUTTON, - 1, - 2, - 0, - HWND(0), - Default::default() - ), - false - ); + + TrackPopupMenu( + HMENU(0), + TPM_LEFTBUTTON, + 1, + 2, + 0, + HWND(0), + Default::default(), + ) + .unwrap_err(); let mut key = HKEY::default(); - RegOpenKeyExA(HKEY_CLASSES_ROOT, s!(r".txt"), 0, KEY_QUERY_VALUE, &mut key).ok()?; + RegOpenKeyExA(HKEY_CLASSES_ROOT, s!(r".txt"), 0, KEY_QUERY_VALUE, &mut key)?; let mut len = 0; - RegQueryValueExA(key, s!("Content Type"), None, None, None, Some(&mut len)).ok()?; + RegQueryValueExA(key, s!("Content Type"), None, None, None, Some(&mut len))?; let mut buffer = vec![0u8; (len) as usize]; RegQueryValueExA( key, @@ -34,8 +33,7 @@ fn test() -> Result<()> { None, Some(buffer.as_mut_ptr() as _), Some(&mut len), - ) - .ok()?; + )?; assert_eq!(String::from_utf8_lossy(&buffer), "text/plain\0"); Ok(()) } diff --git a/crates/tests/string_param/tests/pwstr.rs b/crates/tests/string_param/tests/pwstr.rs index 8d4ad40715..4b01e2e9bb 100644 --- a/crates/tests/string_param/tests/pwstr.rs +++ b/crates/tests/string_param/tests/pwstr.rs @@ -12,6 +12,6 @@ fn test() { assert_eq!(utf8.len(), len); assert_eq!(utf16.len(), len); - assert_eq!(GetLastError(), ERROR_BUSY_DRIVE); + assert_eq!(GetLastError().unwrap_err().code(), ERROR_BUSY_DRIVE.into()); } } diff --git a/crates/tests/wdk/tests/win.rs b/crates/tests/wdk/tests/win.rs index 17d13b31f3..f1f91cea90 100644 --- a/crates/tests/wdk/tests/win.rs +++ b/crates/tests/wdk/tests/win.rs @@ -4,8 +4,8 @@ use windows::{core::*, Wdk::System::OfflineRegistry::*}; fn test() -> Result<()> { unsafe { let mut hive = ORHKEY::default(); - ORCreateHive(&mut hive).ok()?; - ORCloseHive(hive).ok()?; + ORCreateHive(&mut hive)?; + ORCloseHive(hive)?; Ok(()) } } diff --git a/crates/tests/win32/tests/win32.rs b/crates/tests/win32/tests/win32.rs index ca7beed965..8dc6adef5b 100644 --- a/crates/tests/win32/tests/win32.rs +++ b/crates/tests/win32/tests/win32.rs @@ -1,6 +1,6 @@ use windows::{ core::*, - Win32::Foundation::{CloseHandle, BOOL, HANDLE, HWND, RECT, WAIT_OBJECT_0}, + Win32::Foundation::{CloseHandle, BOOL, HANDLE, HWND, RECT}, Win32::Gaming::HasExpandedResources, Win32::Graphics::Direct3D::Fxc::*, Win32::Graphics::{ @@ -120,12 +120,11 @@ fn constant() { fn function() -> windows::core::Result<()> { unsafe { let event = CreateEventW(None, true, false, None)?; - SetEvent(event).ok()?; + SetEvent(event)?; - let result = WaitForSingleObject(event, 0); - assert!(result == WAIT_OBJECT_0); + WaitForSingleObject(event, 0)?; - CloseHandle(event).ok()?; + CloseHandle(event)?; Ok(()) } } @@ -134,12 +133,8 @@ fn function() -> windows::core::Result<()> { fn bool_as_error() { unsafe { assert!(helpers::set_thread_ui_language()); - assert!(!SetEvent(HANDLE(0)).as_bool()); + let error = SetEvent(HANDLE(0)).unwrap_err(); - let result: windows::core::Result<()> = SetEvent(HANDLE(0)).ok(); - assert!(result.is_err()); - - let error: windows::core::Error = result.unwrap_err(); assert_eq!(error.code(), windows::core::HRESULT(-2147024890)); let message: String = error.message().try_into().unwrap(); assert_eq!(message, "The handle is invalid."); @@ -217,8 +212,7 @@ fn onecore_imports() -> windows::core::Result<()> { let port = uri.GetPort()?; assert!(port == 80); - let result = MiniDumpWriteDump(None, 0, None, MiniDumpNormal, None, None, None); - assert!(!result.as_bool()); + MiniDumpWriteDump(None, 0, None, MiniDumpNormal, None, None, None).unwrap_err(); assert!(D3DDisassemble11Trace(std::ptr::null(), 0, None, 0, 0, 0).is_err()); diff --git a/crates/tests/win32_arrays/tests/fixed.rs b/crates/tests/win32_arrays/tests/fixed.rs index 3fb54b062d..dae05accdb 100644 --- a/crates/tests/win32_arrays/tests/fixed.rs +++ b/crates/tests/win32_arrays/tests/fixed.rs @@ -9,9 +9,9 @@ fn keyboard_state() { unsafe { let zeroed: [u8; 256] = std::mem::zeroed(); let mut state: [u8; 256] = std::mem::zeroed(); - assert!(GetKeyboardState(&mut state).as_bool()); + GetKeyboardState(&mut state).unwrap(); assert!(state != zeroed); - assert!(SetKeyboardState(&state).as_bool()); + SetKeyboardState(&state).unwrap(); } } diff --git a/docs/readme.md b/docs/readme.md index 3a54efce81..c652306b7a 100644 --- a/docs/readme.md +++ b/docs/readme.md @@ -38,9 +38,9 @@ fn main() -> Result<()> { unsafe { let event = CreateEventW(None, true, false, None)?; - SetEvent(event).ok()?; - WaitForSingleObject(event, 0); - CloseHandle(event).ok()?; + SetEvent(event)?; + WaitForSingleObject(event, 0)?; + CloseHandle(event)?; MessageBoxA(None, s!("Ansi"), s!("Caption"), MB_OK); MessageBoxW(None, w!("Wide"), w!("Caption"), MB_OK);