From 20fc4f46c52f00583246bb18aa7b7dde0c38ca89 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 9 Oct 2024 10:11:40 -0500 Subject: [PATCH 1/5] bindgen --- crates/libs/bindgen/src/rust/implements.rs | 2 +- crates/libs/bindgen/src/rust/standalone.rs | 6 +++--- crates/libs/bindgen/src/rust/writer.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/libs/bindgen/src/rust/implements.rs b/crates/libs/bindgen/src/rust/implements.rs index 380c527c2d..e1fde80468 100644 --- a/crates/libs/bindgen/src/rust/implements.rs +++ b/crates/libs/bindgen/src/rust/implements.rs @@ -191,7 +191,7 @@ pub fn writer(writer: &Writer, def: metadata::TypeDef) -> TokenStream { } #[doc(hidden)] #features - struct #implvtbl_ident (std::marker::PhantomData); + struct #implvtbl_ident (core::marker::PhantomData); #features impl #implvtbl_ident { const VTABLE: #vtbl_ident = #vtbl_ident::new::(); diff --git a/crates/libs/bindgen/src/rust/standalone.rs b/crates/libs/bindgen/src/rust/standalone.rs index 2234b756dc..1bb6a85c7f 100644 --- a/crates/libs/bindgen/src/rust/standalone.rs +++ b/crates/libs/bindgen/src/rust/standalone.rs @@ -47,9 +47,9 @@ pub fn standalone_imp(writer: &Writer) -> String { #[repr(C)] pub struct IInspectable_Vtbl { pub base: IUnknown_Vtbl, - pub GetIids: unsafe extern "system" fn(this: *mut std::ffi::c_void, count: *mut u32, values: *mut *mut GUID) -> HRESULT, - pub GetRuntimeClassName: unsafe extern "system" fn(this: *mut std::ffi::c_void, value: *mut *mut std::ffi::c_void) -> HRESULT, - pub GetTrustLevel: unsafe extern "system" fn(this: *mut std::ffi::c_void, value: *mut i32) -> HRESULT, + pub GetIids: unsafe extern "system" fn(this: *mut core::ffi::c_void, count: *mut u32, values: *mut *mut GUID) -> HRESULT, + pub GetRuntimeClassName: unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut *mut core::ffi::c_void) -> HRESULT, + pub GetTrustLevel: unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut i32) -> HRESULT, } } }, diff --git a/crates/libs/bindgen/src/rust/writer.rs b/crates/libs/bindgen/src/rust/writer.rs index 1b32c6a378..1669445e95 100644 --- a/crates/libs/bindgen/src/rust/writer.rs +++ b/crates/libs/bindgen/src/rust/writer.rs @@ -1043,9 +1043,9 @@ impl Writer { } metadata::SignatureParamKind::OptionalPointer => { if flags.contains(metadata::ParamAttributes::Out) { - quote! { core::mem::transmute(#name.unwrap_or(std::ptr::null_mut())), } + quote! { core::mem::transmute(#name.unwrap_or(core::ptr::null_mut())), } } else { - quote! { core::mem::transmute(#name.unwrap_or(std::ptr::null())), } + quote! { core::mem::transmute(#name.unwrap_or(core::ptr::null())), } } } metadata::SignatureParamKind::ValueType => { From 0628156a15352bad6f89ee3498ada758b8697dbc Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 9 Oct 2024 10:11:49 -0500 Subject: [PATCH 2/5] core --- crates/libs/core/src/imp/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/libs/core/src/imp/mod.rs b/crates/libs/core/src/imp/mod.rs index 81cad6441a..036b540bdd 100644 --- a/crates/libs/core/src/imp/mod.rs +++ b/crates/libs/core/src/imp/mod.rs @@ -75,7 +75,7 @@ macro_rules! define_interface { ($name:ident, $vtbl:ident) => { #[repr(transparent)] #[derive(::core::cmp::PartialEq, ::core::cmp::Eq, ::core::clone::Clone)] - pub struct $name(::std::ptr::NonNull<::std::ffi::c_void>); + pub struct $name(::core::ptr::NonNull<::core::ffi::c_void>); unsafe impl ::windows_core::Interface for $name { type Vtable = $vtbl; const IID: ::windows_core::GUID = ::windows_core::GUID::zeroed(); From dcb79b3ff5e9ef37e5b949d6e3b4ee0e38ddc1ed Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 9 Oct 2024 10:11:58 -0500 Subject: [PATCH 3/5] windows --- .../windows/src/Windows/Wdk/Foundation/mod.rs | 2 +- .../Windows/Wdk/NetworkManagement/Ndis/mod.rs | 28 +- .../WindowsFilteringPlatform/mod.rs | 96 +- .../Wdk/Storage/FileSystem/Minifilters/mod.rs | 170 +- .../src/Windows/Wdk/Storage/FileSystem/mod.rs | 358 ++-- .../windows/src/Windows/Wdk/System/IO/mod.rs | 2 +- .../src/Windows/Wdk/System/Memory/mod.rs | 8 +- .../Windows/Wdk/System/OfflineRegistry/mod.rs | 26 +- .../src/Windows/Wdk/System/Registry/mod.rs | 40 +- .../Windows/Wdk/System/SystemServices/mod.rs | 528 ++--- .../src/Windows/Wdk/System/Threading/mod.rs | 22 +- .../Win32/AI/MachineLearning/DirectML/mod.rs | 14 +- .../Win32/Data/RightsManagement/mod.rs | 4 +- .../src/Windows/Win32/Data/Xml/XmlLite/mod.rs | 14 +- .../src/Windows/Win32/Devices/AllJoyn/mod.rs | 6 +- .../Win32/Devices/BiometricFramework/mod.rs | 44 +- .../Windows/Win32/Devices/Bluetooth/mod.rs | 20 +- .../Win32/Devices/Communication/mod.rs | 6 +- .../Windows/Win32/Devices/DeviceAccess/mod.rs | 2 +- .../DeviceAndDriverInstallation/mod.rs | 554 ++--- .../Windows/Win32/Devices/DeviceQuery/mod.rs | 12 +- .../src/Windows/Win32/Devices/Display/mod.rs | 18 +- .../Win32/Devices/Enumeration/Pnp/mod.rs | 2 +- .../src/Windows/Win32/Devices/Fax/mod.rs | 18 +- .../Win32/Devices/HumanInterfaceDevice/mod.rs | 2 +- .../Win32/Devices/ImageAcquisition/mod.rs | 6 +- .../Win32/Devices/PortableDevices/mod.rs | 2 +- .../src/Windows/Win32/Devices/Sensors/mod.rs | 6 +- .../Win32/Devices/SerialCommunication/mod.rs | 4 +- .../src/Windows/Win32/Devices/Tapi/mod.rs | 34 +- .../src/Windows/Win32/Devices/Usb/mod.rs | 14 +- .../Win32/Devices/WebServicesOnDevices/mod.rs | 108 +- .../windows/src/Windows/Win32/Gaming/mod.rs | 46 +- .../src/Windows/Win32/Globalization/mod.rs | 198 +- .../src/Windows/Win32/Graphics/DXCore/mod.rs | 6 +- .../Windows/Win32/Graphics/Direct2D/mod.rs | 168 +- .../Win32/Graphics/Direct3D/Dxc/mod.rs | 14 +- .../Win32/Graphics/Direct3D/Fxc/mod.rs | 14 +- .../Windows/Win32/Graphics/Direct3D/impl.rs | 2 +- .../Windows/Win32/Graphics/Direct3D10/impl.rs | 40 +- .../Windows/Win32/Graphics/Direct3D10/mod.rs | 104 +- .../Windows/Win32/Graphics/Direct3D11/impl.rs | 10 +- .../Windows/Win32/Graphics/Direct3D11/mod.rs | 252 +-- .../Win32/Graphics/Direct3D11on12/mod.rs | 6 +- .../Windows/Win32/Graphics/Direct3D12/impl.rs | 10 +- .../Windows/Win32/Graphics/Direct3D12/mod.rs | 128 +- .../Win32/Graphics/DirectComposition/mod.rs | 8 +- .../Windows/Win32/Graphics/DirectDraw/mod.rs | 6 +- .../Win32/Graphics/DirectManipulation/mod.rs | 4 +- .../Windows/Win32/Graphics/DirectWrite/mod.rs | 128 +- .../src/Windows/Win32/Graphics/Dwm/mod.rs | 2 +- .../src/Windows/Win32/Graphics/Dxgi/mod.rs | 22 +- .../src/Windows/Win32/Graphics/Gdi/mod.rs | 134 +- .../Windows/Win32/Graphics/GdiPlus/impl.rs | 2 +- .../src/Windows/Win32/Graphics/GdiPlus/mod.rs | 4 +- .../src/Windows/Win32/Graphics/Imaging/mod.rs | 14 +- .../src/Windows/Win32/Graphics/OpenGL/mod.rs | 4 +- .../Graphics/Printing/PrintTicket/mod.rs | 10 +- .../Windows/Win32/Graphics/Printing/mod.rs | 90 +- .../MobileDeviceManagementRegistration/mod.rs | 4 +- .../Win32/Media/Audio/DirectSound/mod.rs | 42 +- .../Windows/Win32/Media/Audio/XAudio2/impl.rs | 12 +- .../Windows/Win32/Media/Audio/XAudio2/mod.rs | 22 +- .../src/Windows/Win32/Media/Audio/mod.rs | 72 +- .../Windows/Win32/Media/DeviceManager/mod.rs | 42 +- .../Windows/Win32/Media/DirectShow/Tv/mod.rs | 54 +- .../src/Windows/Win32/Media/DirectShow/mod.rs | 118 +- .../Windows/Win32/Media/DxMediaObjects/mod.rs | 10 +- .../Win32/Media/KernelStreaming/mod.rs | 6 +- .../Win32/Media/MediaFoundation/mod.rs | 178 +- .../src/Windows/Win32/Media/Multimedia/mod.rs | 68 +- .../Win32/Media/PictureAcquisition/mod.rs | 14 +- .../src/Windows/Win32/Media/Speech/impl.rs | 6 +- .../src/Windows/Win32/Media/Speech/mod.rs | 24 +- .../Win32/NetworkManagement/Dhcp/mod.rs | 4 +- .../Win32/NetworkManagement/Dns/mod.rs | 44 +- .../Win32/NetworkManagement/IpHelper/mod.rs | 62 +- .../NetworkManagement/NetManagement/mod.rs | 144 +- .../Win32/NetworkManagement/NetShell/mod.rs | 2 +- .../NetworkDiagnosticsFramework/mod.rs | 4 +- .../Win32/NetworkManagement/P2P/mod.rs | 48 +- .../Win32/NetworkManagement/QoS/mod.rs | 8 +- .../Win32/NetworkManagement/Rras/mod.rs | 82 +- .../Win32/NetworkManagement/Snmp/mod.rs | 2 +- .../Win32/NetworkManagement/WNet/mod.rs | 16 +- .../Win32/NetworkManagement/WiFi/mod.rs | 102 +- .../WindowsConnectionManager/mod.rs | 10 +- .../WindowsFilteringPlatform/mod.rs | 128 +- .../NetworkManagement/WindowsFirewall/mod.rs | 4 +- .../Win32/Networking/ActiveDirectory/mod.rs | 74 +- .../Win32/Networking/Clustering/mod.rs | 140 +- .../Win32/Networking/HttpServer/mod.rs | 60 +- .../src/Windows/Win32/Networking/Ldap/mod.rs | 48 +- .../Networking/NetworkListManager/mod.rs | 4 +- .../Windows/Win32/Networking/WebSocket/mod.rs | 8 +- .../Windows/Win32/Networking/WinHttp/mod.rs | 24 +- .../Windows/Win32/Networking/WinInet/mod.rs | 150 +- .../Windows/Win32/Networking/WinSock/mod.rs | 140 +- .../Networking/WindowsWebServices/mod.rs | 356 ++-- .../Windows/Win32/Security/AppLocker/mod.rs | 14 +- .../Authentication/Identity/Provider/mod.rs | 24 +- .../Security/Authentication/Identity/mod.rs | 130 +- .../Win32/Security/Authorization/UI/mod.rs | 16 +- .../Win32/Security/Authorization/mod.rs | 98 +- .../Windows/Win32/Security/Credentials/mod.rs | 44 +- .../Security/Cryptography/Catalog/mod.rs | 10 +- .../Security/Cryptography/Certificates/mod.rs | 4 +- .../Win32/Security/Cryptography/Sip/mod.rs | 2 +- .../Win32/Security/Cryptography/UI/mod.rs | 6 +- .../Win32/Security/Cryptography/mod.rs | 460 ++--- .../Win32/Security/DiagnosticDataQuery/mod.rs | 2 +- .../Win32/Security/EnterpriseData/mod.rs | 4 +- .../Windows/Win32/Security/WinTrust/mod.rs | 2 +- .../windows/src/Windows/Win32/Security/mod.rs | 58 +- .../src/Windows/Win32/Storage/Cabinets/mod.rs | 6 +- .../Windows/Win32/Storage/CloudFilters/mod.rs | 36 +- .../Windows/Win32/Storage/Compression/mod.rs | 8 +- .../Windows/Win32/Storage/FileSystem/mod.rs | 204 +- .../src/Windows/Win32/Storage/Imapi/mod.rs | 2 +- .../Storage/InstallableFileSystems/mod.rs | 6 +- .../src/Windows/Win32/Storage/Jet/mod.rs | 186 +- .../Windows/Win32/Storage/OfflineFiles/mod.rs | 6 +- .../Win32/Storage/Packaging/Appx/mod.rs | 24 +- .../Win32/Storage/ProjectedFileSystem/mod.rs | 18 +- .../src/Windows/Win32/Storage/Vhd/mod.rs | 18 +- .../src/Windows/Win32/Storage/Vss/impl.rs | 4 +- .../src/Windows/Win32/Storage/Xps/mod.rs | 6 +- .../Windows/Win32/System/AddressBook/mod.rs | 30 +- .../mod.rs | 242 +-- .../Windows/Win32/System/ClrHosting/mod.rs | 6 +- .../Windows/Win32/System/Com/CallObj/mod.rs | 2 +- .../Windows/Win32/System/Com/Marshal/mod.rs | 12 +- .../System/Com/StructuredStorage/impl.rs | 2 +- .../Win32/System/Com/StructuredStorage/mod.rs | 34 +- .../Windows/Win32/System/Com/Urlmon/mod.rs | 18 +- .../src/Windows/Win32/System/Com/mod.rs | 100 +- .../Win32/System/ComponentServices/mod.rs | 4 +- .../src/Windows/Win32/System/Console/mod.rs | 18 +- .../Win32/System/CorrelationVector/mod.rs | 2 +- .../Windows/Win32/System/DataExchange/mod.rs | 10 +- .../Win32/System/DeploymentServices/mod.rs | 32 +- .../Diagnostics/Debug/ActiveScript/mod.rs | 2 +- .../Diagnostics/Debug/Extensions/impl.rs | 2 +- .../Diagnostics/Debug/Extensions/mod.rs | 1778 +++++++++-------- .../Win32/System/Diagnostics/Debug/mod.rs | 186 +- .../Win32/System/Diagnostics/Etw/mod.rs | 54 +- .../Diagnostics/ProcessSnapshotting/mod.rs | 2 +- .../DistributedTransactionCoordinator/mod.rs | 6 +- .../Windows/Win32/System/Environment/mod.rs | 12 +- .../Win32/System/ErrorReporting/mod.rs | 12 +- .../src/Windows/Win32/System/EventLog/mod.rs | 22 +- .../Windows/Win32/System/GroupPolicy/mod.rs | 2 +- .../Win32/System/HostComputeNetwork/mod.rs | 60 +- .../Win32/System/HostComputeSystem/mod.rs | 32 +- .../Windows/Win32/System/Hypervisor/mod.rs | 36 +- .../src/Windows/Win32/System/IO/mod.rs | 6 +- .../src/Windows/Win32/System/Iis/mod.rs | 2 +- .../Windows/Win32/System/JobObjects/mod.rs | 6 +- .../src/Windows/Win32/System/Js/mod.rs | 20 +- .../Windows/Win32/System/LibraryLoader/mod.rs | 4 +- .../src/Windows/Win32/System/Mailslots/mod.rs | 6 +- .../src/Windows/Win32/System/Memory/mod.rs | 58 +- .../Win32/System/MessageQueuing/mod.rs | 12 +- .../src/Windows/Win32/System/Ole/mod.rs | 48 +- .../Win32/System/ParentalControls/mod.rs | 2 +- .../Windows/Win32/System/Performance/mod.rs | 36 +- .../src/Windows/Win32/System/Pipes/mod.rs | 41 +- .../src/Windows/Win32/System/Power/mod.rs | 86 +- .../System/RealTimeCommunications/mod.rs | 14 +- .../src/Windows/Win32/System/Recovery/mod.rs | 6 +- .../src/Windows/Win32/System/Registry/mod.rs | 98 +- .../Windows/Win32/System/RemoteDesktop/mod.rs | 6 +- .../Win32/System/RemoteManagement/mod.rs | 24 +- .../Win32/System/RestartManager/mod.rs | 6 +- .../src/Windows/Win32/System/Rpc/mod.rs | 224 +-- .../src/Windows/Win32/System/Search/impl.rs | 2 +- .../src/Windows/Win32/System/Search/mod.rs | 400 ++-- .../src/Windows/Win32/System/Services/mod.rs | 38 +- .../Win32/System/SetupAndMigration/mod.rs | 2 +- .../src/Windows/Win32/System/SideShow/mod.rs | 2 +- .../Win32/System/StationsAndDesktops/mod.rs | 24 +- .../Win32/System/SystemInformation/mod.rs | 10 +- .../src/Windows/Win32/System/Threading/mod.rs | 138 +- .../src/Windows/Win32/System/Time/mod.rs | 14 +- .../Win32/System/TpmBaseServices/mod.rs | 10 +- .../Win32/System/WinRT/Composition/mod.rs | 6 +- .../System/WinRT/Graphics/Imaging/mod.rs | 2 +- .../Windows/Win32/System/WinRT/Media/mod.rs | 2 +- .../Win32/System/WinRT/Metadata/impl.rs | 4 +- .../Win32/System/WinRT/Metadata/mod.rs | 18 +- .../src/Windows/Win32/System/WinRT/Pdf/mod.rs | 4 +- .../src/Windows/Win32/System/WinRT/mod.rs | 10 +- .../Win32/System/WindowsProgramming/mod.rs | 54 +- .../Windows/Win32/System/WindowsSync/mod.rs | 4 +- .../src/Windows/Win32/System/Wmi/mod.rs | 18 +- .../src/Windows/Win32/UI/Accessibility/mod.rs | 2 +- .../src/Windows/Win32/UI/Animation/mod.rs | 16 +- .../src/Windows/Win32/UI/ColorSystem/mod.rs | 20 +- .../src/Windows/Win32/UI/Controls/mod.rs | 70 +- .../windows/src/Windows/Win32/UI/HiDpi/mod.rs | 2 +- .../src/Windows/Win32/UI/Input/Ime/mod.rs | 18 +- .../src/Windows/Win32/UI/Input/Pointer/mod.rs | 24 +- .../src/Windows/Win32/UI/Input/Touch/mod.rs | 2 +- .../Win32/UI/Input/XboxController/mod.rs | 2 +- .../windows/src/Windows/Win32/UI/Input/mod.rs | 12 +- .../Win32/UI/InteractionContext/mod.rs | 6 +- .../LegacyWindowsEnvironmentFeatures/mod.rs | 2 +- .../src/Windows/Win32/UI/Ribbon/mod.rs | 6 +- .../Win32/UI/Shell/PropertiesSystem/mod.rs | 8 +- .../windows/src/Windows/Win32/UI/Shell/mod.rs | 306 +-- .../src/Windows/Win32/UI/TabletPC/mod.rs | 6 +- .../Win32/UI/WindowsAndMessaging/mod.rs | 48 +- .../Windows/Win32/Web/InternetExplorer/mod.rs | 14 +- 213 files changed, 6127 insertions(+), 5952 deletions(-) diff --git a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs index 97db501b37..d574028175 100644 --- a/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Foundation/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryObject(handle : super::super::Win32::Foundation:: HANDLE, objectinformationclass : OBJECT_INFORMATION_CLASS, objectinformation : *mut core::ffi::c_void, objectinformationlength : u32, returnlength : *mut u32) -> super::super::Win32::Foundation:: NTSTATUS); - NtQueryObject(handle.param().abi(), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(std::ptr::null_mut())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + NtQueryObject(handle.param().abi(), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(core::ptr::null_mut())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } pub const DontUseThisType: POOL_TYPE = POOL_TYPE(3i32); pub const DontUseThisTypeSession: POOL_TYPE = POOL_TYPE(35i32); diff --git a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs index 56fbd73c47..f348d7797f 100644 --- a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/Ndis/mod.rs @@ -32,7 +32,7 @@ pub unsafe fn NdisClCloseAddressFamily(ndisafhandle: *const core::ffi::c_void) - #[inline] pub unsafe fn NdisClCloseCall(ndisvchandle: *const core::ffi::c_void, ndispartyhandle: Option<*const core::ffi::c_void>, buffer: Option<*const core::ffi::c_void>, size: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClCloseCall(ndisvchandle : *const core::ffi::c_void, ndispartyhandle : *const core::ffi::c_void, buffer : *const core::ffi::c_void, size : u32) -> i32); - NdisClCloseCall(ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(std::ptr::null())), core::mem::transmute(buffer.unwrap_or(std::ptr::null())), size) + NdisClCloseCall(ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), size) } #[inline] pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i32 { @@ -42,7 +42,7 @@ pub unsafe fn NdisClDeregisterSap(ndissaphandle: *const core::ffi::c_void) -> i3 #[inline] pub unsafe fn NdisClDropParty(ndispartyhandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: u32) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClDropParty(ndispartyhandle : *const core::ffi::c_void, buffer : *const core::ffi::c_void, size : u32) -> i32); - NdisClDropParty(ndispartyhandle, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), size) + NdisClDropParty(ndispartyhandle, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), size) } #[inline] pub unsafe fn NdisClGetProtocolVcContextFromTapiCallId(tapicallid: super::super::super::Win32::Foundation::UNICODE_STRING, protocolvccontext: *mut *mut core::ffi::c_void) -> i32 { @@ -57,7 +57,7 @@ pub unsafe fn NdisClIncomingCallComplete(status: i32, ndisvchandle: *const core: #[inline] pub unsafe fn NdisClMakeCall(ndisvchandle: *const core::ffi::c_void, callparameters: *mut CO_CALL_PARAMETERS, protocolpartycontext: Option<*const core::ffi::c_void>, ndispartyhandle: Option<*mut *mut core::ffi::c_void>) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisClMakeCall(ndisvchandle : *const core::ffi::c_void, callparameters : *mut CO_CALL_PARAMETERS, protocolpartycontext : *const core::ffi::c_void, ndispartyhandle : *mut *mut core::ffi::c_void) -> i32); - NdisClMakeCall(ndisvchandle, callparameters, core::mem::transmute(protocolpartycontext.unwrap_or(std::ptr::null())), core::mem::transmute(ndispartyhandle.unwrap_or(std::ptr::null_mut()))) + NdisClMakeCall(ndisvchandle, callparameters, core::mem::transmute(protocolpartycontext.unwrap_or(core::ptr::null())), core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NdisClModifyCallQoS(ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) -> i32 { @@ -87,7 +87,7 @@ pub unsafe fn NdisCmActivateVc(ndisvchandle: *const core::ffi::c_void, callparam #[inline] pub unsafe fn NdisCmAddPartyComplete(status: i32, ndispartyhandle: *const core::ffi::c_void, callmgrpartycontext: Option<*const core::ffi::c_void>, callparameters: *const CO_CALL_PARAMETERS) { windows_targets::link!("ndis.sys" "system" fn NdisCmAddPartyComplete(status : i32, ndispartyhandle : *const core::ffi::c_void, callmgrpartycontext : *const core::ffi::c_void, callparameters : *const CO_CALL_PARAMETERS)); - NdisCmAddPartyComplete(status, ndispartyhandle, core::mem::transmute(callmgrpartycontext.unwrap_or(std::ptr::null())), callparameters) + NdisCmAddPartyComplete(status, ndispartyhandle, core::mem::transmute(callmgrpartycontext.unwrap_or(core::ptr::null())), callparameters) } #[inline] pub unsafe fn NdisCmCloseAddressFamilyComplete(status: i32, ndisafhandle: *const core::ffi::c_void) { @@ -97,7 +97,7 @@ pub unsafe fn NdisCmCloseAddressFamilyComplete(status: i32, ndisafhandle: *const #[inline] pub unsafe fn NdisCmCloseCallComplete(status: i32, ndisvchandle: *const core::ffi::c_void, ndispartyhandle: Option<*const core::ffi::c_void>) { windows_targets::link!("ndis.sys" "system" fn NdisCmCloseCallComplete(status : i32, ndisvchandle : *const core::ffi::c_void, ndispartyhandle : *const core::ffi::c_void)); - NdisCmCloseCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(std::ptr::null()))) + NdisCmCloseCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NdisCmDeactivateVc(ndisvchandle: *const core::ffi::c_void) -> i32 { @@ -127,12 +127,12 @@ pub unsafe fn NdisCmDispatchIncomingCallQoSChange(ndisvchandle: *const core::ffi #[inline] pub unsafe fn NdisCmDispatchIncomingCloseCall(closestatus: i32, ndisvchandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: u32) { windows_targets::link!("ndis.sys" "system" fn NdisCmDispatchIncomingCloseCall(closestatus : i32, ndisvchandle : *const core::ffi::c_void, buffer : *const core::ffi::c_void, size : u32)); - NdisCmDispatchIncomingCloseCall(closestatus, ndisvchandle, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), size) + NdisCmDispatchIncomingCloseCall(closestatus, ndisvchandle, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), size) } #[inline] pub unsafe fn NdisCmDispatchIncomingDropParty(dropstatus: i32, ndispartyhandle: *const core::ffi::c_void, buffer: Option<*const core::ffi::c_void>, size: u32) { windows_targets::link!("ndis.sys" "system" fn NdisCmDispatchIncomingDropParty(dropstatus : i32, ndispartyhandle : *const core::ffi::c_void, buffer : *const core::ffi::c_void, size : u32)); - NdisCmDispatchIncomingDropParty(dropstatus, ndispartyhandle, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), size) + NdisCmDispatchIncomingDropParty(dropstatus, ndispartyhandle, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), size) } #[inline] pub unsafe fn NdisCmDropPartyComplete(status: i32, ndispartyhandle: *const core::ffi::c_void) { @@ -142,7 +142,7 @@ pub unsafe fn NdisCmDropPartyComplete(status: i32, ndispartyhandle: *const core: #[inline] pub unsafe fn NdisCmMakeCallComplete(status: i32, ndisvchandle: *const core::ffi::c_void, ndispartyhandle: Option<*const core::ffi::c_void>, callmgrpartycontext: Option<*const core::ffi::c_void>, callparameters: *const CO_CALL_PARAMETERS) { windows_targets::link!("ndis.sys" "system" fn NdisCmMakeCallComplete(status : i32, ndisvchandle : *const core::ffi::c_void, ndispartyhandle : *const core::ffi::c_void, callmgrpartycontext : *const core::ffi::c_void, callparameters : *const CO_CALL_PARAMETERS)); - NdisCmMakeCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(std::ptr::null())), core::mem::transmute(callmgrpartycontext.unwrap_or(std::ptr::null())), callparameters) + NdisCmMakeCallComplete(status, ndisvchandle, core::mem::transmute(ndispartyhandle.unwrap_or(core::ptr::null())), core::mem::transmute(callmgrpartycontext.unwrap_or(core::ptr::null())), callparameters) } #[inline] pub unsafe fn NdisCmModifyCallQoSComplete(status: i32, ndisvchandle: *const core::ffi::c_void, callparameters: *const CO_CALL_PARAMETERS) { @@ -162,12 +162,12 @@ pub unsafe fn NdisCmRegisterSapComplete(status: i32, ndissaphandle: *const core: #[inline] pub unsafe fn NdisCoAssignInstanceName(ndisvchandle: *const core::ffi::c_void, baseinstancename: *const super::super::super::Win32::Foundation::UNICODE_STRING, vcinstancename: Option<*mut super::super::super::Win32::Foundation::UNICODE_STRING>) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisCoAssignInstanceName(ndisvchandle : *const core::ffi::c_void, baseinstancename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, vcinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> i32); - NdisCoAssignInstanceName(ndisvchandle, baseinstancename, core::mem::transmute(vcinstancename.unwrap_or(std::ptr::null_mut()))) + NdisCoAssignInstanceName(ndisvchandle, baseinstancename, core::mem::transmute(vcinstancename.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NdisCoCreateVc(ndisbindinghandle: *const core::ffi::c_void, ndisafhandle: Option<*const core::ffi::c_void>, protocolvccontext: *const core::ffi::c_void, ndisvchandle: *mut *mut core::ffi::c_void) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisCoCreateVc(ndisbindinghandle : *const core::ffi::c_void, ndisafhandle : *const core::ffi::c_void, protocolvccontext : *const core::ffi::c_void, ndisvchandle : *mut *mut core::ffi::c_void) -> i32); - NdisCoCreateVc(ndisbindinghandle, core::mem::transmute(ndisafhandle.unwrap_or(std::ptr::null())), protocolvccontext, ndisvchandle) + NdisCoCreateVc(ndisbindinghandle, core::mem::transmute(ndisafhandle.unwrap_or(core::ptr::null())), protocolvccontext, ndisvchandle) } #[inline] pub unsafe fn NdisCoDeleteVc(ndisvchandle: *const core::ffi::c_void) -> i32 { @@ -259,7 +259,7 @@ pub unsafe fn NdisIMGetBindingContext(ndisbindinghandle: *const core::ffi::c_voi #[inline] pub unsafe fn NdisIMInitializeDeviceInstanceEx(driverhandle: *const core::ffi::c_void, driverinstance: *const super::super::super::Win32::Foundation::UNICODE_STRING, devicecontext: Option<*const core::ffi::c_void>) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisIMInitializeDeviceInstanceEx(driverhandle : *const core::ffi::c_void, driverinstance : *const super::super::super::Win32::Foundation:: UNICODE_STRING, devicecontext : *const core::ffi::c_void) -> i32); - NdisIMInitializeDeviceInstanceEx(driverhandle, driverinstance, core::mem::transmute(devicecontext.unwrap_or(std::ptr::null()))) + NdisIMInitializeDeviceInstanceEx(driverhandle, driverinstance, core::mem::transmute(devicecontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -283,7 +283,7 @@ pub unsafe fn NdisInitializeString(destination: *mut super::super::super::Win32: #[inline] pub unsafe fn NdisInitializeTimer(timer: *mut NDIS_TIMER, timerfunction: PNDIS_TIMER_FUNCTION, functioncontext: Option<*const core::ffi::c_void>) { windows_targets::link!("ndis.sys" "system" fn NdisInitializeTimer(timer : *mut NDIS_TIMER, timerfunction : PNDIS_TIMER_FUNCTION, functioncontext : *const core::ffi::c_void)); - NdisInitializeTimer(timer, timerfunction, core::mem::transmute(functioncontext.unwrap_or(std::ptr::null()))) + NdisInitializeTimer(timer, timerfunction, core::mem::transmute(functioncontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NdisMAllocateSharedMemory(miniportadapterhandle: *const core::ffi::c_void, length: u32, cached: P0, virtualaddress: *mut *mut core::ffi::c_void, physicaladdress: *mut i64) @@ -381,7 +381,7 @@ where #[inline] pub unsafe fn NdisMGetDeviceProperty(miniportadapterhandle: *const core::ffi::c_void, physicaldeviceobject: Option<*mut *mut super::super::Foundation::DEVICE_OBJECT>, functionaldeviceobject: Option<*mut *mut super::super::Foundation::DEVICE_OBJECT>, nextdeviceobject: Option<*mut *mut super::super::Foundation::DEVICE_OBJECT>, allocatedresources: Option<*mut *mut super::super::System::SystemServices::CM_RESOURCE_LIST>, allocatedresourcestranslated: Option<*mut *mut super::super::System::SystemServices::CM_RESOURCE_LIST>) { windows_targets::link!("ndis.sys" "system" fn NdisMGetDeviceProperty(miniportadapterhandle : *const core::ffi::c_void, physicaldeviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT, functionaldeviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT, nextdeviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT, allocatedresources : *mut *mut super::super::System::SystemServices:: CM_RESOURCE_LIST, allocatedresourcestranslated : *mut *mut super::super::System::SystemServices:: CM_RESOURCE_LIST)); - NdisMGetDeviceProperty(miniportadapterhandle, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(functionaldeviceobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(nextdeviceobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(allocatedresources.unwrap_or(std::ptr::null_mut())), core::mem::transmute(allocatedresourcestranslated.unwrap_or(std::ptr::null_mut()))) + NdisMGetDeviceProperty(miniportadapterhandle, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(functionaldeviceobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nextdeviceobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(allocatedresources.unwrap_or(core::ptr::null_mut())), core::mem::transmute(allocatedresourcestranslated.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NdisMGetDmaAlignment(miniportadapterhandle: *const core::ffi::c_void) -> u32 { @@ -577,7 +577,7 @@ pub unsafe fn NdisWriteErrorLogEntry(ndisadapterhandle: *const core::ffi::c_void #[inline] pub unsafe fn NdisWriteEventLogEntry(loghandle: *const core::ffi::c_void, eventcode: i32, uniqueeventvalue: u32, numstrings: u16, stringslist: Option<*const core::ffi::c_void>, datasize: u32, data: Option<*const core::ffi::c_void>) -> i32 { windows_targets::link!("ndis.sys" "system" fn NdisWriteEventLogEntry(loghandle : *const core::ffi::c_void, eventcode : i32, uniqueeventvalue : u32, numstrings : u16, stringslist : *const core::ffi::c_void, datasize : u32, data : *const core::ffi::c_void) -> i32); - NdisWriteEventLogEntry(loghandle, eventcode, uniqueeventvalue, numstrings, core::mem::transmute(stringslist.unwrap_or(std::ptr::null())), datasize, core::mem::transmute(data.unwrap_or(std::ptr::null()))) + NdisWriteEventLogEntry(loghandle, eventcode, uniqueeventvalue, numstrings, core::mem::transmute(stringslist.unwrap_or(core::ptr::null())), datasize, core::mem::transmute(data.unwrap_or(core::ptr::null()))) } pub const AUTHENTICATE: OFFLOAD_OPERATION_E = OFFLOAD_OPERATION_E(1i32); pub const BINARY_COMPATIBLE: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs index b3083141c2..0d5b7be97b 100644 --- a/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -8,7 +8,7 @@ pub unsafe fn FwpmBfeStateGet0() -> super::super::super::Win32::NetworkManagemen #[inline] pub unsafe fn FwpmBfeStateSubscribeChanges0(deviceobject: *mut core::ffi::c_void, callback: FWPM_SERVICE_STATE_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fwpkclnt.sys" "system" fn FwpmBfeStateSubscribeChanges0(deviceobject : *mut core::ffi::c_void, callback : FWPM_SERVICE_STATE_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmBfeStateSubscribeChanges0(deviceobject, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmBfeStateSubscribeChanges0(deviceobject, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[inline] pub unsafe fn FwpmBfeStateUnsubscribeChanges0(changehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -23,7 +23,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, callout : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CALLOUT0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutAdd0(enginehandle.param().abi(), callout, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmCalloutAdd0(enginehandle.param().abi(), callout, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -32,7 +32,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CALLOUT_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmCalloutCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmCalloutDeleteById0(enginehandle: P0, id: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -93,7 +93,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmCalloutGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -102,7 +102,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmCalloutSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmCalloutSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -111,7 +111,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_CONNECTION_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmConnectionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmConnectionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: P0, enumhandle: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -157,7 +157,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmConnectionSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmConnectionSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmEngineClose0(enginehandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -189,7 +189,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineOpen0(servername : windows_core::PCWSTR, authnservice : u32, authidentity : *const super::super::super::Win32::System::Rpc:: SEC_WINNT_AUTH_IDENTITY_W, session : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SESSION0, enginehandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), core::mem::transmute(session.unwrap_or(std::ptr::null())), enginehandle) + FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(session.unwrap_or(core::ptr::null())), enginehandle) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -207,7 +207,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmEngineSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmEngineSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -217,7 +217,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, filter : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterAdd0(enginehandle.param().abi(), filter, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmFilterAdd0(enginehandle.param().abi(), filter, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -226,7 +226,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmFilterCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmFilterDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -287,7 +287,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmFilterGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -296,7 +296,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmFilterSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmFilterSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmFreeMemory0(p: *mut *mut core::ffi::c_void) { @@ -311,7 +311,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0, tunnelpolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0, numfilterconditions : u32, filterconditions : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER_CONDITION0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmIPsecTunnelAdd0(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) + FwpmIPsecTunnelAdd0(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -321,7 +321,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1, tunnelpolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1, numfilterconditions : u32, filterconditions : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmIPsecTunnelAdd1(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd1(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -331,7 +331,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2, tunnelpolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2, numfilterconditions : u32, filterconditions : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmIPsecTunnelAdd2(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd2(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -341,7 +341,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3, tunnelpolicy : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3, numfilterconditions : u32, filterconditions : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmIPsecTunnelAdd3(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd3(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[inline] pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS @@ -358,7 +358,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_LAYER_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -403,7 +403,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -412,7 +412,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -421,7 +421,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_NET_EVENT_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmNetEventCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -507,7 +507,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventsSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmNetEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmNetEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -527,7 +527,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, providercontext : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT0, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextAdd0(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd0(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -537,7 +537,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, providercontext : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT1, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextAdd1(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd1(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -547,7 +547,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, providercontext : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT2, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextAdd2(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd2(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -557,7 +557,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd3(enginehandle : super::super::super::Win32::Foundation:: HANDLE, providercontext : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT3, sd : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextAdd3(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd3(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -566,7 +566,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmProviderContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -711,7 +711,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmProviderContextGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -720,7 +720,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderContextSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmProviderContextSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -729,7 +729,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_PROVIDER_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmProviderCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS @@ -773,7 +773,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmProviderGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -782,7 +782,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmProviderSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmProviderSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -791,7 +791,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SESSION_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSessionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmSessionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -828,7 +828,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: FWPM_SUBLAYER_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmSubLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS @@ -872,7 +872,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::super::Win32::Security:: PSID, sidgroup : *mut super::super::super::Win32::Security:: PSID, dacl : *mut *mut super::super::super::Win32::Security:: ACL, sacl : *mut *mut super::super::super::Win32::Security:: ACL, securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmSubLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -881,7 +881,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmSubLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmSubLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmTransactionAbort0(enginehandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -923,7 +923,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - FwpmvSwitchEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmvSwitchEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -950,7 +950,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecDospSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IPsecDospSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -959,7 +959,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_DOSP_STATE_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecDospStateCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecDospStateCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1040,7 +1040,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreate0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, outboundtraffic : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_TRAFFIC0, inboundfilterid : *mut u64, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextCreate0(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(std::ptr::null_mut())), id) + IPsecSaContextCreate0(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), id) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -1049,7 +1049,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreate1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, outboundtraffic : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_TRAFFIC1, virtualiftunnelinfo : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_VIRTUAL_IF_TUNNEL_INFO0, inboundfilterid : *mut u64, id : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextCreate1(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(std::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(std::ptr::null_mut())), id) + IPsecSaContextCreate1(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), id) } #[cfg(all(feature = "Win32_NetworkManagement_WindowsFilteringPlatform", feature = "Win32_Security"))] #[inline] @@ -1058,7 +1058,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_CONTEXT_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecSaContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn IPsecSaContextDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1165,7 +1165,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IPSEC_SA_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1183,7 +1183,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDbSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - IPsecSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IPsecSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1238,7 +1238,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaCreateEnumHandle0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, enumtemplate : *const super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_ENUM_TEMPLATE0, enumhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IkeextSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1256,7 +1256,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDbSetSecurityInfo0(enginehandle : super::super::super::Win32::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::super::Win32::Security:: SID, sidgroup : *const super::super::super::Win32::Security:: SID, dacl : *const super::super::super::Win32::Security:: ACL, sacl : *const super::super::super::Win32::Security:: ACL) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IkeextSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IkeextSaDeleteById0(enginehandle: P0, id: u64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1320,7 +1320,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById1(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, salookupcontext : *const windows_core::GUID, sa : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS1) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaGetById1(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(std::ptr::null())), sa) + IkeextSaGetById1(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), sa) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] #[inline] @@ -1329,7 +1329,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById2(enginehandle : super::super::super::Win32::Foundation:: HANDLE, id : u64, salookupcontext : *const windows_core::GUID, sa : *mut *mut super::super::super::Win32::NetworkManagement::WindowsFilteringPlatform:: IKEEXT_SA_DETAILS2) -> super::super::super::Win32::Foundation:: NTSTATUS); - IkeextSaGetById2(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(std::ptr::null())), sa) + IkeextSaGetById2(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), sa) } #[cfg(feature = "Win32_NetworkManagement_WindowsFilteringPlatform")] pub type FWPM_SERVICE_STATE_CHANGE_CALLBACK0 = Option; diff --git a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/Minifilters/mod.rs b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/Minifilters/mod.rs index b66178ee21..7c23fce20f 100644 --- a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/Minifilters/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/Minifilters/mod.rs @@ -54,7 +54,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltAdjustDeviceStackSizeForIoRedirection(sourceinstance : PFLT_INSTANCE, targetinstance : PFLT_INSTANCE, sourcedevicestacksizemodified : *mut super::super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAdjustDeviceStackSizeForIoRedirection(sourceinstance.param().abi(), targetinstance.param().abi(), core::mem::transmute(sourcedevicestacksizemodified.unwrap_or(std::ptr::null_mut()))) + FltAdjustDeviceStackSizeForIoRedirection(sourceinstance.param().abi(), targetinstance.param().abi(), core::mem::transmute(sourcedevicestacksizemodified.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -63,7 +63,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateCallbackData(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, retnewcallbackdata : *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateCallbackData(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), retnewcallbackdata) + FltAllocateCallbackData(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), retnewcallbackdata) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -72,7 +72,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltAllocateCallbackDataEx(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, flags : u32, retnewcallbackdata : *mut *mut FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAllocateCallbackDataEx(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), flags, retnewcallbackdata) + FltAllocateCallbackDataEx(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), flags, retnewcallbackdata) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -140,7 +140,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltApplyPriorityInfoThread(inputpriorityinfo : *const super:: IO_PRIORITY_INFO, outputpriorityinfo : *mut super:: IO_PRIORITY_INFO, thread : super::super::super::Foundation:: PETHREAD) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(std::ptr::null_mut())), thread.param().abi()) + FltApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(core::ptr::null_mut())), thread.param().abi()) } #[inline] pub unsafe fn FltAttachVolume(filter: P0, volume: P1, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, retinstance: Option<*mut PFLT_INSTANCE>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -149,7 +149,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltAttachVolume(filter : PFLT_FILTER, volume : PFLT_VOLUME, instancename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, retinstance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAttachVolume(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(std::ptr::null())), core::mem::transmute(retinstance.unwrap_or(std::ptr::null_mut()))) + FltAttachVolume(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(core::ptr::null())), core::mem::transmute(retinstance.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltAttachVolumeAtAltitude(filter: P0, volume: P1, altitude: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, retinstance: Option<*mut PFLT_INSTANCE>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -158,7 +158,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltAttachVolumeAtAltitude(filter : PFLT_FILTER, volume : PFLT_VOLUME, altitude : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, instancename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, retinstance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltAttachVolumeAtAltitude(filter.param().abi(), volume.param().abi(), altitude, core::mem::transmute(instancename.unwrap_or(std::ptr::null())), core::mem::transmute(retinstance.unwrap_or(std::ptr::null_mut()))) + FltAttachVolumeAtAltitude(filter.param().abi(), volume.param().abi(), altitude, core::mem::transmute(instancename.unwrap_or(core::ptr::null())), core::mem::transmute(retinstance.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -185,13 +185,13 @@ pub unsafe fn FltCancelIo(callbackdata: *const FLT_CALLBACK_DATA) -> super::supe #[inline] pub unsafe fn FltCancellableWaitForMultipleObjects(objectarray: &[*const core::ffi::c_void], waittype: super::super::super::super::Win32::System::Kernel::WAIT_TYPE, timeout: Option<*const i64>, waitblockarray: Option<*const super::super::super::Foundation::KWAIT_BLOCK>, callbackdata: *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCancellableWaitForMultipleObjects(count : u32, objectarray : *const *const core::ffi::c_void, waittype : super::super::super::super::Win32::System::Kernel:: WAIT_TYPE, timeout : *const i64, waitblockarray : *const super::super::super::Foundation:: KWAIT_BLOCK, callbackdata : *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(std::ptr::null())), callbackdata) + FltCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(core::ptr::null())), callbackdata) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltCancellableWaitForSingleObject(object: *const core::ffi::c_void, timeout: Option<*const i64>, callbackdata: Option<*const FLT_CALLBACK_DATA>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCancellableWaitForSingleObject(object : *const core::ffi::c_void, timeout : *const i64, callbackdata : *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(callbackdata.unwrap_or(std::ptr::null()))) + FltCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -218,7 +218,7 @@ where #[inline] pub unsafe fn FltCbdqInsertIo(cbdq: *mut FLT_CALLBACK_DATA_QUEUE, cbd: *const FLT_CALLBACK_DATA, context: Option<*const super::super::super::System::SystemServices::IO_CSQ_IRP_CONTEXT>, insertcontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqInsertIo(cbdq : *mut FLT_CALLBACK_DATA_QUEUE, cbd : *const FLT_CALLBACK_DATA, context : *const super::super::super::System::SystemServices:: IO_CSQ_IRP_CONTEXT, insertcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCbdqInsertIo(cbdq, cbd, core::mem::transmute(context.unwrap_or(std::ptr::null())), core::mem::transmute(insertcontext.unwrap_or(std::ptr::null()))) + FltCbdqInsertIo(cbdq, cbd, core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(insertcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -230,7 +230,7 @@ pub unsafe fn FltCbdqRemoveIo(cbdq: *mut FLT_CALLBACK_DATA_QUEUE, context: *cons #[inline] pub unsafe fn FltCbdqRemoveNextIo(cbdq: *mut FLT_CALLBACK_DATA_QUEUE, peekcontext: Option<*const core::ffi::c_void>) -> *mut FLT_CALLBACK_DATA { windows_targets::link!("fltmgr.sys" "system" fn FltCbdqRemoveNextIo(cbdq : *mut FLT_CALLBACK_DATA_QUEUE, peekcontext : *const core::ffi::c_void) -> *mut FLT_CALLBACK_DATA); - FltCbdqRemoveNextIo(cbdq, core::mem::transmute(peekcontext.unwrap_or(std::ptr::null()))) + FltCbdqRemoveNextIo(cbdq, core::mem::transmute(peekcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FltCheckAndGrowNameControl(namectrl: *mut FLT_NAME_CONTROL, newsize: u16) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -253,13 +253,13 @@ pub unsafe fn FltCheckLockForWriteAccess(filelock: *const super::FILE_LOCK, call #[inline] pub unsafe fn FltCheckOplock(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>, waitcompletionroutine: PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine: PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCheckOplock(oplock : *const *const core::ffi::c_void, callbackdata : *const FLT_CALLBACK_DATA, context : *const core::ffi::c_void, waitcompletionroutine : PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine : PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS); - FltCheckOplock(oplock, callbackdata, core::mem::transmute(context.unwrap_or(std::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) + FltCheckOplock(oplock, callbackdata, core::mem::transmute(context.unwrap_or(core::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltCheckOplockEx(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, flags: u32, context: Option<*const core::ffi::c_void>, waitcompletionroutine: PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine: PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltCheckOplockEx(oplock : *const *const core::ffi::c_void, callbackdata : *const FLT_CALLBACK_DATA, flags : u32, context : *const core::ffi::c_void, waitcompletionroutine : PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine : PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS); - FltCheckOplockEx(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) + FltCheckOplockEx(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -344,7 +344,7 @@ pub unsafe fn FltCompletePendedPostOperation(callbackdata: *const FLT_CALLBACK_D #[inline] pub unsafe fn FltCompletePendedPreOperation(callbackdata: *const FLT_CALLBACK_DATA, callbackstatus: FLT_PREOP_CALLBACK_STATUS, context: Option<*const core::ffi::c_void>) { windows_targets::link!("fltmgr.sys" "system" fn FltCompletePendedPreOperation(callbackdata : *const FLT_CALLBACK_DATA, callbackstatus : FLT_PREOP_CALLBACK_STATUS, context : *const core::ffi::c_void)); - FltCompletePendedPreOperation(callbackdata, callbackstatus, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FltCompletePendedPreOperation(callbackdata, callbackstatus, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -362,7 +362,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateCommunicationPort(filter : PFLT_FILTER, serverport : *mut PFLT_PORT, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, serverportcookie : *const core::ffi::c_void, connectnotifycallback : PFLT_CONNECT_NOTIFY, disconnectnotifycallback : PFLT_DISCONNECT_NOTIFY, messagenotifycallback : PFLT_MESSAGE_NOTIFY, maxconnections : i32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateCommunicationPort(filter.param().abi(), serverport, objectattributes, core::mem::transmute(serverportcookie.unwrap_or(std::ptr::null())), connectnotifycallback, disconnectnotifycallback, messagenotifycallback, maxconnections) + FltCreateCommunicationPort(filter.param().abi(), serverport, objectattributes, core::mem::transmute(serverportcookie.unwrap_or(core::ptr::null())), connectnotifycallback, disconnectnotifycallback, messagenotifycallback, maxconnections) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] @@ -372,7 +372,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateFile(filter : PFLT_FILTER, instance : PFLT_INSTANCE, filehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, createdisposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, flags : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateFile(filter.param().abi(), instance.param().abi(), filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, flags) + FltCreateFile(filter.param().abi(), instance.param().abi(), filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -382,7 +382,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateFileEx(filter : PFLT_FILTER, instance : PFLT_INSTANCE, filehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, fileobject : *mut *mut super::super::super::Foundation:: FILE_OBJECT, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, createdisposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, flags : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateFileEx(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(std::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, flags) + FltCreateFileEx(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -392,7 +392,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateFileEx2(filter : PFLT_FILTER, instance : PFLT_INSTANCE, filehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, fileobject : *mut *mut super::super::super::Foundation:: FILE_OBJECT, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, createdisposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, flags : u32, drivercontext : *const super::super::super::System::SystemServices:: IO_DRIVER_CREATE_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateFileEx2(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(std::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, flags, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + FltCreateFileEx2(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, flags, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -402,7 +402,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateMailslotFile(filter : PFLT_FILTER, instance : PFLT_INSTANCE, filehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, fileobject : *mut *mut super::super::super::Foundation:: FILE_OBJECT, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, createoptions : u32, mailslotquota : u32, maximummessagesize : u32, readtimeout : *const i64, drivercontext : *const super::super::super::System::SystemServices:: IO_DRIVER_CREATE_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateMailslotFile(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(std::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, createoptions, mailslotquota, maximummessagesize, readtimeout, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + FltCreateMailslotFile(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, createoptions, mailslotquota, maximummessagesize, readtimeout, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -412,7 +412,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateNamedPipeFile(filter : PFLT_FILTER, instance : PFLT_INSTANCE, filehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, fileobject : *mut *mut super::super::super::Foundation:: FILE_OBJECT, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, shareaccess : u32, createdisposition : u32, createoptions : u32, namedpipetype : u32, readmode : u32, completionmode : u32, maximuminstances : u32, inboundquota : u32, outboundquota : u32, defaulttimeout : *const i64, drivercontext : *const super::super::super::System::SystemServices:: IO_DRIVER_CREATE_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateNamedPipeFile(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(std::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, shareaccess, createdisposition, createoptions, namedpipetype, readmode, completionmode, maximuminstances, inboundquota, outboundquota, core::mem::transmute(defaulttimeout.unwrap_or(std::ptr::null())), core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + FltCreateNamedPipeFile(filter.param().abi(), instance.param().abi(), filehandle, core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), desiredaccess, objectattributes, iostatusblock, shareaccess, createdisposition, createoptions, namedpipetype, readmode, completionmode, maximuminstances, inboundquota, outboundquota, core::mem::transmute(defaulttimeout.unwrap_or(core::ptr::null())), core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -422,7 +422,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltCreateSectionForDataScan(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, sectioncontext : PFLT_CONTEXT, desiredaccess : u32, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, flags : u32, sectionhandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, sectionobject : *mut *mut core::ffi::c_void, sectionfilesize : *mut i64) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltCreateSectionForDataScan(instance.param().abi(), fileobject, sectioncontext.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, flags, sectionhandle, sectionobject, core::mem::transmute(sectionfilesize.unwrap_or(std::ptr::null_mut()))) + FltCreateSectionForDataScan(instance.param().abi(), fileobject, sectioncontext.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, flags, sectionhandle, sectionobject, core::mem::transmute(sectionfilesize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltCreateSystemVolumeInformationFolder(instance: P0) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -451,7 +451,7 @@ pub unsafe fn FltCurrentOplockH(oplock: *const *const core::ffi::c_void) -> supe #[inline] pub unsafe fn FltDecodeParameters(callbackdata: *const FLT_CALLBACK_DATA, mdladdresspointer: Option<*mut *mut *mut super::super::super::Foundation::MDL>, buffer: Option<*mut *mut *mut core::ffi::c_void>, length: Option<*mut *mut u32>, desiredaccess: Option<*mut super::super::super::System::SystemServices::LOCK_OPERATION>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltDecodeParameters(callbackdata : *const FLT_CALLBACK_DATA, mdladdresspointer : *mut *mut *mut super::super::super::Foundation:: MDL, buffer : *mut *mut *mut core::ffi::c_void, length : *mut *mut u32, desiredaccess : *mut super::super::super::System::SystemServices:: LOCK_OPERATION) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDecodeParameters(callbackdata, core::mem::transmute(mdladdresspointer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(length.unwrap_or(std::ptr::null_mut())), core::mem::transmute(desiredaccess.unwrap_or(std::ptr::null_mut()))) + FltDecodeParameters(callbackdata, core::mem::transmute(mdladdresspointer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(length.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desiredaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltDeleteContext(context: P0) @@ -476,7 +476,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteFileContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteFileContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteFileContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltDeleteInstanceContext(instance: P0, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -484,7 +484,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteInstanceContext(instance : PFLT_INSTANCE, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteInstanceContext(instance.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteInstanceContext(instance.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltDeletePushLock(pushlock: *const usize) { @@ -498,7 +498,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteStreamContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteStreamContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteStreamContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -507,7 +507,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteStreamHandleContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteStreamHandleContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteStreamHandleContext(instance.param().abi(), fileobject, core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -516,7 +516,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteTransactionContext(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteTransactionContext(instance.param().abi(), transaction, core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteTransactionContext(instance.param().abi(), transaction, core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltDeleteVolumeContext(filter: P0, volume: P1, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -525,7 +525,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeleteVolumeContext(filter : PFLT_FILTER, volume : PFLT_VOLUME, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeleteVolumeContext(filter.param().abi(), volume.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltDeleteVolumeContext(filter.param().abi(), volume.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltDetachVolume(filter: P0, volume: P1, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -534,7 +534,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDetachVolume(filter : PFLT_FILTER, volume : PFLT_VOLUME, instancename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDetachVolume(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(std::ptr::null()))) + FltDetachVolume(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -543,13 +543,13 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltDeviceIoControlFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, iocontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltDeviceIoControlFile(instance.param().abi(), fileobject, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltDeviceIoControlFile(instance.param().abi(), fileobject, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltDoCompletionProcessingWhenSafe(data: *const FLT_CALLBACK_DATA, fltobjects: *const FLT_RELATED_OBJECTS, completioncontext: Option<*const core::ffi::c_void>, flags: u32, safepostcallback: PFLT_POST_OPERATION_CALLBACK, retpostoperationstatus: *mut FLT_POSTOP_CALLBACK_STATUS) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltDoCompletionProcessingWhenSafe(data : *const FLT_CALLBACK_DATA, fltobjects : *const FLT_RELATED_OBJECTS, completioncontext : *const core::ffi::c_void, flags : u32, safepostcallback : PFLT_POST_OPERATION_CALLBACK, retpostoperationstatus : *mut FLT_POSTOP_CALLBACK_STATUS) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltDoCompletionProcessingWhenSafe(data, fltobjects, core::mem::transmute(completioncontext.unwrap_or(std::ptr::null())), flags, safepostcallback, retpostoperationstatus) + FltDoCompletionProcessingWhenSafe(data, fltobjects, core::mem::transmute(completioncontext.unwrap_or(core::ptr::null())), flags, safepostcallback, retpostoperationstatus) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -565,7 +565,7 @@ where #[inline] pub unsafe fn FltEnumerateFilterInformation(index: u32, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::FILTER_INFORMATION_CLASS, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bytesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateFilterInformation(index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: FILTER_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateFilterInformation(index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateFilterInformation(index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[inline] pub unsafe fn FltEnumerateFilters(filterlist: Option<&mut [PFLT_FILTER]>, numberfiltersreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -576,7 +576,7 @@ pub unsafe fn FltEnumerateFilters(filterlist: Option<&mut [PFLT_FILTER]>, number #[inline] pub unsafe fn FltEnumerateInstanceInformationByDeviceObject(deviceobject: *const super::super::super::Foundation::DEVICE_OBJECT, index: u32, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::INSTANCE_INFORMATION_CLASS, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bytesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstanceInformationByDeviceObject(deviceobject : *const super::super::super::Foundation:: DEVICE_OBJECT, index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: INSTANCE_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstanceInformationByDeviceObject(deviceobject, index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateInstanceInformationByDeviceObject(deviceobject, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] @@ -585,7 +585,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstanceInformationByFilter(filter : PFLT_FILTER, index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: INSTANCE_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstanceInformationByFilter(filter.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateInstanceInformationByFilter(filter.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] @@ -594,13 +594,13 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstanceInformationByVolume(volume : PFLT_VOLUME, index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: INSTANCE_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstanceInformationByVolume(volume.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateInstanceInformationByVolume(volume.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] pub unsafe fn FltEnumerateInstanceInformationByVolumeName(volumename: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, index: u32, informationclass: super::super::super::super::Win32::Storage::InstallableFileSystems::INSTANCE_INFORMATION_CLASS, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bytesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateInstanceInformationByVolumeName(volumename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: INSTANCE_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateInstanceInformationByVolumeName(volumename, index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateInstanceInformationByVolumeName(volumename, index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[inline] pub unsafe fn FltEnumerateInstances(volume: P0, filter: P1, instancelist: Option<&mut [PFLT_INSTANCE]>, numberinstancesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -618,7 +618,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltEnumerateVolumeInformation(filter : PFLT_FILTER, index : u32, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: FILTER_VOLUME_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltEnumerateVolumeInformation(filter.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltEnumerateVolumeInformation(filter.param().abi(), index, informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[inline] pub unsafe fn FltEnumerateVolumes(filter: P0, volumelist: Option<&mut [PFLT_VOLUME]>, numbervolumesreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -671,7 +671,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltFindExtraCreateParameter(filter : PFLT_FILTER, ecplist : *const super::super::super::Foundation:: ECP_LIST, ecptype : *const windows_core::GUID, ecpcontext : *mut *mut core::ffi::c_void, ecpcontextsize : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltFindExtraCreateParameter(filter.param().abi(), ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FltFindExtraCreateParameter(filter.param().abi(), ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -689,7 +689,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltFlushBuffers2(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, flushtype : u32, callbackdata : *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltFlushBuffers2(instance.param().abi(), fileobject, flushtype, core::mem::transmute(callbackdata.unwrap_or(std::ptr::null()))) + FltFlushBuffers2(instance.param().abi(), fileobject, flushtype, core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -769,7 +769,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltFsControlFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fscontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltFsControlFile(instance.param().abi(), fileobject, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltFsControlFile(instance.param().abi(), fileobject, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength, core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -885,7 +885,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetFilterInformation(filter : PFLT_FILTER, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: FILTER_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetFilterInformation(filter.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltGetFilterInformation(filter.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -908,7 +908,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetInstanceInformation(instance : PFLT_INSTANCE, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: INSTANCE_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetInstanceInformation(instance.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltGetInstanceInformation(instance.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -969,7 +969,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetNextExtraCreateParameter(filter : PFLT_FILTER, ecplist : *const super::super::super::Foundation:: ECP_LIST, currentecpcontext : *const core::ffi::c_void, nextecptype : *mut windows_core::GUID, nextecpcontext : *mut *mut core::ffi::c_void, nextecpcontextsize : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetNextExtraCreateParameter(filter.param().abi(), ecplist, core::mem::transmute(currentecpcontext.unwrap_or(std::ptr::null())), core::mem::transmute(nextecptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(nextecpcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(nextecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FltGetNextExtraCreateParameter(filter.param().abi(), ecplist, core::mem::transmute(currentecpcontext.unwrap_or(core::ptr::null())), core::mem::transmute(nextecptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nextecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nextecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1116,7 +1116,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeGuidName(volume : PFLT_VOLUME, volumeguidname : *mut super::super::super::super::Win32::Foundation:: UNICODE_STRING, buffersizeneeded : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeGuidName(volume.param().abi(), core::mem::transmute(volumeguidname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(std::ptr::null_mut()))) + FltGetVolumeGuidName(volume.param().abi(), core::mem::transmute(volumeguidname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_InstallableFileSystems")] #[inline] @@ -1125,7 +1125,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeInformation(volume : PFLT_VOLUME, informationclass : super::super::super::super::Win32::Storage::InstallableFileSystems:: FILTER_VOLUME_INFORMATION_CLASS, buffer : *mut core::ffi::c_void, buffersize : u32, bytesreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeInformation(volume.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bytesreturned) + FltGetVolumeInformation(volume.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bytesreturned) } #[inline] pub unsafe fn FltGetVolumeInstanceFromName(filter: P0, volume: P1, instancename: Option<*const super::super::super::super::Win32::Foundation::UNICODE_STRING>, retinstance: *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -1134,7 +1134,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeInstanceFromName(filter : PFLT_FILTER, volume : PFLT_VOLUME, instancename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, retinstance : *mut PFLT_INSTANCE) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeInstanceFromName(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(std::ptr::null())), retinstance) + FltGetVolumeInstanceFromName(filter.param().abi(), volume.param().abi(), core::mem::transmute(instancename.unwrap_or(core::ptr::null())), retinstance) } #[inline] pub unsafe fn FltGetVolumeName(volume: P0, volumename: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, buffersizeneeded: Option<*mut u32>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -1142,7 +1142,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeName(volume : PFLT_VOLUME, volumename : *mut super::super::super::super::Win32::Foundation:: UNICODE_STRING, buffersizeneeded : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeName(volume.param().abi(), core::mem::transmute(volumename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(std::ptr::null_mut()))) + FltGetVolumeName(volume.param().abi(), core::mem::transmute(volumename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersizeneeded.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltGetVolumeProperties(volume: P0, volumeproperties: Option<*mut FLT_VOLUME_PROPERTIES>, volumepropertieslength: u32, lengthreturned: *mut u32) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -1150,7 +1150,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltGetVolumeProperties(volume : PFLT_VOLUME, volumeproperties : *mut FLT_VOLUME_PROPERTIES, volumepropertieslength : u32, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltGetVolumeProperties(volume.param().abi(), core::mem::transmute(volumeproperties.unwrap_or(std::ptr::null_mut())), volumepropertieslength, lengthreturned) + FltGetVolumeProperties(volume.param().abi(), core::mem::transmute(volumeproperties.unwrap_or(core::ptr::null_mut())), volumepropertieslength, lengthreturned) } #[inline] pub unsafe fn FltInitExtraCreateParameterLookasideList(filter: P0, lookaside: *mut core::ffi::c_void, flags: u32, size: usize, tag: u32) @@ -1191,7 +1191,7 @@ where #[inline] pub unsafe fn FltIs32bitProcess(callbackdata: Option<*const FLT_CALLBACK_DATA>) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltIs32bitProcess(callbackdata : *const FLT_CALLBACK_DATA) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltIs32bitProcess(core::mem::transmute(callbackdata.unwrap_or(std::ptr::null()))) + FltIs32bitProcess(core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1252,7 +1252,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltIsIoRedirectionAllowedForOperation(data : *const FLT_CALLBACK_DATA, targetinstance : PFLT_INSTANCE, redirectionallowedthisio : *mut super::super::super::super::Win32::Foundation:: BOOLEAN, redirectionallowedallio : *mut super::super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltIsIoRedirectionAllowedForOperation(data, targetinstance.param().abi(), redirectionallowedthisio, core::mem::transmute(redirectionallowedallio.unwrap_or(std::ptr::null_mut()))) + FltIsIoRedirectionAllowedForOperation(data, targetinstance.param().abi(), redirectionallowedthisio, core::mem::transmute(redirectionallowedallio.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1290,7 +1290,7 @@ where P2: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltNotifyFilterChangeDirectory(notifysync : super::super::super::Foundation:: PNOTIFY_SYNC, notifylist : *mut super::super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *const super::super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifycallbackdata : *const FLT_CALLBACK_DATA, traversecallback : super:: PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, filtercallback : super:: PFILTER_REPORT_CHANGE)); - FltNotifyFilterChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, notifycallbackdata, traversecallback, core::mem::transmute(subjectcontext.unwrap_or(std::ptr::null())), filtercallback) + FltNotifyFilterChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, notifycallbackdata, traversecallback, core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null())), filtercallback) } #[inline] pub unsafe fn FltObjectDereference(fltobject: *mut core::ffi::c_void) { @@ -1309,25 +1309,25 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltOpenVolume(instance : PFLT_INSTANCE, volumehandle : *mut super::super::super::super::Win32::Foundation:: HANDLE, volumefileobject : *mut *mut super::super::super::Foundation:: FILE_OBJECT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltOpenVolume(instance.param().abi(), volumehandle, core::mem::transmute(volumefileobject.unwrap_or(std::ptr::null_mut()))) + FltOpenVolume(instance.param().abi(), volumehandle, core::mem::transmute(volumefileobject.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltOplockBreakH(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, flags: u32, context: Option<*const core::ffi::c_void>, waitcompletionroutine: PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine: PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltOplockBreakH(oplock : *const *const core::ffi::c_void, callbackdata : *const FLT_CALLBACK_DATA, flags : u32, context : *const core::ffi::c_void, waitcompletionroutine : PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine : PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS); - FltOplockBreakH(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) + FltOplockBreakH(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltOplockBreakToNone(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>, waitcompletionroutine: PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine: PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltOplockBreakToNone(oplock : *const *const core::ffi::c_void, callbackdata : *const FLT_CALLBACK_DATA, context : *const core::ffi::c_void, waitcompletionroutine : PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine : PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS); - FltOplockBreakToNone(oplock, callbackdata, core::mem::transmute(context.unwrap_or(std::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) + FltOplockBreakToNone(oplock, callbackdata, core::mem::transmute(context.unwrap_or(core::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltOplockBreakToNoneEx(oplock: *const *const core::ffi::c_void, callbackdata: *const FLT_CALLBACK_DATA, flags: u32, context: Option<*const core::ffi::c_void>, waitcompletionroutine: PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine: PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltOplockBreakToNoneEx(oplock : *const *const core::ffi::c_void, callbackdata : *const FLT_CALLBACK_DATA, flags : u32, context : *const core::ffi::c_void, waitcompletionroutine : PFLTOPLOCK_WAIT_COMPLETE_ROUTINE, prepostcallbackdataroutine : PFLTOPLOCK_PREPOST_CALLBACKDATA_ROUTINE) -> FLT_PREOP_CALLBACK_STATUS); - FltOplockBreakToNoneEx(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) + FltOplockBreakToNoneEx(oplock, callbackdata, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), waitcompletionroutine, prepostcallbackdataroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1356,12 +1356,12 @@ pub unsafe fn FltOplockIsSharedRequest(callbackdata: *const FLT_CALLBACK_DATA) - #[inline] pub unsafe fn FltOplockKeysEqual(fo1: Option<*const super::super::super::Foundation::FILE_OBJECT>, fo2: Option<*const super::super::super::Foundation::FILE_OBJECT>) -> super::super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("fltmgr.sys" "system" fn FltOplockKeysEqual(fo1 : *const super::super::super::Foundation:: FILE_OBJECT, fo2 : *const super::super::super::Foundation:: FILE_OBJECT) -> super::super::super::super::Win32::Foundation:: BOOLEAN); - FltOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(std::ptr::null())), core::mem::transmute(fo2.unwrap_or(std::ptr::null()))) + FltOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::ptr::null())), core::mem::transmute(fo2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FltParseFileName(filename: *const super::super::super::super::Win32::Foundation::UNICODE_STRING, extension: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, stream: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>, finalcomponent: Option<*mut super::super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltParseFileName(filename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, extension : *mut super::super::super::super::Win32::Foundation:: UNICODE_STRING, stream : *mut super::super::super::super::Win32::Foundation:: UNICODE_STRING, finalcomponent : *mut super::super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltParseFileName(filename, core::mem::transmute(extension.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stream.unwrap_or(std::ptr::null_mut())), core::mem::transmute(finalcomponent.unwrap_or(std::ptr::null_mut()))) + FltParseFileName(filename, core::mem::transmute(extension.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stream.unwrap_or(core::ptr::null_mut())), core::mem::transmute(finalcomponent.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltParseFileNameInformation(filenameinformation: *mut FLT_FILE_NAME_INFORMATION) -> super::super::super::super::Win32::Foundation::NTSTATUS { @@ -1412,7 +1412,7 @@ where #[inline] pub unsafe fn FltProcessFileLock(filelock: *const super::FILE_LOCK, callbackdata: *const FLT_CALLBACK_DATA, context: Option<*const core::ffi::c_void>) -> FLT_PREOP_CALLBACK_STATUS { windows_targets::link!("fltmgr.sys" "system" fn FltProcessFileLock(filelock : *const super:: FILE_LOCK, callbackdata : *const FLT_CALLBACK_DATA, context : *const core::ffi::c_void) -> FLT_PREOP_CALLBACK_STATUS); - FltProcessFileLock(filelock, callbackdata, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FltProcessFileLock(filelock, callbackdata, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1433,7 +1433,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltPurgeFileNameInformationCache(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltPurgeFileNameInformationCache(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(std::ptr::null()))) + FltPurgeFileNameInformationCache(instance.param().abi(), core::mem::transmute(fileobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1444,7 +1444,7 @@ where P2: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryDirectoryFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryDirectoryFile(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(std::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryDirectoryFile(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1453,7 +1453,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryDirectoryFileEx(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS, queryflags : u32, filename : *const super::super::super::super::Win32::Foundation:: UNICODE_STRING, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryDirectoryFileEx(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(std::ptr::null())), core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryDirectoryFileEx(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::ptr::null())), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1464,7 +1464,7 @@ where P2: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryEaFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, returnedeadata : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryEaFile(instance.param().abi(), fileobject, returnedeadata, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(std::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(std::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryEaFile(instance.param().abi(), fileobject, returnedeadata, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_System_IO"))] #[inline] @@ -1474,7 +1474,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryInformationByName(filter : PFLT_FILTER, instance : PFLT_INSTANCE, objectattributes : *const super::super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS, drivercontext : *const super::super::super::System::SystemServices:: IO_DRIVER_CREATE_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryInformationByName(filter.param().abi(), instance.param().abi(), objectattributes, iostatusblock, fileinformation, length, fileinformationclass, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + FltQueryInformationByName(filter.param().abi(), instance.param().abi(), objectattributes, iostatusblock, fileinformation, length, fileinformationclass, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1483,7 +1483,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super:: FILE_INFORMATION_CLASS, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryInformationFile(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryInformationFile(instance.param().abi(), fileobject, fileinformation, length, fileinformationclass, core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1494,7 +1494,7 @@ where P2: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryQuotaInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, iostatusblock : *mut super::super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : *const u32, restartscan : super::super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryQuotaInformationFile(instance.param().abi(), fileobject, iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(std::ptr::null())), sidlistlength, core::mem::transmute(startsid.unwrap_or(std::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryQuotaInformationFile(instance.param().abi(), fileobject, iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), sidlistlength, core::mem::transmute(startsid.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1503,7 +1503,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQuerySecurityObject(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, securityinformation : u32, securitydescriptor : super::super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, length : u32, lengthneeded : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQuerySecurityObject(instance.param().abi(), fileobject, securityinformation, securitydescriptor, length, core::mem::transmute(lengthneeded.unwrap_or(std::ptr::null_mut()))) + FltQuerySecurityObject(instance.param().abi(), fileobject, securityinformation, securitydescriptor, length, core::mem::transmute(lengthneeded.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1521,7 +1521,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueryVolumeInformationFile(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, fsinformation : *mut core::ffi::c_void, length : u32, fsinformationclass : super:: FS_INFORMATION_CLASS, lengthreturned : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueryVolumeInformationFile(instance.param().abi(), fileobject, fsinformation, length, fsinformationclass, core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FltQueryVolumeInformationFile(instance.param().abi(), fileobject, fsinformation, length, fsinformationclass, core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1539,7 +1539,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltQueueGenericWorkItem(fltworkitem : PFLT_GENERIC_WORKITEM, fltobject : *const core::ffi::c_void, workerroutine : PFLT_GENERIC_WORKITEM_ROUTINE, queuetype : super::super::super::System::SystemServices:: WORK_QUEUE_TYPE, context : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltQueueGenericWorkItem(fltworkitem.param().abi(), fltobject, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FltQueueGenericWorkItem(fltworkitem.param().abi(), fltobject, workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1548,7 +1548,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltReadFile(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, byteoffset : *const i64, length : u32, buffer : *mut core::ffi::c_void, flags : u32, bytesread : *mut u32, callbackroutine : PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltReadFile(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), length, buffer, flags, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + FltReadFile(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), length, buffer, flags, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1557,7 +1557,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltReadFileEx(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, byteoffset : *const i64, length : u32, buffer : *mut core::ffi::c_void, flags : u32, bytesread : *mut u32, callbackroutine : PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext : *const core::ffi::c_void, key : *const u32, mdl : *const super::super::super::Foundation:: MDL) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltReadFileEx(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), length, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), flags, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null())), core::mem::transmute(mdl.unwrap_or(std::ptr::null()))) + FltReadFileEx(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), length, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), flags, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null())), core::mem::transmute(mdl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FltReferenceContext(context: P0) @@ -1641,7 +1641,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltRemoveExtraCreateParameter(filter : PFLT_FILTER, ecplist : *mut super::super::super::Foundation:: ECP_LIST, ecptype : *const windows_core::GUID, ecpcontext : *mut *mut core::ffi::c_void, ecpcontextsize : *mut u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRemoveExtraCreateParameter(filter.param().abi(), ecplist, ecptype, ecpcontext, core::mem::transmute(ecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FltRemoveExtraCreateParameter(filter.param().abi(), ecplist, ecptype, ecpcontext, core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1665,7 +1665,7 @@ where #[inline] pub unsafe fn FltRequestOperationStatusCallback(data: *const FLT_CALLBACK_DATA, callbackroutine: PFLT_GET_OPERATION_STATUS_CALLBACK, requestercontext: Option<*const core::ffi::c_void>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltRequestOperationStatusCallback(data : *const FLT_CALLBACK_DATA, callbackroutine : PFLT_GET_OPERATION_STATUS_CALLBACK, requestercontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRequestOperationStatusCallback(data, callbackroutine, core::mem::transmute(requestercontext.unwrap_or(std::ptr::null()))) + FltRequestOperationStatusCallback(data, callbackroutine, core::mem::transmute(requestercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1698,7 +1698,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltRetrieveIoPriorityInfo(data : *const FLT_CALLBACK_DATA, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, thread : super::super::super::Foundation:: PETHREAD, priorityinfo : *mut super:: IO_PRIORITY_INFO) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltRetrieveIoPriorityInfo(core::mem::transmute(data.unwrap_or(std::ptr::null())), core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), thread.param().abi(), priorityinfo) + FltRetrieveIoPriorityInfo(core::mem::transmute(data.unwrap_or(core::ptr::null())), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), thread.param().abi(), priorityinfo) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1732,13 +1732,13 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSendMessage(filter : PFLT_FILTER, clientport : *const PFLT_PORT, senderbuffer : *const core::ffi::c_void, senderbufferlength : u32, replybuffer : *mut core::ffi::c_void, replylength : *mut u32, timeout : *const i64) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSendMessage(filter.param().abi(), clientport, senderbuffer, senderbufferlength, core::mem::transmute(replybuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(replylength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(std::ptr::null()))) + FltSendMessage(filter.param().abi(), clientport, senderbuffer, senderbufferlength, core::mem::transmute(replybuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(replylength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FltSetActivityIdCallbackData(callbackdata: *mut FLT_CALLBACK_DATA, guid: Option<*const windows_core::GUID>) -> super::super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("fltmgr.sys" "system" fn FltSetActivityIdCallbackData(callbackdata : *mut FLT_CALLBACK_DATA, guid : *const windows_core::GUID) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetActivityIdCallbackData(callbackdata, core::mem::transmute(guid.unwrap_or(std::ptr::null()))) + FltSetActivityIdCallbackData(callbackdata, core::mem::transmute(guid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1778,7 +1778,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetFileContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetFileContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetFileContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1808,7 +1808,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetInstanceContext(instance : PFLT_INSTANCE, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetInstanceContext(instance.param().abi(), operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetInstanceContext(instance.param().abi(), operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1858,7 +1858,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetStreamContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetStreamContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetStreamContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1868,7 +1868,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetStreamHandleContext(instance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetStreamHandleContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetStreamHandleContext(instance.param().abi(), fileobject, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1878,7 +1878,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetTransactionContext(instance : PFLT_INSTANCE, transaction : *const super::super::super::Foundation:: KTRANSACTION, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetTransactionContext(instance.param().abi(), transaction, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetTransactionContext(instance.param().abi(), transaction, operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FltSetVolumeContext(volume: P0, operation: FLT_SET_CONTEXT_OPERATION, newcontext: P1, oldcontext: Option<*mut PFLT_CONTEXT>) -> super::super::super::super::Win32::Foundation::NTSTATUS @@ -1887,7 +1887,7 @@ where P1: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltSetVolumeContext(volume : PFLT_VOLUME, operation : FLT_SET_CONTEXT_OPERATION, newcontext : PFLT_CONTEXT, oldcontext : *mut PFLT_CONTEXT) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltSetVolumeContext(volume.param().abi(), operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + FltSetVolumeContext(volume.param().abi(), operation, newcontext.param().abi(), core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1940,7 +1940,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltTagFile(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, filetag : u32, guid : *const windows_core::GUID, databuffer : *const core::ffi::c_void, databufferlength : u16) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltTagFile(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(std::ptr::null())), databuffer, databufferlength) + FltTagFile(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::ptr::null())), databuffer, databufferlength) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1949,7 +1949,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltTagFileEx(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, filetag : u32, guid : *const windows_core::GUID, databuffer : *const core::ffi::c_void, databufferlength : u16, existingfiletag : u32, existingguid : *const windows_core::GUID, flags : u32) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltTagFileEx(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(std::ptr::null())), databuffer, databufferlength, existingfiletag, core::mem::transmute(existingguid.unwrap_or(std::ptr::null())), flags) + FltTagFileEx(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::ptr::null())), databuffer, databufferlength, existingfiletag, core::mem::transmute(existingguid.unwrap_or(core::ptr::null())), flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1982,7 +1982,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltUntagFile(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, filetag : u32, guid : *const windows_core::GUID) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltUntagFile(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(std::ptr::null()))) + FltUntagFile(initiatinginstance.param().abi(), fileobject, filetag, core::mem::transmute(guid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2000,7 +2000,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltWriteFile(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, byteoffset : *const i64, length : u32, buffer : *const core::ffi::c_void, flags : u32, byteswritten : *mut u32, callbackroutine : PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltWriteFile(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), length, buffer, flags, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + FltWriteFile(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), length, buffer, flags, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2009,7 +2009,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltmgr.sys" "system" fn FltWriteFileEx(initiatinginstance : PFLT_INSTANCE, fileobject : *const super::super::super::Foundation:: FILE_OBJECT, byteoffset : *const i64, length : u32, buffer : *const core::ffi::c_void, flags : u32, byteswritten : *mut u32, callbackroutine : PFLT_COMPLETED_ASYNC_IO_CALLBACK, callbackcontext : *const core::ffi::c_void, key : *const u32, mdl : *const super::super::super::Foundation:: MDL) -> super::super::super::super::Win32::Foundation:: NTSTATUS); - FltWriteFileEx(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), length, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), flags, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null())), core::mem::transmute(mdl.unwrap_or(std::ptr::null()))) + FltWriteFileEx(initiatinginstance.param().abi(), fileobject, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), length, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), flags, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut())), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null())), core::mem::transmute(mdl.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] diff --git a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs index e820e955d3..fc8f23a799 100644 --- a/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/Storage/FileSystem/mod.rs @@ -22,13 +22,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn CcCanIWrite(fileobject : *const super::super::Foundation:: FILE_OBJECT, bytestowrite : u32, wait : super::super::super::Win32::Foundation:: BOOLEAN, retrying : u8) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), bytestowrite, wait.param().abi(), retrying) + CcCanIWrite(core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), bytestowrite, wait.param().abi(), retrying) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn CcCoherencyFlushAndPurgeCache(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, fileoffset: Option<*const i64>, length: u32, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, flags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn CcCoherencyFlushAndPurgeCache(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, fileoffset : *const i64, length : u32, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, flags : u32)); - CcCoherencyFlushAndPurgeCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(std::ptr::null())), length, iostatus, flags) + CcCoherencyFlushAndPurgeCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), length, iostatus, flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -72,7 +72,7 @@ where #[inline] pub unsafe fn CcCopyWriteWontFlush(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: Option<*const i64>, length: u32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcCopyWriteWontFlush(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcCopyWriteWontFlush(fileobject, core::mem::transmute(fileoffset.unwrap_or(std::ptr::null())), length) + CcCopyWriteWontFlush(fileobject, core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), length) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -104,7 +104,7 @@ pub unsafe fn CcFastCopyWrite(fileobject: *const super::super::Foundation::FILE_ #[inline] pub unsafe fn CcFlushCache(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, fileoffset: Option<*const i64>, length: u32, iostatus: Option<*mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK>) { windows_targets::link!("ntoskrnl.exe" "system" fn CcFlushCache(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, fileoffset : *const i64, length : u32, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK)); - CcFlushCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(std::ptr::null())), length, core::mem::transmute(iostatus.unwrap_or(std::ptr::null_mut()))) + CcFlushCache(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), length, core::mem::transmute(iostatus.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -175,7 +175,7 @@ pub unsafe fn CcIsThereDirtyData(vpb: *const super::super::Foundation::VPB) -> s #[inline] pub unsafe fn CcIsThereDirtyDataEx(vpb: *const super::super::Foundation::VPB, numberofdirtypages: Option<*const u32>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcIsThereDirtyDataEx(vpb : *const super::super::Foundation:: VPB, numberofdirtypages : *const u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcIsThereDirtyDataEx(vpb, core::mem::transmute(numberofdirtypages.unwrap_or(std::ptr::null()))) + CcIsThereDirtyDataEx(vpb, core::mem::transmute(numberofdirtypages.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -238,7 +238,7 @@ where #[inline] pub unsafe fn CcPurgeCacheSection(sectionobjectpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, fileoffset: Option<*const i64>, length: u32, flags: u32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcPurgeCacheSection(sectionobjectpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, fileoffset : *const i64, length : u32, flags : u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcPurgeCacheSection(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(std::ptr::null())), length, flags) + CcPurgeCacheSection(sectionobjectpointer, core::mem::transmute(fileoffset.unwrap_or(core::ptr::null())), length, flags) } #[inline] pub unsafe fn CcRemapBcb(bcb: *const core::ffi::c_void) -> *mut core::ffi::c_void { @@ -295,7 +295,7 @@ pub unsafe fn CcSetDirtyPageThreshold(fileobject: *const super::super::Foundatio #[inline] pub unsafe fn CcSetDirtyPinnedData(bcbvoid: *const core::ffi::c_void, lsn: Option<*const i64>) { windows_targets::link!("ntoskrnl.exe" "system" fn CcSetDirtyPinnedData(bcbvoid : *const core::ffi::c_void, lsn : *const i64)); - CcSetDirtyPinnedData(bcbvoid, core::mem::transmute(lsn.unwrap_or(std::ptr::null()))) + CcSetDirtyPinnedData(bcbvoid, core::mem::transmute(lsn.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -334,7 +334,7 @@ pub unsafe fn CcSetReadAheadGranularity(fileobject: *const super::super::Foundat #[inline] pub unsafe fn CcUninitializeCacheMap(fileobject: *const super::super::Foundation::FILE_OBJECT, truncatesize: Option<*const i64>, uninitializeevent: Option<*const CACHE_UNINITIALIZE_EVENT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn CcUninitializeCacheMap(fileobject : *const super::super::Foundation:: FILE_OBJECT, truncatesize : *const i64, uninitializeevent : *const CACHE_UNINITIALIZE_EVENT) -> super::super::super::Win32::Foundation:: BOOLEAN); - CcUninitializeCacheMap(fileobject, core::mem::transmute(truncatesize.unwrap_or(std::ptr::null())), core::mem::transmute(uninitializeevent.unwrap_or(std::ptr::null()))) + CcUninitializeCacheMap(fileobject, core::mem::transmute(truncatesize.unwrap_or(core::ptr::null())), core::mem::transmute(uninitializeevent.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CcUnpinData(bcb: *const core::ffi::c_void) { @@ -480,7 +480,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlAreNamesEqual(constantnamea : *const super::super::super::Win32::Foundation:: UNICODE_STRING, constantnameb : *const super::super::super::Win32::Foundation:: UNICODE_STRING, ignorecase : super::super::super::Win32::Foundation:: BOOLEAN, upcasetable : *const u16) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlAreNamesEqual(constantnamea, constantnameb, ignorecase.param().abi(), core::mem::transmute(upcasetable.unwrap_or(std::ptr::null()))) + FsRtlAreNamesEqual(constantnamea, constantnameb, ignorecase.param().abi(), core::mem::transmute(upcasetable.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -509,19 +509,19 @@ pub unsafe fn FsRtlBalanceReads(targetdevice: *const super::super::Foundation::D #[inline] pub unsafe fn FsRtlCancellableWaitForMultipleObjects(objectarray: &[*const core::ffi::c_void], waittype: super::super::super::Win32::System::Kernel::WAIT_TYPE, timeout: Option<*const i64>, waitblockarray: Option<*const super::super::Foundation::KWAIT_BLOCK>, irp: Option<*const super::super::Foundation::IRP>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCancellableWaitForMultipleObjects(count : u32, objectarray : *const *const core::ffi::c_void, waittype : super::super::super::Win32::System::Kernel:: WAIT_TYPE, timeout : *const i64, waitblockarray : *const super::super::Foundation:: KWAIT_BLOCK, irp : *const super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(std::ptr::null())), core::mem::transmute(irp.unwrap_or(std::ptr::null()))) + FsRtlCancellableWaitForMultipleObjects(objectarray.len().try_into().unwrap(), core::mem::transmute(objectarray.as_ptr()), waittype, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(core::ptr::null())), core::mem::transmute(irp.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlCancellableWaitForSingleObject(object: *const core::ffi::c_void, timeout: Option<*const i64>, irp: Option<*const super::super::Foundation::IRP>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCancellableWaitForSingleObject(object : *const core::ffi::c_void, timeout : *const i64, irp : *const super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(irp.unwrap_or(std::ptr::null()))) + FsRtlCancellableWaitForSingleObject(object, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(irp.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlChangeBackingFileObject(currentfileobject: Option<*const super::super::Foundation::FILE_OBJECT>, newfileobject: *const super::super::Foundation::FILE_OBJECT, changebackingtype: FSRTL_CHANGE_BACKING_TYPE, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlChangeBackingFileObject(currentfileobject : *const super::super::Foundation:: FILE_OBJECT, newfileobject : *const super::super::Foundation:: FILE_OBJECT, changebackingtype : FSRTL_CHANGE_BACKING_TYPE, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlChangeBackingFileObject(core::mem::transmute(currentfileobject.unwrap_or(std::ptr::null())), newfileobject, changebackingtype, flags) + FsRtlChangeBackingFileObject(core::mem::transmute(currentfileobject.unwrap_or(core::ptr::null())), newfileobject, changebackingtype, flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -545,25 +545,25 @@ pub unsafe fn FsRtlCheckLockForWriteAccess(filelock: *const FILE_LOCK, irp: *con #[inline] pub unsafe fn FsRtlCheckOplock(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCheckOplock(oplock : *const *const core::ffi::c_void, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCheckOplock(oplock, irp, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine) + FsRtlCheckOplock(oplock, irp, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlCheckOplockEx(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCheckOplockEx(oplock : *const *const core::ffi::c_void, irp : *const super::super::Foundation:: IRP, flags : u32, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCheckOplockEx(oplock, irp, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine) + FsRtlCheckOplockEx(oplock, irp, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlCheckOplockEx2(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, flagsex2: u32, completionroutinecontext: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP, timeout: u64, notifycontext: Option<*const core::ffi::c_void>, notifyroutine: POPLOCK_NOTIFY_ROUTINE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCheckOplockEx2(oplock : *const *const core::ffi::c_void, irp : *const super::super::Foundation:: IRP, flags : u32, flagsex2 : u32, completionroutinecontext : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP, timeout : u64, notifycontext : *const core::ffi::c_void, notifyroutine : POPLOCK_NOTIFY_ROUTINE) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCheckOplockEx2(oplock, irp, flags, flagsex2, core::mem::transmute(completionroutinecontext.unwrap_or(std::ptr::null())), completionroutine, postirproutine, timeout, core::mem::transmute(notifycontext.unwrap_or(std::ptr::null())), notifyroutine) + FsRtlCheckOplockEx2(oplock, irp, flags, flagsex2, core::mem::transmute(completionroutinecontext.unwrap_or(core::ptr::null())), completionroutine, postirproutine, timeout, core::mem::transmute(notifycontext.unwrap_or(core::ptr::null())), notifyroutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlCheckUpperOplock(oplock: *const *const core::ffi::c_void, newloweroplockstate: u32, completionroutinecontext: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, prependroutine: POPLOCK_FS_PREPOST_IRP, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCheckUpperOplock(oplock : *const *const core::ffi::c_void, newloweroplockstate : u32, completionroutinecontext : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, prependroutine : POPLOCK_FS_PREPOST_IRP, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCheckUpperOplock(oplock, newloweroplockstate, core::mem::transmute(completionroutinecontext.unwrap_or(std::ptr::null())), completionroutine, prependroutine, flags) + FsRtlCheckUpperOplock(oplock, newloweroplockstate, core::mem::transmute(completionroutinecontext.unwrap_or(core::ptr::null())), completionroutine, prependroutine, flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -587,7 +587,7 @@ where #[inline] pub unsafe fn FsRtlCreateSectionForDataScan(sectionhandle: *mut super::super::super::Win32::Foundation::HANDLE, sectionobject: *mut *mut core::ffi::c_void, sectionfilesize: Option<*mut i64>, fileobject: *const super::super::Foundation::FILE_OBJECT, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, maximumsize: Option<*const i64>, sectionpageprotection: u32, allocationattributes: u32, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlCreateSectionForDataScan(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, sectionobject : *mut *mut core::ffi::c_void, sectionfilesize : *mut i64, fileobject : *const super::super::Foundation:: FILE_OBJECT, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlCreateSectionForDataScan(sectionhandle, sectionobject, core::mem::transmute(sectionfilesize.unwrap_or(std::ptr::null_mut())), fileobject, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, flags) + FsRtlCreateSectionForDataScan(sectionhandle, sectionobject, core::mem::transmute(sectionfilesize.unwrap_or(core::ptr::null_mut())), fileobject, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, flags) } #[inline] pub unsafe fn FsRtlCurrentBatchOplock(oplock: *const *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -679,7 +679,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFastUnlockAll(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, processid : super::super::Foundation:: PEPROCESS, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlFastUnlockAll(filelock, fileobject, processid.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FsRtlFastUnlockAll(filelock, fileobject, processid.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -688,7 +688,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFastUnlockAllByKey(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, processid : super::super::Foundation:: PEPROCESS, key : u32, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlFastUnlockAllByKey(filelock, fileobject, processid.param().abi(), key, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FsRtlFastUnlockAllByKey(filelock, fileobject, processid.param().abi(), key, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -698,13 +698,13 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFastUnlockSingle(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : *const i64, processid : super::super::Foundation:: PEPROCESS, key : u32, context : *const core::ffi::c_void, alreadysynchronized : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlFastUnlockSingle(filelock, fileobject, fileoffset, length, processid.param().abi(), key, core::mem::transmute(context.unwrap_or(std::ptr::null())), alreadysynchronized.param().abi()) + FsRtlFastUnlockSingle(filelock, fileobject, fileoffset, length, processid.param().abi(), key, core::mem::transmute(context.unwrap_or(core::ptr::null())), alreadysynchronized.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn FsRtlFindExtraCreateParameter(ecplist: *const super::super::Foundation::ECP_LIST, ecptype: *const windows_core::GUID, ecpcontext: Option<*mut *mut core::ffi::c_void>, ecpcontextsize: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlFindExtraCreateParameter(ecplist : *const super::super::Foundation:: ECP_LIST, ecptype : *const windows_core::GUID, ecpcontext : *mut *mut core::ffi::c_void, ecpcontextsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlFindExtraCreateParameter(ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FsRtlFindExtraCreateParameter(ecplist, ecptype, core::mem::transmute(ecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -767,7 +767,7 @@ pub unsafe fn FsRtlGetNextBaseMcbEntry(mcb: *const BASE_MCB, runindex: u32, vbn: #[inline] pub unsafe fn FsRtlGetNextExtraCreateParameter(ecplist: *const super::super::Foundation::ECP_LIST, currentecpcontext: Option<*const core::ffi::c_void>, nextecptype: Option<*mut windows_core::GUID>, nextecpcontext: Option<*mut *mut core::ffi::c_void>, nextecpcontextsize: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetNextExtraCreateParameter(ecplist : *const super::super::Foundation:: ECP_LIST, currentecpcontext : *const core::ffi::c_void, nextecptype : *mut windows_core::GUID, nextecpcontext : *mut *mut core::ffi::c_void, nextecpcontextsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlGetNextExtraCreateParameter(ecplist, core::mem::transmute(currentecpcontext.unwrap_or(std::ptr::null())), core::mem::transmute(nextecptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(nextecpcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(nextecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FsRtlGetNextExtraCreateParameter(ecplist, core::mem::transmute(currentecpcontext.unwrap_or(core::ptr::null())), core::mem::transmute(nextecptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nextecpcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(nextecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -806,7 +806,7 @@ pub unsafe fn FsRtlGetSupportedFeatures(deviceobject: *const super::super::Found #[inline] pub unsafe fn FsRtlGetVirtualDiskNestingLevel(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, nestinglevel: *mut u32, nestingflags: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlGetVirtualDiskNestingLevel(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, nestinglevel : *mut u32, nestingflags : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlGetVirtualDiskNestingLevel(deviceobject, nestinglevel, core::mem::transmute(nestingflags.unwrap_or(std::ptr::null_mut()))) + FsRtlGetVirtualDiskNestingLevel(deviceobject, nestinglevel, core::mem::transmute(nestingflags.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FsRtlIncrementCcFastMdlReadWait() { @@ -854,7 +854,7 @@ pub unsafe fn FsRtlInitializeBaseMcbEx(mcb: *mut BASE_MCB, pooltype: super::supe #[inline] pub unsafe fn FsRtlInitializeExtraCreateParameter(ecp: *mut super::super::Foundation::ECP_HEADER, ecpflags: u32, cleanupcallback: PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, totalsize: u32, ecptype: *const windows_core::GUID, listallocatedfrom: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlInitializeExtraCreateParameter(ecp : *mut super::super::Foundation:: ECP_HEADER, ecpflags : u32, cleanupcallback : PFSRTL_EXTRA_CREATE_PARAMETER_CLEANUP_CALLBACK, totalsize : u32, ecptype : *const windows_core::GUID, listallocatedfrom : *const core::ffi::c_void)); - FsRtlInitializeExtraCreateParameter(ecp, ecpflags, cleanupcallback, totalsize, ecptype, core::mem::transmute(listallocatedfrom.unwrap_or(std::ptr::null()))) + FsRtlInitializeExtraCreateParameter(ecp, ecpflags, cleanupcallback, totalsize, ecptype, core::mem::transmute(listallocatedfrom.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1025,7 +1025,7 @@ pub unsafe fn FsRtlIsSystemPagingFile(fileobject: *const super::super::Foundatio #[inline] pub unsafe fn FsRtlIssueDeviceIoControl(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, ioctl: u32, flags: u8, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*const core::ffi::c_void>, outputbufferlength: u32, iosbinformation: Option<*mut usize>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlIssueDeviceIoControl(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, ioctl : u32, flags : u8, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *const core::ffi::c_void, outputbufferlength : u32, iosbinformation : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlIssueDeviceIoControl(deviceobject, ioctl, flags, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null())), outputbufferlength, core::mem::transmute(iosbinformation.unwrap_or(std::ptr::null_mut()))) + FsRtlIssueDeviceIoControl(deviceobject, ioctl, flags, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null())), outputbufferlength, core::mem::transmute(iosbinformation.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1045,13 +1045,13 @@ where #[inline] pub unsafe fn FsRtlLookupBaseMcbEntry(mcb: *const BASE_MCB, vbn: i64, lbn: Option<*mut i64>, sectorcountfromlbn: Option<*mut i64>, startinglbn: Option<*mut i64>, sectorcountfromstartinglbn: Option<*mut i64>, index: Option<*mut u32>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupBaseMcbEntry(mcb : *const BASE_MCB, vbn : i64, lbn : *mut i64, sectorcountfromlbn : *mut i64, startinglbn : *mut i64, sectorcountfromstartinglbn : *mut i64, index : *mut u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlLookupBaseMcbEntry(mcb, vbn, core::mem::transmute(lbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sectorcountfromlbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startinglbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(index.unwrap_or(std::ptr::null_mut()))) + FsRtlLookupBaseMcbEntry(mcb, vbn, core::mem::transmute(lbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sectorcountfromlbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startinglbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(index.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupLargeMcbEntry(mcb: *const LARGE_MCB, vbn: i64, lbn: Option<*mut i64>, sectorcountfromlbn: Option<*mut i64>, startinglbn: Option<*mut i64>, sectorcountfromstartinglbn: Option<*mut i64>, index: Option<*mut u32>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupLargeMcbEntry(mcb : *const LARGE_MCB, vbn : i64, lbn : *mut i64, sectorcountfromlbn : *mut i64, startinglbn : *mut i64, sectorcountfromstartinglbn : *mut i64, index : *mut u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlLookupLargeMcbEntry(mcb, vbn, core::mem::transmute(lbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sectorcountfromlbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startinglbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(index.unwrap_or(std::ptr::null_mut()))) + FsRtlLookupLargeMcbEntry(mcb, vbn, core::mem::transmute(lbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sectorcountfromlbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startinglbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sectorcountfromstartinglbn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(index.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FsRtlLookupLastBaseMcbEntry(mcb: *const BASE_MCB, vbn: *mut i64, lbn: *mut i64) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -1085,37 +1085,37 @@ pub unsafe fn FsRtlLookupLastMcbEntry(mcb: *const MCB, vbn: *mut u32, lbn: *mut #[inline] pub unsafe fn FsRtlLookupMcbEntry(mcb: *const MCB, vbn: u32, lbn: *mut u32, sectorcount: Option<*mut u32>, index: *mut u32) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupMcbEntry(mcb : *const MCB, vbn : u32, lbn : *mut u32, sectorcount : *mut u32, index : *mut u32) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlLookupMcbEntry(mcb, vbn, lbn, core::mem::transmute(sectorcount.unwrap_or(std::ptr::null_mut())), index) + FsRtlLookupMcbEntry(mcb, vbn, lbn, core::mem::transmute(sectorcount.unwrap_or(core::ptr::null_mut())), index) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupPerFileContext(perfilecontextpointer: *const *const core::ffi::c_void, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_FILE_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupPerFileContext(perfilecontextpointer : *const *const core::ffi::c_void, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_FILE_CONTEXT); - FsRtlLookupPerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlLookupPerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlLookupPerFileObjectContext(fileobject: *const super::super::Foundation::FILE_OBJECT, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_FILEOBJECT_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupPerFileObjectContext(fileobject : *const super::super::Foundation:: FILE_OBJECT, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_FILEOBJECT_CONTEXT); - FsRtlLookupPerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlLookupPerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlLookupPerStreamContextInternal(streamcontext: *const FSRTL_ADVANCED_FCB_HEADER, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_STREAM_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlLookupPerStreamContextInternal(streamcontext : *const FSRTL_ADVANCED_FCB_HEADER, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_STREAM_CONTEXT); - FsRtlLookupPerStreamContextInternal(streamcontext, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlLookupPerStreamContextInternal(streamcontext, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlMdlReadCompleteDev(fileobject: *const super::super::Foundation::FILE_OBJECT, mdlchain: *const super::super::Foundation::MDL, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMdlReadCompleteDev(fileobject : *const super::super::Foundation:: FILE_OBJECT, mdlchain : *const super::super::Foundation:: MDL, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlMdlReadCompleteDev(fileobject, mdlchain, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + FsRtlMdlReadCompleteDev(fileobject, mdlchain, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlMdlReadDev(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, length: u32, lockkey: u32, mdlchain: *mut *mut super::super::Foundation::MDL, iostatus: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMdlReadDev(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : u32, lockkey : u32, mdlchain : *mut *mut super::super::Foundation:: MDL, iostatus : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlMdlReadDev(fileobject, fileoffset, length, lockkey, mdlchain, iostatus, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + FsRtlMdlReadDev(fileobject, fileoffset, length, lockkey, mdlchain, iostatus, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1127,7 +1127,7 @@ pub unsafe fn FsRtlMdlReadEx(fileobject: *const super::super::Foundation::FILE_O #[inline] pub unsafe fn FsRtlMdlWriteCompleteDev(fileobject: *const super::super::Foundation::FILE_OBJECT, fileoffset: *const i64, mdlchain: *const super::super::Foundation::MDL, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlMdlWriteCompleteDev(fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, mdlchain : *const super::super::Foundation:: MDL, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlMdlWriteCompleteDev(fileobject, fileoffset, mdlchain, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + FsRtlMdlWriteCompleteDev(fileobject, fileoffset, mdlchain, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FsRtlMupGetProviderIdFromName(pprovidername: *const super::super::super::Win32::Foundation::UNICODE_STRING, pproviderid: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1176,7 +1176,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFilterChangeDirectory(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *const super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifyirp : *const super::super::Foundation:: IRP, traversecallback : PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, filtercallback : PFILTER_REPORT_CHANGE)); - FsRtlNotifyFilterChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, core::mem::transmute(notifyirp.unwrap_or(std::ptr::null())), traversecallback, core::mem::transmute(subjectcontext.unwrap_or(std::ptr::null())), filtercallback) + FsRtlNotifyFilterChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, core::mem::transmute(notifyirp.unwrap_or(core::ptr::null())), traversecallback, core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null())), filtercallback) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1185,7 +1185,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFilterReportChange(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fulltargetname : *const super::super::super::Win32::System::Kernel:: STRING, targetnameoffset : u16, streamname : *const super::super::super::Win32::System::Kernel:: STRING, normalizedparentname : *const super::super::super::Win32::System::Kernel:: STRING, filtermatch : u32, action : u32, targetcontext : *const core::ffi::c_void, filtercontext : *const core::ffi::c_void)); - FsRtlNotifyFilterReportChange(notifysync.param().abi(), notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(std::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(std::ptr::null())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(std::ptr::null())), core::mem::transmute(filtercontext.unwrap_or(std::ptr::null()))) + FsRtlNotifyFilterReportChange(notifysync.param().abi(), notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(core::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(core::ptr::null())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(core::ptr::null())), core::mem::transmute(filtercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1196,7 +1196,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFullChangeDirectory(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fscontext : *const core::ffi::c_void, fulldirectoryname : *mut super::super::super::Win32::System::Kernel:: STRING, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, ignorebuffer : super::super::super::Win32::Foundation:: BOOLEAN, completionfilter : u32, notifyirp : *const super::super::Foundation:: IRP, traversecallback : PCHECK_FOR_TRAVERSE_ACCESS, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT)); - FsRtlNotifyFullChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, core::mem::transmute(notifyirp.unwrap_or(std::ptr::null())), traversecallback, core::mem::transmute(subjectcontext.unwrap_or(std::ptr::null()))) + FsRtlNotifyFullChangeDirectory(notifysync.param().abi(), notifylist, fscontext, fulldirectoryname, watchtree.param().abi(), ignorebuffer.param().abi(), completionfilter, core::mem::transmute(notifyirp.unwrap_or(core::ptr::null())), traversecallback, core::mem::transmute(subjectcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1205,7 +1205,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlNotifyFullReportChange(notifysync : super::super::Foundation:: PNOTIFY_SYNC, notifylist : *const super::super::super::Win32::System::Kernel:: LIST_ENTRY, fulltargetname : *const super::super::super::Win32::System::Kernel:: STRING, targetnameoffset : u16, streamname : *const super::super::super::Win32::System::Kernel:: STRING, normalizedparentname : *const super::super::super::Win32::System::Kernel:: STRING, filtermatch : u32, action : u32, targetcontext : *const core::ffi::c_void)); - FsRtlNotifyFullReportChange(notifysync.param().abi(), notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(std::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(std::ptr::null())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(std::ptr::null()))) + FsRtlNotifyFullReportChange(notifysync.param().abi(), notifylist, fulltargetname, targetnameoffset, core::mem::transmute(streamname.unwrap_or(core::ptr::null())), core::mem::transmute(normalizedparentname.unwrap_or(core::ptr::null())), filtermatch, action, core::mem::transmute(targetcontext.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1254,25 +1254,25 @@ pub unsafe fn FsRtlNumberOfRunsInMcb(mcb: *const MCB) -> u32 { #[inline] pub unsafe fn FsRtlOplockBreakH(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockBreakH(oplock : *const *const core::ffi::c_void, irp : *const super::super::Foundation:: IRP, flags : u32, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlOplockBreakH(oplock, irp, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine) + FsRtlOplockBreakH(oplock, irp, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlOplockBreakH2(oplock: *const *const core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP, grantedaccess: Option<*const u32>, shareaccess: Option<*const u16>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockBreakH2(oplock : *const *const core::ffi::c_void, irp : *const super::super::Foundation:: IRP, flags : u32, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP, grantedaccess : *const u32, shareaccess : *const u16) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlOplockBreakH2(oplock, irp, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine, core::mem::transmute(grantedaccess.unwrap_or(std::ptr::null())), core::mem::transmute(shareaccess.unwrap_or(std::ptr::null()))) + FsRtlOplockBreakH2(oplock, irp, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine, core::mem::transmute(grantedaccess.unwrap_or(core::ptr::null())), core::mem::transmute(shareaccess.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlOplockBreakToNone(oplock: *mut *mut core::ffi::c_void, irpsp: Option<*const super::super::Foundation::IO_STACK_LOCATION>, irp: *const super::super::Foundation::IRP, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockBreakToNone(oplock : *mut *mut core::ffi::c_void, irpsp : *const super::super::Foundation:: IO_STACK_LOCATION, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlOplockBreakToNone(oplock, core::mem::transmute(irpsp.unwrap_or(std::ptr::null())), irp, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine) + FsRtlOplockBreakToNone(oplock, core::mem::transmute(irpsp.unwrap_or(core::ptr::null())), irp, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlOplockBreakToNoneEx(oplock: *mut *mut core::ffi::c_void, irp: *const super::super::Foundation::IRP, flags: u32, context: Option<*const core::ffi::c_void>, completionroutine: POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine: POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockBreakToNoneEx(oplock : *mut *mut core::ffi::c_void, irp : *const super::super::Foundation:: IRP, flags : u32, context : *const core::ffi::c_void, completionroutine : POPLOCK_WAIT_COMPLETE_ROUTINE, postirproutine : POPLOCK_FS_PREPOST_IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlOplockBreakToNoneEx(oplock, irp, flags, core::mem::transmute(context.unwrap_or(std::ptr::null())), completionroutine, postirproutine) + FsRtlOplockBreakToNoneEx(oplock, irp, flags, core::mem::transmute(context.unwrap_or(core::ptr::null())), completionroutine, postirproutine) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1307,7 +1307,7 @@ pub unsafe fn FsRtlOplockIsSharedRequest(irp: *const super::super::Foundation::I #[inline] pub unsafe fn FsRtlOplockKeysEqual(fo1: Option<*const super::super::Foundation::FILE_OBJECT>, fo2: Option<*const super::super::Foundation::FILE_OBJECT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlOplockKeysEqual(fo1 : *const super::super::Foundation:: FILE_OBJECT, fo2 : *const super::super::Foundation:: FILE_OBJECT) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(std::ptr::null())), core::mem::transmute(fo2.unwrap_or(std::ptr::null()))) + FsRtlOplockKeysEqual(core::mem::transmute(fo1.unwrap_or(core::ptr::null())), core::mem::transmute(fo2.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1348,13 +1348,13 @@ where P3: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlPrivateLock(filelock : *const FILE_LOCK, fileobject : *const super::super::Foundation:: FILE_OBJECT, fileoffset : *const i64, length : *const i64, processid : super::super::Foundation:: PEPROCESS, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN, iosb : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void, alreadysynchronized : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - FsRtlPrivateLock(filelock, fileobject, fileoffset, length, processid.param().abi(), key, failimmediately.param().abi(), exclusivelock.param().abi(), iosb, core::mem::transmute(irp.unwrap_or(std::ptr::null())), core::mem::transmute(context.unwrap_or(std::ptr::null())), alreadysynchronized.param().abi()) + FsRtlPrivateLock(filelock, fileobject, fileoffset, length, processid.param().abi(), key, failimmediately.param().abi(), exclusivelock.param().abi(), iosb, core::mem::transmute(irp.unwrap_or(core::ptr::null())), core::mem::transmute(context.unwrap_or(core::ptr::null())), alreadysynchronized.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlProcessFileLock(filelock: *const FILE_LOCK, irp: *const super::super::Foundation::IRP, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlProcessFileLock(filelock : *const FILE_LOCK, irp : *const super::super::Foundation:: IRP, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlProcessFileLock(filelock, irp, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + FsRtlProcessFileLock(filelock, irp, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1376,7 +1376,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlQueryKernelEaFile(fileobject : *const super::super::Foundation:: FILE_OBJECT, returnedeadata : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, lengthreturned : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlQueryKernelEaFile(fileobject, returnedeadata, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(std::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(std::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(std::ptr::null_mut()))) + FsRtlQueryKernelEaFile(fileobject, returnedeadata, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi(), core::mem::transmute(lengthreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FsRtlQueryMaximumVirtualDiskNestingLevel() -> u32 { @@ -1429,7 +1429,7 @@ pub unsafe fn FsRtlRemoveDotsFromPath(originalstring: windows_core::PWSTR, pathl #[inline] pub unsafe fn FsRtlRemoveExtraCreateParameter(ecplist: *mut super::super::Foundation::ECP_LIST, ecptype: *const windows_core::GUID, ecpcontext: *mut *mut core::ffi::c_void, ecpcontextsize: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemoveExtraCreateParameter(ecplist : *mut super::super::Foundation:: ECP_LIST, ecptype : *const windows_core::GUID, ecpcontext : *mut *mut core::ffi::c_void, ecpcontextsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - FsRtlRemoveExtraCreateParameter(ecplist, ecptype, ecpcontext, core::mem::transmute(ecpcontextsize.unwrap_or(std::ptr::null_mut()))) + FsRtlRemoveExtraCreateParameter(ecplist, ecptype, ecpcontext, core::mem::transmute(ecpcontextsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1447,19 +1447,19 @@ pub unsafe fn FsRtlRemoveMcbEntry(mcb: *mut MCB, vbn: u32, sectorcount: u32) { #[inline] pub unsafe fn FsRtlRemovePerFileContext(perfilecontextpointer: *const *const core::ffi::c_void, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_FILE_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemovePerFileContext(perfilecontextpointer : *const *const core::ffi::c_void, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_FILE_CONTEXT); - FsRtlRemovePerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlRemovePerFileContext(perfilecontextpointer, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn FsRtlRemovePerFileObjectContext(fileobject: *const super::super::Foundation::FILE_OBJECT, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_FILEOBJECT_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemovePerFileObjectContext(fileobject : *const super::super::Foundation:: FILE_OBJECT, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_FILEOBJECT_CONTEXT); - FsRtlRemovePerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlRemovePerFileObjectContext(fileobject, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn FsRtlRemovePerStreamContext(streamcontext: *const FSRTL_ADVANCED_FCB_HEADER, ownerid: Option<*const core::ffi::c_void>, instanceid: Option<*const core::ffi::c_void>) -> *mut FSRTL_PER_STREAM_CONTEXT { windows_targets::link!("ntoskrnl.exe" "system" fn FsRtlRemovePerStreamContext(streamcontext : *const FSRTL_ADVANCED_FCB_HEADER, ownerid : *const core::ffi::c_void, instanceid : *const core::ffi::c_void) -> *mut FSRTL_PER_STREAM_CONTEXT); - FsRtlRemovePerStreamContext(streamcontext, core::mem::transmute(ownerid.unwrap_or(std::ptr::null())), core::mem::transmute(instanceid.unwrap_or(std::ptr::null()))) + FsRtlRemovePerStreamContext(streamcontext, core::mem::transmute(ownerid.unwrap_or(core::ptr::null())), core::mem::transmute(instanceid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FsRtlResetBaseMcb() -> BASE_MCB { @@ -1588,7 +1588,7 @@ pub unsafe fn FsRtlVolumeDeviceToCorrelationId(volumedeviceobject: *const super: #[inline] pub unsafe fn GetSecurityUserInfo(logonid: Option<*const super::super::super::Win32::Foundation::LUID>, flags: u32, userinformation: *mut *mut super::super::super::Win32::Security::Authentication::Identity::SECURITY_USER_DATA) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn GetSecurityUserInfo(logonid : *const super::super::super::Win32::Foundation:: LUID, flags : u32, userinformation : *mut *mut super::super::super::Win32::Security::Authentication::Identity:: SECURITY_USER_DATA) -> super::super::super::Win32::Foundation:: NTSTATUS); - GetSecurityUserInfo(core::mem::transmute(logonid.unwrap_or(std::ptr::null())), flags, userinformation) + GetSecurityUserInfo(core::mem::transmute(logonid.unwrap_or(core::ptr::null())), flags, userinformation) } #[inline] pub unsafe fn IoAcquireVpbSpinLock() -> u8 { @@ -1604,7 +1604,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoApplyPriorityInfoThread(inputpriorityinfo : *const IO_PRIORITY_INFO, outputpriorityinfo : *mut IO_PRIORITY_INFO, thread : super::super::Foundation:: PETHREAD) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(std::ptr::null_mut())), thread.param().abi()) + IoApplyPriorityInfoThread(inputpriorityinfo, core::mem::transmute(outputpriorityinfo.unwrap_or(core::ptr::null_mut())), thread.param().abi()) } #[inline] pub unsafe fn IoCheckDesiredAccess(desiredaccess: *mut u32, grantedaccess: u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1619,7 +1619,7 @@ pub unsafe fn IoCheckEaBufferValidity(eabuffer: *const FILE_FULL_EA_INFORMATION, #[inline] pub unsafe fn IoCheckFunctionAccess(grantedaccess: u32, majorfunction: u8, minorfunction: u8, iocontrolcode: u32, arg1: Option<*const core::ffi::c_void>, arg2: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckFunctionAccess(grantedaccess : u32, majorfunction : u8, minorfunction : u8, iocontrolcode : u32, arg1 : *const core::ffi::c_void, arg2 : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckFunctionAccess(grantedaccess, majorfunction, minorfunction, iocontrolcode, core::mem::transmute(arg1.unwrap_or(std::ptr::null())), core::mem::transmute(arg2.unwrap_or(std::ptr::null()))) + IoCheckFunctionAccess(grantedaccess, majorfunction, minorfunction, iocontrolcode, core::mem::transmute(arg1.unwrap_or(core::ptr::null())), core::mem::transmute(arg2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoCheckQuerySetFileInformation(fileinformationclass: FILE_INFORMATION_CLASS, length: u32, setoperation: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -1653,37 +1653,37 @@ pub unsafe fn IoClearFsTrackOffsetState(irp: *mut super::super::Foundation::IRP) #[inline] pub unsafe fn IoCreateStreamFileObject(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -> *mut super::super::Foundation::FILE_OBJECT { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateStreamFileObject(fileobject : *const super::super::Foundation:: FILE_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> *mut super::super::Foundation:: FILE_OBJECT); - IoCreateStreamFileObject(core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + IoCreateStreamFileObject(core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoCreateStreamFileObjectEx(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, filehandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>) -> *mut super::super::Foundation::FILE_OBJECT { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateStreamFileObjectEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, filehandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> *mut super::super::Foundation:: FILE_OBJECT); - IoCreateStreamFileObjectEx(core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(filehandle.unwrap_or(std::ptr::null_mut()))) + IoCreateStreamFileObjectEx(core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(filehandle.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoCreateStreamFileObjectEx2(createoptions: *const IO_CREATE_STREAM_FILE_OPTIONS, fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, streamfileobject: *mut *mut super::super::Foundation::FILE_OBJECT, filehandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateStreamFileObjectEx2(createoptions : *const IO_CREATE_STREAM_FILE_OPTIONS, fileobject : *const super::super::Foundation:: FILE_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, streamfileobject : *mut *mut super::super::Foundation:: FILE_OBJECT, filehandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateStreamFileObjectEx2(createoptions, core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), streamfileobject, core::mem::transmute(filehandle.unwrap_or(std::ptr::null_mut()))) + IoCreateStreamFileObjectEx2(createoptions, core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), streamfileobject, core::mem::transmute(filehandle.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoCreateStreamFileObjectLite(fileobject: Option<*const super::super::Foundation::FILE_OBJECT>, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>) -> *mut super::super::Foundation::FILE_OBJECT { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateStreamFileObjectLite(fileobject : *const super::super::Foundation:: FILE_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT) -> *mut super::super::Foundation:: FILE_OBJECT); - IoCreateStreamFileObjectLite(core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + IoCreateStreamFileObjectLite(core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoEnumerateDeviceObjectList(driverobject: *const super::super::Foundation::DRIVER_OBJECT, deviceobjectlist: Option<*mut *mut super::super::Foundation::DEVICE_OBJECT>, deviceobjectlistsize: u32, actualnumberdeviceobjects: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoEnumerateDeviceObjectList(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, deviceobjectlist : *mut *mut super::super::Foundation:: DEVICE_OBJECT, deviceobjectlistsize : u32, actualnumberdeviceobjects : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoEnumerateDeviceObjectList(driverobject, core::mem::transmute(deviceobjectlist.unwrap_or(std::ptr::null_mut())), deviceobjectlistsize, actualnumberdeviceobjects) + IoEnumerateDeviceObjectList(driverobject, core::mem::transmute(deviceobjectlist.unwrap_or(core::ptr::null_mut())), deviceobjectlistsize, actualnumberdeviceobjects) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoEnumerateRegisteredFiltersList(driverobjectlist: Option<*mut *mut super::super::Foundation::DRIVER_OBJECT>, driverobjectlistsize: u32, actualnumberdriverobjects: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoEnumerateRegisteredFiltersList(driverobjectlist : *mut *mut super::super::Foundation:: DRIVER_OBJECT, driverobjectlistsize : u32, actualnumberdriverobjects : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoEnumerateRegisteredFiltersList(core::mem::transmute(driverobjectlist.unwrap_or(std::ptr::null_mut())), driverobjectlistsize, actualnumberdriverobjects) + IoEnumerateRegisteredFiltersList(core::mem::transmute(driverobjectlist.unwrap_or(core::ptr::null_mut())), driverobjectlistsize, actualnumberdriverobjects) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] @@ -1871,7 +1871,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoRetrievePriorityInfo(irp : *const super::super::Foundation:: IRP, fileobject : *const super::super::Foundation:: FILE_OBJECT, thread : super::super::Foundation:: PETHREAD, priorityinfo : *mut IO_PRIORITY_INFO) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRetrievePriorityInfo(core::mem::transmute(irp.unwrap_or(std::ptr::null())), core::mem::transmute(fileobject.unwrap_or(std::ptr::null())), thread.param().abi(), priorityinfo) + IoRetrievePriorityInfo(core::mem::transmute(irp.unwrap_or(core::ptr::null())), core::mem::transmute(fileobject.unwrap_or(core::ptr::null())), thread.param().abi(), priorityinfo) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1880,7 +1880,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetDeviceToVerify(thread : super::super::Foundation:: PETHREAD, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT)); - IoSetDeviceToVerify(thread.param().abi(), core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + IoSetDeviceToVerify(thread.param().abi(), core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Ioctl", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2014,7 +2014,7 @@ pub unsafe fn KeReleaseQueuedSpinLock(number: super::super::Foundation::KSPIN_LO #[inline] pub unsafe fn KeRemoveQueue(queue: *mut super::super::Foundation::KQUEUE, waitmode: i8, timeout: Option<*const i64>) -> *mut super::super::super::Win32::System::Kernel::LIST_ENTRY { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueue(queue : *mut super::super::Foundation:: KQUEUE, waitmode : i8, timeout : *const i64) -> *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY); - KeRemoveQueue(queue, waitmode, core::mem::transmute(timeout.unwrap_or(std::ptr::null()))) + KeRemoveQueue(queue, waitmode, core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2023,7 +2023,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn KeRemoveQueueEx(queue : *mut super::super::Foundation:: KQUEUE, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, entryarray : *mut *mut super::super::super::Win32::System::Kernel:: LIST_ENTRY, count : u32) -> u32); - KeRemoveQueueEx(queue, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) + KeRemoveQueueEx(queue, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(entryarray.as_ptr()), entryarray.len().try_into().unwrap()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2083,7 +2083,7 @@ pub unsafe fn MapSecurityError(secstatus: windows_core::HRESULT) -> super::super #[inline] pub unsafe fn MmCanFileBeTruncated(sectionpointer: *const super::super::Foundation::SECTION_OBJECT_POINTERS, newfilesize: Option<*const i64>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn MmCanFileBeTruncated(sectionpointer : *const super::super::Foundation:: SECTION_OBJECT_POINTERS, newfilesize : *const i64) -> super::super::super::Win32::Foundation:: BOOLEAN); - MmCanFileBeTruncated(sectionpointer, core::mem::transmute(newfilesize.unwrap_or(std::ptr::null()))) + MmCanFileBeTruncated(sectionpointer, core::mem::transmute(newfilesize.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2153,7 +2153,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + NtAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2180,7 +2180,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckByTypeAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + NtAccessCheckByTypeAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2208,7 +2208,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + NtAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2238,7 +2238,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), clienttoken.param().abi(), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + NtAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2248,7 +2248,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_GROUPS, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_GROUPS, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAdjustGroupsToken(tokenhandle.param().abi(), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(std::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut())), returnlength) + NtAdjustGroupsToken(tokenhandle.param().abi(), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), returnlength) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2258,7 +2258,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtAdjustPrivilegesToken(tokenhandle.param().abi(), disableallprivileges.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()))) + NtAdjustPrivilegesToken(tokenhandle.param().abi(), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NtAllocateVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2284,7 +2284,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCancelIoFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, iorequesttocancel : *const super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCancelIoFileEx(filehandle.param().abi(), core::mem::transmute(iorequesttocancel.unwrap_or(std::ptr::null())), iostatusblock) + NtCancelIoFileEx(filehandle.param().abi(), core::mem::transmute(iorequesttocancel.unwrap_or(core::ptr::null())), iostatusblock) } #[inline] pub unsafe fn NtCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2292,7 +2292,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), generateonclose.param().abi()) + NtCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2307,13 +2307,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, eventtype : super::super::super::Win32::System::Kernel:: EVENT_TYPE, initialstate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateEvent(eventhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), eventtype, initialstate.param().abi()) + NtCreateEvent(eventhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), eventtype, initialstate.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] pub unsafe fn NtCreateFile(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: super::super::super::Win32::Storage::FileSystem::FILE_ACCESS_RIGHTS, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: super::super::super::Win32::Storage::FileSystem::FILE_FLAGS_AND_ATTRIBUTES, shareaccess: super::super::super::Win32::Storage::FileSystem::FILE_SHARE_MODE, createdisposition: NTCREATEFILE_CREATE_DISPOSITION, createoptions: NTCREATEFILE_CREATE_OPTIONS, eabuffer: Option<*const core::ffi::c_void>, ealength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateFile(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : super::super::super::Win32::Storage::FileSystem:: FILE_ACCESS_RIGHTS, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : super::super::super::Win32::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, shareaccess : super::super::super::Win32::Storage::FileSystem:: FILE_SHARE_MODE, createdisposition : NTCREATEFILE_CREATE_DISPOSITION, createoptions : NTCREATEFILE_CREATE_OPTIONS, eabuffer : *const core::ffi::c_void, ealength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength) + NtCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2322,7 +2322,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateSection(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, filehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateSection(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi()) + NtCreateSection(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Memory"))] #[inline] @@ -2331,7 +2331,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateSectionEx(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, filehandle : super::super::super::Win32::Foundation:: HANDLE, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateSectionEx(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + NtCreateSectionEx(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2345,7 +2345,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), generateonclose.param().abi()) + NtDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) } #[inline] pub unsafe fn NtDuplicateObject(sourceprocesshandle: P0, sourcehandle: P1, targetprocesshandle: P2, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2355,7 +2355,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtDuplicateObject(sourceprocesshandle : super::super::super::Win32::Foundation:: HANDLE, sourcehandle : super::super::super::Win32::Foundation:: HANDLE, targetprocesshandle : super::super::super::Win32::Foundation:: HANDLE, targethandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, handleattributes : u32, options : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDuplicateObject(sourceprocesshandle.param().abi(), sourcehandle.param().abi(), targetprocesshandle.param().abi(), core::mem::transmute(targethandle.unwrap_or(std::ptr::null_mut())), desiredaccess, handleattributes, options) + NtDuplicateObject(sourceprocesshandle.param().abi(), sourcehandle.param().abi(), targetprocesshandle.param().abi(), core::mem::transmute(targethandle.unwrap_or(core::ptr::null_mut())), desiredaccess, handleattributes, options) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -2365,7 +2365,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtDuplicateToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDuplicateToken(existingtokenhandle.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), effectiveonly.param().abi(), tokentype, newtokenhandle) + NtDuplicateToken(existingtokenhandle.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), effectiveonly.param().abi(), tokentype, newtokenhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2374,7 +2374,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtFilterToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, sidstodisable : *const super::super::super::Win32::Security:: TOKEN_GROUPS, privilegestodelete : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, restrictedsids : *const super::super::super::Win32::Security:: TOKEN_GROUPS, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFilterToken(existingtokenhandle.param().abi(), flags, core::mem::transmute(sidstodisable.unwrap_or(std::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(std::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(std::ptr::null())), newtokenhandle) + NtFilterToken(existingtokenhandle.param().abi(), flags, core::mem::transmute(sidstodisable.unwrap_or(core::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(core::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(core::ptr::null())), newtokenhandle) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2419,7 +2419,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtFsControlFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fscontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtFsControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + NtFsControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn NtImpersonateAnonymousToken(threadhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2439,7 +2439,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtLockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtLockFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, byteoffset, length, key, failimmediately.param().abi(), exclusivelock.param().abi()) + NtLockFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, byteoffset, length, key, failimmediately.param().abi(), exclusivelock.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2451,7 +2451,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtNotifyChangeKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtNotifyChangeKey(keyhandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, asynchronous.param().abi()) + NtNotifyChangeKey(keyhandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, asynchronous.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2475,7 +2475,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtOpenObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) + NtOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) } #[inline] pub unsafe fn NtOpenProcessToken(processhandle: P0, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2534,7 +2534,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrivilegeObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), clienttoken.param().abi(), desiredaccess, privileges, accessgranted.param().abi()) + NtPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), desiredaccess, privileges, accessgranted.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2556,7 +2556,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryDirectoryFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(std::ptr::null())), restartscan.param().abi()) + NtQueryDirectoryFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::ptr::null())), restartscan.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2566,7 +2566,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, queryflags : u32, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryDirectoryFileEx(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(std::ptr::null()))) + NtQueryDirectoryFileEx(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtQueryDirectoryObject(directoryhandle: P0, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P1, restartscan: P2, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2576,7 +2576,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryDirectoryObject(directoryhandle.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), length, returnsingleentry.param().abi(), restartscan.param().abi(), context, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + NtQueryDirectoryObject(directoryhandle.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), length, returnsingleentry.param().abi(), restartscan.param().abi(), context, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2587,7 +2587,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryEaFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(std::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(std::ptr::null())), restartscan.param().abi()) + NtQueryEaFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2617,7 +2617,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, tokeninformationclass : super::super::super::Win32::Security:: TOKEN_INFORMATION_CLASS, tokeninformation : *mut core::ffi::c_void, tokeninformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationToken(tokenhandle.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(std::ptr::null_mut())), tokeninformationlength, returnlength) + NtQueryInformationToken(tokenhandle.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), tokeninformationlength, returnlength) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -2629,7 +2629,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryQuotaInformationFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(std::ptr::null())), sidlistlength, startsid.param().abi(), restartscan.param().abi()) + NtQueryQuotaInformationFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), sidlistlength, startsid.param().abi(), restartscan.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2646,7 +2646,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQuerySymbolicLinkObject(linkhandle : super::super::super::Win32::Foundation:: HANDLE, linktarget : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, returnedlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQuerySymbolicLinkObject(linkhandle.param().abi(), linktarget, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))) + NtQuerySymbolicLinkObject(linkhandle.param().abi(), linktarget, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NtQueryVirtualMemory(processhandle: P0, baseaddress: Option<*const core::ffi::c_void>, memoryinformationclass: MEMORY_INFORMATION_CLASS, memoryinformation: *mut core::ffi::c_void, memoryinformationlength: usize, returnlength: Option<*mut usize>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2654,7 +2654,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, memoryinformationclass : MEMORY_INFORMATION_CLASS, memoryinformation : *mut core::ffi::c_void, memoryinformationlength : usize, returnlength : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), memoryinformationclass, memoryinformation, memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + NtQueryVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), memoryinformationclass, memoryinformation, memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2673,7 +2673,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtReadFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, byteoffset : *const i64, key : *const u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtReadFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null()))) + NtReadFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2690,7 +2690,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtSetEvent(eventhandle : super::super::super::Win32::Foundation:: HANDLE, previousstate : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetEvent(eventhandle.param().abi(), core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut()))) + NtSetEvent(eventhandle.param().abi(), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2763,13 +2763,13 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtWriteFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32, byteoffset : *const i64, key : *const u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtWriteFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null()))) + NtWriteFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] pub unsafe fn ObInsertObject(object: *const core::ffi::c_void, passedaccessstate: Option<*mut super::super::Foundation::ACCESS_STATE>, desiredaccess: u32, objectpointerbias: u32, newobject: Option<*mut *mut core::ffi::c_void>, handle: Option<*mut super::super::super::Win32::Foundation::HANDLE>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObInsertObject(object : *const core::ffi::c_void, passedaccessstate : *mut super::super::Foundation:: ACCESS_STATE, desiredaccess : u32, objectpointerbias : u32, newobject : *mut *mut core::ffi::c_void, handle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObInsertObject(object, core::mem::transmute(passedaccessstate.unwrap_or(std::ptr::null_mut())), desiredaccess, objectpointerbias, core::mem::transmute(newobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut()))) + ObInsertObject(object, core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null_mut())), desiredaccess, objectpointerbias, core::mem::transmute(newobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ObIsKernelHandle(handle: P0) -> super::super::super::Win32::Foundation::BOOLEAN @@ -2791,7 +2791,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ObOpenObjectByPointer(object : *const core::ffi::c_void, handleattributes : u32, passedaccessstate : *const super::super::Foundation:: ACCESS_STATE, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8, handle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObOpenObjectByPointer(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(std::ptr::null())), desiredaccess, objecttype.param().abi(), accessmode, handle) + ObOpenObjectByPointer(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null())), desiredaccess, objecttype.param().abi(), accessmode, handle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -2800,13 +2800,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ObOpenObjectByPointerWithTag(object : *const core::ffi::c_void, handleattributes : u32, passedaccessstate : *const super::super::Foundation:: ACCESS_STATE, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8, tag : u32, handle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObOpenObjectByPointerWithTag(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(std::ptr::null())), desiredaccess, objecttype.param().abi(), accessmode, tag, handle) + ObOpenObjectByPointerWithTag(object, handleattributes, core::mem::transmute(passedaccessstate.unwrap_or(core::ptr::null())), desiredaccess, objecttype.param().abi(), accessmode, tag, handle) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ObQueryNameString(object: *const core::ffi::c_void, objectnameinfo: Option<*mut super::super::Foundation::OBJECT_NAME_INFORMATION>, length: u32, returnlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ObQueryNameString(object : *const core::ffi::c_void, objectnameinfo : *mut super::super::Foundation:: OBJECT_NAME_INFORMATION, length : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObQueryNameString(object, core::mem::transmute(objectnameinfo.unwrap_or(std::ptr::null_mut())), length, returnlength) + ObQueryNameString(object, core::mem::transmute(objectnameinfo.unwrap_or(core::ptr::null_mut())), length, returnlength) } #[inline] pub unsafe fn ObQueryObjectAuditingByHandle(handle: P0, generateonclose: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2918,7 +2918,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PsImpersonateClient(thread : super::super::Foundation:: PETHREAD, token : *const core::ffi::c_void, copyonopen : super::super::super::Win32::Foundation:: BOOLEAN, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, impersonationlevel : super::super::super::Win32::Security:: SECURITY_IMPERSONATION_LEVEL) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsImpersonateClient(thread.param().abi(), core::mem::transmute(token.unwrap_or(std::ptr::null())), copyonopen.param().abi(), effectiveonly.param().abi(), impersonationlevel) + PsImpersonateClient(thread.param().abi(), core::mem::transmute(token.unwrap_or(core::ptr::null())), copyonopen.param().abi(), effectiveonly.param().abi(), impersonationlevel) } #[inline] pub unsafe fn PsIsDiskCountersEnabled() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3115,7 +3115,7 @@ pub unsafe fn RtlCreateAcl(acl: *mut super::super::super::Win32::Security::ACL, #[inline] pub unsafe fn RtlCreateHeap(flags: u32, heapbase: Option<*const core::ffi::c_void>, reservesize: usize, commitsize: usize, lock: Option<*const core::ffi::c_void>, parameters: Option<*const RTL_HEAP_PARAMETERS>) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlCreateHeap(flags : u32, heapbase : *const core::ffi::c_void, reservesize : usize, commitsize : usize, lock : *const core::ffi::c_void, parameters : *const RTL_HEAP_PARAMETERS) -> *mut core::ffi::c_void); - RtlCreateHeap(flags, core::mem::transmute(heapbase.unwrap_or(std::ptr::null())), reservesize, commitsize, core::mem::transmute(lock.unwrap_or(std::ptr::null())), core::mem::transmute(parameters.unwrap_or(std::ptr::null()))) + RtlCreateHeap(flags, core::mem::transmute(heapbase.unwrap_or(core::ptr::null())), reservesize, commitsize, core::mem::transmute(lock.unwrap_or(core::ptr::null())), core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3145,7 +3145,7 @@ pub unsafe fn RtlCreateVirtualAccountSid(name: *const super::super::super::Win32 #[inline] pub unsafe fn RtlCustomCPToUnicodeN(customcp: *const CPTABLEINFO, unicodestring: windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: Option<*mut u32>, customcpstring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlCustomCPToUnicodeN(customcp : *const CPTABLEINFO, unicodestring : windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, customcpstring : windows_core::PCSTR, bytesincustomcpstring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlCustomCPToUnicodeN(customcp, core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(std::ptr::null_mut())), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap()) + RtlCustomCPToUnicodeN(customcp, core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap()) } #[inline] pub unsafe fn RtlDecompressBuffer(compressionformat: u16, uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], finaluncompressedsize: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3155,12 +3155,12 @@ pub unsafe fn RtlDecompressBuffer(compressionformat: u16, uncompressedbuffer: &m #[inline] pub unsafe fn RtlDecompressBufferEx(compressionformat: u16, uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], finaluncompressedsize: *mut u32, workspace: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlDecompressBufferEx(compressionformat : u16, uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, finaluncompressedsize : *mut u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDecompressBufferEx(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), finaluncompressedsize, core::mem::transmute(workspace.unwrap_or(std::ptr::null()))) + RtlDecompressBufferEx(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), finaluncompressedsize, core::mem::transmute(workspace.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlDecompressBufferEx2(compressionformat: u16, uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], uncompressedchunksize: u32, finaluncompressedsize: *mut u32, workspace: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlDecompressBufferEx2(compressionformat : u16, uncompressedbuffer : *mut u8, uncompressedbuffersize : u32, compressedbuffer : *const u8, compressedbuffersize : u32, uncompressedchunksize : u32, finaluncompressedsize : *mut u32, workspace : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlDecompressBufferEx2(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, finaluncompressedsize, core::mem::transmute(workspace.unwrap_or(std::ptr::null()))) + RtlDecompressBufferEx2(compressionformat, core::mem::transmute(uncompressedbuffer.as_ptr()), uncompressedbuffer.len().try_into().unwrap(), core::mem::transmute(compressedbuffer.as_ptr()), compressedbuffer.len().try_into().unwrap(), uncompressedchunksize, finaluncompressedsize, core::mem::transmute(workspace.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlDecompressChunks(uncompressedbuffer: &mut [u8], compressedbuffer: &[u8], compressedtail: &[u8], compresseddatainfo: *const COMPRESSED_DATA_INFO) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3235,7 +3235,7 @@ pub unsafe fn RtlFindUnicodePrefix(prefixtable: *const UNICODE_PREFIX_TABLE, ful #[inline] pub unsafe fn RtlFreeHeap(heaphandle: *const core::ffi::c_void, flags: u32, baseaddress: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlFreeHeap(heaphandle : *const core::ffi::c_void, flags : u32, baseaddress : *const core::ffi::c_void) -> u32); - RtlFreeHeap(heaphandle, flags, core::mem::transmute(baseaddress.unwrap_or(std::ptr::null()))) + RtlFreeHeap(heaphandle, flags, core::mem::transmute(baseaddress.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3413,7 +3413,7 @@ pub unsafe fn RtlIsPartialPlaceholderFileInfo(infobuffer: *const core::ffi::c_vo #[inline] pub unsafe fn RtlIsSandboxedToken(context: Option<*const super::super::Foundation::SECURITY_SUBJECT_CONTEXT>, previousmode: i8) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn RtlIsSandboxedToken(context : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, previousmode : i8) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlIsSandboxedToken(core::mem::transmute(context.unwrap_or(std::ptr::null())), previousmode) + RtlIsSandboxedToken(core::mem::transmute(context.unwrap_or(core::ptr::null())), previousmode) } #[inline] pub unsafe fn RtlIsValidOemCharacter(char: windows_core::PWSTR) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3437,7 +3437,7 @@ where #[inline] pub unsafe fn RtlMultiByteToUnicodeN(unicodestring: windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: Option<*mut u32>, multibytestring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlMultiByteToUnicodeN(unicodestring : windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, multibytestring : windows_core::PCSTR, bytesinmultibytestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(std::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) + RtlMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } #[inline] pub unsafe fn RtlMultiByteToUnicodeSize(bytesinunicodestring: *mut u32, multibytestring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3490,7 +3490,7 @@ where #[inline] pub unsafe fn RtlOemToUnicodeN(unicodestring: windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: Option<*mut u32>, oemstring: &[u8]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlOemToUnicodeN(unicodestring : windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, oemstring : windows_core::PCSTR, bytesinoemstring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlOemToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(std::ptr::null_mut())), core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) + RtlOemToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3504,12 +3504,12 @@ where #[inline] pub unsafe fn RtlQueryPackageIdentity(tokenobject: *const core::ffi::c_void, packagefullname: windows_core::PWSTR, packagesize: *mut usize, appid: windows_core::PWSTR, appidsize: Option<*mut usize>, packaged: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlQueryPackageIdentity(tokenobject : *const core::ffi::c_void, packagefullname : windows_core::PWSTR, packagesize : *mut usize, appid : windows_core::PWSTR, appidsize : *mut usize, packaged : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlQueryPackageIdentity(tokenobject, core::mem::transmute(packagefullname), packagesize, core::mem::transmute(appid), core::mem::transmute(appidsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(packaged.unwrap_or(std::ptr::null_mut()))) + RtlQueryPackageIdentity(tokenobject, core::mem::transmute(packagefullname), packagesize, core::mem::transmute(appid), core::mem::transmute(appidsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(packaged.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlQueryPackageIdentityEx(tokenobject: *const core::ffi::c_void, packagefullname: windows_core::PWSTR, packagesize: *mut usize, appid: windows_core::PWSTR, appidsize: Option<*mut usize>, dynamicid: Option<*mut windows_core::GUID>, flags: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlQueryPackageIdentityEx(tokenobject : *const core::ffi::c_void, packagefullname : windows_core::PWSTR, packagesize : *mut usize, appid : windows_core::PWSTR, appidsize : *mut usize, dynamicid : *mut windows_core::GUID, flags : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlQueryPackageIdentityEx(tokenobject, core::mem::transmute(packagefullname), packagesize, core::mem::transmute(appid), core::mem::transmute(appidsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(dynamicid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut()))) + RtlQueryPackageIdentityEx(tokenobject, core::mem::transmute(packagefullname), packagesize, core::mem::transmute(appid), core::mem::transmute(appidsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dynamicid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlQueryProcessPlaceholderCompatibilityMode() -> i8 { @@ -3573,7 +3573,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, absolutesecuritydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, absolutesecuritydescriptorsize : *mut u32, dacl : *mut super::super::super::Win32::Security:: ACL, daclsize : *mut u32, sacl : *mut super::super::super::Win32::Security:: ACL, saclsize : *mut u32, owner : super::super::super::Win32::Security:: PSID, ownersize : *mut u32, primarygroup : super::super::super::Win32::Security:: PSID, primarygroupsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor.param().abi(), absolutesecuritydescriptor, absolutesecuritydescriptorsize, core::mem::transmute(dacl.unwrap_or(std::ptr::null_mut())), daclsize, core::mem::transmute(sacl.unwrap_or(std::ptr::null_mut())), saclsize, owner, ownersize, primarygroup, primarygroupsize) + RtlSelfRelativeToAbsoluteSD(selfrelativesecuritydescriptor.param().abi(), absolutesecuritydescriptor, absolutesecuritydescriptorsize, core::mem::transmute(dacl.unwrap_or(core::ptr::null_mut())), daclsize, core::mem::transmute(sacl.unwrap_or(core::ptr::null_mut())), saclsize, owner, ownersize, primarygroup, primarygroupsize) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3643,17 +3643,17 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToCustomCPN(customcp : *const CPTABLEINFO, customcpstring : windows_core::PSTR, maxbytesincustomcpstring : u32, bytesincustomcpstring : *mut u32, unicodestring : windows_core::PCWSTR, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(std::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) + RtlUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) } #[inline] pub unsafe fn RtlUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToMultiByteN(multibytestring : windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[inline] pub unsafe fn RtlUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUnicodeToOemN(oemstring : windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3679,17 +3679,17 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToCustomCPN(customcp : *const CPTABLEINFO, customcpstring : windows_core::PSTR, maxbytesincustomcpstring : u32, bytesincustomcpstring : *mut u32, unicodestring : windows_core::PCWSTR, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(std::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) + RtlUpcaseUnicodeToCustomCPN(customcp, core::mem::transmute(customcpstring.as_ptr()), customcpstring.len().try_into().unwrap(), core::mem::transmute(bytesincustomcpstring.unwrap_or(core::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) } #[inline] pub unsafe fn RtlUpcaseUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToMultiByteN(multibytestring : windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUpcaseUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[inline] pub unsafe fn RtlUpcaseUnicodeToOemN(oemstring: &mut [u8], bytesinoemstring: Option<*mut u32>, unicodestring: *const u16, bytesinunicodestring: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlUpcaseUnicodeToOemN(oemstring : windows_core::PSTR, maxbytesinoemstring : u32, bytesinoemstring : *mut u32, unicodestring : *const u16, bytesinunicodestring : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUpcaseUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(std::ptr::null_mut())), unicodestring, bytesinunicodestring) + RtlUpcaseUnicodeToOemN(core::mem::transmute(oemstring.as_ptr()), oemstring.len().try_into().unwrap(), core::mem::transmute(bytesinoemstring.unwrap_or(core::ptr::null_mut())), unicodestring, bytesinunicodestring) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3723,7 +3723,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAccessCheckFromState(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, primarytokeninformation : *const super::super::super::Win32::Security:: TOKEN_ACCESS_INFORMATION, clienttokeninformation : *const super::super::super::Win32::Security:: TOKEN_ACCESS_INFORMATION, desiredaccess : u32, previouslygrantedaccess : u32, privileges : *mut *mut super::super::super::Win32::Security:: PRIVILEGE_SET, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, accessmode : i8, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAccessCheckFromState(securitydescriptor.param().abi(), primarytokeninformation, core::mem::transmute(clienttokeninformation.unwrap_or(std::ptr::null())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) + SeAccessCheckFromState(securitydescriptor.param().abi(), primarytokeninformation, core::mem::transmute(clienttokeninformation.unwrap_or(core::ptr::null())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3732,7 +3732,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAccessCheckFromStateEx(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, primarytoken : *const core::ffi::c_void, clienttoken : *const core::ffi::c_void, desiredaccess : u32, previouslygrantedaccess : u32, privileges : *mut *mut super::super::super::Win32::Security:: PRIVILEGE_SET, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, accessmode : i8, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAccessCheckFromStateEx(securitydescriptor.param().abi(), primarytoken, core::mem::transmute(clienttoken.unwrap_or(std::ptr::null())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) + SeAccessCheckFromStateEx(securitydescriptor.param().abi(), primarytoken, core::mem::transmute(clienttoken.unwrap_or(core::ptr::null())), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -3790,7 +3790,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditHardLinkCreationWithTransaction(filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, linkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, bsuccess : super::super::super::Win32::Foundation:: BOOLEAN, transactionid : *const windows_core::GUID)); - SeAuditHardLinkCreationWithTransaction(filename, linkname, bsuccess.param().abi(), core::mem::transmute(transactionid.unwrap_or(std::ptr::null()))) + SeAuditHardLinkCreationWithTransaction(filename, linkname, bsuccess.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SeAuditTransactionStateChange(transactionid: *const windows_core::GUID, resourcemanagerid: *const windows_core::GUID, newtransactionstate: u32) { @@ -3804,7 +3804,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingAnyFileEventsWithContext(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingAnyFileEventsWithContext(securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(std::ptr::null()))) + SeAuditingAnyFileEventsWithContext(securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3813,7 +3813,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingAnyFileEventsWithContextEx(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, stagingenabled : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingAnyFileEventsWithContextEx(securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(std::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(std::ptr::null_mut()))) + SeAuditingAnyFileEventsWithContextEx(securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3833,7 +3833,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContext(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEventsWithContext(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(std::ptr::null()))) + SeAuditingFileEventsWithContext(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3843,7 +3843,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingFileEventsWithContextEx(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, stagingenabled : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingFileEventsWithContextEx(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(std::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(std::ptr::null_mut()))) + SeAuditingFileEventsWithContextEx(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::ptr::null())), core::mem::transmute(stagingenabled.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3873,7 +3873,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAuditingHardLinkEventsWithContext(accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAuditingHardLinkEventsWithContext(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(std::ptr::null()))) + SeAuditingHardLinkEventsWithContext(accessgranted.param().abi(), securitydescriptor.param().abi(), core::mem::transmute(subjectsecuritycontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -3938,7 +3938,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeDeleteObjectAuditAlarmWithTransaction(object : *const core::ffi::c_void, handle : super::super::super::Win32::Foundation:: HANDLE, transactionid : *const windows_core::GUID)); - SeDeleteObjectAuditAlarmWithTransaction(object, handle.param().abi(), core::mem::transmute(transactionid.unwrap_or(std::ptr::null()))) + SeDeleteObjectAuditAlarmWithTransaction(object, handle.param().abi(), core::mem::transmute(transactionid.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -3953,7 +3953,7 @@ where #[inline] pub unsafe fn SeFilterToken(existingtoken: *const core::ffi::c_void, flags: u32, sidstodisable: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, privilegestodelete: Option<*const super::super::super::Win32::Security::TOKEN_PRIVILEGES>, restrictedsids: Option<*const super::super::super::Win32::Security::TOKEN_GROUPS>, filteredtoken: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeFilterToken(existingtoken : *const core::ffi::c_void, flags : u32, sidstodisable : *const super::super::super::Win32::Security:: TOKEN_GROUPS, privilegestodelete : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, restrictedsids : *const super::super::super::Win32::Security:: TOKEN_GROUPS, filteredtoken : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeFilterToken(existingtoken, flags, core::mem::transmute(sidstodisable.unwrap_or(std::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(std::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(std::ptr::null())), filteredtoken) + SeFilterToken(existingtoken, flags, core::mem::transmute(sidstodisable.unwrap_or(core::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(core::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(core::ptr::null())), filteredtoken) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4012,7 +4012,7 @@ where { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectAuditAlarm(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(std::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(std::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, &mut result__); + SeOpenObjectAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] @@ -4025,7 +4025,7 @@ where { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectAuditAlarmWithTransaction(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(std::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(std::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, core::mem::transmute(transactionid.unwrap_or(std::ptr::null())), &mut result__); + SeOpenObjectAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, core::mem::transmute(transactionid.unwrap_or(core::ptr::null())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] @@ -4038,7 +4038,7 @@ where { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectForDeleteAuditAlarm(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(std::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(std::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, &mut result__); + SeOpenObjectForDeleteAuditAlarm(objecttypename, core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] @@ -4051,7 +4051,7 @@ where { windows_targets::link!("ntoskrnl.exe" "system" fn SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, object : *const core::ffi::c_void, absoluteobjectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, accessstate : *const super::super::Foundation:: ACCESS_STATE, objectcreated : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, accessmode : i8, transactionid : *const windows_core::GUID, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN)); let mut result__ = core::mem::zeroed(); - SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(std::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(std::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, core::mem::transmute(transactionid.unwrap_or(std::ptr::null())), &mut result__); + SeOpenObjectForDeleteAuditAlarmWithTransaction(objecttypename, core::mem::transmute(object.unwrap_or(core::ptr::null())), core::mem::transmute(absoluteobjectname.unwrap_or(core::ptr::null())), securitydescriptor.param().abi(), accessstate, objectcreated.param().abi(), accessgranted.param().abi(), accessmode, core::mem::transmute(transactionid.unwrap_or(core::ptr::null())), &mut result__); result__ } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] @@ -4125,7 +4125,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeSetSecurityDescriptorInfo(object : *const core::ffi::c_void, securityinformation : *const u32, modificationdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, pooltype : super::super::Foundation:: POOL_TYPE, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeSetSecurityDescriptorInfo(core::mem::transmute(object.unwrap_or(std::ptr::null())), securityinformation, modificationdescriptor.param().abi(), objectssecuritydescriptor, pooltype, genericmapping) + SeSetSecurityDescriptorInfo(core::mem::transmute(object.unwrap_or(core::ptr::null())), securityinformation, modificationdescriptor.param().abi(), objectssecuritydescriptor, pooltype, genericmapping) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4134,7 +4134,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeSetSecurityDescriptorInfoEx(object : *const core::ffi::c_void, securityinformation : *const u32, modificationdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, objectssecuritydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, autoinheritflags : u32, pooltype : super::super::Foundation:: POOL_TYPE, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeSetSecurityDescriptorInfoEx(core::mem::transmute(object.unwrap_or(std::ptr::null())), securityinformation, modificationdescriptor.param().abi(), objectssecuritydescriptor, autoinheritflags, pooltype, genericmapping) + SeSetSecurityDescriptorInfoEx(core::mem::transmute(object.unwrap_or(core::ptr::null())), securityinformation, modificationdescriptor.param().abi(), objectssecuritydescriptor, autoinheritflags, pooltype, genericmapping) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_System_SystemServices", feature = "Win32_Security"))] #[inline] @@ -4149,7 +4149,7 @@ where #[inline] pub unsafe fn SeTokenFromAccessInformation(accessinformation: Option<*const super::super::super::Win32::Security::TOKEN_ACCESS_INFORMATION>, token: Option<*mut core::ffi::c_void>, length: u32, requiredlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeTokenFromAccessInformation(accessinformation : *const super::super::super::Win32::Security:: TOKEN_ACCESS_INFORMATION, token : *mut core::ffi::c_void, length : u32, requiredlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeTokenFromAccessInformation(core::mem::transmute(accessinformation.unwrap_or(std::ptr::null())), core::mem::transmute(token.unwrap_or(std::ptr::null_mut())), length, requiredlength) + SeTokenFromAccessInformation(core::mem::transmute(accessinformation.unwrap_or(core::ptr::null())), core::mem::transmute(token.unwrap_or(core::ptr::null_mut())), length, requiredlength) } #[inline] pub unsafe fn SeTokenIsAdmin(token: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -4186,7 +4186,7 @@ pub unsafe fn SeUnregisterLogonSessionTerminatedRoutineEx(callbackroutine: PSE_L #[inline] pub unsafe fn SecLookupAccountName(name: *const super::super::super::Win32::Foundation::UNICODE_STRING, sidsize: *mut u32, sid: super::super::super::Win32::Security::PSID, nameuse: *mut super::super::super::Win32::Security::SID_NAME_USE, domainsize: *mut u32, referenceddomain: Option<*mut super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecLookupAccountName(name : *const super::super::super::Win32::Foundation:: UNICODE_STRING, sidsize : *mut u32, sid : super::super::super::Win32::Security:: PSID, nameuse : *mut super::super::super::Win32::Security:: SID_NAME_USE, domainsize : *mut u32, referenceddomain : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecLookupAccountName(name, sidsize, sid, nameuse, domainsize, core::mem::transmute(referenceddomain.unwrap_or(std::ptr::null_mut()))) + SecLookupAccountName(name, sidsize, sid, nameuse, domainsize, core::mem::transmute(referenceddomain.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4195,13 +4195,13 @@ where P0: windows_core::Param, { windows_targets::link!("ksecdd.sys" "system" fn SecLookupAccountSid(sid : super::super::super::Win32::Security:: PSID, namesize : *mut u32, namebuffer : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, domainsize : *mut u32, domainbuffer : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, nameuse : *mut super::super::super::Win32::Security:: SID_NAME_USE) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecLookupAccountSid(sid.param().abi(), namesize, namebuffer, domainsize, core::mem::transmute(domainbuffer.unwrap_or(std::ptr::null_mut())), nameuse) + SecLookupAccountSid(sid.param().abi(), namesize, namebuffer, domainsize, core::mem::transmute(domainbuffer.unwrap_or(core::ptr::null_mut())), nameuse) } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SecLookupWellKnownSid(sidtype: super::super::super::Win32::Security::WELL_KNOWN_SID_TYPE, sid: super::super::super::Win32::Security::PSID, sidbuffersize: u32, sidsize: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ksecdd.sys" "system" fn SecLookupWellKnownSid(sidtype : super::super::super::Win32::Security:: WELL_KNOWN_SID_TYPE, sid : super::super::super::Win32::Security:: PSID, sidbuffersize : u32, sidsize : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - SecLookupWellKnownSid(sidtype, sid, sidbuffersize, core::mem::transmute(sidsize.unwrap_or(std::ptr::null_mut()))) + SecLookupWellKnownSid(sidtype, sid, sidbuffersize, core::mem::transmute(sidsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SecMakeSPN(serviceclass: *mut super::super::super::Win32::Foundation::UNICODE_STRING, servicename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING, instanceport: u16, referrer: *mut super::super::super::Win32::Foundation::UNICODE_STRING, spn: *mut super::super::super::Win32::Foundation::UNICODE_STRING, length: *mut u32, allocate: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4237,7 +4237,7 @@ pub unsafe fn SetContextAttributesW(phcontext: *const SecHandle, ulattribute: u3 #[inline] pub unsafe fn SspiAcceptSecurityContextAsync(asynccontext: *mut super::super::Foundation::SspiAsyncContext, phcredential: Option<*const SecHandle>, phcontext: Option<*const SecHandle>, pinput: Option<*const SecBufferDesc>, fcontextreq: u32, targetdatarep: u32, phnewcontext: Option<*const SecHandle>, poutput: Option<*const SecBufferDesc>, pfcontextattr: *const u32, ptsexpiry: Option<*const i64>) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiAcceptSecurityContextAsync(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle, phcontext : *const SecHandle, pinput : *const SecBufferDesc, fcontextreq : u32, targetdatarep : u32, phnewcontext : *const SecHandle, poutput : *const SecBufferDesc, pfcontextattr : *const u32, ptsexpiry : *const i64) -> windows_core::HRESULT); - SspiAcceptSecurityContextAsync(asynccontext, core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), core::mem::transmute(pinput.unwrap_or(std::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null())), core::mem::transmute(poutput.unwrap_or(std::ptr::null())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null()))).ok() + SspiAcceptSecurityContextAsync(asynccontext, core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pinput.unwrap_or(core::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), core::mem::transmute(poutput.unwrap_or(core::ptr::null())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] @@ -4247,13 +4247,13 @@ where P1: windows_core::Param, { windows_targets::link!("ksecdd.sys" "system" fn SspiAcquireCredentialsHandleAsyncA(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, pszprincipal : windows_core::PCSTR, pszpackage : windows_core::PCSTR, fcredentialuse : u32, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : super::super::super::Win32::Security::Authentication::Identity:: SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *const SecHandle, ptsexpiry : *const i64) -> windows_core::HRESULT); - SspiAcquireCredentialsHandleAsyncA(asynccontext, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(std::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null()))).ok() + SspiAcquireCredentialsHandleAsyncA(asynccontext, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security_Authentication_Identity"))] #[inline] pub unsafe fn SspiAcquireCredentialsHandleAsyncW(asynccontext: *mut super::super::Foundation::SspiAsyncContext, pszprincipal: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, pszpackage: *const super::super::super::Win32::Foundation::UNICODE_STRING, fcredentialuse: u32, pvlogonid: Option<*const core::ffi::c_void>, pauthdata: Option<*const core::ffi::c_void>, pgetkeyfn: super::super::super::Win32::Security::Authentication::Identity::SEC_GET_KEY_FN, pvgetkeyargument: Option<*const core::ffi::c_void>, phcredential: *const SecHandle, ptsexpiry: Option<*const i64>) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiAcquireCredentialsHandleAsyncW(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, pszprincipal : *const super::super::super::Win32::Foundation:: UNICODE_STRING, pszpackage : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fcredentialuse : u32, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : super::super::super::Win32::Security::Authentication::Identity:: SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *const SecHandle, ptsexpiry : *const i64) -> windows_core::HRESULT); - SspiAcquireCredentialsHandleAsyncW(asynccontext, core::mem::transmute(pszprincipal.unwrap_or(std::ptr::null())), pszpackage, fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(std::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null()))).ok() + SspiAcquireCredentialsHandleAsyncW(asynccontext, core::mem::transmute(pszprincipal.unwrap_or(core::ptr::null())), pszpackage, fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4271,7 +4271,7 @@ pub unsafe fn SspiDeleteSecurityContextAsync(asynccontext: *mut super::super::Fo #[inline] pub unsafe fn SspiFreeAsyncContext(handle: Option<*const super::super::Foundation::SspiAsyncContext>) { windows_targets::link!("ksecdd.sys" "system" fn SspiFreeAsyncContext(handle : *const super::super::Foundation:: SspiAsyncContext)); - SspiFreeAsyncContext(core::mem::transmute(handle.unwrap_or(std::ptr::null()))) + SspiFreeAsyncContext(core::mem::transmute(handle.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4292,7 +4292,7 @@ where P0: windows_core::Param, { windows_targets::link!("ksecdd.sys" "system" fn SspiInitializeSecurityContextAsyncA(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle, phcontext : *const SecHandle, psztargetname : windows_core::PCSTR, fcontextreq : u32, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *const SecHandle, poutput : *const SecBufferDesc, pfcontextattr : *const u32, ptsexpiry : *const i64) -> windows_core::HRESULT); - SspiInitializeSecurityContextAsyncA(asynccontext, core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(std::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null())), core::mem::transmute(poutput.unwrap_or(std::ptr::null())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null()))).ok() + SspiInitializeSecurityContextAsyncA(asynccontext, core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), core::mem::transmute(poutput.unwrap_or(core::ptr::null())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4300,18 +4300,18 @@ pub unsafe fn SspiInitializeSecurityContextAsyncW(asynccontext: *mut super::supe windows_targets::link!("ksecdd.sys" "system" fn SspiInitializeSecurityContextAsyncW(asynccontext : *mut super::super::Foundation:: SspiAsyncContext, phcredential : *const SecHandle, phcontext : *const SecHandle, psztargetname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fcontextreq : u32, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *const SecHandle, poutput : *const SecBufferDesc, pfcontextattr : *const u32, ptsexpiry : *const i64) -> windows_core::HRESULT); SspiInitializeSecurityContextAsyncW( asynccontext, - core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), - core::mem::transmute(psztargetname.unwrap_or(std::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), + core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(psztargetname.unwrap_or(core::ptr::null())), fcontextreq, reserved1, targetdatarep, - core::mem::transmute(pinput.unwrap_or(std::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, - core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null())), - core::mem::transmute(poutput.unwrap_or(std::ptr::null())), + core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(poutput.unwrap_or(core::ptr::null())), pfcontextattr, - core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null())), + core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null())), ) .ok() } @@ -4325,7 +4325,7 @@ pub unsafe fn SspiReinitAsyncContext(handle: *mut super::super::Foundation::Sspi #[inline] pub unsafe fn SspiSetAsyncNotifyCallback(context: *const super::super::Foundation::SspiAsyncContext, callback: SspiAsyncNotifyCallback, callbackdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("ksecdd.sys" "system" fn SspiSetAsyncNotifyCallback(context : *const super::super::Foundation:: SspiAsyncContext, callback : SspiAsyncNotifyCallback, callbackdata : *const core::ffi::c_void) -> windows_core::HRESULT); - SspiSetAsyncNotifyCallback(context, callback, core::mem::transmute(callbackdata.unwrap_or(std::ptr::null()))).ok() + SspiSetAsyncNotifyCallback(context, callback, core::mem::transmute(callbackdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn VerifySignature(phcontext: *const SecHandle, pmessage: *const SecBufferDesc, messageseqno: u32) -> windows_core::Result { @@ -4341,7 +4341,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + ZwAccessCheckAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4368,7 +4368,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAccessCheckByTypeAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + ZwAccessCheckByTypeAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), objecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4396,7 +4396,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + ZwAccessCheckByTypeResultListAndAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4426,7 +4426,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, principalselfsid : super::super::super::Win32::Security:: PSID, desiredaccess : u32, audittype : super::super::super::Win32::Security:: AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *const super::super::super::Win32::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, grantedaccess : *mut u32, accessstatus : *mut i32, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), clienttoken.param().abi(), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) + ZwAccessCheckByTypeResultListAndAuditAlarmByHandle(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), objecttypename, objectname, securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, generateonclose) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4436,7 +4436,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustGroupsToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, resettodefault : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_GROUPS, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_GROUPS, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAdjustGroupsToken(tokenhandle.param().abi(), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(std::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut())), returnlength) + ZwAdjustGroupsToken(tokenhandle.param().abi(), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), returnlength) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4446,7 +4446,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwAdjustPrivilegesToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, disableallprivileges : super::super::super::Win32::Foundation:: BOOLEAN, newstate : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, bufferlength : u32, previousstate : *mut super::super::super::Win32::Security:: TOKEN_PRIVILEGES, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwAdjustPrivilegesToken(tokenhandle.param().abi(), disableallprivileges.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()))) + ZwAdjustPrivilegesToken(tokenhandle.param().abi(), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ZwAllocateVirtualMemory(processhandle: P0, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, regionsize: *mut usize, allocationtype: u32, protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4472,7 +4472,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCancelIoFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, iorequesttocancel : *const super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCancelIoFileEx(filehandle.param().abi(), core::mem::transmute(iorequesttocancel.unwrap_or(std::ptr::null())), iostatusblock) + ZwCancelIoFileEx(filehandle.param().abi(), core::mem::transmute(iorequesttocancel.unwrap_or(core::ptr::null())), iostatusblock) } #[inline] pub unsafe fn ZwCloseObjectAuditAlarm(subsystemname: *const super::super::super::Win32::Foundation::UNICODE_STRING, handleid: Option<*const core::ffi::c_void>, generateonclose: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4480,7 +4480,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCloseObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), generateonclose.param().abi()) + ZwCloseObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4495,7 +4495,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateEvent(eventhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, eventtype : super::super::super::Win32::System::Kernel:: EVENT_TYPE, initialstate : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateEvent(eventhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), eventtype, initialstate.param().abi()) + ZwCreateEvent(eventhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), eventtype, initialstate.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Memory"))] #[inline] @@ -4504,7 +4504,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateSectionEx(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, filehandle : super::super::super::Win32::Foundation:: HANDLE, extendedparameters : *mut super::super::super::Win32::System::Memory:: MEM_EXTENDED_PARAMETER, extendedparametercount : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateSectionEx(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + ZwCreateSectionEx(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4518,7 +4518,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwDeleteObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, generateonclose : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), generateonclose.param().abi()) + ZwDeleteObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), generateonclose.param().abi()) } #[inline] pub unsafe fn ZwDuplicateObject(sourceprocesshandle: P0, sourcehandle: P1, targetprocesshandle: P2, targethandle: Option<*mut super::super::super::Win32::Foundation::HANDLE>, desiredaccess: u32, handleattributes: u32, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4528,7 +4528,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwDuplicateObject(sourceprocesshandle : super::super::super::Win32::Foundation:: HANDLE, sourcehandle : super::super::super::Win32::Foundation:: HANDLE, targetprocesshandle : super::super::super::Win32::Foundation:: HANDLE, targethandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, handleattributes : u32, options : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDuplicateObject(sourceprocesshandle.param().abi(), sourcehandle.param().abi(), targetprocesshandle.param().abi(), core::mem::transmute(targethandle.unwrap_or(std::ptr::null_mut())), desiredaccess, handleattributes, options) + ZwDuplicateObject(sourceprocesshandle.param().abi(), sourcehandle.param().abi(), targetprocesshandle.param().abi(), core::mem::transmute(targethandle.unwrap_or(core::ptr::null_mut())), desiredaccess, handleattributes, options) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -4538,7 +4538,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwDuplicateToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, effectiveonly : super::super::super::Win32::Foundation:: BOOLEAN, tokentype : super::super::super::Win32::Security:: TOKEN_TYPE, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDuplicateToken(existingtokenhandle.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), effectiveonly.param().abi(), tokentype, newtokenhandle) + ZwDuplicateToken(existingtokenhandle.param().abi(), desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), effectiveonly.param().abi(), tokentype, newtokenhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4547,7 +4547,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwFilterToken(existingtokenhandle : super::super::super::Win32::Foundation:: HANDLE, flags : u32, sidstodisable : *const super::super::super::Win32::Security:: TOKEN_GROUPS, privilegestodelete : *const super::super::super::Win32::Security:: TOKEN_PRIVILEGES, restrictedsids : *const super::super::super::Win32::Security:: TOKEN_GROUPS, newtokenhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFilterToken(existingtokenhandle.param().abi(), flags, core::mem::transmute(sidstodisable.unwrap_or(std::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(std::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(std::ptr::null())), newtokenhandle) + ZwFilterToken(existingtokenhandle.param().abi(), flags, core::mem::transmute(sidstodisable.unwrap_or(core::ptr::null())), core::mem::transmute(privilegestodelete.unwrap_or(core::ptr::null())), core::mem::transmute(restrictedsids.unwrap_or(core::ptr::null())), newtokenhandle) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -4592,7 +4592,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwFsControlFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fscontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwFsControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + ZwFsControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fscontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn ZwImpersonateAnonymousToken(threadhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4612,7 +4612,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwLockFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, byteoffset : *const i64, length : *const i64, key : u32, failimmediately : super::super::super::Win32::Foundation:: BOOLEAN, exclusivelock : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwLockFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, byteoffset, length, key, failimmediately.param().abi(), exclusivelock.param().abi()) + ZwLockFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, byteoffset, length, key, failimmediately.param().abi(), exclusivelock.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -4624,7 +4624,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwNotifyChangeKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwNotifyChangeKey(keyhandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, asynchronous.param().abi()) + ZwNotifyChangeKey(keyhandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, asynchronous.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4642,7 +4642,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, objecttypename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, grantedaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, objectcreation : super::super::super::Win32::Foundation:: BOOLEAN, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN, generateonclose : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) + ZwOpenObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename, objectname, securitydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) } #[inline] pub unsafe fn ZwOpenProcessToken(processhandle: P0, desiredaccess: u32, tokenhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4695,7 +4695,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrivilegeObjectAuditAlarm(subsystemname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, handleid : *const core::ffi::c_void, clienttoken : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, privileges : *const super::super::super::Win32::Security:: PRIVILEGE_SET, accessgranted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(std::ptr::null())), clienttoken.param().abi(), desiredaccess, privileges, accessgranted.param().abi()) + ZwPrivilegeObjectAuditAlarm(subsystemname, core::mem::transmute(handleid.unwrap_or(core::ptr::null())), clienttoken.param().abi(), desiredaccess, privileges, accessgranted.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4717,7 +4717,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryDirectoryFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(std::ptr::null())), restartscan.param().abi()) + ZwQueryDirectoryFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, returnsingleentry.param().abi(), core::mem::transmute(filename.unwrap_or(core::ptr::null())), restartscan.param().abi()) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -4727,7 +4727,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryFileEx(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : FILE_INFORMATION_CLASS, queryflags : u32, filename : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryDirectoryFileEx(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(std::ptr::null()))) + ZwQueryDirectoryFileEx(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, fileinformation, length, fileinformationclass, queryflags, core::mem::transmute(filename.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwQueryDirectoryObject(directoryhandle: P0, buffer: Option<*mut core::ffi::c_void>, length: u32, returnsingleentry: P1, restartscan: P2, context: *mut u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4737,7 +4737,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryDirectoryObject(directoryhandle : super::super::super::Win32::Foundation:: HANDLE, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, restartscan : super::super::super::Win32::Foundation:: BOOLEAN, context : *mut u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryDirectoryObject(directoryhandle.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), length, returnsingleentry.param().abi(), restartscan.param().abi(), context, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryDirectoryObject(directoryhandle.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), length, returnsingleentry.param().abi(), restartscan.param().abi(), context, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -4748,7 +4748,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryEaFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, ealist : *const core::ffi::c_void, ealistlength : u32, eaindex : *const u32, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryEaFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(std::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(std::ptr::null())), restartscan.param().abi()) + ZwQueryEaFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(ealist.unwrap_or(core::ptr::null())), ealistlength, core::mem::transmute(eaindex.unwrap_or(core::ptr::null())), restartscan.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4763,7 +4763,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationToken(tokenhandle : super::super::super::Win32::Foundation:: HANDLE, tokeninformationclass : super::super::super::Win32::Security:: TOKEN_INFORMATION_CLASS, tokeninformation : *mut core::ffi::c_void, tokeninformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationToken(tokenhandle.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(std::ptr::null_mut())), tokeninformationlength, returnlength) + ZwQueryInformationToken(tokenhandle.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), tokeninformationlength, returnlength) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4772,7 +4772,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryObject(handle : super::super::super::Win32::Foundation:: HANDLE, objectinformationclass : super::super::Foundation:: OBJECT_INFORMATION_CLASS, objectinformation : *mut core::ffi::c_void, objectinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryObject(handle.param().abi(), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(std::ptr::null_mut())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryObject(handle.param().abi(), objectinformationclass, core::mem::transmute(objectinformation.unwrap_or(core::ptr::null_mut())), objectinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_IO"))] #[inline] @@ -4784,7 +4784,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryQuotaInformationFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, returnsingleentry : super::super::super::Win32::Foundation:: BOOLEAN, sidlist : *const core::ffi::c_void, sidlistlength : u32, startsid : super::super::super::Win32::Security:: PSID, restartscan : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryQuotaInformationFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(std::ptr::null())), sidlistlength, startsid.param().abi(), restartscan.param().abi()) + ZwQueryQuotaInformationFile(filehandle.param().abi(), iostatusblock, buffer, length, returnsingleentry.param().abi(), core::mem::transmute(sidlist.unwrap_or(core::ptr::null())), sidlistlength, startsid.param().abi(), restartscan.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -4801,7 +4801,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryVirtualMemory(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, memoryinformationclass : MEMORY_INFORMATION_CLASS, memoryinformation : *mut core::ffi::c_void, memoryinformationlength : usize, returnlength : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), memoryinformationclass, memoryinformation, memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryVirtualMemory(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), memoryinformationclass, memoryinformation, memoryinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -4827,7 +4827,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwSetEvent(eventhandle : super::super::super::Win32::Foundation:: HANDLE, previousstate : *mut i32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetEvent(eventhandle.param().abi(), core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut()))) + ZwSetEvent(eventhandle.param().abi(), core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] diff --git a/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs index baea09c46f..9cbea1b0b1 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/IO/mod.rs @@ -6,5 +6,5 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtDeviceIoControlFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, iocontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtDeviceIoControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + NtDeviceIoControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } diff --git a/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs index 965e84326c..f2e07c8e0a 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Memory/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtMapViewOfSection(sectionhandle : super::super::super::Win32::Foundation:: HANDLE, processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, zerobits : usize, commitsize : usize, sectionoffset : *mut i64, viewsize : *mut usize, inheritdisposition : SECTION_INHERIT, allocationtype : u32, win32protect : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtMapViewOfSection(sectionhandle.param().abi(), processhandle.param().abi(), baseaddress, zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(std::ptr::null_mut())), viewsize, inheritdisposition, allocationtype, win32protect) + NtMapViewOfSection(sectionhandle.param().abi(), processhandle.param().abi(), baseaddress, zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(core::ptr::null_mut())), viewsize, inheritdisposition, allocationtype, win32protect) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -19,7 +19,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtUnmapViewOfSection(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtUnmapViewOfSection(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null()))) + NtUnmapViewOfSection(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwMapViewOfSection(sectionhandle: P0, processhandle: P1, baseaddress: *mut *mut core::ffi::c_void, zerobits: usize, commitsize: usize, sectionoffset: Option<*mut i64>, viewsize: *mut usize, inheritdisposition: SECTION_INHERIT, allocationtype: u32, win32protect: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -28,7 +28,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwMapViewOfSection(sectionhandle : super::super::super::Win32::Foundation:: HANDLE, processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *mut *mut core::ffi::c_void, zerobits : usize, commitsize : usize, sectionoffset : *mut i64, viewsize : *mut usize, inheritdisposition : SECTION_INHERIT, allocationtype : u32, win32protect : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwMapViewOfSection(sectionhandle.param().abi(), processhandle.param().abi(), baseaddress, zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(std::ptr::null_mut())), viewsize, inheritdisposition, allocationtype, win32protect) + ZwMapViewOfSection(sectionhandle.param().abi(), processhandle.param().abi(), baseaddress, zerobits, commitsize, core::mem::transmute(sectionoffset.unwrap_or(core::ptr::null_mut())), viewsize, inheritdisposition, allocationtype, win32protect) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwUnmapViewOfSection(processhandle : super::super::super::Win32::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwUnmapViewOfSection(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null()))) + ZwUnmapViewOfSection(processhandle.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null()))) } pub const ViewShare: SECTION_INHERIT = SECTION_INHERIT(1i32); pub const ViewUnmap: SECTION_INHERIT = SECTION_INHERIT(2i32); 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 343223133b..dc92f8c6a1 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/OfflineRegistry/mod.rs @@ -29,7 +29,7 @@ where P3: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpclass.param().abi(), dwoptions, psecuritydescriptor.param().abi(), phkresult, core::mem::transmute(pdwdisposition.unwrap_or(std::ptr::null_mut()))) + ORCreateKey(keyhandle.param().abi(), lpsubkey.param().abi(), lpclass.param().abi(), dwoptions, psecuritydescriptor.param().abi(), phkresult, core::mem::transmute(pdwdisposition.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ORDeleteKey(handle: P0, lpsubkey: P1) -> super::super::super::Win32::Foundation::WIN32_ERROR @@ -55,7 +55,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpname), lpcname, core::mem::transmute(lpclass), core::mem::transmute(lpcclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OREnumValue(handle: P0, dwindex: u32, lpvaluename: windows_core::PWSTR, lpcvaluename: *mut u32, lptype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::super::Win32::Foundation::WIN32_ERROR @@ -63,7 +63,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpvaluename), lpcvaluename, core::mem::transmute(lptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -82,7 +82,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpvalue.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.param().abi(), lpsubkey.param().abi(), lpvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ORGetVersion(pdwmajorversion: *mut u32, pdwminorversion: *mut u32) -> super::super::super::Win32::Foundation::WIN32_ERROR { @@ -136,15 +136,15 @@ where ORQueryInfoKey( handle.param().abi(), core::mem::transmute(lpclass), - core::mem::transmute(lpcclass.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcsubkeys.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcmaxsubkeylen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcmaxclasslen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcvalues.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcmaxvaluenamelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcmaxvaluelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpftlastwritetime.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcclass.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcmaxsubkeylen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcmaxclasslen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcvalues.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcmaxvaluenamelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcmaxvaluelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut())), ) } #[inline] diff --git a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs index cf627b63c8..867faf614c 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Registry/mod.rs @@ -10,7 +10,7 @@ where #[inline] pub unsafe fn NtCreateKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: u32, class: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateKey(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, titleindex : u32, class : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, disposition : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateKey(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(std::ptr::null())), createoptions, core::mem::transmute(disposition.unwrap_or(std::ptr::null_mut()))) + NtCreateKey(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(core::ptr::null())), createoptions, core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -19,13 +19,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateKeyTransacted(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, titleindex : u32, class : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, transactionhandle : super::super::super::Win32::Foundation:: HANDLE, disposition : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateKeyTransacted(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(std::ptr::null())), createoptions, transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(std::ptr::null_mut()))) + NtCreateKeyTransacted(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(core::ptr::null())), createoptions, transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn NtCreateRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateRegistryTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateRegistryTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions) + NtCreateRegistryTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions) } #[inline] pub unsafe fn NtDeleteKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -49,7 +49,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtEnumerateKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, index : u32, keyinformationclass : KEY_INFORMATION_CLASS, keyinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtEnumerateKey(keyhandle.param().abi(), index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + NtEnumerateKey(keyhandle.param().abi(), index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn NtEnumerateValueKey(keyhandle: P0, index: u32, keyvalueinformationclass: KEY_VALUE_INFORMATION_CLASS, keyvalueinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -57,7 +57,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtEnumerateValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, index : u32, keyvalueinformationclass : KEY_VALUE_INFORMATION_CLASS, keyvalueinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtEnumerateValueKey(keyhandle.param().abi(), index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + NtEnumerateValueKey(keyhandle.param().abi(), index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn NtFlushKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -77,7 +77,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtNotifyChangeMultipleKeys(masterkeyhandle : super::super::super::Win32::Foundation:: HANDLE, count : u32, subordinateobjects : *const super::super::Foundation:: OBJECT_ATTRIBUTES, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtNotifyChangeMultipleKeys(masterkeyhandle.param().abi(), subordinateobjects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subordinateobjects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, asynchronous.param().abi()) + NtNotifyChangeMultipleKeys(masterkeyhandle.param().abi(), subordinateobjects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subordinateobjects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, asynchronous.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -121,7 +121,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, keyinformationclass : KEY_INFORMATION_CLASS, keyinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryKey(keyhandle.param().abi(), keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + NtQueryKey(keyhandle.param().abi(), keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn NtQueryMultipleValueKey(keyhandle: P0, valueentries: &mut [KEY_VALUE_ENTRY], valuebuffer: *mut core::ffi::c_void, bufferlength: *mut u32, requiredbufferlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -129,7 +129,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryMultipleValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valueentries : *mut KEY_VALUE_ENTRY, entrycount : u32, valuebuffer : *mut core::ffi::c_void, bufferlength : *mut u32, requiredbufferlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryMultipleValueKey(keyhandle.param().abi(), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer, bufferlength, core::mem::transmute(requiredbufferlength.unwrap_or(std::ptr::null_mut()))) + NtQueryMultipleValueKey(keyhandle.param().abi(), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer, bufferlength, core::mem::transmute(requiredbufferlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NtQueryValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, keyvalueinformationclass: KEY_VALUE_INFORMATION_CLASS, keyvalueinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -137,7 +137,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, keyvalueinformationclass : KEY_VALUE_INFORMATION_CLASS, keyvalueinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryValueKey(keyhandle.param().abi(), valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + NtQueryValueKey(keyhandle.param().abi(), valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn NtRenameKey(keyhandle: P0, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS @@ -196,7 +196,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtSetValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, titleindex : u32, r#type : u32, data : *const core::ffi::c_void, datasize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetValueKey(keyhandle.param().abi(), valuename, titleindex, r#type, core::mem::transmute(data.unwrap_or(std::ptr::null())), datasize) + NtSetValueKey(keyhandle.param().abi(), valuename, titleindex, r#type, core::mem::transmute(data.unwrap_or(core::ptr::null())), datasize) } #[inline] pub unsafe fn ZwCommitRegistryTransaction(transactionhandle: P0, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -210,7 +210,7 @@ where #[inline] pub unsafe fn ZwCreateKey(keyhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, titleindex: u32, class: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, disposition: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateKey(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, titleindex : u32, class : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, disposition : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateKey(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(std::ptr::null())), createoptions, core::mem::transmute(disposition.unwrap_or(std::ptr::null_mut()))) + ZwCreateKey(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(core::ptr::null())), createoptions, core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -219,13 +219,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateKeyTransacted(keyhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, titleindex : u32, class : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, transactionhandle : super::super::super::Win32::Foundation:: HANDLE, disposition : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateKeyTransacted(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(std::ptr::null())), createoptions, transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(std::ptr::null_mut()))) + ZwCreateKeyTransacted(keyhandle, desiredaccess, objectattributes, titleindex, core::mem::transmute(class.unwrap_or(core::ptr::null())), createoptions, transactionhandle.param().abi(), core::mem::transmute(disposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ZwCreateRegistryTransaction(transactionhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, createoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateRegistryTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateRegistryTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions) + ZwCreateRegistryTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions) } #[inline] pub unsafe fn ZwDeleteKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -249,7 +249,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwEnumerateKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, index : u32, keyinformationclass : KEY_INFORMATION_CLASS, keyinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwEnumerateKey(keyhandle.param().abi(), index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + ZwEnumerateKey(keyhandle.param().abi(), index, keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn ZwEnumerateValueKey(keyhandle: P0, index: u32, keyvalueinformationclass: KEY_VALUE_INFORMATION_CLASS, keyvalueinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -257,7 +257,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwEnumerateValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, index : u32, keyvalueinformationclass : KEY_VALUE_INFORMATION_CLASS, keyvalueinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwEnumerateValueKey(keyhandle.param().abi(), index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + ZwEnumerateValueKey(keyhandle.param().abi(), index, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn ZwFlushKey(keyhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -277,7 +277,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwNotifyChangeMultipleKeys(masterkeyhandle : super::super::super::Win32::Foundation:: HANDLE, count : u32, subordinateobjects : *const super::super::Foundation:: OBJECT_ATTRIBUTES, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, completionfilter : u32, watchtree : super::super::super::Win32::Foundation:: BOOLEAN, buffer : *mut core::ffi::c_void, buffersize : u32, asynchronous : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwNotifyChangeMultipleKeys(masterkeyhandle.param().abi(), subordinateobjects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subordinateobjects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, asynchronous.param().abi()) + ZwNotifyChangeMultipleKeys(masterkeyhandle.param().abi(), subordinateobjects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(subordinateobjects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, completionfilter, watchtree.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, asynchronous.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -321,7 +321,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, keyinformationclass : KEY_INFORMATION_CLASS, keyinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryKey(keyhandle.param().abi(), keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + ZwQueryKey(keyhandle.param().abi(), keyinformationclass, core::mem::transmute(keyinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn ZwQueryMultipleValueKey(keyhandle: P0, valueentries: &mut [KEY_VALUE_ENTRY], valuebuffer: *mut core::ffi::c_void, bufferlength: *mut u32, requiredbufferlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -329,7 +329,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryMultipleValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valueentries : *mut KEY_VALUE_ENTRY, entrycount : u32, valuebuffer : *mut core::ffi::c_void, bufferlength : *mut u32, requiredbufferlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryMultipleValueKey(keyhandle.param().abi(), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer, bufferlength, core::mem::transmute(requiredbufferlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryMultipleValueKey(keyhandle.param().abi(), core::mem::transmute(valueentries.as_ptr()), valueentries.len().try_into().unwrap(), valuebuffer, bufferlength, core::mem::transmute(requiredbufferlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ZwQueryValueKey(keyhandle: P0, valuename: *const super::super::super::Win32::Foundation::UNICODE_STRING, keyvalueinformationclass: KEY_VALUE_INFORMATION_CLASS, keyvalueinformation: Option<*mut core::ffi::c_void>, length: u32, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -337,7 +337,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, keyvalueinformationclass : KEY_VALUE_INFORMATION_CLASS, keyvalueinformation : *mut core::ffi::c_void, length : u32, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryValueKey(keyhandle.param().abi(), valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(std::ptr::null_mut())), length, resultlength) + ZwQueryValueKey(keyhandle.param().abi(), valuename, keyvalueinformationclass, core::mem::transmute(keyvalueinformation.unwrap_or(core::ptr::null_mut())), length, resultlength) } #[inline] pub unsafe fn ZwRenameKey(keyhandle: P0, newname: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS @@ -396,7 +396,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwSetValueKey(keyhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, titleindex : u32, r#type : u32, data : *const core::ffi::c_void, datasize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetValueKey(keyhandle.param().abi(), valuename, titleindex, r#type, core::mem::transmute(data.unwrap_or(std::ptr::null())), datasize) + ZwSetValueKey(keyhandle.param().abi(), valuename, titleindex, r#type, core::mem::transmute(data.unwrap_or(core::ptr::null())), datasize) } pub const KeyBasicInformation: KEY_INFORMATION_CLASS = KEY_INFORMATION_CLASS(0i32); pub const KeyCachedInformation: KEY_INFORMATION_CLASS = KEY_INFORMATION_CLASS(4i32); diff --git a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs index 7510033819..357729f54a 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/SystemServices/mod.rs @@ -8,7 +8,7 @@ pub unsafe fn ClfsAddLogContainer(plfolog: *const super::super::Foundation::FILE #[inline] pub unsafe fn ClfsAddLogContainerSet(plfolog: *const super::super::Foundation::FILE_OBJECT, pcbcontainer: Option<*const u64>, rguszcontainerpath: &[super::super::super::Win32::Foundation::UNICODE_STRING]) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsAddLogContainerSet(plfolog : *const super::super::Foundation:: FILE_OBJECT, ccontainers : u16, pcbcontainer : *const u64, rguszcontainerpath : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(std::ptr::null())), core::mem::transmute(rguszcontainerpath.as_ptr())) + ClfsAddLogContainerSet(plfolog, rguszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::ptr::null())), core::mem::transmute(rguszcontainerpath.as_ptr())) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -45,7 +45,7 @@ where P0: windows_core::Param, { windows_targets::link!("clfs.sys" "system" fn ClfsCreateLogFile(pplfolog : *mut *mut super::super::Foundation:: FILE_OBJECT, puszlogfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, fdesiredaccess : u32, dwsharemode : u32, psdlogfile : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, fcreatedisposition : u32, fcreateoptions : u32, fflagsandattributes : u32, flogoptionflag : u32, pvcontext : *const core::ffi::c_void, cbcontext : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsCreateLogFile(pplfolog, puszlogfilename, fdesiredaccess, dwsharemode, psdlogfile.param().abi(), fcreatedisposition, fcreateoptions, fflagsandattributes, flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), cbcontext) + ClfsCreateLogFile(pplfolog, puszlogfilename, fdesiredaccess, dwsharemode, psdlogfile.param().abi(), fcreatedisposition, fcreateoptions, fflagsandattributes, flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), cbcontext) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -74,7 +74,7 @@ pub unsafe fn ClfsDeleteLogByPointer(plfolog: *const super::super::Foundation::F #[inline] pub unsafe fn ClfsDeleteLogFile(puszlogfilename: *const super::super::super::Win32::Foundation::UNICODE_STRING, pvreserved: Option<*const core::ffi::c_void>, flogoptionflag: u32, pvcontext: Option<*const core::ffi::c_void>, cbcontext: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsDeleteLogFile(puszlogfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, pvreserved : *const core::ffi::c_void, flogoptionflag : u32, pvcontext : *const core::ffi::c_void, cbcontext : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsDeleteLogFile(puszlogfilename, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), cbcontext) + ClfsDeleteLogFile(puszlogfilename, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), flogoptionflag, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), cbcontext) } #[inline] pub unsafe fn ClfsDeleteMarshallingArea(pvmarshalcontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -101,7 +101,7 @@ pub unsafe fn ClfsFlushBuffers(pvmarshalcontext: *const core::ffi::c_void) -> su #[inline] pub unsafe fn ClfsFlushToLsn(pvmarshalcontext: *const core::ffi::c_void, plsnflush: *const super::super::super::Win32::Storage::FileSystem::CLS_LSN, plsnlastflushed: Option<*mut super::super::super::Win32::Storage::FileSystem::CLS_LSN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsFlushToLsn(pvmarshalcontext : *const core::ffi::c_void, plsnflush : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnlastflushed : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsFlushToLsn(pvmarshalcontext, plsnflush, core::mem::transmute(plsnlastflushed.unwrap_or(std::ptr::null_mut()))) + ClfsFlushToLsn(pvmarshalcontext, plsnflush, core::mem::transmute(plsnlastflushed.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClfsFreeReservedLog(pvmarshalcontext: *const core::ffi::c_void, pcbadjustment: &[i64]) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -112,13 +112,13 @@ pub unsafe fn ClfsFreeReservedLog(pvmarshalcontext: *const core::ffi::c_void, pc #[inline] pub unsafe fn ClfsGetContainerName(plfolog: *const super::super::Foundation::FILE_OBJECT, cidlogicalcontainer: u32, puszcontainername: *mut super::super::super::Win32::Foundation::UNICODE_STRING, pcactuallencontainername: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsGetContainerName(plfolog : *const super::super::Foundation:: FILE_OBJECT, cidlogicalcontainer : u32, puszcontainername : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, pcactuallencontainername : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsGetContainerName(plfolog, cidlogicalcontainer, puszcontainername, core::mem::transmute(pcactuallencontainername.unwrap_or(std::ptr::null_mut()))) + ClfsGetContainerName(plfolog, cidlogicalcontainer, puszcontainername, core::mem::transmute(pcactuallencontainername.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_Storage_FileSystem", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn ClfsGetIoStatistics(plfolog: *const super::super::Foundation::FILE_OBJECT, pvstatsbuffer: *mut core::ffi::c_void, cbstatsbuffer: u32, estatsclass: super::super::super::Win32::Storage::FileSystem::CLFS_IOSTATS_CLASS, pcbstatswritten: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsGetIoStatistics(plfolog : *const super::super::Foundation:: FILE_OBJECT, pvstatsbuffer : *mut core::ffi::c_void, cbstatsbuffer : u32, estatsclass : super::super::super::Win32::Storage::FileSystem:: CLFS_IOSTATS_CLASS, pcbstatswritten : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsGetIoStatistics(plfolog, pvstatsbuffer, cbstatsbuffer, estatsclass, core::mem::transmute(pcbstatswritten.unwrap_or(std::ptr::null_mut()))) + ClfsGetIoStatistics(plfolog, pvstatsbuffer, cbstatsbuffer, estatsclass, core::mem::transmute(pcbstatswritten.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_Storage_FileSystem", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -235,13 +235,13 @@ pub unsafe fn ClfsMgmtRemovePolicy(logfile: *const super::super::Foundation::FIL #[inline] pub unsafe fn ClfsMgmtSetLogFileSize(logfile: *const super::super::Foundation::FILE_OBJECT, newsizeincontainers: *const u64, resultingsizeincontainers: Option<*mut u64>, completionroutine: PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, completionroutinedata: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsMgmtSetLogFileSize(logfile : *const super::super::Foundation:: FILE_OBJECT, newsizeincontainers : *const u64, resultingsizeincontainers : *mut u64, completionroutine : PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, completionroutinedata : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsMgmtSetLogFileSize(logfile, newsizeincontainers, core::mem::transmute(resultingsizeincontainers.unwrap_or(std::ptr::null_mut())), completionroutine, core::mem::transmute(completionroutinedata.unwrap_or(std::ptr::null()))) + ClfsMgmtSetLogFileSize(logfile, newsizeincontainers, core::mem::transmute(resultingsizeincontainers.unwrap_or(core::ptr::null_mut())), completionroutine, core::mem::transmute(completionroutinedata.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn ClfsMgmtSetLogFileSizeAsClient(logfile: *const super::super::Foundation::FILE_OBJECT, clientcookie: Option<*const *const core::ffi::c_void>, newsizeincontainers: *const u64, resultingsizeincontainers: Option<*mut u64>, completionroutine: PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, completionroutinedata: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsMgmtSetLogFileSizeAsClient(logfile : *const super::super::Foundation:: FILE_OBJECT, clientcookie : *const *const core::ffi::c_void, newsizeincontainers : *const u64, resultingsizeincontainers : *mut u64, completionroutine : PCLFS_SET_LOG_SIZE_COMPLETE_CALLBACK, completionroutinedata : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsMgmtSetLogFileSizeAsClient(logfile, core::mem::transmute(clientcookie.unwrap_or(std::ptr::null())), newsizeincontainers, core::mem::transmute(resultingsizeincontainers.unwrap_or(std::ptr::null_mut())), completionroutine, core::mem::transmute(completionroutinedata.unwrap_or(std::ptr::null()))) + ClfsMgmtSetLogFileSizeAsClient(logfile, core::mem::transmute(clientcookie.unwrap_or(core::ptr::null())), newsizeincontainers, core::mem::transmute(resultingsizeincontainers.unwrap_or(core::ptr::null_mut())), completionroutine, core::mem::transmute(completionroutinedata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ClfsMgmtTailAdvanceFailure(client: *const core::ffi::c_void, reason: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -255,7 +255,7 @@ where #[inline] pub unsafe fn ClfsQueryLogFileInformation(plfolog: *const super::super::Foundation::FILE_OBJECT, einformationclass: super::super::super::Win32::Storage::FileSystem::CLS_LOG_INFORMATION_CLASS, pinfoinputbuffer: Option<*const core::ffi::c_void>, cbinfoinputbuffer: u32, pinfobuffer: *mut core::ffi::c_void, pcbinfobuffer: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsQueryLogFileInformation(plfolog : *const super::super::Foundation:: FILE_OBJECT, einformationclass : super::super::super::Win32::Storage::FileSystem:: CLS_LOG_INFORMATION_CLASS, pinfoinputbuffer : *const core::ffi::c_void, cbinfoinputbuffer : u32, pinfobuffer : *mut core::ffi::c_void, pcbinfobuffer : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsQueryLogFileInformation(plfolog, einformationclass, core::mem::transmute(pinfoinputbuffer.unwrap_or(std::ptr::null())), cbinfoinputbuffer, pinfobuffer, pcbinfobuffer) + ClfsQueryLogFileInformation(plfolog, einformationclass, core::mem::transmute(pinfoinputbuffer.unwrap_or(core::ptr::null())), cbinfoinputbuffer, pinfobuffer, pcbinfobuffer) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -267,7 +267,7 @@ pub unsafe fn ClfsReadLogRecord(pvmarshalcontext: *const core::ffi::c_void, plsn #[inline] pub unsafe fn ClfsReadNextLogRecord(pvreadcontext: *mut core::ffi::c_void, ppvbuffer: *mut *mut core::ffi::c_void, pcbbuffer: *mut u32, perecordtype: *mut u8, plsnuser: Option<*const super::super::super::Win32::Storage::FileSystem::CLS_LSN>, plsnundonext: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, plsnprevious: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN, plsnrecord: *mut super::super::super::Win32::Storage::FileSystem::CLS_LSN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsReadNextLogRecord(pvreadcontext : *mut core::ffi::c_void, ppvbuffer : *mut *mut core::ffi::c_void, pcbbuffer : *mut u32, perecordtype : *mut u8, plsnuser : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnundonext : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnprevious : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN, plsnrecord : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsReadNextLogRecord(pvreadcontext, ppvbuffer, pcbbuffer, perecordtype, core::mem::transmute(plsnuser.unwrap_or(std::ptr::null())), plsnundonext, plsnprevious, plsnrecord) + ClfsReadNextLogRecord(pvreadcontext, ppvbuffer, pcbbuffer, perecordtype, core::mem::transmute(plsnuser.unwrap_or(core::ptr::null())), plsnundonext, plsnprevious, plsnrecord) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -307,12 +307,12 @@ pub unsafe fn ClfsReserveAndAppendLog(pvmarshalcontext: *const core::ffi::c_void pvmarshalcontext, core::mem::transmute(rgwriteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(plsnundonext.unwrap_or(std::ptr::null())), - core::mem::transmute(plsnprevious.unwrap_or(std::ptr::null())), + core::mem::transmute(plsnundonext.unwrap_or(core::ptr::null())), + core::mem::transmute(plsnprevious.unwrap_or(core::ptr::null())), rgcbreservation.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcbreservation.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fflags, - core::mem::transmute(plsn.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(plsn.unwrap_or(core::ptr::null_mut())), ) } #[cfg(feature = "Win32_Storage_FileSystem")] @@ -324,12 +324,12 @@ pub unsafe fn ClfsReserveAndAppendLogAligned(pvmarshalcontext: *const core::ffi: core::mem::transmute(rgwriteentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgwriteentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), cbentryalignment, - core::mem::transmute(plsnundonext.unwrap_or(std::ptr::null())), - core::mem::transmute(plsnprevious.unwrap_or(std::ptr::null())), + core::mem::transmute(plsnundonext.unwrap_or(core::ptr::null())), + core::mem::transmute(plsnprevious.unwrap_or(core::ptr::null())), rgcbreservation.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcbreservation.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fflags, - core::mem::transmute(plsn.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(plsn.unwrap_or(core::ptr::null_mut())), ) } #[cfg(feature = "Win32_Storage_FileSystem")] @@ -365,17 +365,17 @@ pub unsafe fn ClfsTerminateReadLog(pvcursorcontext: *const core::ffi::c_void) -> #[inline] pub unsafe fn ClfsWriteRestartArea(pvmarshalcontext: *mut core::ffi::c_void, pvrestartbuffer: *const core::ffi::c_void, cbrestartbuffer: u32, plsnbase: Option<*const super::super::super::Win32::Storage::FileSystem::CLS_LSN>, fflags: u32, pcbwritten: Option<*mut u32>, plsnnext: Option<*mut super::super::super::Win32::Storage::FileSystem::CLS_LSN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("clfs.sys" "system" fn ClfsWriteRestartArea(pvmarshalcontext : *mut core::ffi::c_void, pvrestartbuffer : *const core::ffi::c_void, cbrestartbuffer : u32, plsnbase : *const super::super::super::Win32::Storage::FileSystem:: CLS_LSN, fflags : u32, pcbwritten : *mut u32, plsnnext : *mut super::super::super::Win32::Storage::FileSystem:: CLS_LSN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ClfsWriteRestartArea(pvmarshalcontext, pvrestartbuffer, cbrestartbuffer, core::mem::transmute(plsnbase.unwrap_or(std::ptr::null())), fflags, core::mem::transmute(pcbwritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plsnnext.unwrap_or(std::ptr::null_mut()))) + ClfsWriteRestartArea(pvmarshalcontext, pvrestartbuffer, cbrestartbuffer, core::mem::transmute(plsnbase.unwrap_or(core::ptr::null())), fflags, core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsnnext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CmCallbackGetKeyObjectID(cookie: *const i64, object: *const core::ffi::c_void, objectid: Option<*mut usize>, objectname: Option<*mut *mut super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn CmCallbackGetKeyObjectID(cookie : *const i64, object : *const core::ffi::c_void, objectid : *mut usize, objectname : *mut *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - CmCallbackGetKeyObjectID(cookie, object, core::mem::transmute(objectid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(std::ptr::null_mut()))) + CmCallbackGetKeyObjectID(cookie, object, core::mem::transmute(objectid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CmCallbackGetKeyObjectIDEx(cookie: *const i64, object: *const core::ffi::c_void, objectid: Option<*mut usize>, objectname: Option<*mut *mut super::super::super::Win32::Foundation::UNICODE_STRING>, flags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn CmCallbackGetKeyObjectIDEx(cookie : *const i64, object : *const core::ffi::c_void, objectid : *mut usize, objectname : *mut *mut super::super::super::Win32::Foundation:: UNICODE_STRING, flags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - CmCallbackGetKeyObjectIDEx(cookie, object, core::mem::transmute(objectid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(std::ptr::null_mut())), flags) + CmCallbackGetKeyObjectIDEx(cookie, object, core::mem::transmute(objectid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectname.unwrap_or(core::ptr::null_mut())), flags) } #[inline] pub unsafe fn CmCallbackReleaseKeyObjectIDEx(objectname: *const super::super::super::Win32::Foundation::UNICODE_STRING) { @@ -390,22 +390,22 @@ pub unsafe fn CmGetBoundTransaction(cookie: *const i64, object: *const core::ffi #[inline] pub unsafe fn CmGetCallbackVersion(major: Option<*mut u32>, minor: Option<*mut u32>) { windows_targets::link!("ntoskrnl.exe" "system" fn CmGetCallbackVersion(major : *mut u32, minor : *mut u32)); - CmGetCallbackVersion(core::mem::transmute(major.unwrap_or(std::ptr::null_mut())), core::mem::transmute(minor.unwrap_or(std::ptr::null_mut()))) + CmGetCallbackVersion(core::mem::transmute(major.unwrap_or(core::ptr::null_mut())), core::mem::transmute(minor.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CmRegisterCallback(function: PEX_CALLBACK_FUNCTION, context: Option<*const core::ffi::c_void>, cookie: *mut i64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn CmRegisterCallback(function : PEX_CALLBACK_FUNCTION, context : *const core::ffi::c_void, cookie : *mut i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - CmRegisterCallback(function, core::mem::transmute(context.unwrap_or(std::ptr::null())), cookie) + CmRegisterCallback(function, core::mem::transmute(context.unwrap_or(core::ptr::null())), cookie) } #[inline] pub unsafe fn CmRegisterCallbackEx(function: PEX_CALLBACK_FUNCTION, altitude: *const super::super::super::Win32::Foundation::UNICODE_STRING, driver: *const core::ffi::c_void, context: Option<*const core::ffi::c_void>, cookie: *mut i64, reserved: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn CmRegisterCallbackEx(function : PEX_CALLBACK_FUNCTION, altitude : *const super::super::super::Win32::Foundation:: UNICODE_STRING, driver : *const core::ffi::c_void, context : *const core::ffi::c_void, cookie : *mut i64, reserved : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - CmRegisterCallbackEx(function, altitude, driver, core::mem::transmute(context.unwrap_or(std::ptr::null())), cookie, core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + CmRegisterCallbackEx(function, altitude, driver, core::mem::transmute(context.unwrap_or(core::ptr::null())), cookie, core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CmSetCallbackObjectContext(object: *mut core::ffi::c_void, cookie: *const i64, newcontext: *const core::ffi::c_void, oldcontext: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn CmSetCallbackObjectContext(object : *mut core::ffi::c_void, cookie : *const i64, newcontext : *const core::ffi::c_void, oldcontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - CmSetCallbackObjectContext(object, cookie, newcontext, core::mem::transmute(oldcontext.unwrap_or(std::ptr::null_mut()))) + CmSetCallbackObjectContext(object, cookie, newcontext, core::mem::transmute(oldcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CmUnRegisterCallback(cookie: i64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -497,7 +497,7 @@ where #[inline] pub unsafe fn EtwRegister(providerid: *const windows_core::GUID, enablecallback: PETWENABLECALLBACK, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut u64) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn EtwRegister(providerid : *const windows_core::GUID, enablecallback : PETWENABLECALLBACK, callbackcontext : *const core::ffi::c_void, reghandle : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwRegister(providerid, enablecallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), reghandle) + EtwRegister(providerid, enablecallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), reghandle) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -506,7 +506,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn EtwSetInformation(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, informationclass : super::super::super::Win32::System::Diagnostics::Etw:: EVENT_INFO_CLASS, eventinformation : *const core::ffi::c_void, informationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwSetInformation(reghandle.param().abi(), informationclass, core::mem::transmute(eventinformation.unwrap_or(std::ptr::null())), informationlength) + EtwSetInformation(reghandle.param().abi(), informationclass, core::mem::transmute(eventinformation.unwrap_or(core::ptr::null())), informationlength) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -524,7 +524,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn EtwWrite(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, activityid : *const windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWrite(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + EtwWrite(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -533,7 +533,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn EtwWriteEx(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, filter : u64, flags : u32, activityid : *const windows_core::GUID, relatedactivityid : *const windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWriteEx(reghandle.param().abi(), eventdescriptor, filter, flags, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + EtwWriteEx(reghandle.param().abi(), eventdescriptor, filter, flags, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(core::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -543,7 +543,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn EtwWriteString(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, level : u8, keyword : u64, activityid : *const windows_core::GUID, string : windows_core::PCWSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWriteString(reghandle.param().abi(), level, keyword, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), string.param().abi()) + EtwWriteString(reghandle.param().abi(), level, keyword, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), string.param().abi()) } #[cfg(feature = "Win32_System_Diagnostics_Etw")] #[inline] @@ -552,7 +552,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn EtwWriteTransfer(reghandle : super::super::super::Win32::System::Diagnostics::Etw:: REGHANDLE, eventdescriptor : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DESCRIPTOR, activityid : *const windows_core::GUID, relatedactivityid : *const windows_core::GUID, userdatacount : u32, userdata : *const super::super::super::Win32::System::Diagnostics::Etw:: EVENT_DATA_DESCRIPTOR) -> super::super::super::Win32::Foundation:: NTSTATUS); - EtwWriteTransfer(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + EtwWriteTransfer(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(core::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -710,7 +710,7 @@ pub unsafe fn ExAllocatePoolWithTagPriority(pooltype: super::super::Foundation:: #[inline] pub unsafe fn ExAllocateTimer(callback: PEXT_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>, attributes: u32) -> super::super::Foundation::PEX_TIMER { windows_targets::link!("ntoskrnl.exe" "system" fn ExAllocateTimer(callback : PEXT_CALLBACK, callbackcontext : *const core::ffi::c_void, attributes : u32) -> super::super::Foundation:: PEX_TIMER); - ExAllocateTimer(callback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), attributes) + ExAllocateTimer(callback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), attributes) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -719,7 +719,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ExCancelTimer(timer : super::super::Foundation:: PEX_TIMER, parameters : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExCancelTimer(timer.param().abi(), core::mem::transmute(parameters.unwrap_or(std::ptr::null()))) + ExCancelTimer(timer.param().abi(), core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -749,7 +749,7 @@ where #[inline] pub unsafe fn ExCreatePool(flags: u32, tag: usize, params: Option<*const POOL_CREATE_EXTENDED_PARAMS>, poolhandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExCreatePool(flags : u32, tag : usize, params : *const POOL_CREATE_EXTENDED_PARAMS, poolhandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExCreatePool(flags, tag, core::mem::transmute(params.unwrap_or(std::ptr::null())), poolhandle) + ExCreatePool(flags, tag, core::mem::transmute(params.unwrap_or(core::ptr::null())), poolhandle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -766,7 +766,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ExDeleteTimer(timer : super::super::Foundation:: PEX_TIMER, cancel : super::super::super::Win32::Foundation:: BOOLEAN, wait : super::super::super::Win32::Foundation:: BOOLEAN, parameters : *const EXT_DELETE_PARAMETERS) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExDeleteTimer(timer.param().abi(), cancel.param().abi(), wait.param().abi(), core::mem::transmute(parameters.unwrap_or(std::ptr::null()))) + ExDeleteTimer(timer.param().abi(), cancel.param().abi(), wait.param().abi(), core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ExDestroyPool(poolhandle: P0) @@ -797,7 +797,7 @@ pub unsafe fn ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(resource: *m #[inline] pub unsafe fn ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature: u32, firmwaretablebuffer: Option<*mut core::ffi::c_void>, bufferlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature : u32, firmwaretablebuffer : *mut core::ffi::c_void, bufferlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature, core::mem::transmute(firmwaretablebuffer.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ExEnumerateSystemFirmwareTables(firmwaretableprovidersignature, core::mem::transmute(firmwaretablebuffer.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -838,7 +838,7 @@ pub unsafe fn ExGetExclusiveWaiterCount(resource: *const super::super::Foundatio #[inline] pub unsafe fn ExGetFirmwareEnvironmentVariable(variablename: *const super::super::super::Win32::Foundation::UNICODE_STRING, vendorguid: *const windows_core::GUID, value: Option<*mut core::ffi::c_void>, valuelength: *mut u32, attributes: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExGetFirmwareEnvironmentVariable(variablename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, vendorguid : *const windows_core::GUID, value : *mut core::ffi::c_void, valuelength : *mut u32, attributes : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExGetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), valuelength, core::mem::transmute(attributes.unwrap_or(std::ptr::null_mut()))) + ExGetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), valuelength, core::mem::transmute(attributes.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -860,7 +860,7 @@ pub unsafe fn ExGetSharedWaiterCount(resource: *const super::super::Foundation:: #[inline] pub unsafe fn ExGetSystemFirmwareTable(firmwaretableprovidersignature: u32, firmwaretableid: u32, firmwaretablebuffer: Option<*mut core::ffi::c_void>, bufferlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExGetSystemFirmwareTable(firmwaretableprovidersignature : u32, firmwaretableid : u32, firmwaretablebuffer : *mut core::ffi::c_void, bufferlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExGetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, core::mem::transmute(firmwaretablebuffer.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ExGetSystemFirmwareTable(firmwaretableprovidersignature, firmwaretableid, core::mem::transmute(firmwaretablebuffer.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ExInitializePushLock() -> usize { @@ -954,7 +954,7 @@ pub unsafe fn ExLocalTimeToSystemTime(localtime: *const i64) -> i64 { #[inline] pub unsafe fn ExNotifyCallback(callbackobject: *const core::ffi::c_void, argument1: Option<*const core::ffi::c_void>, argument2: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn ExNotifyCallback(callbackobject : *const core::ffi::c_void, argument1 : *const core::ffi::c_void, argument2 : *const core::ffi::c_void)); - ExNotifyCallback(callbackobject, core::mem::transmute(argument1.unwrap_or(std::ptr::null())), core::mem::transmute(argument2.unwrap_or(std::ptr::null()))) + ExNotifyCallback(callbackobject, core::mem::transmute(argument1.unwrap_or(core::ptr::null())), core::mem::transmute(argument2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ExQueryTimerResolution(maximumtime: *mut u32, minimumtime: *mut u32, currenttime: *mut u32) { @@ -1006,7 +1006,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ExRegisterCallback(callbackobject : super::super::Foundation:: PCALLBACK_OBJECT, callbackfunction : PCALLBACK_FUNCTION, callbackcontext : *const core::ffi::c_void) -> *mut core::ffi::c_void); - ExRegisterCallback(callbackobject.param().abi(), callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + ExRegisterCallback(callbackobject.param().abi(), callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1137,7 +1137,7 @@ where #[inline] pub unsafe fn ExSetFirmwareEnvironmentVariable(variablename: *const super::super::super::Win32::Foundation::UNICODE_STRING, vendorguid: *const windows_core::GUID, value: Option<*const core::ffi::c_void>, valuelength: u32, attributes: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetFirmwareEnvironmentVariable(variablename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, vendorguid : *const windows_core::GUID, value : *const core::ffi::c_void, valuelength : u32, attributes : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ExSetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(std::ptr::null())), valuelength, attributes) + ExSetFirmwareEnvironmentVariable(variablename, vendorguid, core::mem::transmute(value.unwrap_or(core::ptr::null())), valuelength, attributes) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1158,7 +1158,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ExSetTimer(timer : super::super::Foundation:: PEX_TIMER, duetime : i64, period : i64, parameters : *const _EXT_SET_PARAMETERS_V0) -> super::super::super::Win32::Foundation:: BOOLEAN); - ExSetTimer(timer.param().abi(), duetime, period, core::mem::transmute(parameters.unwrap_or(std::ptr::null()))) + ExSetTimer(timer.param().abi(), duetime, period, core::mem::transmute(parameters.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ExSetTimerResolution(desiredtime: u32, setresolution: P0) -> u32 @@ -1269,7 +1269,7 @@ pub unsafe fn HalAllocateCrashDumpRegisters(adapterobject: *const super::super:: #[inline] pub unsafe fn HalAllocateHardwareCounters(groupaffinty: Option<&[super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY]>, resourcelist: Option<*const PHYSICAL_COUNTER_RESOURCE_LIST>, countersethandle: *mut super::super::super::Win32::Foundation::HANDLE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("hal.dll" "system" fn HalAllocateHardwareCounters(groupaffinty : *const super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, groupcount : u32, resourcelist : *const PHYSICAL_COUNTER_RESOURCE_LIST, countersethandle : *mut super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - HalAllocateHardwareCounters(core::mem::transmute(groupaffinty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), groupaffinty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(resourcelist.unwrap_or(std::ptr::null())), countersethandle) + HalAllocateHardwareCounters(core::mem::transmute(groupaffinty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), groupaffinty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(resourcelist.unwrap_or(core::ptr::null())), countersethandle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1386,13 +1386,13 @@ pub unsafe fn IoAcquireCancelSpinLock() -> u8 { #[inline] pub unsafe fn IoAcquireKsrPersistentMemory(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, buffer: *mut core::ffi::c_void, size: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAcquireKsrPersistentMemory(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, buffer : *mut core::ffi::c_void, size : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoAcquireKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), buffer, size) + IoAcquireKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), buffer, size) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoAcquireKsrPersistentMemoryEx(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, physicaldeviceid: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, datatag: Option<*const u16>, dataversion: Option<*mut u32>, buffer: *mut core::ffi::c_void, size: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAcquireKsrPersistentMemoryEx(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, physicaldeviceid : *const super::super::super::Win32::Foundation:: UNICODE_STRING, datatag : *const u16, dataversion : *mut u32, buffer : *mut core::ffi::c_void, size : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoAcquireKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(std::ptr::null())), core::mem::transmute(datatag.unwrap_or(std::ptr::null())), core::mem::transmute(dataversion.unwrap_or(std::ptr::null_mut())), buffer, size) + IoAcquireKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(core::ptr::null())), core::mem::transmute(datatag.unwrap_or(core::ptr::null())), core::mem::transmute(dataversion.unwrap_or(core::ptr::null_mut())), buffer, size) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1401,7 +1401,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoAcquireRemoveLockEx(removelock : *mut IO_REMOVE_LOCK, tag : *const core::ffi::c_void, file : windows_core::PCSTR, line : u32, remlocksize : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoAcquireRemoveLockEx(removelock, core::mem::transmute(tag.unwrap_or(std::ptr::null())), file.param().abi(), line, remlocksize) + IoAcquireRemoveLockEx(removelock, core::mem::transmute(tag.unwrap_or(core::ptr::null())), file.param().abi(), line, remlocksize) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_Storage_IscsiDisc", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1413,7 +1413,7 @@ pub unsafe fn IoAllocateAdapterChannel(adapterobject: *const super::super::super #[inline] pub unsafe fn IoAllocateController(controllerobject: *const CONTROLLER_OBJECT, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, executionroutine: super::super::Foundation::DRIVER_CONTROL, context: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateController(controllerobject : *const CONTROLLER_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, executionroutine : super::super::Foundation:: DRIVER_CONTROL, context : *const core::ffi::c_void)); - IoAllocateController(controllerobject, deviceobject, executionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoAllocateController(controllerobject, deviceobject, executionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1452,7 +1452,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoAllocateMdl(virtualaddress : *const core::ffi::c_void, length : u32, secondarybuffer : super::super::super::Win32::Foundation:: BOOLEAN, chargequota : super::super::super::Win32::Foundation:: BOOLEAN, irp : *mut super::super::Foundation:: IRP) -> *mut super::super::Foundation:: MDL); - IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(std::ptr::null())), length, secondarybuffer.param().abi(), chargequota.param().abi(), core::mem::transmute(irp.unwrap_or(std::ptr::null_mut()))) + IoAllocateMdl(core::mem::transmute(virtualaddress.unwrap_or(core::ptr::null())), length, secondarybuffer.param().abi(), chargequota.param().abi(), core::mem::transmute(irp.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1470,7 +1470,7 @@ pub unsafe fn IoAllocateWorkItem(deviceobject: *const super::super::Foundation:: #[inline] pub unsafe fn IoAssignResources(registrypath: *const super::super::super::Win32::Foundation::UNICODE_STRING, driverclassname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, driverobject: *const super::super::Foundation::DRIVER_OBJECT, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, requestedresources: Option<*const IO_RESOURCE_REQUIREMENTS_LIST>, allocatedresources: *mut *mut CM_RESOURCE_LIST) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoAssignResources(registrypath : *const super::super::super::Win32::Foundation:: UNICODE_STRING, driverclassname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, driverobject : *const super::super::Foundation:: DRIVER_OBJECT, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, requestedresources : *const IO_RESOURCE_REQUIREMENTS_LIST, allocatedresources : *mut *mut CM_RESOURCE_LIST) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoAssignResources(registrypath, core::mem::transmute(driverclassname.unwrap_or(std::ptr::null())), driverobject, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(requestedresources.unwrap_or(std::ptr::null())), allocatedresources) + IoAssignResources(registrypath, core::mem::transmute(driverclassname.unwrap_or(core::ptr::null())), driverobject, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(requestedresources.unwrap_or(core::ptr::null())), allocatedresources) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1500,7 +1500,7 @@ pub unsafe fn IoAttachDeviceToDeviceStackSafe(sourcedevice: *const super::super: #[inline] pub unsafe fn IoBuildAsynchronousFsdRequest(majorfunction: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, buffer: Option<*mut core::ffi::c_void>, length: u32, startingoffset: Option<*const i64>, iostatusblock: Option<*const super::super::super::Win32::System::IO::IO_STATUS_BLOCK>) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoBuildAsynchronousFsdRequest(majorfunction : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, buffer : *mut core::ffi::c_void, length : u32, startingoffset : *const i64, iostatusblock : *const super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> *mut super::super::Foundation:: IRP); - IoBuildAsynchronousFsdRequest(majorfunction, deviceobject, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), length, core::mem::transmute(startingoffset.unwrap_or(std::ptr::null())), core::mem::transmute(iostatusblock.unwrap_or(std::ptr::null()))) + IoBuildAsynchronousFsdRequest(majorfunction, deviceobject, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), length, core::mem::transmute(startingoffset.unwrap_or(core::ptr::null())), core::mem::transmute(iostatusblock.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1509,7 +1509,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoBuildDeviceIoControlRequest(iocontrolcode : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32, internaldeviceiocontrol : super::super::super::Win32::Foundation:: BOOLEAN, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> *mut super::super::Foundation:: IRP); - IoBuildDeviceIoControlRequest(iocontrolcode, deviceobject, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength, internaldeviceiocontrol.param().abi(), core::mem::transmute(event.unwrap_or(std::ptr::null())), iostatusblock) + IoBuildDeviceIoControlRequest(iocontrolcode, deviceobject, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength, internaldeviceiocontrol.param().abi(), core::mem::transmute(event.unwrap_or(core::ptr::null())), iostatusblock) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1521,7 +1521,7 @@ pub unsafe fn IoBuildPartialMdl(sourcemdl: *const super::super::Foundation::MDL, #[inline] pub unsafe fn IoBuildSynchronousFsdRequest(majorfunction: u32, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, buffer: *mut core::ffi::c_void, length: u32, startingoffset: Option<*const i64>, event: *const super::super::Foundation::KEVENT, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoBuildSynchronousFsdRequest(majorfunction : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, buffer : *mut core::ffi::c_void, length : u32, startingoffset : *const i64, event : *const super::super::Foundation:: KEVENT, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK) -> *mut super::super::Foundation:: IRP); - IoBuildSynchronousFsdRequest(majorfunction, deviceobject, buffer, length, core::mem::transmute(startingoffset.unwrap_or(std::ptr::null())), event, iostatusblock) + IoBuildSynchronousFsdRequest(majorfunction, deviceobject, buffer, length, core::mem::transmute(startingoffset.unwrap_or(core::ptr::null())), event, iostatusblock) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1539,7 +1539,7 @@ pub unsafe fn IoCancelIrp(irp: *const super::super::Foundation::IRP) -> super::s #[inline] pub unsafe fn IoCheckLinkShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: Option<*mut super::super::Foundation::FILE_OBJECT>, shareaccess: Option<*mut SHARE_ACCESS>, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>, ioshareaccessflags: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckLinkShareAccess(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS, ioshareaccessflags : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckLinkShareAccess(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(shareaccess.unwrap_or(std::ptr::null_mut())), core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut())), ioshareaccessflags) + IoCheckLinkShareAccess(desiredaccess, desiredshareaccess, core::mem::transmute(fileobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(shareaccess.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), ioshareaccessflags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1557,7 +1557,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoCheckShareAccessEx(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, update : super::super::super::Win32::Foundation:: BOOLEAN, writepermission : *const super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCheckShareAccessEx(desiredaccess, desiredshareaccess, fileobject, shareaccess, update.param().abi(), core::mem::transmute(writepermission.unwrap_or(std::ptr::null()))) + IoCheckShareAccessEx(desiredaccess, desiredshareaccess, fileobject, shareaccess, update.param().abi(), core::mem::transmute(writepermission.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1584,7 +1584,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoConnectInterrupt(interruptobject : *mut super::super::Foundation:: PKINTERRUPT, serviceroutine : PKSERVICE_ROUTINE, servicecontext : *const core::ffi::c_void, spinlock : *const usize, vector : u32, irql : u8, synchronizeirql : u8, interruptmode : KINTERRUPT_MODE, sharevector : super::super::super::Win32::Foundation:: BOOLEAN, processorenablemask : usize, floatingsave : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoConnectInterrupt(interruptobject, serviceroutine, core::mem::transmute(servicecontext.unwrap_or(std::ptr::null())), core::mem::transmute(spinlock.unwrap_or(std::ptr::null())), vector, irql, synchronizeirql, interruptmode, sharevector.param().abi(), processorenablemask, floatingsave.param().abi()) + IoConnectInterrupt(interruptobject, serviceroutine, core::mem::transmute(servicecontext.unwrap_or(core::ptr::null())), core::mem::transmute(spinlock.unwrap_or(core::ptr::null())), vector, irql, synchronizeirql, interruptmode, sharevector.param().abi(), processorenablemask, floatingsave.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1605,31 +1605,31 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateDevice(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, deviceextensionsize : u32, devicename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, devicetype : u32, devicecharacteristics : u32, exclusive : super::super::super::Win32::Foundation:: BOOLEAN, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateDevice(driverobject, deviceextensionsize, core::mem::transmute(devicename.unwrap_or(std::ptr::null())), devicetype, devicecharacteristics, exclusive.param().abi(), deviceobject) + IoCreateDevice(driverobject, deviceextensionsize, core::mem::transmute(devicename.unwrap_or(core::ptr::null())), devicetype, devicecharacteristics, exclusive.param().abi(), deviceobject) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Ioctl", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoCreateDisk(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, disk: Option<*const super::super::super::Win32::System::Ioctl::CREATE_DISK>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateDisk(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, disk : *const super::super::super::Win32::System::Ioctl:: CREATE_DISK) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateDisk(deviceobject, core::mem::transmute(disk.unwrap_or(std::ptr::null()))) + IoCreateDisk(deviceobject, core::mem::transmute(disk.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFile(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFile(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(std::ptr::null())), options) + IoCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), options) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFileEx(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32, drivercontext: Option<*const IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFileEx(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32, drivercontext : *const IO_DRIVER_CREATE_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateFileEx(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(std::ptr::null())), options, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + IoCreateFileEx(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), options, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn IoCreateFileSpecifyDeviceObjectHint(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, disposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32, createfiletype: CREATE_FILE_TYPE, internalparameters: Option<*const core::ffi::c_void>, options: u32, deviceobject: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateFileSpecifyDeviceObjectHint(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, disposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32, createfiletype : CREATE_FILE_TYPE, internalparameters : *const core::ffi::c_void, options : u32, deviceobject : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateFileSpecifyDeviceObjectHint(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(std::ptr::null())), options, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null()))) + IoCreateFileSpecifyDeviceObjectHint(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, disposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength, createfiletype, core::mem::transmute(internalparameters.unwrap_or(core::ptr::null())), options, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -1655,7 +1655,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoCreateSystemThread(ioobject : *mut core::ffi::c_void, threadhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, processhandle : super::super::super::Win32::Foundation:: HANDLE, clientid : *mut super::super::super::Win32::System::WindowsProgramming:: CLIENT_ID, startroutine : PKSTART_ROUTINE, startcontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCreateSystemThread(ioobject, threadhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(std::ptr::null_mut())), startroutine, core::mem::transmute(startcontext.unwrap_or(std::ptr::null()))) + IoCreateSystemThread(ioobject, threadhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(core::ptr::null_mut())), startroutine, core::mem::transmute(startcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoCreateUnprotectedSymbolicLink(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, devicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -1678,13 +1678,13 @@ pub unsafe fn IoCsqInitializeEx(csq: *mut IO_CSQ, csqinsertirp: PIO_CSQ_INSERT_I #[inline] pub unsafe fn IoCsqInsertIrp(csq: *mut IO_CSQ, irp: *mut super::super::Foundation::IRP, context: Option<*mut IO_CSQ_IRP_CONTEXT>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqInsertIrp(csq : *mut IO_CSQ, irp : *mut super::super::Foundation:: IRP, context : *mut IO_CSQ_IRP_CONTEXT)); - IoCsqInsertIrp(csq, irp, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + IoCsqInsertIrp(csq, irp, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoCsqInsertIrpEx(csq: *mut IO_CSQ, irp: *mut super::super::Foundation::IRP, context: Option<*mut IO_CSQ_IRP_CONTEXT>, insertcontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqInsertIrpEx(csq : *mut IO_CSQ, irp : *mut super::super::Foundation:: IRP, context : *mut IO_CSQ_IRP_CONTEXT, insertcontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoCsqInsertIrpEx(csq, irp, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), core::mem::transmute(insertcontext.unwrap_or(std::ptr::null()))) + IoCsqInsertIrpEx(csq, irp, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), core::mem::transmute(insertcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1696,7 +1696,7 @@ pub unsafe fn IoCsqRemoveIrp(csq: *mut IO_CSQ, context: *mut IO_CSQ_IRP_CONTEXT) #[inline] pub unsafe fn IoCsqRemoveNextIrp(csq: *mut IO_CSQ, peekcontext: Option<*const core::ffi::c_void>) -> *mut super::super::Foundation::IRP { windows_targets::link!("ntoskrnl.exe" "system" fn IoCsqRemoveNextIrp(csq : *mut IO_CSQ, peekcontext : *const core::ffi::c_void) -> *mut super::super::Foundation:: IRP); - IoCsqRemoveNextIrp(csq, core::mem::transmute(peekcontext.unwrap_or(std::ptr::null()))) + IoCsqRemoveNextIrp(csq, core::mem::transmute(peekcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1749,7 +1749,7 @@ pub unsafe fn IoDisconnectInterruptEx(parameters: *const IO_DISCONNECT_INTERRUPT #[inline] pub unsafe fn IoEnumerateKsrPersistentMemoryEx(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, physicaldeviceid: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, callback: PIO_PERSISTED_MEMORY_ENUMERATION_CALLBACK, callbackcontext: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoEnumerateKsrPersistentMemoryEx(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, physicaldeviceid : *const super::super::super::Win32::Foundation:: UNICODE_STRING, callback : PIO_PERSISTED_MEMORY_ENUMERATION_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoEnumerateKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(std::ptr::null())), callback, callbackcontext) + IoEnumerateKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(core::ptr::null())), callback, callbackcontext) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Storage_IscsiDisc"))] #[inline] @@ -1865,7 +1865,7 @@ pub unsafe fn IoGetConfigurationInformation() -> *mut CONFIGURATION_INFORMATION #[inline] pub unsafe fn IoGetContainerInformation(informationclass: IO_CONTAINER_INFORMATION_CLASS, containerobject: Option<*const core::ffi::c_void>, buffer: Option<*mut core::ffi::c_void>, bufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetContainerInformation(informationclass : IO_CONTAINER_INFORMATION_CLASS, containerobject : *const core::ffi::c_void, buffer : *mut core::ffi::c_void, bufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetContainerInformation(informationclass, core::mem::transmute(containerobject.unwrap_or(std::ptr::null())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), bufferlength) + IoGetContainerInformation(informationclass, core::mem::transmute(containerobject.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), bufferlength) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -1894,7 +1894,7 @@ pub unsafe fn IoGetDeviceInterfacePropertyData(symboliclinkname: *const super::s #[inline] pub unsafe fn IoGetDeviceInterfaces(interfaceclassguid: *const windows_core::GUID, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, flags: u32, symboliclinklist: *mut windows_core::PWSTR) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceInterfaces(interfaceclassguid : *const windows_core::GUID, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, flags : u32, symboliclinklist : *mut windows_core::PWSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetDeviceInterfaces(interfaceclassguid, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), flags, symboliclinklist) + IoGetDeviceInterfaces(interfaceclassguid, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), flags, symboliclinklist) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1912,7 +1912,7 @@ pub unsafe fn IoGetDeviceObjectPointer(objectname: *const super::super::super::W #[inline] pub unsafe fn IoGetDeviceProperty(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, deviceproperty: DEVICE_REGISTRY_PROPERTY, bufferlength: u32, propertybuffer: Option<*mut core::ffi::c_void>, resultlength: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDeviceProperty(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, deviceproperty : DEVICE_REGISTRY_PROPERTY, bufferlength : u32, propertybuffer : *mut core::ffi::c_void, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoGetDeviceProperty(deviceobject, deviceproperty, bufferlength, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), resultlength) + IoGetDeviceProperty(deviceobject, deviceproperty, bufferlength, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), resultlength) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Devices_Properties", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -1924,7 +1924,7 @@ pub unsafe fn IoGetDevicePropertyData(pdo: *const super::super::Foundation::DEVI #[inline] pub unsafe fn IoGetDmaAdapter(physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicedescription: *const DEVICE_DESCRIPTION, numberofmapregisters: *mut u32) -> *mut DMA_ADAPTER { windows_targets::link!("ntoskrnl.exe" "system" fn IoGetDmaAdapter(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, devicedescription : *const DEVICE_DESCRIPTION, numberofmapregisters : *mut u32) -> *mut DMA_ADAPTER); - IoGetDmaAdapter(core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), devicedescription, numberofmapregisters) + IoGetDmaAdapter(core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), devicedescription, numberofmapregisters) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2055,7 +2055,7 @@ pub unsafe fn IoInitializeIrp(irp: *mut super::super::Foundation::IRP, packetsiz #[inline] pub unsafe fn IoInitializeIrpEx(irp: *mut super::super::Foundation::IRP, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, packetsize: u16, stacksize: i8) { windows_targets::link!("ntoskrnl.exe" "system" fn IoInitializeIrpEx(irp : *mut super::super::Foundation:: IRP, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, packetsize : u16, stacksize : i8)); - IoInitializeIrpEx(irp, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), packetsize, stacksize) + IoInitializeIrpEx(irp, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), packetsize, stacksize) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -2067,7 +2067,7 @@ pub unsafe fn IoInitializeRemoveLockEx(lock: *mut IO_REMOVE_LOCK, allocatetag: u #[inline] pub unsafe fn IoInitializeTimer(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, timerroutine: PIO_TIMER_ROUTINE, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoInitializeTimer(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, timerroutine : PIO_TIMER_ROUTINE, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoInitializeTimer(deviceobject, timerroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoInitializeTimer(deviceobject, timerroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2094,7 +2094,7 @@ pub unsafe fn IoInvalidateDeviceState(physicaldeviceobject: *const super::super: #[inline] pub unsafe fn IoIs32bitProcess(irp: Option<*const super::super::Foundation::IRP>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn IoIs32bitProcess(irp : *const super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoIs32bitProcess(core::mem::transmute(irp.unwrap_or(std::ptr::null()))) + IoIs32bitProcess(core::mem::transmute(irp.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2174,7 +2174,7 @@ pub unsafe fn IoPropagateActivityIdToThread(irp: *const super::super::Foundation #[inline] pub unsafe fn IoQueryDeviceDescription(bustype: Option<*const INTERFACE_TYPE>, busnumber: Option<*const u32>, controllertype: Option<*const CONFIGURATION_TYPE>, controllernumber: Option<*const u32>, peripheraltype: Option<*const CONFIGURATION_TYPE>, peripheralnumber: Option<*const u32>, calloutroutine: PIO_QUERY_DEVICE_ROUTINE, context: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryDeviceDescription(bustype : *const INTERFACE_TYPE, busnumber : *const u32, controllertype : *const CONFIGURATION_TYPE, controllernumber : *const u32, peripheraltype : *const CONFIGURATION_TYPE, peripheralnumber : *const u32, calloutroutine : PIO_QUERY_DEVICE_ROUTINE, context : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoQueryDeviceDescription(core::mem::transmute(bustype.unwrap_or(std::ptr::null())), core::mem::transmute(busnumber.unwrap_or(std::ptr::null())), core::mem::transmute(controllertype.unwrap_or(std::ptr::null())), core::mem::transmute(controllernumber.unwrap_or(std::ptr::null())), core::mem::transmute(peripheraltype.unwrap_or(std::ptr::null())), core::mem::transmute(peripheralnumber.unwrap_or(std::ptr::null())), calloutroutine, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + IoQueryDeviceDescription(core::mem::transmute(bustype.unwrap_or(core::ptr::null())), core::mem::transmute(busnumber.unwrap_or(core::ptr::null())), core::mem::transmute(controllertype.unwrap_or(core::ptr::null())), core::mem::transmute(controllernumber.unwrap_or(core::ptr::null())), core::mem::transmute(peripheraltype.unwrap_or(core::ptr::null())), core::mem::transmute(peripheralnumber.unwrap_or(core::ptr::null())), calloutroutine, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2186,19 +2186,19 @@ pub unsafe fn IoQueryFullDriverPath(driverobject: *const super::super::Foundatio #[inline] pub unsafe fn IoQueryInformationByName(objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, fileinformation: *mut core::ffi::c_void, length: u32, fileinformationclass: super::super::Storage::FileSystem::FILE_INFORMATION_CLASS, options: u32, drivercontext: Option<*const IO_DRIVER_CREATE_CONTEXT>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryInformationByName(objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, fileinformation : *mut core::ffi::c_void, length : u32, fileinformationclass : super::super::Storage::FileSystem:: FILE_INFORMATION_CLASS, options : u32, drivercontext : *const IO_DRIVER_CREATE_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoQueryInformationByName(objectattributes, iostatusblock, fileinformation, length, fileinformationclass, options, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + IoQueryInformationByName(objectattributes, iostatusblock, fileinformation, length, fileinformationclass, options, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoQueryKsrPersistentMemorySize(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, buffersize: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryKsrPersistentMemorySize(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, buffersize : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoQueryKsrPersistentMemorySize(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), buffersize) + IoQueryKsrPersistentMemorySize(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), buffersize) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoQueryKsrPersistentMemorySizeEx(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, physicaldeviceid: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, datatag: Option<*const u16>, dataversion: Option<*mut u32>, buffersize: *mut usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueryKsrPersistentMemorySizeEx(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, physicaldeviceid : *const super::super::super::Win32::Foundation:: UNICODE_STRING, datatag : *const u16, dataversion : *mut u32, buffersize : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoQueryKsrPersistentMemorySizeEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(std::ptr::null())), core::mem::transmute(datatag.unwrap_or(std::ptr::null())), core::mem::transmute(dataversion.unwrap_or(std::ptr::null_mut())), buffersize) + IoQueryKsrPersistentMemorySizeEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(core::ptr::null())), core::mem::transmute(datatag.unwrap_or(core::ptr::null())), core::mem::transmute(dataversion.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2207,7 +2207,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueueWorkItem(ioworkitem : super::super::Foundation:: PIO_WORKITEM, workerroutine : PIO_WORKITEM_ROUTINE, queuetype : WORK_QUEUE_TYPE, context : *const core::ffi::c_void)); - IoQueueWorkItem(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoQueueWorkItem(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2216,13 +2216,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoQueueWorkItemEx(ioworkitem : super::super::Foundation:: PIO_WORKITEM, workerroutine : PIO_WORKITEM_ROUTINE_EX, queuetype : WORK_QUEUE_TYPE, context : *const core::ffi::c_void)); - IoQueueWorkItemEx(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoQueueWorkItemEx(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRaiseHardError(irp: *const super::super::Foundation::IRP, vpb: Option<*const super::super::Foundation::VPB>, realdeviceobject: *const super::super::Foundation::DEVICE_OBJECT) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRaiseHardError(irp : *const super::super::Foundation:: IRP, vpb : *const super::super::Foundation:: VPB, realdeviceobject : *const super::super::Foundation:: DEVICE_OBJECT)); - IoRaiseHardError(irp, core::mem::transmute(vpb.unwrap_or(std::ptr::null())), realdeviceobject) + IoRaiseHardError(irp, core::mem::transmute(vpb.unwrap_or(core::ptr::null())), realdeviceobject) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2232,7 +2232,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoRaiseInformationalHardError(errorstatus : super::super::super::Win32::Foundation:: NTSTATUS, string : *const super::super::super::Win32::Foundation:: UNICODE_STRING, thread : super::super::Foundation:: PKTHREAD) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoRaiseInformationalHardError(errorstatus.param().abi(), core::mem::transmute(string.unwrap_or(std::ptr::null())), thread.param().abi()) + IoRaiseInformationalHardError(errorstatus.param().abi(), core::mem::transmute(string.unwrap_or(core::ptr::null())), thread.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2263,30 +2263,30 @@ pub unsafe fn IoRecordIoAttribution(opaquehandle: *mut core::ffi::c_void, attrib #[inline] pub unsafe fn IoRegisterBootDriverCallback(callbackfunction: PBOOT_DRIVER_CALLBACK_FUNCTION, callbackcontext: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterBootDriverCallback(callbackfunction : PBOOT_DRIVER_CALLBACK_FUNCTION, callbackcontext : *const core::ffi::c_void) -> *mut core::ffi::c_void); - IoRegisterBootDriverCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + IoRegisterBootDriverCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRegisterBootDriverReinitialization(driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverreinitializationroutine: super::super::Foundation::DRIVER_REINITIALIZE, context: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterBootDriverReinitialization(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, driverreinitializationroutine : super::super::Foundation:: DRIVER_REINITIALIZE, context : *const core::ffi::c_void)); - IoRegisterBootDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoRegisterBootDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoRegisterContainerNotification(notificationclass: IO_CONTAINER_NOTIFICATION_CLASS, callbackfunction: PIO_CONTAINER_NOTIFICATION_FUNCTION, notificationinformation: Option<*const core::ffi::c_void>, notificationinformationlength: u32, callbackregistration: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterContainerNotification(notificationclass : IO_CONTAINER_NOTIFICATION_CLASS, callbackfunction : PIO_CONTAINER_NOTIFICATION_FUNCTION, notificationinformation : *const core::ffi::c_void, notificationinformationlength : u32, callbackregistration : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRegisterContainerNotification(notificationclass, callbackfunction, core::mem::transmute(notificationinformation.unwrap_or(std::ptr::null())), notificationinformationlength, callbackregistration) + IoRegisterContainerNotification(notificationclass, callbackfunction, core::mem::transmute(notificationinformation.unwrap_or(core::ptr::null())), notificationinformationlength, callbackregistration) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRegisterDeviceInterface(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, interfaceclassguid: *const windows_core::GUID, referencestring: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, symboliclinkname: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterDeviceInterface(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, interfaceclassguid : *const windows_core::GUID, referencestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING, symboliclinkname : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRegisterDeviceInterface(physicaldeviceobject, interfaceclassguid, core::mem::transmute(referencestring.unwrap_or(std::ptr::null())), symboliclinkname) + IoRegisterDeviceInterface(physicaldeviceobject, interfaceclassguid, core::mem::transmute(referencestring.unwrap_or(core::ptr::null())), symboliclinkname) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRegisterDriverReinitialization(driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverreinitializationroutine: super::super::Foundation::DRIVER_REINITIALIZE, context: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterDriverReinitialization(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, driverreinitializationroutine : super::super::Foundation:: DRIVER_REINITIALIZE, context : *const core::ffi::c_void)); - IoRegisterDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoRegisterDriverReinitialization(driverobject, driverreinitializationroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2298,7 +2298,7 @@ pub unsafe fn IoRegisterLastChanceShutdownNotification(deviceobject: *const supe #[inline] pub unsafe fn IoRegisterPlugPlayNotification(eventcategory: IO_NOTIFICATION_EVENT_CATEGORY, eventcategoryflags: u32, eventcategorydata: Option<*const core::ffi::c_void>, driverobject: *const super::super::Foundation::DRIVER_OBJECT, callbackroutine: super::super::Foundation::DRIVER_NOTIFICATION_CALLBACK_ROUTINE, context: Option<*mut core::ffi::c_void>, notificationentry: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRegisterPlugPlayNotification(eventcategory : IO_NOTIFICATION_EVENT_CATEGORY, eventcategoryflags : u32, eventcategorydata : *const core::ffi::c_void, driverobject : *const super::super::Foundation:: DRIVER_OBJECT, callbackroutine : super::super::Foundation:: DRIVER_NOTIFICATION_CALLBACK_ROUTINE, context : *mut core::ffi::c_void, notificationentry : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRegisterPlugPlayNotification(eventcategory, eventcategoryflags, core::mem::transmute(eventcategorydata.unwrap_or(std::ptr::null())), driverobject, callbackroutine, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), notificationentry) + IoRegisterPlugPlayNotification(eventcategory, eventcategoryflags, core::mem::transmute(eventcategorydata.unwrap_or(core::ptr::null())), driverobject, callbackroutine, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), notificationentry) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2315,25 +2315,25 @@ pub unsafe fn IoReleaseCancelSpinLock(irql: u8) { #[inline] pub unsafe fn IoReleaseRemoveLockAndWaitEx(removelock: *mut IO_REMOVE_LOCK, tag: Option<*const core::ffi::c_void>, remlocksize: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoReleaseRemoveLockAndWaitEx(removelock : *mut IO_REMOVE_LOCK, tag : *const core::ffi::c_void, remlocksize : u32)); - IoReleaseRemoveLockAndWaitEx(removelock, core::mem::transmute(tag.unwrap_or(std::ptr::null())), remlocksize) + IoReleaseRemoveLockAndWaitEx(removelock, core::mem::transmute(tag.unwrap_or(core::ptr::null())), remlocksize) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn IoReleaseRemoveLockEx(removelock: *mut IO_REMOVE_LOCK, tag: Option<*const core::ffi::c_void>, remlocksize: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoReleaseRemoveLockEx(removelock : *mut IO_REMOVE_LOCK, tag : *const core::ffi::c_void, remlocksize : u32)); - IoReleaseRemoveLockEx(removelock, core::mem::transmute(tag.unwrap_or(std::ptr::null())), remlocksize) + IoReleaseRemoveLockEx(removelock, core::mem::transmute(tag.unwrap_or(core::ptr::null())), remlocksize) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRemoveLinkShareAccess(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRemoveLinkShareAccess(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS)); - IoRemoveLinkShareAccess(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut()))) + IoRemoveLinkShareAccess(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoRemoveLinkShareAccessEx(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>, ioshareaccessflags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoRemoveLinkShareAccessEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS, ioshareaccessflags : u32)); - IoRemoveLinkShareAccessEx(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut())), ioshareaccessflags) + IoRemoveLinkShareAccessEx(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), ioshareaccessflags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2354,7 +2354,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportDetectedDevice(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, legacybustype : INTERFACE_TYPE, busnumber : u32, slotnumber : u32, resourcelist : *const CM_RESOURCE_LIST, resourcerequirements : *const IO_RESOURCE_REQUIREMENTS_LIST, resourceassigned : super::super::super::Win32::Foundation:: BOOLEAN, deviceobject : *mut *mut super::super::Foundation:: DEVICE_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReportDetectedDevice(driverobject, legacybustype, busnumber, slotnumber, core::mem::transmute(resourcelist.unwrap_or(std::ptr::null())), core::mem::transmute(resourcerequirements.unwrap_or(std::ptr::null())), resourceassigned.param().abi(), deviceobject) + IoReportDetectedDevice(driverobject, legacybustype, busnumber, slotnumber, core::mem::transmute(resourcelist.unwrap_or(core::ptr::null())), core::mem::transmute(resourcerequirements.unwrap_or(core::ptr::null())), resourceassigned.param().abi(), deviceobject) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2372,7 +2372,7 @@ pub unsafe fn IoReportInterruptInactive(parameters: *const IO_REPORT_INTERRUPT_A #[inline] pub unsafe fn IoReportResourceForDetection(driverobject: *const super::super::Foundation::DRIVER_OBJECT, driverlist: Option<*const CM_RESOURCE_LIST>, driverlistsize: u32, deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, devicelist: Option<*const CM_RESOURCE_LIST>, devicelistsize: u32, conflictdetected: *mut super::super::super::Win32::Foundation::BOOLEAN) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportResourceForDetection(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, driverlist : *const CM_RESOURCE_LIST, driverlistsize : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, devicelist : *const CM_RESOURCE_LIST, devicelistsize : u32, conflictdetected : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReportResourceForDetection(driverobject, core::mem::transmute(driverlist.unwrap_or(std::ptr::null())), driverlistsize, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(devicelist.unwrap_or(std::ptr::null())), devicelistsize, conflictdetected) + IoReportResourceForDetection(driverobject, core::mem::transmute(driverlist.unwrap_or(core::ptr::null())), driverlistsize, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(devicelist.unwrap_or(core::ptr::null())), devicelistsize, conflictdetected) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2381,7 +2381,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportResourceUsage(driverclassname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, driverobject : *const super::super::Foundation:: DRIVER_OBJECT, driverlist : *const CM_RESOURCE_LIST, driverlistsize : u32, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, devicelist : *const CM_RESOURCE_LIST, devicelistsize : u32, overrideconflict : super::super::super::Win32::Foundation:: BOOLEAN, conflictdetected : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReportResourceUsage(core::mem::transmute(driverclassname.unwrap_or(std::ptr::null())), driverobject, core::mem::transmute(driverlist.unwrap_or(std::ptr::null())), driverlistsize, core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(devicelist.unwrap_or(std::ptr::null())), devicelistsize, overrideconflict.param().abi(), conflictdetected) + IoReportResourceUsage(core::mem::transmute(driverclassname.unwrap_or(core::ptr::null())), driverobject, core::mem::transmute(driverlist.unwrap_or(core::ptr::null())), driverlistsize, core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(devicelist.unwrap_or(core::ptr::null())), devicelistsize, overrideconflict.param().abi(), conflictdetected) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2399,7 +2399,7 @@ pub unsafe fn IoReportTargetDeviceChange(physicaldeviceobject: *const super::sup #[inline] pub unsafe fn IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, notificationstructure: *const core::ffi::c_void, callback: PDEVICE_CHANGE_COMPLETE_CALLBACK, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, notificationstructure : *const core::ffi::c_void, callback : PDEVICE_CHANGE_COMPLETE_CALLBACK, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject, notificationstructure, callback, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoReportTargetDeviceChangeAsynchronous(physicaldeviceobject, notificationstructure, callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2411,19 +2411,19 @@ pub unsafe fn IoRequestDeviceEject(physicaldeviceobject: *const super::super::Fo #[inline] pub unsafe fn IoRequestDeviceEjectEx(physicaldeviceobject: *const super::super::Foundation::DEVICE_OBJECT, callback: PIO_DEVICE_EJECT_CALLBACK, context: Option<*const core::ffi::c_void>, driverobject: Option<*const super::super::Foundation::DRIVER_OBJECT>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoRequestDeviceEjectEx(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, callback : PIO_DEVICE_EJECT_CALLBACK, context : *const core::ffi::c_void, driverobject : *const super::super::Foundation:: DRIVER_OBJECT) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoRequestDeviceEjectEx(physicaldeviceobject, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), core::mem::transmute(driverobject.unwrap_or(std::ptr::null()))) + IoRequestDeviceEjectEx(physicaldeviceobject, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(driverobject.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoReserveKsrPersistentMemory(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, size: usize, flags: u32, datahandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReserveKsrPersistentMemory(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, size : usize, flags : u32, datahandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReserveKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), size, flags, datahandle) + IoReserveKsrPersistentMemory(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), size, flags, datahandle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoReserveKsrPersistentMemoryEx(driverobject: *const super::super::Foundation::DRIVER_OBJECT, physicaldeviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, physicaldeviceid: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, datatag: Option<*const u16>, dataversion: u32, size: usize, flags: u32, datahandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoReserveKsrPersistentMemoryEx(driverobject : *const super::super::Foundation:: DRIVER_OBJECT, physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, physicaldeviceid : *const super::super::super::Win32::Foundation:: UNICODE_STRING, datatag : *const u16, dataversion : u32, size : usize, flags : u32, datahandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoReserveKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(std::ptr::null())), core::mem::transmute(datatag.unwrap_or(std::ptr::null())), dataversion, size, flags, datahandle) + IoReserveKsrPersistentMemoryEx(driverobject, core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(physicaldeviceid.unwrap_or(core::ptr::null())), core::mem::transmute(datatag.unwrap_or(core::ptr::null())), dataversion, size, flags, datahandle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2438,7 +2438,7 @@ where #[inline] pub unsafe fn IoSetActivityIdIrp(irp: *mut super::super::Foundation::IRP, guid: Option<*const windows_core::GUID>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetActivityIdIrp(irp : *mut super::super::Foundation:: IRP, guid : *const windows_core::GUID) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetActivityIdIrp(irp, core::mem::transmute(guid.unwrap_or(std::ptr::null()))) + IoSetActivityIdIrp(irp, core::mem::transmute(guid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoSetActivityIdThread(activityid: *const windows_core::GUID) -> *mut windows_core::GUID { @@ -2454,13 +2454,13 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetCompletionRoutineEx(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, irp : *const super::super::Foundation:: IRP, completionroutine : super::super::Foundation:: PIO_COMPLETION_ROUTINE, context : *const core::ffi::c_void, invokeonsuccess : super::super::super::Win32::Foundation:: BOOLEAN, invokeonerror : super::super::super::Win32::Foundation:: BOOLEAN, invokeoncancel : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetCompletionRoutineEx(deviceobject, irp, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null())), invokeonsuccess.param().abi(), invokeonerror.param().abi(), invokeoncancel.param().abi()) + IoSetCompletionRoutineEx(deviceobject, irp, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null())), invokeonsuccess.param().abi(), invokeonerror.param().abi(), invokeoncancel.param().abi()) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn IoSetDeviceInterfacePropertyData(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, propertykey: *const super::super::super::Win32::Devices::Properties::DEVPROPKEY, lcid: u32, flags: u32, r#type: u32, size: u32, data: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetDeviceInterfacePropertyData(symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, propertykey : *const super::super::super::Win32::Devices::Properties:: DEVPROPKEY, lcid : u32, flags : u32, r#type : u32, size : u32, data : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(std::ptr::null()))) + IoSetDeviceInterfacePropertyData(symboliclinkname, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoSetDeviceInterfaceState(symboliclinkname: *const super::super::super::Win32::Foundation::UNICODE_STRING, enable: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2474,7 +2474,7 @@ where #[inline] pub unsafe fn IoSetDevicePropertyData(pdo: *const super::super::Foundation::DEVICE_OBJECT, propertykey: *const super::super::super::Win32::Devices::Properties::DEVPROPKEY, lcid: u32, flags: u32, r#type: u32, size: u32, data: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetDevicePropertyData(pdo : *const super::super::Foundation:: DEVICE_OBJECT, propertykey : *const super::super::super::Win32::Devices::Properties:: DEVPROPKEY, lcid : u32, flags : u32, r#type : u32, size : u32, data : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoSetDevicePropertyData(pdo, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(std::ptr::null()))) + IoSetDevicePropertyData(pdo, propertykey, lcid, flags, r#type, size, core::mem::transmute(data.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2531,7 +2531,7 @@ pub unsafe fn IoSetIrpExtraCreateParameter(irp: *mut super::super::Foundation::I #[inline] pub unsafe fn IoSetLinkShareAccess(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>, ioshareaccessflags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetLinkShareAccess(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS, ioshareaccessflags : u32)); - IoSetLinkShareAccess(desiredaccess, desiredshareaccess, fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut())), ioshareaccessflags) + IoSetLinkShareAccess(desiredaccess, desiredshareaccess, fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), ioshareaccessflags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2564,7 +2564,7 @@ pub unsafe fn IoSetShareAccess(desiredaccess: u32, desiredshareaccess: u32, file #[inline] pub unsafe fn IoSetShareAccessEx(desiredaccess: u32, desiredshareaccess: u32, fileobject: *mut super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, writepermission: Option<*const super::super::super::Win32::Foundation::BOOLEAN>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetShareAccessEx(desiredaccess : u32, desiredshareaccess : u32, fileobject : *mut super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, writepermission : *const super::super::super::Win32::Foundation:: BOOLEAN)); - IoSetShareAccessEx(desiredaccess, desiredshareaccess, fileobject, shareaccess, core::mem::transmute(writepermission.unwrap_or(std::ptr::null()))) + IoSetShareAccessEx(desiredaccess, desiredshareaccess, fileobject, shareaccess, core::mem::transmute(writepermission.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2593,13 +2593,13 @@ where #[inline] pub unsafe fn IoSetTopLevelIrp(irp: Option<*const super::super::Foundation::IRP>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoSetTopLevelIrp(irp : *const super::super::Foundation:: IRP)); - IoSetTopLevelIrp(core::mem::transmute(irp.unwrap_or(std::ptr::null()))) + IoSetTopLevelIrp(core::mem::transmute(irp.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoSizeOfIrpEx(deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, stacksize: i8) -> u16 { windows_targets::link!("ntoskrnl.exe" "system" fn IoSizeOfIrpEx(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, stacksize : i8) -> u16); - IoSizeOfIrpEx(core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), stacksize) + IoSizeOfIrpEx(core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), stacksize) } #[inline] pub unsafe fn IoSizeofWorkItem() -> u32 { @@ -2628,7 +2628,7 @@ where #[inline] pub unsafe fn IoStartPacket(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, irp: *const super::super::Foundation::IRP, key: Option<*const u32>, cancelfunction: super::super::Foundation::DRIVER_CANCEL) { windows_targets::link!("ntoskrnl.exe" "system" fn IoStartPacket(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, irp : *const super::super::Foundation:: IRP, key : *const u32, cancelfunction : super::super::Foundation:: DRIVER_CANCEL)); - IoStartPacket(deviceobject, irp, core::mem::transmute(key.unwrap_or(std::ptr::null())), cancelfunction) + IoStartPacket(deviceobject, irp, core::mem::transmute(key.unwrap_or(core::ptr::null())), cancelfunction) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2665,7 +2665,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoTryQueueWorkItem(ioworkitem : super::super::Foundation:: PIO_WORKITEM, workerroutine : PIO_WORKITEM_ROUTINE_EX, queuetype : WORK_QUEUE_TYPE, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - IoTryQueueWorkItem(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoTryQueueWorkItem(ioworkitem.param().abi(), workerroutine, queuetype, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -2706,13 +2706,13 @@ pub unsafe fn IoUnregisterShutdownNotification(deviceobject: *const super::super #[inline] pub unsafe fn IoUpdateLinkShareAccess(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>) { windows_targets::link!("ntoskrnl.exe" "system" fn IoUpdateLinkShareAccess(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS)); - IoUpdateLinkShareAccess(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut()))) + IoUpdateLinkShareAccess(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn IoUpdateLinkShareAccessEx(fileobject: *const super::super::Foundation::FILE_OBJECT, shareaccess: *mut SHARE_ACCESS, linkshareaccess: Option<*mut LINK_SHARE_ACCESS>, ioshareaccessflags: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn IoUpdateLinkShareAccessEx(fileobject : *const super::super::Foundation:: FILE_OBJECT, shareaccess : *mut SHARE_ACCESS, linkshareaccess : *mut LINK_SHARE_ACCESS, ioshareaccessflags : u32)); - IoUpdateLinkShareAccessEx(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(std::ptr::null_mut())), ioshareaccessflags) + IoUpdateLinkShareAccessEx(fileobject, shareaccess, core::mem::transmute(linkshareaccess.unwrap_or(core::ptr::null_mut())), ioshareaccessflags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2774,7 +2774,7 @@ pub unsafe fn IoWMIDeviceObjectToInstanceName(datablockobject: *const core::ffi: #[inline] pub unsafe fn IoWMIExecuteMethod(datablockobject: *const core::ffi::c_void, instancename: *const super::super::super::Win32::Foundation::UNICODE_STRING, methodid: u32, inbuffersize: u32, outbuffersize: *mut u32, inoutbuffer: Option<*mut u8>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIExecuteMethod(datablockobject : *const core::ffi::c_void, instancename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, methodid : u32, inbuffersize : u32, outbuffersize : *mut u32, inoutbuffer : *mut u8) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIExecuteMethod(datablockobject, instancename, methodid, inbuffersize, outbuffersize, core::mem::transmute(inoutbuffer.unwrap_or(std::ptr::null_mut()))) + IoWMIExecuteMethod(datablockobject, instancename, methodid, inbuffersize, outbuffersize, core::mem::transmute(inoutbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IoWMIHandleToInstanceName(datablockobject: *const core::ffi::c_void, filehandle: P0, instancename: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS @@ -2792,22 +2792,22 @@ pub unsafe fn IoWMIOpenBlock(guid: *const windows_core::GUID, desiredaccess: u32 #[inline] pub unsafe fn IoWMIQueryAllData(datablockobject: *const core::ffi::c_void, inoutbuffersize: *mut u32, outbuffer: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIQueryAllData(datablockobject : *const core::ffi::c_void, inoutbuffersize : *mut u32, outbuffer : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIQueryAllData(datablockobject, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut()))) + IoWMIQueryAllData(datablockobject, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IoWMIQueryAllDataMultiple(datablockobjectlist: &[*const core::ffi::c_void], inoutbuffersize: *mut u32, outbuffer: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIQueryAllDataMultiple(datablockobjectlist : *const *const core::ffi::c_void, objectcount : u32, inoutbuffersize : *mut u32, outbuffer : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIQueryAllDataMultiple(core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len().try_into().unwrap(), inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut()))) + IoWMIQueryAllDataMultiple(core::mem::transmute(datablockobjectlist.as_ptr()), datablockobjectlist.len().try_into().unwrap(), inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IoWMIQuerySingleInstance(datablockobject: *const core::ffi::c_void, instancename: *const super::super::super::Win32::Foundation::UNICODE_STRING, inoutbuffersize: *mut u32, outbuffer: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIQuerySingleInstance(datablockobject : *const core::ffi::c_void, instancename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, inoutbuffersize : *mut u32, outbuffer : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIQuerySingleInstance(datablockobject, instancename, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut()))) + IoWMIQuerySingleInstance(datablockobject, instancename, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IoWMIQuerySingleInstanceMultiple(datablockobjectlist: *const *const core::ffi::c_void, instancenames: *const super::super::super::Win32::Foundation::UNICODE_STRING, objectcount: u32, inoutbuffersize: *mut u32, outbuffer: Option<*mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMIQuerySingleInstanceMultiple(datablockobjectlist : *const *const core::ffi::c_void, instancenames : *const super::super::super::Win32::Foundation:: UNICODE_STRING, objectcount : u32, inoutbuffersize : *mut u32, outbuffer : *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMIQuerySingleInstanceMultiple(datablockobjectlist, instancenames, objectcount, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut()))) + IoWMIQuerySingleInstanceMultiple(datablockobjectlist, instancenames, objectcount, inoutbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -2818,7 +2818,7 @@ pub unsafe fn IoWMIRegistrationControl(deviceobject: *const super::super::Founda #[inline] pub unsafe fn IoWMISetNotificationCallback(object: *mut core::ffi::c_void, callback: WMI_NOTIFICATION_CALLBACK, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMISetNotificationCallback(object : *mut core::ffi::c_void, callback : WMI_NOTIFICATION_CALLBACK, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMISetNotificationCallback(object, callback, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + IoWMISetNotificationCallback(object, callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IoWMISetSingleInstance(datablockobject: *const core::ffi::c_void, instancename: *const super::super::super::Win32::Foundation::UNICODE_STRING, version: u32, valuebuffersize: u32, valuebuffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2837,7 +2837,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn IoWMISuggestInstanceName(physicaldeviceobject : *const super::super::Foundation:: DEVICE_OBJECT, symboliclinkname : *const super::super::super::Win32::Foundation:: UNICODE_STRING, combinenames : super::super::super::Win32::Foundation:: BOOLEAN, suggestedinstancename : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(std::ptr::null())), core::mem::transmute(symboliclinkname.unwrap_or(std::ptr::null())), combinenames.param().abi(), suggestedinstancename) + IoWMISuggestInstanceName(core::mem::transmute(physicaldeviceobject.unwrap_or(core::ptr::null())), core::mem::transmute(symboliclinkname.unwrap_or(core::ptr::null())), combinenames.param().abi(), suggestedinstancename) } #[inline] pub unsafe fn IoWMIWriteEvent(wnodeeventitem: *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -2987,12 +2987,12 @@ pub unsafe fn KeClearEvent(event: *mut super::super::Foundation::KEVENT) { #[inline] pub unsafe fn KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue: u64, performancecountervalue: *mut u64, conversionerror: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue : u64, performancecountervalue : *mut u64, conversionerror : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue, performancecountervalue, core::mem::transmute(conversionerror.unwrap_or(std::ptr::null_mut()))) + KeConvertAuxiliaryCounterToPerformanceCounter(auxiliarycountervalue, performancecountervalue, core::mem::transmute(conversionerror.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue: u64, auxiliarycountervalue: *mut u64, conversionerror: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue : u64, auxiliarycountervalue : *mut u64, conversionerror : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue, auxiliarycountervalue, core::mem::transmute(conversionerror.unwrap_or(std::ptr::null_mut()))) + KeConvertPerformanceCounterToAuxiliaryCounter(performancecountervalue, auxiliarycountervalue, core::mem::transmute(conversionerror.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn KeDelayExecutionThread(waitmode: i8, alertable: P0, interval: *const i64) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3042,7 +3042,7 @@ pub unsafe fn KeEnterGuardedRegion() { #[inline] pub unsafe fn KeExpandKernelStackAndCallout(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeExpandKernelStackAndCallout(callout : PEXPAND_STACK_CALLOUT, parameter : *const core::ffi::c_void, size : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeExpandKernelStackAndCallout(callout, core::mem::transmute(parameter.unwrap_or(std::ptr::null())), size) + KeExpandKernelStackAndCallout(callout, core::mem::transmute(parameter.unwrap_or(core::ptr::null())), size) } #[inline] pub unsafe fn KeExpandKernelStackAndCalloutEx(callout: PEXPAND_STACK_CALLOUT, parameter: Option<*const core::ffi::c_void>, size: usize, wait: P0, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3050,7 +3050,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn KeExpandKernelStackAndCalloutEx(callout : PEXPAND_STACK_CALLOUT, parameter : *const core::ffi::c_void, size : usize, wait : super::super::super::Win32::Foundation:: BOOLEAN, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeExpandKernelStackAndCalloutEx(callout, core::mem::transmute(parameter.unwrap_or(std::ptr::null())), size, wait.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null()))) + KeExpandKernelStackAndCalloutEx(callout, core::mem::transmute(parameter.unwrap_or(core::ptr::null())), size, wait.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3086,7 +3086,7 @@ pub unsafe fn KeGetCurrentNodeNumber() -> u16 { #[inline] pub unsafe fn KeGetCurrentProcessorNumberEx(procnumber: Option<*mut super::super::super::Win32::System::Kernel::PROCESSOR_NUMBER>) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeGetCurrentProcessorNumberEx(procnumber : *mut super::super::super::Win32::System::Kernel:: PROCESSOR_NUMBER) -> u32); - KeGetCurrentProcessorNumberEx(core::mem::transmute(procnumber.unwrap_or(std::ptr::null_mut()))) + KeGetCurrentProcessorNumberEx(core::mem::transmute(procnumber.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3108,7 +3108,7 @@ pub unsafe fn KeGetRecommendedSharedDataAlignment() -> u32 { #[inline] pub unsafe fn KeInitializeCrashDumpHeader(dumptype: u32, flags: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bufferneeded: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeCrashDumpHeader(dumptype : u32, flags : u32, buffer : *mut core::ffi::c_void, buffersize : u32, bufferneeded : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeInitializeCrashDumpHeader(dumptype, flags, buffer, buffersize, core::mem::transmute(bufferneeded.unwrap_or(std::ptr::null_mut()))) + KeInitializeCrashDumpHeader(dumptype, flags, buffer, buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3120,7 +3120,7 @@ pub unsafe fn KeInitializeDeviceQueue(devicequeue: *mut super::super::Foundation #[inline] pub unsafe fn KeInitializeDpc(dpc: *mut super::super::Foundation::KDPC, deferredroutine: super::super::Foundation::PKDEFERRED_ROUTINE, deferredcontext: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeDpc(dpc : *mut super::super::Foundation:: KDPC, deferredroutine : super::super::Foundation:: PKDEFERRED_ROUTINE, deferredcontext : *const core::ffi::c_void)); - KeInitializeDpc(dpc, deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(std::ptr::null()))) + KeInitializeDpc(dpc, deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3160,7 +3160,7 @@ pub unsafe fn KeInitializeSpinLock() -> usize { #[inline] pub unsafe fn KeInitializeThreadedDpc(dpc: *mut super::super::Foundation::KDPC, deferredroutine: super::super::Foundation::PKDEFERRED_ROUTINE, deferredcontext: Option<*const core::ffi::c_void>) { windows_targets::link!("ntoskrnl.exe" "system" fn KeInitializeThreadedDpc(dpc : *mut super::super::Foundation:: KDPC, deferredroutine : super::super::Foundation:: PKDEFERRED_ROUTINE, deferredcontext : *const core::ffi::c_void)); - KeInitializeThreadedDpc(dpc, deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(std::ptr::null()))) + KeInitializeThreadedDpc(dpc, deferredroutine, core::mem::transmute(deferredcontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3196,7 +3196,7 @@ pub unsafe fn KeInsertDeviceQueue(devicequeue: *mut super::super::Foundation::KD #[inline] pub unsafe fn KeInsertQueueDpc(dpc: *mut super::super::Foundation::KDPC, systemargument1: Option<*const core::ffi::c_void>, systemargument2: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeInsertQueueDpc(dpc : *mut super::super::Foundation:: KDPC, systemargument1 : *const core::ffi::c_void, systemargument2 : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeInsertQueueDpc(dpc, core::mem::transmute(systemargument1.unwrap_or(std::ptr::null())), core::mem::transmute(systemargument2.unwrap_or(std::ptr::null()))) + KeInsertQueueDpc(dpc, core::mem::transmute(systemargument1.unwrap_or(core::ptr::null())), core::mem::transmute(systemargument2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn KeInvalidateAllCaches() -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3245,7 +3245,7 @@ pub unsafe fn KeQueryActiveGroupCount() -> u16 { #[inline] pub unsafe fn KeQueryActiveProcessorCount(activeprocessors: Option<*mut usize>) -> u32 { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryActiveProcessorCount(activeprocessors : *mut usize) -> u32); - KeQueryActiveProcessorCount(core::mem::transmute(activeprocessors.unwrap_or(std::ptr::null_mut()))) + KeQueryActiveProcessorCount(core::mem::transmute(activeprocessors.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn KeQueryActiveProcessorCountEx(groupnumber: u16) -> u32 { @@ -3260,7 +3260,7 @@ pub unsafe fn KeQueryActiveProcessors() -> usize { #[inline] pub unsafe fn KeQueryAuxiliaryCounterFrequency(auxiliarycounterfrequency: Option<*mut u64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryAuxiliaryCounterFrequency(auxiliarycounterfrequency : *mut u64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeQueryAuxiliaryCounterFrequency(core::mem::transmute(auxiliarycounterfrequency.unwrap_or(std::ptr::null_mut()))) + KeQueryAuxiliaryCounterFrequency(core::mem::transmute(auxiliarycounterfrequency.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn KeQueryDpcWatchdogInformation(watchdoginformation: *mut KDPC_WATCHDOG_INFORMATION) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3291,7 +3291,7 @@ pub unsafe fn KeQueryInterruptTimePrecise(qpctimestamp: *mut u64) -> u64 { #[inline] pub unsafe fn KeQueryLogicalProcessorRelationship(processornumber: Option<*const super::super::super::Win32::System::Kernel::PROCESSOR_NUMBER>, relationshiptype: super::super::super::Win32::System::SystemInformation::LOGICAL_PROCESSOR_RELATIONSHIP, information: Option<*mut super::super::super::Win32::System::SystemInformation::SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX>, length: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryLogicalProcessorRelationship(processornumber : *const super::super::super::Win32::System::Kernel:: PROCESSOR_NUMBER, relationshiptype : super::super::super::Win32::System::SystemInformation:: LOGICAL_PROCESSOR_RELATIONSHIP, information : *mut super::super::super::Win32::System::SystemInformation:: SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, length : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeQueryLogicalProcessorRelationship(core::mem::transmute(processornumber.unwrap_or(std::ptr::null())), relationshiptype, core::mem::transmute(information.unwrap_or(std::ptr::null_mut())), length) + KeQueryLogicalProcessorRelationship(core::mem::transmute(processornumber.unwrap_or(core::ptr::null())), relationshiptype, core::mem::transmute(information.unwrap_or(core::ptr::null_mut())), length) } #[inline] pub unsafe fn KeQueryMaximumGroupCount() -> u16 { @@ -3312,7 +3312,7 @@ pub unsafe fn KeQueryMaximumProcessorCountEx(groupnumber: u16) -> u32 { #[inline] pub unsafe fn KeQueryNodeActiveAffinity(nodenumber: u16, affinity: Option<*mut super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY>, count: Option<*mut u16>) { windows_targets::link!("ntoskrnl.exe" "system" fn KeQueryNodeActiveAffinity(nodenumber : u16, affinity : *mut super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, count : *mut u16)); - KeQueryNodeActiveAffinity(nodenumber, core::mem::transmute(affinity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(count.unwrap_or(std::ptr::null_mut()))) + KeQueryNodeActiveAffinity(nodenumber, core::mem::transmute(affinity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -3333,7 +3333,7 @@ pub unsafe fn KeQueryNodeMaximumProcessorCount(nodenumber: u16) -> u16 { #[inline] pub unsafe fn KeQueryPerformanceCounter(performancefrequency: Option<*mut i64>) -> i64 { windows_targets::link!("hal.dll" "system" fn KeQueryPerformanceCounter(performancefrequency : *mut i64) -> i64); - KeQueryPerformanceCounter(core::mem::transmute(performancefrequency.unwrap_or(std::ptr::null_mut()))) + KeQueryPerformanceCounter(core::mem::transmute(performancefrequency.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3417,7 +3417,7 @@ pub unsafe fn KeRegisterBoundCallback(callbackroutine: PBOUND_CALLBACK) -> *mut #[inline] pub unsafe fn KeRegisterBugCheckCallback(callbackrecord: *mut KBUGCHECK_CALLBACK_RECORD, callbackroutine: PKBUGCHECK_CALLBACK_ROUTINE, buffer: Option<*const core::ffi::c_void>, length: u32, component: *const u8) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeRegisterBugCheckCallback(callbackrecord : *mut KBUGCHECK_CALLBACK_RECORD, callbackroutine : PKBUGCHECK_CALLBACK_ROUTINE, buffer : *const core::ffi::c_void, length : u32, component : *const u8) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeRegisterBugCheckCallback(callbackrecord, callbackroutine, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), length, component) + KeRegisterBugCheckCallback(callbackrecord, callbackroutine, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), length, component) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -3428,12 +3428,12 @@ pub unsafe fn KeRegisterBugCheckReasonCallback(callbackrecord: *mut KBUGCHECK_RE #[inline] pub unsafe fn KeRegisterNmiCallback(callbackroutine: PNMI_CALLBACK, context: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn KeRegisterNmiCallback(callbackroutine : PNMI_CALLBACK, context : *const core::ffi::c_void) -> *mut core::ffi::c_void); - KeRegisterNmiCallback(callbackroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + KeRegisterNmiCallback(callbackroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn KeRegisterProcessorChangeCallback(callbackfunction: PPROCESSOR_CALLBACK_FUNCTION, callbackcontext: Option<*const core::ffi::c_void>, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn KeRegisterProcessorChangeCallback(callbackfunction : PPROCESSOR_CALLBACK_FUNCTION, callbackcontext : *const core::ffi::c_void, flags : u32) -> *mut core::ffi::c_void); - KeRegisterProcessorChangeCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), flags) + KeRegisterProcessorChangeCallback(callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3580,7 +3580,7 @@ where #[inline] pub unsafe fn KeSetCoalescableTimer(timer: *mut KTIMER, duetime: i64, period: u32, tolerabledelay: u32, dpc: Option<*const super::super::Foundation::KDPC>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetCoalescableTimer(timer : *mut KTIMER, duetime : i64, period : u32, tolerabledelay : u32, dpc : *const super::super::Foundation:: KDPC) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeSetCoalescableTimer(timer, duetime, period, tolerabledelay, core::mem::transmute(dpc.unwrap_or(std::ptr::null()))) + KeSetCoalescableTimer(timer, duetime, period, tolerabledelay, core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3625,7 +3625,7 @@ pub unsafe fn KeSetSystemAffinityThreadEx(affinity: usize) -> usize { #[inline] pub unsafe fn KeSetSystemGroupAffinityThread(affinity: *const super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY, previousaffinity: Option<*mut super::super::super::Win32::System::SystemInformation::GROUP_AFFINITY>) { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetSystemGroupAffinityThread(affinity : *const super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY, previousaffinity : *mut super::super::super::Win32::System::SystemInformation:: GROUP_AFFINITY)); - KeSetSystemGroupAffinityThread(affinity, core::mem::transmute(previousaffinity.unwrap_or(std::ptr::null_mut()))) + KeSetSystemGroupAffinityThread(affinity, core::mem::transmute(previousaffinity.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -3643,13 +3643,13 @@ pub unsafe fn KeSetTargetProcessorDpcEx(dpc: *mut super::super::Foundation::KDPC #[inline] pub unsafe fn KeSetTimer(timer: *mut KTIMER, duetime: i64, dpc: Option<*const super::super::Foundation::KDPC>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTimer(timer : *mut KTIMER, duetime : i64, dpc : *const super::super::Foundation:: KDPC) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeSetTimer(timer, duetime, core::mem::transmute(dpc.unwrap_or(std::ptr::null()))) + KeSetTimer(timer, duetime, core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn KeSetTimerEx(timer: *mut KTIMER, duetime: i64, period: i32, dpc: Option<*const super::super::Foundation::KDPC>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn KeSetTimerEx(timer : *mut KTIMER, duetime : i64, period : i32, dpc : *const super::super::Foundation:: KDPC) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeSetTimerEx(timer, duetime, period, core::mem::transmute(dpc.unwrap_or(std::ptr::null()))) + KeSetTimerEx(timer, duetime, period, core::mem::transmute(dpc.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn KeShouldYieldProcessor() -> u32 { @@ -3668,7 +3668,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn KeSynchronizeExecution(interrupt : super::super::Foundation:: PKINTERRUPT, synchronizeroutine : PKSYNCHRONIZE_ROUTINE, synchronizecontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: BOOLEAN); - KeSynchronizeExecution(interrupt.param().abi(), synchronizeroutine, core::mem::transmute(synchronizecontext.unwrap_or(std::ptr::null()))) + KeSynchronizeExecution(interrupt.param().abi(), synchronizeroutine, core::mem::transmute(synchronizecontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn KeTestSpinLock(spinlock: *const usize) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -3693,7 +3693,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForMultipleObjects(count : u32, object : *const *const core::ffi::c_void, waittype : super::super::super::Win32::System::Kernel:: WAIT_TYPE, waitreason : KWAIT_REASON, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64, waitblockarray : *mut super::super::Foundation:: KWAIT_BLOCK) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(std::ptr::null_mut()))) + KeWaitForMultipleObjects(object.len().try_into().unwrap(), core::mem::transmute(object.as_ptr()), waittype, waitreason, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(waitblockarray.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn KeWaitForSingleObject(object: *const core::ffi::c_void, waitreason: KWAIT_REASON, waitmode: i8, alertable: P0, timeout: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -3701,7 +3701,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn KeWaitForSingleObject(object : *const core::ffi::c_void, waitreason : KWAIT_REASON, waitmode : i8, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - KeWaitForSingleObject(object, waitreason, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(std::ptr::null()))) + KeWaitForSingleObject(object, waitreason, waitmode, alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn KfRaiseIrql(newirql: u8) -> u8 { @@ -3737,7 +3737,7 @@ pub unsafe fn MmAllocateContiguousMemory(numberofbytes: usize, highestacceptable #[inline] pub unsafe fn MmAllocateContiguousMemoryEx(numberofbytes: *const usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: i64, preferrednode: u32, protect: u32, partitionobject: Option<*const core::ffi::c_void>, tag: u32, flags: u32, baseaddress: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocateContiguousMemoryEx(numberofbytes : *const usize, lowestacceptableaddress : i64, highestacceptableaddress : i64, boundaryaddressmultiple : i64, preferrednode : u32, protect : u32, partitionobject : *const core::ffi::c_void, tag : u32, flags : u32, baseaddress : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - MmAllocateContiguousMemoryEx(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple, preferrednode, protect, core::mem::transmute(partitionobject.unwrap_or(std::ptr::null())), tag, flags, baseaddress) + MmAllocateContiguousMemoryEx(numberofbytes, lowestacceptableaddress, highestacceptableaddress, boundaryaddressmultiple, preferrednode, protect, core::mem::transmute(partitionobject.unwrap_or(core::ptr::null())), tag, flags, baseaddress) } #[inline] pub unsafe fn MmAllocateContiguousMemorySpecifyCache(numberofbytes: usize, lowestacceptableaddress: i64, highestacceptableaddress: i64, boundaryaddressmultiple: i64, cachetype: MEMORY_CACHING_TYPE) -> *mut core::ffi::c_void { @@ -3797,7 +3797,7 @@ pub unsafe fn MmAllocatePagesForMdlEx(lowaddress: i64, highaddress: i64, skipbyt #[inline] pub unsafe fn MmAllocatePartitionNodePagesForMdlEx(lowaddress: i64, highaddress: i64, skipbytes: i64, totalbytes: usize, cachetype: MEMORY_CACHING_TYPE, idealnode: u32, flags: u32, partitionobject: Option<*const core::ffi::c_void>) -> *mut super::super::Foundation::MDL { windows_targets::link!("ntoskrnl.exe" "system" fn MmAllocatePartitionNodePagesForMdlEx(lowaddress : i64, highaddress : i64, skipbytes : i64, totalbytes : usize, cachetype : MEMORY_CACHING_TYPE, idealnode : u32, flags : u32, partitionobject : *const core::ffi::c_void) -> *mut super::super::Foundation:: MDL); - MmAllocatePartitionNodePagesForMdlEx(lowaddress, highaddress, skipbytes, totalbytes, cachetype, idealnode, flags, core::mem::transmute(partitionobject.unwrap_or(std::ptr::null()))) + MmAllocatePartitionNodePagesForMdlEx(lowaddress, highaddress, skipbytes, totalbytes, cachetype, idealnode, flags, core::mem::transmute(partitionobject.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3820,7 +3820,7 @@ pub unsafe fn MmCopyMemory(targetaddress: *const core::ffi::c_void, sourceaddres #[inline] pub unsafe fn MmCreateMdl(memorydescriptorlist: Option<*mut super::super::Foundation::MDL>, base: Option<*const core::ffi::c_void>, length: usize) -> *mut super::super::Foundation::MDL { windows_targets::link!("ntoskrnl.exe" "system" fn MmCreateMdl(memorydescriptorlist : *mut super::super::Foundation:: MDL, base : *const core::ffi::c_void, length : usize) -> *mut super::super::Foundation:: MDL); - MmCreateMdl(core::mem::transmute(memorydescriptorlist.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null())), length) + MmCreateMdl(core::mem::transmute(memorydescriptorlist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null())), length) } #[inline] pub unsafe fn MmCreateMirror() -> super::super::super::Win32::Foundation::NTSTATUS { @@ -3882,12 +3882,12 @@ pub unsafe fn MmGetPhysicalMemoryRanges() -> *mut PHYSICAL_MEMORY_RANGE { #[inline] pub unsafe fn MmGetPhysicalMemoryRangesEx(partitionobject: Option<*const core::ffi::c_void>) -> *mut PHYSICAL_MEMORY_RANGE { windows_targets::link!("ntoskrnl.exe" "system" fn MmGetPhysicalMemoryRangesEx(partitionobject : *const core::ffi::c_void) -> *mut PHYSICAL_MEMORY_RANGE); - MmGetPhysicalMemoryRangesEx(core::mem::transmute(partitionobject.unwrap_or(std::ptr::null()))) + MmGetPhysicalMemoryRangesEx(core::mem::transmute(partitionobject.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MmGetPhysicalMemoryRangesEx2(partitionobject: Option<*const core::ffi::c_void>, flags: u32) -> *mut PHYSICAL_MEMORY_RANGE { windows_targets::link!("ntoskrnl.exe" "system" fn MmGetPhysicalMemoryRangesEx2(partitionobject : *const core::ffi::c_void, flags : u32) -> *mut PHYSICAL_MEMORY_RANGE); - MmGetPhysicalMemoryRangesEx2(core::mem::transmute(partitionobject.unwrap_or(std::ptr::null())), flags) + MmGetPhysicalMemoryRangesEx2(core::mem::transmute(partitionobject.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn MmGetSystemRoutineAddress(systemroutinename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> *mut core::ffi::c_void { @@ -3971,7 +3971,7 @@ pub unsafe fn MmMapLockedPages(memorydescriptorlist: *mut super::super::Foundati #[inline] pub unsafe fn MmMapLockedPagesSpecifyCache(memorydescriptorlist: *mut super::super::Foundation::MDL, accessmode: i8, cachetype: MEMORY_CACHING_TYPE, requestedaddress: Option<*const core::ffi::c_void>, bugcheckonfailure: u32, priority: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapLockedPagesSpecifyCache(memorydescriptorlist : *mut super::super::Foundation:: MDL, accessmode : i8, cachetype : MEMORY_CACHING_TYPE, requestedaddress : *const core::ffi::c_void, bugcheckonfailure : u32, priority : u32) -> *mut core::ffi::c_void); - MmMapLockedPagesSpecifyCache(memorydescriptorlist, accessmode, cachetype, core::mem::transmute(requestedaddress.unwrap_or(std::ptr::null())), bugcheckonfailure, priority) + MmMapLockedPagesSpecifyCache(memorydescriptorlist, accessmode, cachetype, core::mem::transmute(requestedaddress.unwrap_or(core::ptr::null())), bugcheckonfailure, priority) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -3983,7 +3983,7 @@ pub unsafe fn MmMapLockedPagesWithReservedMapping(mappingaddress: *const core::f #[inline] pub unsafe fn MmMapMdl(memorydescriptorlist: *mut super::super::Foundation::MDL, protection: u32, driverroutine: PMM_MDL_ROUTINE, drivercontext: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmMapMdl(memorydescriptorlist : *mut super::super::Foundation:: MDL, protection : u32, driverroutine : PMM_MDL_ROUTINE, drivercontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - MmMapMdl(memorydescriptorlist, protection, driverroutine, core::mem::transmute(drivercontext.unwrap_or(std::ptr::null()))) + MmMapMdl(memorydescriptorlist, protection, driverroutine, core::mem::transmute(drivercontext.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4083,7 +4083,7 @@ pub unsafe fn MmResetDriverPaging(addresswithinsection: *const core::ffi::c_void #[inline] pub unsafe fn MmRotatePhysicalView(virtualaddress: *const core::ffi::c_void, numberofbytes: *mut usize, newmdl: Option<*const super::super::Foundation::MDL>, direction: MM_ROTATE_DIRECTION, copyfunction: PMM_ROTATE_COPY_CALLBACK_FUNCTION, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn MmRotatePhysicalView(virtualaddress : *const core::ffi::c_void, numberofbytes : *mut usize, newmdl : *const super::super::Foundation:: MDL, direction : MM_ROTATE_DIRECTION, copyfunction : PMM_ROTATE_COPY_CALLBACK_FUNCTION, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - MmRotatePhysicalView(virtualaddress, numberofbytes, core::mem::transmute(newmdl.unwrap_or(std::ptr::null())), direction, copyfunction, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + MmRotatePhysicalView(virtualaddress, numberofbytes, core::mem::transmute(newmdl.unwrap_or(core::ptr::null())), direction, copyfunction, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MmSecureVirtualMemory(address: *const core::ffi::c_void, size: usize, probemode: u32) -> super::super::super::Win32::Foundation::HANDLE { @@ -4103,7 +4103,7 @@ pub unsafe fn MmSetPermanentCacheAttribute(startaddress: i64, numberofbytes: i64 #[inline] pub unsafe fn MmSizeOfMdl(base: Option<*const core::ffi::c_void>, length: usize) -> usize { windows_targets::link!("ntoskrnl.exe" "system" fn MmSizeOfMdl(base : *const core::ffi::c_void, length : usize) -> usize); - MmSizeOfMdl(core::mem::transmute(base.unwrap_or(std::ptr::null())), length) + MmSizeOfMdl(core::mem::transmute(base.unwrap_or(core::ptr::null())), length) } #[inline] pub unsafe fn MmUnlockPagableImageSection(imagesectionhandle: *const core::ffi::c_void) { @@ -4167,7 +4167,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCommitComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCommitComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtCommitComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtCommitEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4175,7 +4175,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCommitEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCommitEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtCommitEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtCommitTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4194,7 +4194,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateEnlistment(enlistmenthandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, transactionhandle : super::super::super::Win32::Foundation:: HANDLE, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32, notificationmask : u32, enlistmentkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(std::ptr::null()))) + NtCreateEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4203,7 +4203,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateResourceManager(resourcemanagerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tmhandle : super::super::super::Win32::Foundation:: HANDLE, rmguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32, description : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), rmguid, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions, core::mem::transmute(description.unwrap_or(std::ptr::null()))) + NtCreateResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), rmguid, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions, core::mem::transmute(description.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4212,13 +4212,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCreateTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, uow : *const windows_core::GUID, tmhandle : super::super::super::Win32::Foundation:: HANDLE, createoptions : u32, isolationlevel : u32, isolationflags : u32, timeout : *const i64, description : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(uow.unwrap_or(std::ptr::null())), tmhandle.param().abi(), createoptions, isolationlevel, isolationflags, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(description.unwrap_or(std::ptr::null()))) + NtCreateTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(uow.unwrap_or(core::ptr::null())), tmhandle.param().abi(), createoptions, isolationlevel, isolationflags, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(description.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn NtCreateTransactionManager(tmhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, logfilename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, commitstrength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateTransactionManager(tmhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, logfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, commitstrength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(logfilename.unwrap_or(std::ptr::null())), createoptions, commitstrength) + NtCreateTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), createoptions, commitstrength) } #[inline] pub unsafe fn NtDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4241,7 +4241,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtGetNotificationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, transactionnotification : *mut super::super::super::Win32::Storage::FileSystem:: TRANSACTION_NOTIFICATION, notificationlength : u32, timeout : *const i64, returnlength : *mut u32, asynchronous : u32, asynchronouscontext : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtGetNotificationResourceManager(resourcemanagerhandle.param().abi(), transactionnotification, notificationlength, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut())), asynchronous, asynchronouscontext) + NtGetNotificationResourceManager(resourcemanagerhandle.param().abi(), transactionnotification, notificationlength, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), asynchronous, asynchronouscontext) } #[inline] pub unsafe fn NtLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4272,7 +4272,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtOpenEnlistment(enlistmenthandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null()))) + NtOpenEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4281,7 +4281,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtOpenResourceManager(resourcemanagerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tmhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(std::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(std::ptr::null()))) + NtOpenResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(core::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4296,13 +4296,13 @@ where #[inline] pub unsafe fn NtOpenTransactionManager(tmhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, logfilename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, tmidentity: Option<*const windows_core::GUID>, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenTransactionManager(tmhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, logfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, tmidentity : *const windows_core::GUID, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(logfilename.unwrap_or(std::ptr::null())), core::mem::transmute(tmidentity.unwrap_or(std::ptr::null())), openoptions) + NtOpenTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(tmidentity.unwrap_or(core::ptr::null())), openoptions) } #[cfg(feature = "Win32_System_Power")] #[inline] pub unsafe fn NtPowerInformation(informationlevel: super::super::super::Win32::System::Power::POWER_INFORMATION_LEVEL, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtPowerInformation(informationlevel : super::super::super::Win32::System::Power:: POWER_INFORMATION_LEVEL, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + NtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn NtPrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4310,7 +4310,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrePrepareComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrePrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtPrePrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtPrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4318,7 +4318,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrePrepareEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrePrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtPrePrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtPrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4326,7 +4326,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrepareComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtPrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtPrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4334,7 +4334,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtPrepareEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtPrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtPrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtPropagationComplete(resourcemanagerhandle: P0, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4369,7 +4369,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerinformationclass : super::super::super::Win32::System::SystemServices:: RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation : *mut core::ffi::c_void, resourcemanagerinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationResourceManager(resourcemanagerhandle.param().abi(), resourcemanagerinformationclass, resourcemanagerinformation, resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + NtQueryInformationResourceManager(resourcemanagerhandle.param().abi(), resourcemanagerinformationclass, resourcemanagerinformation, resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -4378,7 +4378,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtQueryInformationTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, transactioninformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTION_INFORMATION_CLASS, transactioninformation : *mut core::ffi::c_void, transactioninformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtQueryInformationTransaction(transactionhandle.param().abi(), transactioninformationclass, transactioninformation, transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + NtQueryInformationTransaction(transactionhandle.param().abi(), transactioninformationclass, transactioninformation, transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -4395,7 +4395,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtReadOnlyEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtReadOnlyEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtReadOnlyEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtRecoverEnlistment(enlistmenthandle: P0, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4403,7 +4403,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtRecoverEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRecoverEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentkey.unwrap_or(std::ptr::null()))) + NtRecoverEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtRecoverResourceManager(resourcemanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4440,7 +4440,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtRollbackComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollbackComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtRollbackComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtRollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4448,7 +4448,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtRollbackEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollbackEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtRollbackEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtRollbackTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -4465,7 +4465,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtRollforwardTransactionManager(transactionmanagerhandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtRollforwardTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtRollforwardTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -4509,7 +4509,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtSinglePhaseReject(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSinglePhaseReject(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + NtSinglePhaseReject(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NtUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -4553,7 +4553,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ObReferenceObjectByHandle(handle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8, object : *mut *mut core::ffi::c_void, handleinformation : *mut OBJECT_HANDLE_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObReferenceObjectByHandle(handle.param().abi(), desiredaccess, objecttype.param().abi(), accessmode, object, core::mem::transmute(handleinformation.unwrap_or(std::ptr::null_mut()))) + ObReferenceObjectByHandle(handle.param().abi(), desiredaccess, objecttype.param().abi(), accessmode, object, core::mem::transmute(handleinformation.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4563,7 +4563,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn ObReferenceObjectByHandleWithTag(handle : super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objecttype : super::super::Foundation:: POBJECT_TYPE, accessmode : i8, tag : u32, object : *mut *mut core::ffi::c_void, handleinformation : *mut OBJECT_HANDLE_INFORMATION) -> super::super::super::Win32::Foundation:: NTSTATUS); - ObReferenceObjectByHandleWithTag(handle.param().abi(), desiredaccess, objecttype.param().abi(), accessmode, tag, object, core::mem::transmute(handleinformation.unwrap_or(std::ptr::null_mut()))) + ObReferenceObjectByHandleWithTag(handle.param().abi(), desiredaccess, objecttype.param().abi(), accessmode, tag, object, core::mem::transmute(handleinformation.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4692,7 +4692,7 @@ pub unsafe fn PoClearPowerRequest(powerrequest: *mut core::ffi::c_void, r#type: #[inline] pub unsafe fn PoCreatePowerRequest(powerrequest: *mut *mut core::ffi::c_void, deviceobject: *const super::super::Foundation::DEVICE_OBJECT, context: Option<*const COUNTED_REASON_CONTEXT>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoCreatePowerRequest(powerrequest : *mut *mut core::ffi::c_void, deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, context : *const COUNTED_REASON_CONTEXT) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoCreatePowerRequest(powerrequest, deviceobject, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + PoCreatePowerRequest(powerrequest, deviceobject, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] @@ -4800,7 +4800,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxPowerControl(handle : super::super::Foundation:: POHANDLE, powercontrolcode : *const windows_core::GUID, inbuffer : *const core::ffi::c_void, inbuffersize : usize, outbuffer : *mut core::ffi::c_void, outbuffersize : usize, bytesreturned : *mut usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxPowerControl(handle.param().abi(), powercontrolcode, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outbuffersize, core::mem::transmute(bytesreturned.unwrap_or(std::ptr::null_mut()))) + PoFxPowerControl(handle.param().abi(), powercontrolcode, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4809,7 +4809,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxPowerOnCrashdumpDevice(handle : super::super::Foundation:: POHANDLE, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoFxPowerOnCrashdumpDevice(handle.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null()))) + PoFxPowerOnCrashdumpDevice(handle.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4852,7 +4852,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PoFxRegisterDripsWatchdogCallback(handle : super::super::Foundation:: POHANDLE, callback : PPO_FX_DRIPS_WATCHDOG_CALLBACK, includechilddevices : super::super::super::Win32::Foundation:: BOOLEAN, matchingdriverobject : *const super::super::Foundation:: DRIVER_OBJECT)); - PoFxRegisterDripsWatchdogCallback(handle.param().abi(), callback, includechilddevices.param().abi(), core::mem::transmute(matchingdriverobject.unwrap_or(std::ptr::null()))) + PoFxRegisterDripsWatchdogCallback(handle.param().abi(), callback, includechilddevices.param().abi(), core::mem::transmute(matchingdriverobject.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -4954,18 +4954,18 @@ pub unsafe fn PoRegisterDeviceForIdleDetection(deviceobject: *const super::super #[inline] pub unsafe fn PoRegisterPowerSettingCallback(deviceobject: Option<*const super::super::Foundation::DEVICE_OBJECT>, settingguid: *const windows_core::GUID, callback: PPOWER_SETTING_CALLBACK, context: Option<*const core::ffi::c_void>, handle: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoRegisterPowerSettingCallback(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, settingguid : *const windows_core::GUID, callback : PPOWER_SETTING_CALLBACK, context : *const core::ffi::c_void, handle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoRegisterPowerSettingCallback(core::mem::transmute(deviceobject.unwrap_or(std::ptr::null())), settingguid, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut()))) + PoRegisterPowerSettingCallback(core::mem::transmute(deviceobject.unwrap_or(core::ptr::null())), settingguid, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PoRegisterSystemState(statehandle: Option<*mut core::ffi::c_void>, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("ntoskrnl.exe" "system" fn PoRegisterSystemState(statehandle : *mut core::ffi::c_void, flags : u32) -> *mut core::ffi::c_void); - PoRegisterSystemState(core::mem::transmute(statehandle.unwrap_or(std::ptr::null_mut())), flags) + PoRegisterSystemState(core::mem::transmute(statehandle.unwrap_or(core::ptr::null_mut())), flags) } #[cfg(all(feature = "Wdk_Foundation", feature = "Wdk_Storage_FileSystem", feature = "Win32_Security", feature = "Win32_System_IO", feature = "Win32_System_Kernel", feature = "Win32_System_Power"))] #[inline] pub unsafe fn PoRequestPowerIrp(deviceobject: *const super::super::Foundation::DEVICE_OBJECT, minorfunction: u8, powerstate: POWER_STATE, completionfunction: PREQUEST_POWER_COMPLETE, context: Option<*const core::ffi::c_void>, irp: Option<*mut *mut super::super::Foundation::IRP>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn PoRequestPowerIrp(deviceobject : *const super::super::Foundation:: DEVICE_OBJECT, minorfunction : u8, powerstate : POWER_STATE, completionfunction : PREQUEST_POWER_COMPLETE, context : *const core::ffi::c_void, irp : *mut *mut super::super::Foundation:: IRP) -> super::super::super::Win32::Foundation:: NTSTATUS); - PoRequestPowerIrp(deviceobject, minorfunction, core::mem::transmute(powerstate), completionfunction, core::mem::transmute(context.unwrap_or(std::ptr::null())), core::mem::transmute(irp.unwrap_or(std::ptr::null_mut()))) + PoRequestPowerIrp(deviceobject, minorfunction, core::mem::transmute(powerstate), completionfunction, core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(irp.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PoSetDeviceBusyEx(idlepointer: *mut u32) { @@ -4975,7 +4975,7 @@ pub unsafe fn PoSetDeviceBusyEx(idlepointer: *mut u32) { #[inline] pub unsafe fn PoSetHiberRange(memorymap: Option<*const core::ffi::c_void>, flags: u32, address: *const core::ffi::c_void, length: usize, tag: u32) { windows_targets::link!("ntoskrnl.exe" "system" fn PoSetHiberRange(memorymap : *const core::ffi::c_void, flags : u32, address : *const core::ffi::c_void, length : usize, tag : u32)); - PoSetHiberRange(core::mem::transmute(memorymap.unwrap_or(std::ptr::null())), flags, address, length, tag) + PoSetHiberRange(core::mem::transmute(memorymap.unwrap_or(core::ptr::null())), flags, address, length, tag) } #[cfg(feature = "Win32_System_Power")] #[inline] @@ -5095,7 +5095,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PsCreateSystemThread(threadhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, processhandle : super::super::super::Win32::Foundation:: HANDLE, clientid : *mut super::super::super::Win32::System::WindowsProgramming:: CLIENT_ID, startroutine : PKSTART_ROUTINE, startcontext : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsCreateSystemThread(threadhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(std::ptr::null_mut())), startroutine, core::mem::transmute(startcontext.unwrap_or(std::ptr::null()))) + PsCreateSystemThread(threadhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), processhandle.param().abi(), core::mem::transmute(clientid.unwrap_or(core::ptr::null_mut())), startroutine, core::mem::transmute(startcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PsDereferenceSiloContext(silocontext: *const core::ffi::c_void) { @@ -5337,7 +5337,7 @@ where #[inline] pub unsafe fn PsGetVersion(majorversion: Option<*mut u32>, minorversion: Option<*mut u32>, buildnumber: Option<*mut u32>, csdversion: Option<*mut super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntoskrnl.exe" "system" fn PsGetVersion(majorversion : *mut u32, minorversion : *mut u32, buildnumber : *mut u32, csdversion : *mut super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: BOOLEAN); - PsGetVersion(core::mem::transmute(majorversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(minorversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buildnumber.unwrap_or(std::ptr::null_mut())), core::mem::transmute(csdversion.unwrap_or(std::ptr::null_mut()))) + PsGetVersion(core::mem::transmute(majorversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(minorversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buildnumber.unwrap_or(core::ptr::null_mut())), core::mem::transmute(csdversion.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5431,7 +5431,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PsRemoveSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, removedsilocontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsRemoveSiloContext(silo.param().abi(), contextslot, core::mem::transmute(removedsilocontext.unwrap_or(std::ptr::null_mut()))) + PsRemoveSiloContext(silo.param().abi(), contextslot, core::mem::transmute(removedsilocontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5440,7 +5440,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn PsReplaceSiloContext(silo : super::super::Foundation:: PESILO, contextslot : u32, newsilocontext : *const core::ffi::c_void, oldsilocontext : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - PsReplaceSiloContext(silo.param().abi(), contextslot, newsilocontext, core::mem::transmute(oldsilocontext.unwrap_or(std::ptr::null_mut()))) + PsReplaceSiloContext(silo.param().abi(), contextslot, newsilocontext, core::mem::transmute(oldsilocontext.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -5643,7 +5643,7 @@ pub unsafe fn RtlClearBits(bitmapheader: *const RTL_BITMAP, startingindex: u32, #[inline] pub unsafe fn RtlCmDecodeMemIoResource(descriptor: *const CM_PARTIAL_RESOURCE_DESCRIPTOR, start: Option<*mut u64>) -> u64 { windows_targets::link!("ntdll.dll" "system" fn RtlCmDecodeMemIoResource(descriptor : *const CM_PARTIAL_RESOURCE_DESCRIPTOR, start : *mut u64) -> u64); - RtlCmDecodeMemIoResource(descriptor, core::mem::transmute(start.unwrap_or(std::ptr::null_mut()))) + RtlCmDecodeMemIoResource(descriptor, core::mem::transmute(start.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlCmEncodeMemIoResource(descriptor: *const CM_PARTIAL_RESOURCE_DESCRIPTOR, r#type: u8, length: u64, start: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5689,12 +5689,12 @@ pub unsafe fn RtlCopyBitMap(source: *const RTL_BITMAP, destination: *const RTL_B #[inline] pub unsafe fn RtlCopyString(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: Option<*const super::super::super::Win32::System::Kernel::STRING>) { windows_targets::link!("ntdll.dll" "system" fn RtlCopyString(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const super::super::super::Win32::System::Kernel:: STRING)); - RtlCopyString(destinationstring, core::mem::transmute(sourcestring.unwrap_or(std::ptr::null()))) + RtlCopyString(destinationstring, core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlCopyUnicodeString(destinationstring: *mut super::super::super::Win32::Foundation::UNICODE_STRING, sourcestring: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) { windows_targets::link!("ntdll.dll" "system" fn RtlCopyUnicodeString(destinationstring : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, sourcestring : *const super::super::super::Win32::Foundation:: UNICODE_STRING)); - RtlCopyUnicodeString(destinationstring, core::mem::transmute(sourcestring.unwrap_or(std::ptr::null()))) + RtlCopyUnicodeString(destinationstring, core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlCreateHashTable(hashtable: *mut *mut RTL_DYNAMIC_HASH_TABLE, shift: u32, flags: u32) -> super::super::super::Win32::Foundation::BOOLEAN { @@ -5811,7 +5811,7 @@ where #[inline] pub unsafe fn RtlEnumerateGenericTableLikeADirectory(table: *const RTL_AVL_TABLE, matchfunction: PRTL_AVL_MATCH_FUNCTION, matchdata: Option<*const core::ffi::c_void>, nextflag: u32, restartkey: *mut *mut core::ffi::c_void, deletecount: *mut u32, buffer: *const core::ffi::c_void) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlEnumerateGenericTableLikeADirectory(table : *const RTL_AVL_TABLE, matchfunction : PRTL_AVL_MATCH_FUNCTION, matchdata : *const core::ffi::c_void, nextflag : u32, restartkey : *mut *mut core::ffi::c_void, deletecount : *mut u32, buffer : *const core::ffi::c_void) -> *mut core::ffi::c_void); - RtlEnumerateGenericTableLikeADirectory(table, matchfunction, core::mem::transmute(matchdata.unwrap_or(std::ptr::null())), nextflag, restartkey, deletecount, buffer) + RtlEnumerateGenericTableLikeADirectory(table, matchfunction, core::mem::transmute(matchdata.unwrap_or(core::ptr::null())), nextflag, restartkey, deletecount, buffer) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -5918,7 +5918,7 @@ pub unsafe fn RtlFindSetBitsAndClear(bitmapheader: *const RTL_BITMAP, numbertofi #[inline] pub unsafe fn RtlFreeUTF8String(utf8string: Option<*mut super::super::super::Win32::System::Kernel::STRING>) { windows_targets::link!("ntdll.dll" "system" fn RtlFreeUTF8String(utf8string : *mut super::super::super::Win32::System::Kernel:: STRING)); - RtlFreeUTF8String(core::mem::transmute(utf8string.unwrap_or(std::ptr::null_mut()))) + RtlFreeUTF8String(core::mem::transmute(utf8string.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlGUIDFromString(guidstring: *const super::super::super::Win32::Foundation::UNICODE_STRING, guid: *mut windows_core::GUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -5986,7 +5986,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlGetPersistedStateLocation(sourceid : windows_core::PCWSTR, customvalue : windows_core::PCWSTR, defaultpath : windows_core::PCWSTR, statelocationtype : STATE_LOCATION_TYPE, targetpath : windows_core::PWSTR, bufferlengthin : u32, bufferlengthout : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlGetPersistedStateLocation(sourceid.param().abi(), customvalue.param().abi(), defaultpath.param().abi(), statelocationtype, core::mem::transmute(targetpath), bufferlengthin, core::mem::transmute(bufferlengthout.unwrap_or(std::ptr::null_mut()))) + RtlGetPersistedStateLocation(sourceid.param().abi(), customvalue.param().abi(), defaultpath.param().abi(), statelocationtype, core::mem::transmute(targetpath), bufferlengthin, core::mem::transmute(bufferlengthout.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlGetSuiteMask() -> u32 { @@ -6023,13 +6023,13 @@ pub unsafe fn RtlInitStrongEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HA #[inline] pub unsafe fn RtlInitUTF8String(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: Option<*const i8>) { windows_targets::link!("ntdll.dll" "system" fn RtlInitUTF8String(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const i8)); - RtlInitUTF8String(destinationstring, core::mem::transmute(sourcestring.unwrap_or(std::ptr::null()))) + RtlInitUTF8String(destinationstring, core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInitUTF8StringEx(destinationstring: *mut super::super::super::Win32::System::Kernel::STRING, sourcestring: Option<*const i8>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlInitUTF8StringEx(destinationstring : *mut super::super::super::Win32::System::Kernel:: STRING, sourcestring : *const i8) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlInitUTF8StringEx(destinationstring, core::mem::transmute(sourcestring.unwrap_or(std::ptr::null()))) + RtlInitUTF8StringEx(destinationstring, core::mem::transmute(sourcestring.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -6040,46 +6040,46 @@ pub unsafe fn RtlInitWeakEnumerationHashTable(hashtable: *const RTL_DYNAMIC_HASH #[inline] pub unsafe fn RtlInitializeBitMap(bitmapheader: *mut RTL_BITMAP, bitmapbuffer: Option<*const u32>, sizeofbitmap: u32) { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeBitMap(bitmapheader : *mut RTL_BITMAP, bitmapbuffer : *const u32, sizeofbitmap : u32)); - RtlInitializeBitMap(bitmapheader, core::mem::transmute(bitmapbuffer.unwrap_or(std::ptr::null())), sizeofbitmap) + RtlInitializeBitMap(bitmapheader, core::mem::transmute(bitmapbuffer.unwrap_or(core::ptr::null())), sizeofbitmap) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn RtlInitializeGenericTable(table: *mut RTL_GENERIC_TABLE, compareroutine: PRTL_GENERIC_COMPARE_ROUTINE, allocateroutine: PRTL_GENERIC_ALLOCATE_ROUTINE, freeroutine: PRTL_GENERIC_FREE_ROUTINE, tablecontext: Option<*const core::ffi::c_void>) { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeGenericTable(table : *mut RTL_GENERIC_TABLE, compareroutine : PRTL_GENERIC_COMPARE_ROUTINE, allocateroutine : PRTL_GENERIC_ALLOCATE_ROUTINE, freeroutine : PRTL_GENERIC_FREE_ROUTINE, tablecontext : *const core::ffi::c_void)); - RtlInitializeGenericTable(table, compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(std::ptr::null()))) + RtlInitializeGenericTable(table, compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlInitializeGenericTableAvl(table: *mut RTL_AVL_TABLE, compareroutine: PRTL_AVL_COMPARE_ROUTINE, allocateroutine: PRTL_AVL_ALLOCATE_ROUTINE, freeroutine: PRTL_AVL_FREE_ROUTINE, tablecontext: Option<*const core::ffi::c_void>) { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeGenericTableAvl(table : *mut RTL_AVL_TABLE, compareroutine : PRTL_AVL_COMPARE_ROUTINE, allocateroutine : PRTL_AVL_ALLOCATE_ROUTINE, freeroutine : PRTL_AVL_FREE_ROUTINE, tablecontext : *const core::ffi::c_void)); - RtlInitializeGenericTableAvl(table, compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(std::ptr::null()))) + RtlInitializeGenericTableAvl(table, compareroutine, allocateroutine, freeroutine, core::mem::transmute(tablecontext.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn RtlInsertElementGenericTable(table: *const RTL_GENERIC_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlInsertElementGenericTable(table : *const RTL_GENERIC_TABLE, buffer : *const core::ffi::c_void, buffersize : u32, newelement : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> *mut core::ffi::c_void); - RtlInsertElementGenericTable(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(std::ptr::null_mut()))) + RtlInsertElementGenericTable(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlInsertElementGenericTableAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlInsertElementGenericTableAvl(table : *const RTL_AVL_TABLE, buffer : *const core::ffi::c_void, buffersize : u32, newelement : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> *mut core::ffi::c_void); - RtlInsertElementGenericTableAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(std::ptr::null_mut()))) + RtlInsertElementGenericTableAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn RtlInsertElementGenericTableFull(table: *const RTL_GENERIC_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>, nodeorparent: *const core::ffi::c_void, searchresult: TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlInsertElementGenericTableFull(table : *const RTL_GENERIC_TABLE, buffer : *const core::ffi::c_void, buffersize : u32, newelement : *mut super::super::super::Win32::Foundation:: BOOLEAN, nodeorparent : *const core::ffi::c_void, searchresult : TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - RtlInsertElementGenericTableFull(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(std::ptr::null_mut())), nodeorparent, searchresult) + RtlInsertElementGenericTableFull(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut())), nodeorparent, searchresult) } #[inline] pub unsafe fn RtlInsertElementGenericTableFullAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, buffersize: u32, newelement: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>, nodeorparent: *const core::ffi::c_void, searchresult: TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void { windows_targets::link!("ntdll.dll" "system" fn RtlInsertElementGenericTableFullAvl(table : *const RTL_AVL_TABLE, buffer : *const core::ffi::c_void, buffersize : u32, newelement : *mut super::super::super::Win32::Foundation:: BOOLEAN, nodeorparent : *const core::ffi::c_void, searchresult : TABLE_SEARCH_RESULT) -> *mut core::ffi::c_void); - RtlInsertElementGenericTableFullAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(std::ptr::null_mut())), nodeorparent, searchresult) + RtlInsertElementGenericTableFullAvl(table, buffer, buffersize, core::mem::transmute(newelement.unwrap_or(core::ptr::null_mut())), nodeorparent, searchresult) } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlInsertEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, entry: *const RTL_DYNAMIC_HASH_TABLE_ENTRY, signature: usize, context: Option<*mut RTL_DYNAMIC_HASH_TABLE_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlInsertEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, entry : *const RTL_DYNAMIC_HASH_TABLE_ENTRY, signature : usize, context : *mut RTL_DYNAMIC_HASH_TABLE_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlInsertEntryHashTable(hashtable, entry, signature, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + RtlInsertEntryHashTable(hashtable, entry, signature, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlInt64ToUnicodeString(value: u64, base: u32, string: *mut super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6094,7 +6094,7 @@ pub unsafe fn RtlIntegerToUnicodeString(value: u32, base: u32, string: *mut supe #[inline] pub unsafe fn RtlIoDecodeMemIoResource(descriptor: *const IO_RESOURCE_DESCRIPTOR, alignment: Option<*mut u64>, minimumaddress: Option<*mut u64>, maximumaddress: Option<*mut u64>) -> u64 { windows_targets::link!("ntdll.dll" "system" fn RtlIoDecodeMemIoResource(descriptor : *const IO_RESOURCE_DESCRIPTOR, alignment : *mut u64, minimumaddress : *mut u64, maximumaddress : *mut u64) -> u64); - RtlIoDecodeMemIoResource(descriptor, core::mem::transmute(alignment.unwrap_or(std::ptr::null_mut())), core::mem::transmute(minimumaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(maximumaddress.unwrap_or(std::ptr::null_mut()))) + RtlIoDecodeMemIoResource(descriptor, core::mem::transmute(alignment.unwrap_or(core::ptr::null_mut())), core::mem::transmute(minimumaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(maximumaddress.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlIoEncodeMemIoResource(descriptor: *const IO_RESOURCE_DESCRIPTOR, r#type: u8, length: u64, alignment: u64, minimumaddress: u64, maximumaddress: u64) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6151,7 +6151,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlIsUntrustedObject(handle : super::super::super::Win32::Foundation:: HANDLE, object : *const core::ffi::c_void, untrustedobject : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlIsUntrustedObject(handle.param().abi(), core::mem::transmute(object.unwrap_or(std::ptr::null())), untrustedobject) + RtlIsUntrustedObject(handle.param().abi(), core::mem::transmute(object.unwrap_or(core::ptr::null())), untrustedobject) } #[cfg(feature = "Win32_Security")] #[inline] @@ -6188,7 +6188,7 @@ pub unsafe fn RtlLookupElementGenericTableFullAvl(table: *const RTL_AVL_TABLE, b #[inline] pub unsafe fn RtlLookupEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, signature: usize, context: Option<*mut RTL_DYNAMIC_HASH_TABLE_CONTEXT>) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY { windows_targets::link!("ntdll.dll" "system" fn RtlLookupEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, signature : usize, context : *mut RTL_DYNAMIC_HASH_TABLE_CONTEXT) -> *mut RTL_DYNAMIC_HASH_TABLE_ENTRY); - RtlLookupEntryHashTable(hashtable, signature, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + RtlLookupEntryHashTable(hashtable, signature, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlLookupFirstMatchingElementGenericTableAvl(table: *const RTL_AVL_TABLE, buffer: *const core::ffi::c_void, restartkey: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void { @@ -6208,7 +6208,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlNormalizeSecurityDescriptor(securitydescriptor, securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(std::ptr::null_mut())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(securitydescriptor, securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::ptr::null_mut())), checkonly.param().abi()) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] @@ -6266,7 +6266,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlQueryRegistryValueWithFallback(primaryhandle : super::super::super::Win32::Foundation:: HANDLE, fallbackhandle : super::super::super::Win32::Foundation:: HANDLE, valuename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, valuelength : u32, valuetype : *mut u32, valuedata : *mut core::ffi::c_void, resultlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlQueryRegistryValueWithFallback(primaryhandle.param().abi(), fallbackhandle.param().abi(), valuename, valuelength, core::mem::transmute(valuetype.unwrap_or(std::ptr::null_mut())), valuedata, resultlength) + RtlQueryRegistryValueWithFallback(primaryhandle.param().abi(), fallbackhandle.param().abi(), valuename, valuelength, core::mem::transmute(valuetype.unwrap_or(core::ptr::null_mut())), valuedata, resultlength) } #[inline] pub unsafe fn RtlQueryRegistryValues(relativeto: u32, path: P0, querytable: *mut RTL_QUERY_REGISTRY_TABLE, context: Option<*const core::ffi::c_void>, environment: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -6274,12 +6274,12 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlQueryRegistryValues(relativeto : u32, path : windows_core::PCWSTR, querytable : *mut RTL_QUERY_REGISTRY_TABLE, context : *const core::ffi::c_void, environment : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlQueryRegistryValues(relativeto, path.param().abi(), querytable, core::mem::transmute(context.unwrap_or(std::ptr::null())), core::mem::transmute(environment.unwrap_or(std::ptr::null()))) + RtlQueryRegistryValues(relativeto, path.param().abi(), querytable, core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(environment.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlQueryValidationRunlevel(componentname: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlQueryValidationRunlevel(componentname : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> u32); - RtlQueryValidationRunlevel(core::mem::transmute(componentname.unwrap_or(std::ptr::null()))) + RtlQueryValidationRunlevel(core::mem::transmute(componentname.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6297,25 +6297,25 @@ pub unsafe fn RtlRealSuccessor(links: *const super::super::Foundation::RTL_SPLAY #[inline] pub unsafe fn RtlRemoveEntryHashTable(hashtable: *const RTL_DYNAMIC_HASH_TABLE, entry: *const RTL_DYNAMIC_HASH_TABLE_ENTRY, context: Option<*mut RTL_DYNAMIC_HASH_TABLE_CONTEXT>) -> super::super::super::Win32::Foundation::BOOLEAN { windows_targets::link!("ntdll.dll" "system" fn RtlRemoveEntryHashTable(hashtable : *const RTL_DYNAMIC_HASH_TABLE, entry : *const RTL_DYNAMIC_HASH_TABLE_ENTRY, context : *mut RTL_DYNAMIC_HASH_TABLE_CONTEXT) -> super::super::super::Win32::Foundation:: BOOLEAN); - RtlRemoveEntryHashTable(hashtable, entry, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + RtlRemoveEntryHashTable(hashtable, entry, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Threading")] #[inline] pub unsafe fn RtlRunOnceBeginInitialize(runonce: *mut super::super::super::Win32::System::Threading::INIT_ONCE, flags: u32, context: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlRunOnceBeginInitialize(runonce : *mut super::super::super::Win32::System::Threading:: INIT_ONCE, flags : u32, context : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlRunOnceBeginInitialize(runonce, flags, core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + RtlRunOnceBeginInitialize(runonce, flags, core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Threading")] #[inline] pub unsafe fn RtlRunOnceComplete(runonce: *mut super::super::super::Win32::System::Threading::INIT_ONCE, flags: u32, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlRunOnceComplete(runonce : *mut super::super::super::Win32::System::Threading:: INIT_ONCE, flags : u32, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlRunOnceComplete(runonce, flags, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + RtlRunOnceComplete(runonce, flags, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Threading")] #[inline] pub unsafe fn RtlRunOnceExecuteOnce(runonce: *mut super::super::super::Win32::System::Threading::INIT_ONCE, initfn: PRTL_RUN_ONCE_INIT_FN, parameter: Option<*mut core::ffi::c_void>, context: Option<*mut *mut core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn RtlRunOnceExecuteOnce(runonce : *mut super::super::super::Win32::System::Threading:: INIT_ONCE, initfn : PRTL_RUN_ONCE_INIT_FN, parameter : *mut core::ffi::c_void, context : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlRunOnceExecuteOnce(runonce, initfn, core::mem::transmute(parameter.unwrap_or(std::ptr::null_mut())), core::mem::transmute(context.unwrap_or(std::ptr::null_mut()))) + RtlRunOnceExecuteOnce(runonce, initfn, core::mem::transmute(parameter.unwrap_or(core::ptr::null_mut())), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Threading")] #[inline] @@ -6348,7 +6348,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlSetDaclSecurityDescriptor(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, daclpresent : super::super::super::Win32::Foundation:: BOOLEAN, dacl : *const super::super::super::Win32::Security:: ACL, dacldefaulted : super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlSetDaclSecurityDescriptor(securitydescriptor, daclpresent.param().abi(), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), dacldefaulted.param().abi()) + RtlSetDaclSecurityDescriptor(securitydescriptor, daclpresent.param().abi(), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), dacldefaulted.param().abi()) } #[cfg(feature = "Win32_System_SystemInformation")] #[inline] @@ -6427,7 +6427,7 @@ pub unsafe fn RtlUTF8ToUnicodeN(unicodestringdestination: windows_core::PWSTR, u #[inline] pub unsafe fn RtlUnicodeStringToInt64(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, base: u32, number: *mut i64, endpointer: Option<*mut windows_core::PWSTR>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn RtlUnicodeStringToInt64(string : *const super::super::super::Win32::Foundation:: UNICODE_STRING, base : u32, number : *mut i64, endpointer : *mut windows_core::PWSTR) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlUnicodeStringToInt64(string, base, number, core::mem::transmute(endpointer.unwrap_or(std::ptr::null_mut()))) + RtlUnicodeStringToInt64(string, base, number, core::mem::transmute(endpointer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlUnicodeStringToInteger(string: *const super::super::super::Win32::Foundation::UNICODE_STRING, base: u32, value: *mut u32) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6519,7 +6519,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlWriteRegistryValue(relativeto : u32, path : windows_core::PCWSTR, valuename : windows_core::PCWSTR, valuetype : u32, valuedata : *const core::ffi::c_void, valuelength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - RtlWriteRegistryValue(relativeto, path.param().abi(), valuename.param().abi(), valuetype, core::mem::transmute(valuedata.unwrap_or(std::ptr::null())), valuelength) + RtlWriteRegistryValue(relativeto, path.param().abi(), valuename.param().abi(), valuetype, core::mem::transmute(valuedata.unwrap_or(core::ptr::null())), valuelength) } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -6540,7 +6540,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAccessCheck(securitydescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, subjectsecuritycontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, subjectcontextlocked : super::super::super::Win32::Foundation:: BOOLEAN, desiredaccess : u32, previouslygrantedaccess : u32, privileges : *mut *mut super::super::super::Win32::Security:: PRIVILEGE_SET, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, accessmode : i8, grantedaccess : *mut u32, accessstatus : *mut i32) -> super::super::super::Win32::Foundation:: BOOLEAN); - SeAccessCheck(securitydescriptor.param().abi(), subjectsecuritycontext, subjectcontextlocked.param().abi(), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) + SeAccessCheck(securitydescriptor.param().abi(), subjectsecuritycontext, subjectcontextlocked.param().abi(), desiredaccess, previouslygrantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null_mut())), genericmapping, accessmode, grantedaccess, accessstatus) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6562,7 +6562,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntoskrnl.exe" "system" fn SeAssignSecurityEx(parentdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, explicitdescriptor : super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, newdescriptor : *mut super::super::super::Win32::Security:: PSECURITY_DESCRIPTOR, objecttype : *const windows_core::GUID, isdirectoryobject : super::super::super::Win32::Foundation:: BOOLEAN, autoinheritflags : u32, subjectcontext : *const super::super::Foundation:: SECURITY_SUBJECT_CONTEXT, genericmapping : *const super::super::super::Win32::Security:: GENERIC_MAPPING, pooltype : super::super::Foundation:: POOL_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeAssignSecurityEx(parentdescriptor.param().abi(), explicitdescriptor.param().abi(), newdescriptor, core::mem::transmute(objecttype.unwrap_or(std::ptr::null())), isdirectoryobject.param().abi(), autoinheritflags, subjectcontext, genericmapping, pooltype) + SeAssignSecurityEx(parentdescriptor.param().abi(), explicitdescriptor.param().abi(), newdescriptor, core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), isdirectoryobject.param().abi(), autoinheritflags, subjectcontext, genericmapping, pooltype) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6591,7 +6591,7 @@ pub unsafe fn SeDeassignSecurity(securitydescriptor: *mut super::super::super::W #[inline] pub unsafe fn SeEtwWriteKMCveEvent(cveid: *const super::super::super::Win32::Foundation::UNICODE_STRING, additionaldetails: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeEtwWriteKMCveEvent(cveid : *const super::super::super::Win32::Foundation:: UNICODE_STRING, additionaldetails : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeEtwWriteKMCveEvent(cveid, core::mem::transmute(additionaldetails.unwrap_or(std::ptr::null()))) + SeEtwWriteKMCveEvent(cveid, core::mem::transmute(additionaldetails.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6602,7 +6602,7 @@ pub unsafe fn SeLockSubjectContext(subjectcontext: *const super::super::Foundati #[inline] pub unsafe fn SeRegisterImageVerificationCallback(imagetype: SE_IMAGE_TYPE, callbacktype: SE_IMAGE_VERIFICATION_CALLBACK_TYPE, callbackfunction: PSE_IMAGE_VERIFICATION_CALLBACK_FUNCTION, callbackcontext: Option<*const core::ffi::c_void>, token: Option<*const core::ffi::c_void>, callbackhandle: *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn SeRegisterImageVerificationCallback(imagetype : SE_IMAGE_TYPE, callbacktype : SE_IMAGE_VERIFICATION_CALLBACK_TYPE, callbackfunction : PSE_IMAGE_VERIFICATION_CALLBACK_FUNCTION, callbackcontext : *const core::ffi::c_void, token : *const core::ffi::c_void, callbackhandle : *mut *mut core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - SeRegisterImageVerificationCallback(imagetype, callbacktype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), core::mem::transmute(token.unwrap_or(std::ptr::null())), callbackhandle) + SeRegisterImageVerificationCallback(imagetype, callbacktype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(token.unwrap_or(core::ptr::null())), callbackhandle) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_Security"))] #[inline] @@ -6654,7 +6654,7 @@ where #[inline] pub unsafe fn TmCommitComplete(enlistment: *const super::super::Foundation::KENLISTMENT, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmCommitComplete(enlistment : *const super::super::Foundation:: KENLISTMENT, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmCommitComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + TmCommitComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6675,19 +6675,19 @@ where #[inline] pub unsafe fn TmCreateEnlistment(enlistmenthandle: *mut super::super::super::Win32::Foundation::HANDLE, previousmode: i8, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, resourcemanager: *const isize, transaction: *const super::super::Foundation::KTRANSACTION, createoptions: u32, notificationmask: u32, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmCreateEnlistment(enlistmenthandle : *mut super::super::super::Win32::Foundation:: HANDLE, previousmode : i8, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, resourcemanager : *const isize, transaction : *const super::super::Foundation:: KTRANSACTION, createoptions : u32, notificationmask : u32, enlistmentkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmCreateEnlistment(enlistmenthandle, previousmode, desiredaccess, objectattributes, resourcemanager, transaction, createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(std::ptr::null()))) + TmCreateEnlistment(enlistmenthandle, previousmode, desiredaccess, objectattributes, resourcemanager, transaction, createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn TmDereferenceEnlistmentKey(enlistment: *const super::super::Foundation::KENLISTMENT, lastreference: Option<*mut super::super::super::Win32::Foundation::BOOLEAN>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmDereferenceEnlistmentKey(enlistment : *const super::super::Foundation:: KENLISTMENT, lastreference : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmDereferenceEnlistmentKey(enlistment, core::mem::transmute(lastreference.unwrap_or(std::ptr::null_mut()))) + TmDereferenceEnlistmentKey(enlistment, core::mem::transmute(lastreference.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn TmEnableCallbacks(resourcemanager: *const super::super::Foundation::KRESOURCEMANAGER, callbackroutine: PTM_RM_NOTIFICATION, rmkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmEnableCallbacks(resourcemanager : *const super::super::Foundation:: KRESOURCEMANAGER, callbackroutine : PTM_RM_NOTIFICATION, rmkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmEnableCallbacks(resourcemanager, callbackroutine, core::mem::transmute(rmkey.unwrap_or(std::ptr::null()))) + TmEnableCallbacks(resourcemanager, callbackroutine, core::mem::transmute(rmkey.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6700,7 +6700,7 @@ pub unsafe fn TmGetTransactionId(transaction: *const super::super::Foundation::K #[inline] pub unsafe fn TmInitializeTransactionManager(transactionmanager: *const isize, logfilename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, tmid: Option<*const windows_core::GUID>, createoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmInitializeTransactionManager(transactionmanager : *const isize, logfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, tmid : *const windows_core::GUID, createoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmInitializeTransactionManager(transactionmanager, core::mem::transmute(logfilename.unwrap_or(std::ptr::null())), core::mem::transmute(tmid.unwrap_or(std::ptr::null())), createoptions) + TmInitializeTransactionManager(transactionmanager, core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(tmid.unwrap_or(core::ptr::null())), createoptions) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6724,7 +6724,7 @@ pub unsafe fn TmPrePrepareEnlistment(enlistment: *const super::super::Foundation #[inline] pub unsafe fn TmPrepareComplete(enlistment: *const super::super::Foundation::KENLISTMENT, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmPrepareComplete(enlistment : *const super::super::Foundation:: KENLISTMENT, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmPrepareComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + TmPrepareComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6751,7 +6751,7 @@ where #[inline] pub unsafe fn TmReadOnlyEnlistment(enlistment: *const super::super::Foundation::KENLISTMENT, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmReadOnlyEnlistment(enlistment : *const super::super::Foundation:: KENLISTMENT, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmReadOnlyEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + TmReadOnlyEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6792,13 +6792,13 @@ pub unsafe fn TmRequestOutcomeEnlistment(enlistment: *const super::super::Founda #[inline] pub unsafe fn TmRollbackComplete(enlistment: *const super::super::Foundation::KENLISTMENT, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmRollbackComplete(enlistment : *const super::super::Foundation:: KENLISTMENT, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmRollbackComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + TmRollbackComplete(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn TmRollbackEnlistment(enlistment: *const super::super::Foundation::KENLISTMENT, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn TmRollbackEnlistment(enlistment : *const super::super::Foundation:: KENLISTMENT, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - TmRollbackEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + TmRollbackEnlistment(enlistment, core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -6836,19 +6836,19 @@ where #[inline] pub unsafe fn WheaAddErrorSource(errorsource: *const super::super::super::Win32::System::Diagnostics::Debug::WHEA_ERROR_SOURCE_DESCRIPTOR, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaAddErrorSource(errorsource : *const super::super::super::Win32::System::Diagnostics::Debug:: WHEA_ERROR_SOURCE_DESCRIPTOR, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaAddErrorSource(errorsource, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + WheaAddErrorSource(errorsource, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] pub unsafe fn WheaAddErrorSourceDeviceDriver(context: Option<*mut core::ffi::c_void>, configuration: *const super::super::super::Win32::System::Diagnostics::Debug::WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numberpreallocatederrorreports: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaAddErrorSourceDeviceDriver(context : *mut core::ffi::c_void, configuration : *const super::super::super::Win32::System::Diagnostics::Debug:: WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numberpreallocatederrorreports : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaAddErrorSourceDeviceDriver(core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), configuration, numberpreallocatederrorreports) + WheaAddErrorSourceDeviceDriver(core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), configuration, numberpreallocatederrorreports) } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] pub unsafe fn WheaAddErrorSourceDeviceDriverV1(context: Option<*mut core::ffi::c_void>, configuration: *const super::super::super::Win32::System::Diagnostics::Debug::WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numbufferstopreallocate: u32, maxdatalength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaAddErrorSourceDeviceDriverV1(context : *mut core::ffi::c_void, configuration : *const super::super::super::Win32::System::Diagnostics::Debug:: WHEA_ERROR_SOURCE_CONFIGURATION_DEVICE_DRIVER, numbufferstopreallocate : u32, maxdatalength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaAddErrorSourceDeviceDriverV1(core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), configuration, numbufferstopreallocate, maxdatalength) + WheaAddErrorSourceDeviceDriverV1(core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), configuration, numbufferstopreallocate, maxdatalength) } #[cfg(feature = "Win32_System_Diagnostics_Debug")] #[inline] @@ -6929,7 +6929,7 @@ pub unsafe fn WheaLogInternalEvent(entry: *const WHEA_EVENT_LOG_ENTRY) { #[inline] pub unsafe fn WheaRegisterInUsePageOfflineNotification(callback: PFN_IN_USE_PAGE_OFFLINE_NOTIFY, context: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WheaRegisterInUsePageOfflineNotification(callback : PFN_IN_USE_PAGE_OFFLINE_NOTIFY, context : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - WheaRegisterInUsePageOfflineNotification(callback, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + WheaRegisterInUsePageOfflineNotification(callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WheaRemoveErrorSource(errorsourceid: u32) { @@ -6970,7 +6970,7 @@ pub unsafe fn WheaUnregisterInUsePageOfflineNotification(callback: PFN_IN_USE_PA #[inline] pub unsafe fn WmiQueryTraceInformation(traceinformationclass: TRACE_INFORMATION_CLASS, traceinformation: *mut core::ffi::c_void, traceinformationlength: u32, requiredlength: Option<*mut u32>, buffer: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntoskrnl.exe" "system" fn WmiQueryTraceInformation(traceinformationclass : TRACE_INFORMATION_CLASS, traceinformation : *mut core::ffi::c_void, traceinformationlength : u32, requiredlength : *mut u32, buffer : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - WmiQueryTraceInformation(traceinformationclass, traceinformation, traceinformationlength, core::mem::transmute(requiredlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null()))) + WmiQueryTraceInformation(traceinformationclass, traceinformation, traceinformationlength, core::mem::transmute(requiredlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwAllocateLocallyUniqueId(luid: *mut super::super::super::Win32::Foundation::LUID) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -6991,7 +6991,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCommitComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCommitComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwCommitComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwCommitEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -6999,7 +6999,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCommitEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCommitEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwCommitEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwCommitTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7018,13 +7018,13 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateEnlistment(enlistmenthandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, transactionhandle : super::super::super::Win32::Foundation:: HANDLE, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32, notificationmask : u32, enlistmentkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(std::ptr::null()))) + ZwCreateEnlistment(enlistmenthandle, desiredaccess, resourcemanagerhandle.param().abi(), transactionhandle.param().abi(), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions, notificationmask, core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] pub unsafe fn ZwCreateFile(filehandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, iostatusblock: *mut super::super::super::Win32::System::IO::IO_STATUS_BLOCK, allocationsize: Option<*const i64>, fileattributes: u32, shareaccess: u32, createdisposition: u32, createoptions: u32, eabuffer: Option<*const core::ffi::c_void>, ealength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateFile(filehandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, allocationsize : *const i64, fileattributes : u32, shareaccess : u32, createdisposition : u32, createoptions : u32, eabuffer : *const core::ffi::c_void, ealength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(std::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(std::ptr::null())), ealength) + ZwCreateFile(filehandle, desiredaccess, objectattributes, iostatusblock, core::mem::transmute(allocationsize.unwrap_or(core::ptr::null())), fileattributes, shareaccess, createdisposition, createoptions, core::mem::transmute(eabuffer.unwrap_or(core::ptr::null())), ealength) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -7033,7 +7033,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateResourceManager(resourcemanagerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tmhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, createoptions : u32, description : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(std::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), createoptions, core::mem::transmute(description.unwrap_or(std::ptr::null()))) + ZwCreateResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), core::mem::transmute(resourcemanagerguid.unwrap_or(core::ptr::null())), core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), createoptions, core::mem::transmute(description.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -7042,7 +7042,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateSection(sectionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, maximumsize : *const i64, sectionpageprotection : u32, allocationattributes : u32, filehandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateSection(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(std::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi()) + ZwCreateSection(sectionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(maximumsize.unwrap_or(core::ptr::null())), sectionpageprotection, allocationattributes, filehandle.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -7051,13 +7051,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCreateTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, uow : *const windows_core::GUID, tmhandle : super::super::super::Win32::Foundation:: HANDLE, createoptions : u32, isolationlevel : u32, isolationflags : u32, timeout : *const i64, description : *const super::super::super::Win32::Foundation:: UNICODE_STRING) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(uow.unwrap_or(std::ptr::null())), tmhandle.param().abi(), createoptions, isolationlevel, isolationflags, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(description.unwrap_or(std::ptr::null()))) + ZwCreateTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(uow.unwrap_or(core::ptr::null())), tmhandle.param().abi(), createoptions, isolationlevel, isolationflags, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(description.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ZwCreateTransactionManager(tmhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, logfilename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, createoptions: u32, commitstrength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateTransactionManager(tmhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, logfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, createoptions : u32, commitstrength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(logfilename.unwrap_or(std::ptr::null())), createoptions, commitstrength) + ZwCreateTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), createoptions, commitstrength) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -7067,7 +7067,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwDeviceIoControlFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, iocontrolcode : u32, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwDeviceIoControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + ZwDeviceIoControlFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, iocontrolcode, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn ZwDisplayString(string: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7090,7 +7090,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwGetNotificationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, transactionnotification : *mut super::super::super::Win32::Storage::FileSystem:: TRANSACTION_NOTIFICATION, notificationlength : u32, timeout : *const i64, returnlength : *mut u32, asynchronous : u32, asynchronouscontext : usize) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwGetNotificationResourceManager(resourcemanagerhandle.param().abi(), transactionnotification, notificationlength, timeout, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut())), asynchronous, asynchronouscontext) + ZwGetNotificationResourceManager(resourcemanagerhandle.param().abi(), transactionnotification, notificationlength, timeout, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), asynchronous, asynchronouscontext) } #[inline] pub unsafe fn ZwLoadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7121,7 +7121,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenEnlistment(enlistmenthandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, rmhandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenEnlistment(enlistmenthandle, desiredaccess, rmhandle.param().abi(), enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null()))) + ZwOpenEnlistment(enlistmenthandle, desiredaccess, rmhandle.param().abi(), enlistmentguid, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_IO"))] #[inline] @@ -7136,7 +7136,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenResourceManager(resourcemanagerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, tmhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerguid : *const windows_core::GUID, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), resourcemanagerguid, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null()))) + ZwOpenResourceManager(resourcemanagerhandle, desiredaccess, tmhandle.param().abi(), resourcemanagerguid, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -7151,19 +7151,19 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwOpenTransaction(transactionhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, uow : *const windows_core::GUID, tmhandle : super::super::super::Win32::Foundation:: HANDLE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), uow, tmhandle.param().abi()) + ZwOpenTransaction(transactionhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), uow, tmhandle.param().abi()) } #[cfg(feature = "Wdk_Foundation")] #[inline] pub unsafe fn ZwOpenTransactionManager(tmhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, logfilename: Option<*const super::super::super::Win32::Foundation::UNICODE_STRING>, tmidentity: Option<*const windows_core::GUID>, openoptions: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenTransactionManager(tmhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, logfilename : *const super::super::super::Win32::Foundation:: UNICODE_STRING, tmidentity : *const windows_core::GUID, openoptions : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), core::mem::transmute(logfilename.unwrap_or(std::ptr::null())), core::mem::transmute(tmidentity.unwrap_or(std::ptr::null())), openoptions) + ZwOpenTransactionManager(tmhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), core::mem::transmute(logfilename.unwrap_or(core::ptr::null())), core::mem::transmute(tmidentity.unwrap_or(core::ptr::null())), openoptions) } #[cfg(feature = "Win32_System_Power")] #[inline] pub unsafe fn ZwPowerInformation(informationlevel: super::super::super::Win32::System::Power::POWER_INFORMATION_LEVEL, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwPowerInformation(informationlevel : super::super::super::Win32::System::Power:: POWER_INFORMATION_LEVEL, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + ZwPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn ZwPrePrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7171,7 +7171,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrePrepareComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrePrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwPrePrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwPrePrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7179,7 +7179,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrePrepareEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrePrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwPrePrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwPrepareComplete(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7187,7 +7187,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrepareComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwPrepareComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwPrepareEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7195,7 +7195,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwPrepareEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwPrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwPrepareEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwPropagationComplete(resourcemanagerhandle: P0, requestcookie: u32, bufferlength: u32, buffer: *const core::ffi::c_void) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7227,7 +7227,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentinformationclass : super::super::super::Win32::System::SystemServices:: ENLISTMENT_INFORMATION_CLASS, enlistmentinformation : *mut core::ffi::c_void, enlistmentinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationEnlistment(enlistmenthandle.param().abi(), enlistmentinformationclass, enlistmentinformation, enlistmentinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryInformationEnlistment(enlistmenthandle.param().abi(), enlistmentinformationclass, enlistmentinformation, enlistmentinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Storage_FileSystem", feature = "Win32_System_IO"))] #[inline] @@ -7245,7 +7245,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationResourceManager(resourcemanagerhandle : super::super::super::Win32::Foundation:: HANDLE, resourcemanagerinformationclass : super::super::super::Win32::System::SystemServices:: RESOURCEMANAGER_INFORMATION_CLASS, resourcemanagerinformation : *mut core::ffi::c_void, resourcemanagerinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationResourceManager(resourcemanagerhandle.param().abi(), resourcemanagerinformationclass, resourcemanagerinformation, resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryInformationResourceManager(resourcemanagerhandle.param().abi(), resourcemanagerinformationclass, resourcemanagerinformation, resourcemanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -7254,7 +7254,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationTransaction(transactionhandle : super::super::super::Win32::Foundation:: HANDLE, transactioninformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTION_INFORMATION_CLASS, transactioninformation : *mut core::ffi::c_void, transactioninformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationTransaction(transactionhandle.param().abi(), transactioninformationclass, transactioninformation, transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryInformationTransaction(transactionhandle.param().abi(), transactioninformationclass, transactioninformation, transactioninformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -7263,7 +7263,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQueryInformationTransactionManager(transactionmanagerhandle : super::super::super::Win32::Foundation:: HANDLE, transactionmanagerinformationclass : super::super::super::Win32::System::SystemServices:: TRANSACTIONMANAGER_INFORMATION_CLASS, transactionmanagerinformation : *mut core::ffi::c_void, transactionmanagerinformationlength : u32, returnlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQueryInformationTransactionManager(transactionmanagerhandle.param().abi(), transactionmanagerinformationclass, transactionmanagerinformation, transactionmanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + ZwQueryInformationTransactionManager(transactionmanagerhandle.param().abi(), transactionmanagerinformationclass, transactionmanagerinformation, transactionmanagerinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ZwQuerySymbolicLinkObject(linkhandle: P0, linktarget: *mut super::super::super::Win32::Foundation::UNICODE_STRING, returnedlength: Option<*mut u32>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7271,7 +7271,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwQuerySymbolicLinkObject(linkhandle : super::super::super::Win32::Foundation:: HANDLE, linktarget : *mut super::super::super::Win32::Foundation:: UNICODE_STRING, returnedlength : *mut u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwQuerySymbolicLinkObject(linkhandle.param().abi(), linktarget, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))) + ZwQuerySymbolicLinkObject(linkhandle.param().abi(), linktarget, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -7281,7 +7281,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwReadFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *mut core::ffi::c_void, length : u32, byteoffset : *const i64, key : *const u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwReadFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null()))) + ZwReadFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwReadOnlyEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7289,7 +7289,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwReadOnlyEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwReadOnlyEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwReadOnlyEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwRecoverEnlistment(enlistmenthandle: P0, enlistmentkey: Option<*const core::ffi::c_void>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7297,7 +7297,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwRecoverEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, enlistmentkey : *const core::ffi::c_void) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRecoverEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentkey.unwrap_or(std::ptr::null()))) + ZwRecoverEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(enlistmentkey.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwRecoverResourceManager(resourcemanagerhandle: P0) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7334,7 +7334,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwRollbackComplete(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollbackComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwRollbackComplete(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwRollbackEnlistment(enlistmenthandle: P0, tmvirtualclock: Option<*const i64>) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7342,7 +7342,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwRollbackEnlistment(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollbackEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwRollbackEnlistment(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwRollbackTransaction(transactionhandle: P0, wait: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -7359,7 +7359,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwRollforwardTransactionManager(transactionmanagerhandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwRollforwardTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwRollforwardTransactionManager(transactionmanagerhandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_SystemServices")] #[inline] @@ -7412,7 +7412,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwSinglePhaseReject(enlistmenthandle : super::super::super::Win32::Foundation:: HANDLE, tmvirtualclock : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSinglePhaseReject(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(std::ptr::null()))) + ZwSinglePhaseReject(enlistmenthandle.param().abi(), core::mem::transmute(tmvirtualclock.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ZwUnloadDriver(driverservicename: *const super::super::super::Win32::Foundation::UNICODE_STRING) -> super::super::super::Win32::Foundation::NTSTATUS { @@ -7427,7 +7427,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwWriteFile(filehandle : super::super::super::Win32::Foundation:: HANDLE, event : super::super::super::Win32::Foundation:: HANDLE, apcroutine : super::super::super::Win32::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, iostatusblock : *mut super::super::super::Win32::System::IO:: IO_STATUS_BLOCK, buffer : *const core::ffi::c_void, length : u32, byteoffset : *const i64, key : *const u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwWriteFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(std::ptr::null())), core::mem::transmute(key.unwrap_or(std::ptr::null()))) + ZwWriteFile(filehandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), iostatusblock, buffer, length, core::mem::transmute(byteoffset.unwrap_or(core::ptr::null())), core::mem::transmute(key.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn vDbgPrintEx(componentid: u32, level: u32, format: P0, arglist: *const i8) -> u32 diff --git a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs index 59f11ad8d7..47dbec0efd 100644 --- a/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Wdk/System/Threading/mod.rs @@ -4,13 +4,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtCancelTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, currentstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCancelTimer(timerhandle.param().abi(), core::mem::transmute(currentstate.unwrap_or(std::ptr::null_mut()))) + NtCancelTimer(timerhandle.param().abi(), core::mem::transmute(currentstate.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn NtCreateTimer(timerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, timertype: super::super::super::Win32::System::Kernel::TIMER_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtCreateTimer(timerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, timertype : super::super::super::Win32::System::Kernel:: TIMER_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtCreateTimer(timerhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), timertype) + NtCreateTimer(timerhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), timertype) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -22,7 +22,7 @@ pub unsafe fn NtOpenEvent(eventhandle: *mut super::super::super::Win32::Foundati #[inline] pub unsafe fn NtOpenProcess(processhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, clientid: Option<*const super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn NtOpenProcess(processhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, clientid : *const super::super::super::Win32::System::WindowsProgramming:: CLIENT_ID) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtOpenProcess(processhandle, desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(std::ptr::null()))) + NtOpenProcess(processhandle, desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -62,7 +62,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtSetTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, duetime : *const i64, timerapcroutine : super::SystemServices:: PTIMER_APC_ROUTINE, timercontext : *const core::ffi::c_void, resumetimer : super::super::super::Win32::Foundation:: BOOLEAN, period : i32, previousstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetTimer(timerhandle.param().abi(), duetime, timerapcroutine, core::mem::transmute(timercontext.unwrap_or(std::ptr::null())), resumetimer.param().abi(), period, core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut()))) + NtSetTimer(timerhandle.param().abi(), duetime, timerapcroutine, core::mem::transmute(timercontext.unwrap_or(core::ptr::null())), resumetimer.param().abi(), period, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NtSetTimerEx(timerhandle: P0, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -70,7 +70,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn NtSetTimerEx(timerhandle : super::super::super::Win32::Foundation:: HANDLE, timersetinformationclass : TIMER_SET_INFORMATION_CLASS, timersetinformation : *mut core::ffi::c_void, timersetinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - NtSetTimerEx(timerhandle.param().abi(), timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(std::ptr::null_mut())), timersetinformationlength) + NtSetTimerEx(timerhandle.param().abi(), timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(core::ptr::null_mut())), timersetinformationlength) } #[inline] pub unsafe fn NtTerminateProcess(processhandle: P0, exitstatus: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -96,13 +96,13 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwCancelTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, currentstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCancelTimer(timerhandle.param().abi(), core::mem::transmute(currentstate.unwrap_or(std::ptr::null_mut()))) + ZwCancelTimer(timerhandle.param().abi(), core::mem::transmute(currentstate.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Wdk_Foundation", feature = "Win32_System_Kernel"))] #[inline] pub unsafe fn ZwCreateTimer(timerhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: Option<*const super::super::Foundation::OBJECT_ATTRIBUTES>, timertype: super::super::super::Win32::System::Kernel::TIMER_TYPE) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwCreateTimer(timerhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, timertype : super::super::super::Win32::System::Kernel:: TIMER_TYPE) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwCreateTimer(timerhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(std::ptr::null())), timertype) + ZwCreateTimer(timerhandle, desiredaccess, core::mem::transmute(objectattributes.unwrap_or(core::ptr::null())), timertype) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -114,7 +114,7 @@ pub unsafe fn ZwOpenEvent(eventhandle: *mut super::super::super::Win32::Foundati #[inline] pub unsafe fn ZwOpenProcess(processhandle: *mut super::super::super::Win32::Foundation::HANDLE, desiredaccess: u32, objectattributes: *const super::super::Foundation::OBJECT_ATTRIBUTES, clientid: Option<*const super::super::super::Win32::System::WindowsProgramming::CLIENT_ID>) -> super::super::super::Win32::Foundation::NTSTATUS { windows_targets::link!("ntdll.dll" "system" fn ZwOpenProcess(processhandle : *mut super::super::super::Win32::Foundation:: HANDLE, desiredaccess : u32, objectattributes : *const super::super::Foundation:: OBJECT_ATTRIBUTES, clientid : *const super::super::super::Win32::System::WindowsProgramming:: CLIENT_ID) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwOpenProcess(processhandle, desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(std::ptr::null()))) + ZwOpenProcess(processhandle, desiredaccess, objectattributes, core::mem::transmute(clientid.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Wdk_Foundation")] #[inline] @@ -154,7 +154,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwSetTimer(timerhandle : super::super::super::Win32::Foundation:: HANDLE, duetime : *const i64, timerapcroutine : super::SystemServices:: PTIMER_APC_ROUTINE, timercontext : *const core::ffi::c_void, resumetimer : super::super::super::Win32::Foundation:: BOOLEAN, period : i32, previousstate : *mut super::super::super::Win32::Foundation:: BOOLEAN) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetTimer(timerhandle.param().abi(), duetime, timerapcroutine, core::mem::transmute(timercontext.unwrap_or(std::ptr::null())), resumetimer.param().abi(), period, core::mem::transmute(previousstate.unwrap_or(std::ptr::null_mut()))) + ZwSetTimer(timerhandle.param().abi(), duetime, timerapcroutine, core::mem::transmute(timercontext.unwrap_or(core::ptr::null())), resumetimer.param().abi(), period, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ZwSetTimerEx(timerhandle: P0, timersetinformationclass: TIMER_SET_INFORMATION_CLASS, timersetinformation: Option<*mut core::ffi::c_void>, timersetinformationlength: u32) -> super::super::super::Win32::Foundation::NTSTATUS @@ -162,7 +162,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwSetTimerEx(timerhandle : super::super::super::Win32::Foundation:: HANDLE, timersetinformationclass : TIMER_SET_INFORMATION_CLASS, timersetinformation : *mut core::ffi::c_void, timersetinformationlength : u32) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwSetTimerEx(timerhandle.param().abi(), timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(std::ptr::null_mut())), timersetinformationlength) + ZwSetTimerEx(timerhandle.param().abi(), timersetinformationclass, core::mem::transmute(timersetinformation.unwrap_or(core::ptr::null_mut())), timersetinformationlength) } #[inline] pub unsafe fn ZwTerminateProcess(processhandle: P0, exitstatus: P1) -> super::super::super::Win32::Foundation::NTSTATUS @@ -180,7 +180,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn ZwWaitForSingleObject(handle : super::super::super::Win32::Foundation:: HANDLE, alertable : super::super::super::Win32::Foundation:: BOOLEAN, timeout : *const i64) -> super::super::super::Win32::Foundation:: NTSTATUS); - ZwWaitForSingleObject(handle.param().abi(), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(std::ptr::null()))) + ZwWaitForSingleObject(handle.param().abi(), alertable.param().abi(), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) } pub const MaxProcessInfoClass: PROCESSINFOCLASS = PROCESSINFOCLASS(83i32); pub const MaxThreadInfoClass: THREADINFOCLASS = THREADINFOCLASS(56i32); diff --git a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs index ace1126122..ef8bc6f016 100644 --- a/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/AI/MachineLearning/DirectML/mod.rs @@ -34,14 +34,14 @@ impl IDMLBindingTable { (windows_core::Interface::vtable(self).BindOutputs)(windows_core::Interface::as_raw(self), bindings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(bindings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn BindTemporaryResource(&self, binding: Option<*const DML_BINDING_DESC>) { - (windows_core::Interface::vtable(self).BindTemporaryResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).BindTemporaryResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::ptr::null()))) } pub unsafe fn BindPersistentResource(&self, binding: Option<*const DML_BINDING_DESC>) { - (windows_core::Interface::vtable(self).BindPersistentResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).BindPersistentResource)(windows_core::Interface::as_raw(self), core::mem::transmute(binding.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn Reset(&self, desc: Option<*const DML_BINDING_TABLE_DESC>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -127,7 +127,7 @@ impl core::ops::Deref for IDMLDevice { windows_core::imp::interface_hierarchy!(IDMLDevice, windows_core::IUnknown, IDMLObject); impl IDMLDevice { pub unsafe fn CheckFeatureSupport(&self, feature: DML_FEATURE, featurequerydatasize: u32, featurequerydata: Option<*const core::ffi::c_void>, featuresupportdatasize: u32, featuresupportdata: *mut core::ffi::c_void) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, featurequerydatasize, core::mem::transmute(featurequerydata.unwrap_or(std::ptr::null())), featuresupportdatasize, featuresupportdata).ok() + (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, featurequerydatasize, core::mem::transmute(featurequerydata.unwrap_or(core::ptr::null())), featuresupportdatasize, featuresupportdata).ok() } pub unsafe fn CreateOperator(&self, desc: *const DML_OPERATOR_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -162,7 +162,7 @@ impl IDMLDevice { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateBindingTable)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(std::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBindingTable)(windows_core::Interface::as_raw(self), core::mem::transmute(desc.unwrap_or(core::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Evict(&self, ppobjects: &[Option]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Evict)(windows_core::Interface::as_raw(self), ppobjects.len().try_into().unwrap(), core::mem::transmute(ppobjects.as_ptr())).ok() @@ -271,10 +271,10 @@ impl core::ops::Deref for IDMLObject { windows_core::imp::interface_hierarchy!(IDMLObject, windows_core::IUnknown); impl IDMLObject { pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, datasize: *mut u32, data: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(data.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(data.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(data.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, data: P0) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs index 54125b3d4f..81709e2848 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/RightsManagement/mod.rs @@ -163,7 +163,7 @@ where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMCreateRight(wszrightname : windows_core::PCWSTR, pstfrom : *mut super::super::Foundation:: SYSTEMTIME, pstuntil : *mut super::super::Foundation:: SYSTEMTIME, cextendedinfo : u32, pwszextendedinfoname : *const windows_core::PCWSTR, pwszextendedinfovalue : *const windows_core::PCWSTR, phright : *mut u32) -> windows_core::HRESULT); - DRMCreateRight(wszrightname.param().abi(), pstfrom, pstuntil, cextendedinfo, core::mem::transmute(pwszextendedinfoname.unwrap_or(std::ptr::null())), core::mem::transmute(pwszextendedinfovalue.unwrap_or(std::ptr::null())), phright).ok() + DRMCreateRight(wszrightname.param().abi(), pstfrom, pstuntil, cextendedinfo, core::mem::transmute(pwszextendedinfoname.unwrap_or(core::ptr::null())), core::mem::transmute(pwszextendedinfovalue.unwrap_or(core::ptr::null())), phright).ok() } #[inline] pub unsafe fn DRMCreateUser(wszusername: P0, wszuserid: P1, wszuseridtype: P2, phuser: *mut u32) -> windows_core::Result<()> @@ -391,7 +391,7 @@ where P0: windows_core::Param, { windows_targets::link!("msdrm.dll" "system" fn DRMGetSignedIssuanceLicenseEx(henv : u32, hissuancelicense : u32, uflags : u32, pbsymkey : *const u8, cbsymkey : u32, wszsymkeytype : windows_core::PCWSTR, pvreserved : *const core::ffi::c_void, henablingprincipal : u32, hboundlicenseclc : u32, pfncallback : DRMCALLBACK, pvcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, core::mem::transmute(pbsymkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), wszsymkeytype.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() + DRMGetSignedIssuanceLicenseEx(henv, hissuancelicense, uflags, core::mem::transmute(pbsymkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsymkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), wszsymkeytype.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), henablingprincipal, hboundlicenseclc, pfncallback, pvcontext).ok() } #[inline] pub unsafe fn DRMGetTime(henv: u32, etimeridtype: DRMTIMETYPE, potimeobject: *mut super::super::Foundation::SYSTEMTIME) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs index 0317cecb33..f7c8f06beb 100644 --- a/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Data/Xml/XmlLite/mod.rs @@ -89,7 +89,7 @@ impl IXmlReader { (windows_core::Interface::vtable(self).SetProperty)(windows_core::Interface::as_raw(self), nproperty, pvalue).ok() } pub unsafe fn Read(&self, pnodetype: Option<*mut XmlNodeType>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pnodetype.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), core::mem::transmute(pnodetype.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetNodeType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -112,25 +112,25 @@ impl IXmlReader { (windows_core::Interface::vtable(self).MoveToElement)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetQualifiedName(&self, ppwszqualifiedname: *mut windows_core::PCWSTR, pcwchqualifiedname: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQualifiedName)(windows_core::Interface::as_raw(self), ppwszqualifiedname, core::mem::transmute(pcwchqualifiedname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQualifiedName)(windows_core::Interface::as_raw(self), ppwszqualifiedname, core::mem::transmute(pcwchqualifiedname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetNamespaceUri(&self, ppwsznamespaceuri: *mut windows_core::PCWSTR, pcwchnamespaceuri: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNamespaceUri)(windows_core::Interface::as_raw(self), ppwsznamespaceuri, core::mem::transmute(pcwchnamespaceuri.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNamespaceUri)(windows_core::Interface::as_raw(self), ppwsznamespaceuri, core::mem::transmute(pcwchnamespaceuri.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLocalName(&self, ppwszlocalname: *mut windows_core::PCWSTR, pcwchlocalname: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocalName)(windows_core::Interface::as_raw(self), ppwszlocalname, core::mem::transmute(pcwchlocalname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocalName)(windows_core::Interface::as_raw(self), ppwszlocalname, core::mem::transmute(pcwchlocalname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetPrefix(&self, ppwszprefix: *mut windows_core::PCWSTR, pcwchprefix: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrefix)(windows_core::Interface::as_raw(self), ppwszprefix, core::mem::transmute(pcwchprefix.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrefix)(windows_core::Interface::as_raw(self), ppwszprefix, core::mem::transmute(pcwchprefix.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetValue(&self, ppwszvalue: *mut windows_core::PCWSTR, pcwchvalue: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), ppwszvalue, core::mem::transmute(pcwchvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), ppwszvalue, core::mem::transmute(pcwchvalue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadValueChunk(&self, pwchbuffer: &mut [u16], pcwchread: *mut u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).ReadValueChunk)(windows_core::Interface::as_raw(self), core::mem::transmute(pwchbuffer.as_ptr()), pwchbuffer.len().try_into().unwrap(), pcwchread) } pub unsafe fn GetBaseUri(&self, ppwszbaseuri: *mut windows_core::PCWSTR, pcwchbaseuri: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBaseUri)(windows_core::Interface::as_raw(self), ppwszbaseuri, core::mem::transmute(pcwchbaseuri.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBaseUri)(windows_core::Interface::as_raw(self), ppwszbaseuri, core::mem::transmute(pcwchbaseuri.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsDefault(&self) -> super::super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsDefault)(windows_core::Interface::as_raw(self)) 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 c8c481be57..fd24760df8 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/AllJoyn/mod.rs @@ -28,7 +28,7 @@ where #[inline] pub unsafe fn AllJoynCreateBus(outbuffersize: u32, inbuffersize: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> super::super::Foundation::HANDLE { windows_targets::link!("msajapi.dll" "system" fn AllJoynCreateBus(outbuffersize : u32, inbuffersize : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - AllJoynCreateBus(outbuffersize, inbuffersize, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + AllJoynCreateBus(outbuffersize, inbuffersize, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AllJoynEnumEvents(connectedbushandle: P0, eventtoreset: P1, eventtypes: *mut u32) -> windows_core::Result<()> @@ -54,7 +54,7 @@ where P0: windows_core::Param, { 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.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() + AllJoynReceiveFromBus(connectedbushandle.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), bytestoread, core::mem::transmute(bytestransferred.unwrap_or(core::ptr::null_mut())), reserved).ok() } #[inline] pub unsafe fn AllJoynSendToBus(connectedbushandle: P0, buffer: Option<*const core::ffi::c_void>, bytestowrite: u32, bytestransferred: Option<*mut u32>, reserved: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -62,7 +62,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null())), bytestowrite, core::mem::transmute(bytestransferred.unwrap_or(std::ptr::null_mut())), reserved).ok() + AllJoynSendToBus(connectedbushandle.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null())), bytestowrite, core::mem::transmute(bytestransferred.unwrap_or(core::ptr::null_mut())), reserved).ok() } #[inline] pub unsafe fn QCC_StatusText(status: QStatus) -> windows_core::PCSTR { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs index 3190145b7e..e28630df89 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/BiometricFramework/mod.rs @@ -30,7 +30,7 @@ where P1: windows_core::Param, { windows_targets::link!("winbio.dll" "system" fn WinBioAsyncOpenFramework(notificationmethod : WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow : super::super::Foundation:: HWND, messagecode : u32, callbackroutine : PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata : *const core::ffi::c_void, asynchronousopen : super::super::Foundation:: BOOL, frameworkhandle : *mut u32) -> windows_core::HRESULT); - WinBioAsyncOpenFramework(notificationmethod, targetwindow.param().abi(), messagecode, callbackroutine, core::mem::transmute(userdata.unwrap_or(std::ptr::null())), asynchronousopen.param().abi(), core::mem::transmute(frameworkhandle.unwrap_or(std::ptr::null_mut()))).ok() + WinBioAsyncOpenFramework(notificationmethod, targetwindow.param().abi(), messagecode, callbackroutine, core::mem::transmute(userdata.unwrap_or(core::ptr::null())), asynchronousopen.param().abi(), core::mem::transmute(frameworkhandle.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioAsyncOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, unitarray: Option<&[u32]>, databaseid: Option<*const windows_core::GUID>, notificationmethod: WINBIO_ASYNC_NOTIFICATION_METHOD, targetwindow: P0, messagecode: u32, callbackroutine: PWINBIO_ASYNC_COMPLETION_CALLBACK, userdata: Option<*const core::ffi::c_void>, asynchronousopen: P1, sessionhandle: Option<*mut u32>) -> windows_core::Result<()> @@ -45,14 +45,14 @@ where flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(databaseid.unwrap_or(std::ptr::null())), + core::mem::transmute(databaseid.unwrap_or(core::ptr::null())), notificationmethod, targetwindow.param().abi(), messagecode, callbackroutine, - core::mem::transmute(userdata.unwrap_or(std::ptr::null())), + core::mem::transmute(userdata.unwrap_or(core::ptr::null())), asynchronousopen.param().abi(), - core::mem::transmute(sessionhandle.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(sessionhandle.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -64,12 +64,12 @@ pub unsafe fn WinBioCancel(sessionhandle: u32) -> windows_core::Result<()> { #[inline] pub unsafe fn WinBioCaptureSample(sessionhandle: u32, purpose: u8, flags: u8, unitid: Option<*mut u32>, sample: *mut *mut WINBIO_BIR, samplesize: Option<*mut usize>, rejectdetail: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioCaptureSample(sessionhandle : u32, purpose : u8, flags : u8, unitid : *mut u32, sample : *mut *mut WINBIO_BIR, samplesize : *mut usize, rejectdetail : *mut u32) -> windows_core::HRESULT); - WinBioCaptureSample(sessionhandle, purpose, flags, core::mem::transmute(unitid.unwrap_or(std::ptr::null_mut())), sample, core::mem::transmute(samplesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(std::ptr::null_mut()))).ok() + WinBioCaptureSample(sessionhandle, purpose, flags, core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut())), sample, core::mem::transmute(samplesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioCaptureSampleWithCallback(sessionhandle: u32, purpose: u8, flags: u8, capturecallback: PWINBIO_CAPTURE_CALLBACK, capturecallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioCaptureSampleWithCallback(sessionhandle : u32, purpose : u8, flags : u8, capturecallback : PWINBIO_CAPTURE_CALLBACK, capturecallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioCaptureSampleWithCallback(sessionhandle, purpose, flags, capturecallback, core::mem::transmute(capturecallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioCaptureSampleWithCallback(sessionhandle, purpose, flags, capturecallback, core::mem::transmute(capturecallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioCloseFramework(frameworkhandle: u32) -> windows_core::Result<()> { @@ -84,12 +84,12 @@ pub unsafe fn WinBioCloseSession(sessionhandle: u32) -> windows_core::Result<()> #[inline] pub unsafe fn WinBioControlUnit(sessionhandle: u32, unitid: u32, component: WINBIO_COMPONENT, controlcode: u32, sendbuffer: &[u8], receivebuffer: &mut [u8], receivedatasize: *mut usize, operationstatus: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioControlUnit(sessionhandle : u32, unitid : u32, component : WINBIO_COMPONENT, controlcode : u32, sendbuffer : *const u8, sendbuffersize : usize, receivebuffer : *mut u8, receivebuffersize : usize, receivedatasize : *mut usize, operationstatus : *mut u32) -> windows_core::HRESULT); - WinBioControlUnit(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, core::mem::transmute(operationstatus.unwrap_or(std::ptr::null_mut()))).ok() + WinBioControlUnit(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, core::mem::transmute(operationstatus.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioControlUnitPrivileged(sessionhandle: u32, unitid: u32, component: WINBIO_COMPONENT, controlcode: u32, sendbuffer: &[u8], receivebuffer: &mut [u8], receivedatasize: *mut usize, operationstatus: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioControlUnitPrivileged(sessionhandle : u32, unitid : u32, component : WINBIO_COMPONENT, controlcode : u32, sendbuffer : *const u8, sendbuffersize : usize, receivebuffer : *mut u8, receivebuffersize : usize, receivedatasize : *mut usize, operationstatus : *mut u32) -> windows_core::HRESULT); - WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, core::mem::transmute(operationstatus.unwrap_or(std::ptr::null_mut()))).ok() + WinBioControlUnitPrivileged(sessionhandle, unitid, component, controlcode, core::mem::transmute(sendbuffer.as_ptr()), sendbuffer.len().try_into().unwrap(), core::mem::transmute(receivebuffer.as_ptr()), receivebuffer.len().try_into().unwrap(), receivedatasize, core::mem::transmute(operationstatus.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioDeleteTemplate(sessionhandle: u32, unitid: u32, identity: *const WINBIO_IDENTITY, subfactor: u8) -> windows_core::Result<()> { @@ -104,17 +104,17 @@ pub unsafe fn WinBioEnrollBegin(sessionhandle: u32, subfactor: u8, unitid: u32) #[inline] pub unsafe fn WinBioEnrollCapture(sessionhandle: u32, rejectdetail: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnrollCapture(sessionhandle : u32, rejectdetail : *mut u32) -> windows_core::HRESULT); - WinBioEnrollCapture(sessionhandle, core::mem::transmute(rejectdetail.unwrap_or(std::ptr::null_mut()))).ok() + WinBioEnrollCapture(sessionhandle, core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioEnrollCaptureWithCallback(sessionhandle: u32, enrollcallback: PWINBIO_ENROLL_CAPTURE_CALLBACK, enrollcallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnrollCaptureWithCallback(sessionhandle : u32, enrollcallback : PWINBIO_ENROLL_CAPTURE_CALLBACK, enrollcallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioEnrollCaptureWithCallback(sessionhandle, enrollcallback, core::mem::transmute(enrollcallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioEnrollCaptureWithCallback(sessionhandle, enrollcallback, core::mem::transmute(enrollcallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioEnrollCommit(sessionhandle: u32, identity: Option<*mut WINBIO_IDENTITY>, isnewtemplate: Option<*mut u8>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnrollCommit(sessionhandle : u32, identity : *mut WINBIO_IDENTITY, isnewtemplate : *mut u8) -> windows_core::HRESULT); - WinBioEnrollCommit(sessionhandle, core::mem::transmute(identity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(isnewtemplate.unwrap_or(std::ptr::null_mut()))).ok() + WinBioEnrollCommit(sessionhandle, core::mem::transmute(identity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(isnewtemplate.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioEnrollDiscard(sessionhandle: u32) -> windows_core::Result<()> { @@ -139,7 +139,7 @@ pub unsafe fn WinBioEnumDatabases(factor: u32, storageschemaarray: *mut *mut WIN #[inline] pub unsafe fn WinBioEnumEnrollments(sessionhandle: u32, unitid: u32, identity: *const WINBIO_IDENTITY, subfactorarray: *mut *mut u8, subfactorcount: Option<*mut usize>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioEnumEnrollments(sessionhandle : u32, unitid : u32, identity : *const WINBIO_IDENTITY, subfactorarray : *mut *mut u8, subfactorcount : *mut usize) -> windows_core::HRESULT); - WinBioEnumEnrollments(sessionhandle, unitid, identity, subfactorarray, core::mem::transmute(subfactorcount.unwrap_or(std::ptr::null_mut()))).ok() + WinBioEnumEnrollments(sessionhandle, unitid, identity, subfactorarray, core::mem::transmute(subfactorcount.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioEnumServiceProviders(factor: u32, bspschemaarray: *mut *mut WINBIO_BSP_SCHEMA, bspcount: *mut usize) -> windows_core::Result<()> { @@ -181,17 +181,17 @@ pub unsafe fn WinBioGetLogonSetting(value: *mut u8, source: *mut WINBIO_SETTING_ #[inline] pub unsafe fn WinBioGetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: u32, identity: Option<*const WINBIO_IDENTITY>, subfactor: u8, propertybuffer: *mut *mut core::ffi::c_void, propertybuffersize: Option<*mut usize>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioGetProperty(sessionhandle : u32, propertytype : u32, propertyid : u32, unitid : u32, identity : *const WINBIO_IDENTITY, subfactor : u8, propertybuffer : *mut *mut core::ffi::c_void, propertybuffersize : *mut usize) -> windows_core::HRESULT); - WinBioGetProperty(sessionhandle, propertytype, propertyid, unitid, core::mem::transmute(identity.unwrap_or(std::ptr::null())), subfactor, propertybuffer, core::mem::transmute(propertybuffersize.unwrap_or(std::ptr::null_mut()))).ok() + WinBioGetProperty(sessionhandle, propertytype, propertyid, unitid, core::mem::transmute(identity.unwrap_or(core::ptr::null())), subfactor, propertybuffer, core::mem::transmute(propertybuffersize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioIdentify(sessionhandle: u32, unitid: Option<*mut u32>, identity: Option<*mut WINBIO_IDENTITY>, subfactor: Option<*mut u8>, rejectdetail: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioIdentify(sessionhandle : u32, unitid : *mut u32, identity : *mut WINBIO_IDENTITY, subfactor : *mut u8, rejectdetail : *mut u32) -> windows_core::HRESULT); - WinBioIdentify(sessionhandle, core::mem::transmute(unitid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(identity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(subfactor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(std::ptr::null_mut()))).ok() + WinBioIdentify(sessionhandle, core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(identity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(subfactor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioIdentifyWithCallback(sessionhandle: u32, identifycallback: PWINBIO_IDENTIFY_CALLBACK, identifycallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioIdentifyWithCallback(sessionhandle : u32, identifycallback : PWINBIO_IDENTIFY_CALLBACK, identifycallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioIdentifyWithCallback(sessionhandle, identifycallback, core::mem::transmute(identifycallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioIdentifyWithCallback(sessionhandle, identifycallback, core::mem::transmute(identifycallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioImproveBegin(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -206,12 +206,12 @@ pub unsafe fn WinBioImproveEnd(sessionhandle: u32) -> windows_core::Result<()> { #[inline] pub unsafe fn WinBioLocateSensor(sessionhandle: u32, unitid: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioLocateSensor(sessionhandle : u32, unitid : *mut u32) -> windows_core::HRESULT); - WinBioLocateSensor(sessionhandle, core::mem::transmute(unitid.unwrap_or(std::ptr::null_mut()))).ok() + WinBioLocateSensor(sessionhandle, core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioLocateSensorWithCallback(sessionhandle: u32, locatecallback: PWINBIO_LOCATE_SENSOR_CALLBACK, locatecallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioLocateSensorWithCallback(sessionhandle : u32, locatecallback : PWINBIO_LOCATE_SENSOR_CALLBACK, locatecallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioLocateSensorWithCallback(sessionhandle, locatecallback, core::mem::transmute(locatecallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioLocateSensorWithCallback(sessionhandle, locatecallback, core::mem::transmute(locatecallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioLockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -232,12 +232,12 @@ pub unsafe fn WinBioMonitorPresence(sessionhandle: u32, unitid: u32) -> windows_ pub unsafe fn WinBioOpenSession(factor: u32, pooltype: WINBIO_POOL, flags: u32, unitarray: Option<&[u32]>, databaseid: Option<*const windows_core::GUID>) -> windows_core::Result { windows_targets::link!("winbio.dll" "system" fn WinBioOpenSession(factor : u32, pooltype : WINBIO_POOL, flags : u32, unitarray : *const u32, unitcount : usize, databaseid : *const windows_core::GUID, sessionhandle : *mut u32) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(databaseid.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WinBioOpenSession(factor, pooltype, flags, core::mem::transmute(unitarray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), unitarray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(databaseid.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WinBioRegisterEventMonitor(sessionhandle: u32, eventmask: u32, eventcallback: PWINBIO_EVENT_CALLBACK, eventcallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioRegisterEventMonitor(sessionhandle : u32, eventmask : u32, eventcallback : PWINBIO_EVENT_CALLBACK, eventcallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioRegisterEventMonitor(sessionhandle, eventmask, eventcallback, core::mem::transmute(eventcallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioRegisterEventMonitor(sessionhandle, eventmask, eventcallback, core::mem::transmute(eventcallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioReleaseFocus() -> windows_core::Result<()> { @@ -267,7 +267,7 @@ pub unsafe fn WinBioSetCredential(r#type: WINBIO_CREDENTIAL_TYPE, credential: &[ #[inline] pub unsafe fn WinBioSetProperty(sessionhandle: u32, propertytype: u32, propertyid: u32, unitid: u32, identity: Option<*const WINBIO_IDENTITY>, subfactor: u8, propertybuffer: *const core::ffi::c_void, propertybuffersize: usize) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioSetProperty(sessionhandle : u32, propertytype : u32, propertyid : u32, unitid : u32, identity : *const WINBIO_IDENTITY, subfactor : u8, propertybuffer : *const core::ffi::c_void, propertybuffersize : usize) -> windows_core::HRESULT); - WinBioSetProperty(sessionhandle, propertytype, propertyid, unitid, core::mem::transmute(identity.unwrap_or(std::ptr::null())), subfactor, propertybuffer, propertybuffersize).ok() + WinBioSetProperty(sessionhandle, propertytype, propertyid, unitid, core::mem::transmute(identity.unwrap_or(core::ptr::null())), subfactor, propertybuffer, propertybuffersize).ok() } #[inline] pub unsafe fn WinBioUnlockUnit(sessionhandle: u32, unitid: u32) -> windows_core::Result<()> { @@ -282,12 +282,12 @@ pub unsafe fn WinBioUnregisterEventMonitor(sessionhandle: u32) -> windows_core:: #[inline] pub unsafe fn WinBioVerify(sessionhandle: u32, identity: *const WINBIO_IDENTITY, subfactor: u8, unitid: Option<*mut u32>, r#match: Option<*mut u8>, rejectdetail: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioVerify(sessionhandle : u32, identity : *const WINBIO_IDENTITY, subfactor : u8, unitid : *mut u32, r#match : *mut u8, rejectdetail : *mut u32) -> windows_core::HRESULT); - WinBioVerify(sessionhandle, identity, subfactor, core::mem::transmute(unitid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(r#match.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(std::ptr::null_mut()))).ok() + WinBioVerify(sessionhandle, identity, subfactor, core::mem::transmute(unitid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(r#match.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rejectdetail.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WinBioVerifyWithCallback(sessionhandle: u32, identity: *const WINBIO_IDENTITY, subfactor: u8, verifycallback: PWINBIO_VERIFY_CALLBACK, verifycallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("winbio.dll" "system" fn WinBioVerifyWithCallback(sessionhandle : u32, identity : *const WINBIO_IDENTITY, subfactor : u8, verifycallback : PWINBIO_VERIFY_CALLBACK, verifycallbackcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WinBioVerifyWithCallback(sessionhandle, identity, subfactor, verifycallback, core::mem::transmute(verifycallbackcontext.unwrap_or(std::ptr::null()))).ok() + WinBioVerifyWithCallback(sessionhandle, identity, subfactor, verifycallback, core::mem::transmute(verifycallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinBioWait(sessionhandle: u32) -> windows_core::Result<()> { 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 454c1047df..1850f1b3f2 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Bluetooth/mod.rs @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("bthprops.cpl" "system" fn BluetoothAuthenticateDeviceEx(hwndparentin : super::super::Foundation:: HWND, hradioin : super::super::Foundation:: HANDLE, pbtdiinout : *mut BLUETOOTH_DEVICE_INFO, pbtoobdata : *const BLUETOOTH_OOB_DATA_INFO, authenticationrequirement : AUTHENTICATION_REQUIREMENTS) -> u32); - BluetoothAuthenticateDeviceEx(hwndparentin.param().abi(), hradioin.param().abi(), pbtdiinout, core::mem::transmute(pbtoobdata.unwrap_or(std::ptr::null())), authenticationrequirement) + BluetoothAuthenticateDeviceEx(hwndparentin.param().abi(), hradioin.param().abi(), pbtdiinout, core::mem::transmute(pbtoobdata.unwrap_or(core::ptr::null())), authenticationrequirement) } #[inline] pub unsafe fn BluetoothAuthenticateMultipleDevices(hwndparent: P0, hradio: P1, rgbtdi: &mut [BLUETOOTH_DEVICE_INFO]) -> u32 @@ -57,7 +57,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothEnumerateInstalledServices(hradio : super::super::Foundation:: HANDLE, pbtdi : *const BLUETOOTH_DEVICE_INFO, pcserviceinout : *mut u32, pguidservices : *mut windows_core::GUID) -> u32); - BluetoothEnumerateInstalledServices(hradio.param().abi(), pbtdi, pcserviceinout, core::mem::transmute(pguidservices.unwrap_or(std::ptr::null_mut()))) + BluetoothEnumerateInstalledServices(hradio.param().abi(), pbtdi, pcserviceinout, core::mem::transmute(pguidservices.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BluetoothFindDeviceClose(hfind: P0) -> windows_core::Result<()> @@ -133,7 +133,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetCharacteristicValue(hdevice : super::super::Foundation:: HANDLE, characteristic : *const BTH_LE_GATT_CHARACTERISTIC, characteristicvaluedatasize : u32, characteristicvalue : *mut BTH_LE_GATT_CHARACTERISTIC_VALUE, characteristicvaluesizerequired : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetCharacteristicValue(hdevice.param().abi(), characteristic, characteristicvaluedatasize, core::mem::transmute(characteristicvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(characteristicvaluesizerequired.unwrap_or(std::ptr::null_mut())), flags).ok() + BluetoothGATTGetCharacteristicValue(hdevice.param().abi(), characteristic, characteristicvaluedatasize, core::mem::transmute(characteristicvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(characteristicvaluesizerequired.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn BluetoothGATTGetCharacteristics(hdevice: P0, service: Option<*const BTH_LE_GATT_SERVICE>, characteristicsbuffer: Option<&mut [BTH_LE_GATT_CHARACTERISTIC]>, characteristicsbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> @@ -141,7 +141,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetCharacteristics(hdevice : super::super::Foundation:: HANDLE, service : *const BTH_LE_GATT_SERVICE, characteristicsbuffercount : u16, characteristicsbuffer : *mut BTH_LE_GATT_CHARACTERISTIC, characteristicsbufferactual : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetCharacteristics(hdevice.param().abi(), core::mem::transmute(service.unwrap_or(std::ptr::null())), characteristicsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(characteristicsbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), characteristicsbufferactual, flags).ok() + BluetoothGATTGetCharacteristics(hdevice.param().abi(), core::mem::transmute(service.unwrap_or(core::ptr::null())), characteristicsbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(characteristicsbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), characteristicsbufferactual, flags).ok() } #[inline] pub unsafe fn BluetoothGATTGetDescriptorValue(hdevice: P0, descriptor: *const BTH_LE_GATT_DESCRIPTOR, descriptorvaluedatasize: u32, descriptorvalue: Option<*mut BTH_LE_GATT_DESCRIPTOR_VALUE>, descriptorvaluesizerequired: Option<*mut u16>, flags: u32) -> windows_core::Result<()> @@ -149,7 +149,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetDescriptorValue(hdevice : super::super::Foundation:: HANDLE, descriptor : *const BTH_LE_GATT_DESCRIPTOR, descriptorvaluedatasize : u32, descriptorvalue : *mut BTH_LE_GATT_DESCRIPTOR_VALUE, descriptorvaluesizerequired : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetDescriptorValue(hdevice.param().abi(), descriptor, descriptorvaluedatasize, core::mem::transmute(descriptorvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(descriptorvaluesizerequired.unwrap_or(std::ptr::null_mut())), flags).ok() + BluetoothGATTGetDescriptorValue(hdevice.param().abi(), descriptor, descriptorvaluedatasize, core::mem::transmute(descriptorvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(descriptorvaluesizerequired.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn BluetoothGATTGetDescriptors(hdevice: P0, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, descriptorsbuffer: Option<&mut [BTH_LE_GATT_DESCRIPTOR]>, descriptorsbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> @@ -165,7 +165,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTGetIncludedServices(hdevice : super::super::Foundation:: HANDLE, parentservice : *const BTH_LE_GATT_SERVICE, includedservicesbuffercount : u16, includedservicesbuffer : *mut BTH_LE_GATT_SERVICE, includedservicesbufferactual : *mut u16, flags : u32) -> windows_core::HRESULT); - BluetoothGATTGetIncludedServices(hdevice.param().abi(), core::mem::transmute(parentservice.unwrap_or(std::ptr::null())), includedservicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(includedservicesbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), includedservicesbufferactual, flags).ok() + BluetoothGATTGetIncludedServices(hdevice.param().abi(), core::mem::transmute(parentservice.unwrap_or(core::ptr::null())), includedservicesbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(includedservicesbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), includedservicesbufferactual, flags).ok() } #[inline] pub unsafe fn BluetoothGATTGetServices(hdevice: P0, servicesbuffer: Option<&mut [BTH_LE_GATT_SERVICE]>, servicesbufferactual: *mut u16, flags: u32) -> windows_core::Result<()> @@ -181,7 +181,7 @@ where P0: windows_core::Param, { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothGATTRegisterEvent(hservice : super::super::Foundation:: HANDLE, eventtype : BTH_LE_GATT_EVENT_TYPE, eventparameterin : *const core::ffi::c_void, callback : PFNBLUETOOTH_GATT_EVENT_CALLBACK, callbackcontext : *const core::ffi::c_void, peventhandle : *mut isize, flags : u32) -> windows_core::HRESULT); - BluetoothGATTRegisterEvent(hservice.param().abi(), eventtype, eventparameterin, callback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), peventhandle, flags).ok() + BluetoothGATTRegisterEvent(hservice.param().abi(), eventtype, eventparameterin, callback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), peventhandle, flags).ok() } #[inline] pub unsafe fn BluetoothGATTSetCharacteristicValue(hdevice: P0, characteristic: *const BTH_LE_GATT_CHARACTERISTIC, characteristicvalue: *const BTH_LE_GATT_CHARACTERISTIC_VALUE, reliablewritecontext: u64, flags: u32) -> windows_core::Result<()> @@ -244,12 +244,12 @@ pub unsafe fn BluetoothIsVersionAvailable(majorversion: u8, minorversion: u8) -> #[inline] pub unsafe fn BluetoothRegisterForAuthentication(pbtdi: Option<*const BLUETOOTH_DEVICE_INFO>, phreghandle: *mut isize, pfncallback: PFN_AUTHENTICATION_CALLBACK, pvparam: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothRegisterForAuthentication(pbtdi : *const BLUETOOTH_DEVICE_INFO, phreghandle : *mut isize, pfncallback : PFN_AUTHENTICATION_CALLBACK, pvparam : *const core::ffi::c_void) -> u32); - BluetoothRegisterForAuthentication(core::mem::transmute(pbtdi.unwrap_or(std::ptr::null())), phreghandle, pfncallback, core::mem::transmute(pvparam.unwrap_or(std::ptr::null()))) + BluetoothRegisterForAuthentication(core::mem::transmute(pbtdi.unwrap_or(core::ptr::null())), phreghandle, pfncallback, core::mem::transmute(pvparam.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BluetoothRegisterForAuthenticationEx(pbtdiin: Option<*const BLUETOOTH_DEVICE_INFO>, phreghandleout: *mut isize, pfncallbackin: PFN_AUTHENTICATION_CALLBACK_EX, pvparam: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothRegisterForAuthenticationEx(pbtdiin : *const BLUETOOTH_DEVICE_INFO, phreghandleout : *mut isize, pfncallbackin : PFN_AUTHENTICATION_CALLBACK_EX, pvparam : *const core::ffi::c_void) -> u32); - BluetoothRegisterForAuthenticationEx(core::mem::transmute(pbtdiin.unwrap_or(std::ptr::null())), phreghandleout, pfncallbackin, core::mem::transmute(pvparam.unwrap_or(std::ptr::null()))) + BluetoothRegisterForAuthenticationEx(core::mem::transmute(pbtdiin.unwrap_or(core::ptr::null())), phreghandleout, pfncallbackin, core::mem::transmute(pvparam.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BluetoothRemoveDevice(paddress: *const BLUETOOTH_ADDRESS) -> u32 { @@ -279,7 +279,7 @@ pub unsafe fn BluetoothSdpGetElementData(psdpstream: &[u8], pdata: *mut SDP_ELEM #[inline] pub unsafe fn BluetoothSdpGetString(precordstream: &[u8], pstringdata: Option<*const SDP_STRING_TYPE_DATA>, usstringoffset: u16, pszstring: windows_core::PWSTR, pcchstringlength: *mut u32) -> u32 { windows_targets::link!("bluetoothapis.dll" "system" fn BluetoothSdpGetString(precordstream : *const u8, cbrecordlength : u32, pstringdata : *const SDP_STRING_TYPE_DATA, usstringoffset : u16, pszstring : windows_core::PWSTR, pcchstringlength : *mut u32) -> u32); - BluetoothSdpGetString(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), core::mem::transmute(pstringdata.unwrap_or(std::ptr::null())), usstringoffset, core::mem::transmute(pszstring), pcchstringlength) + BluetoothSdpGetString(core::mem::transmute(precordstream.as_ptr()), precordstream.len().try_into().unwrap(), core::mem::transmute(pstringdata.unwrap_or(core::ptr::null())), usstringoffset, core::mem::transmute(pszstring), pcchstringlength) } #[inline] pub unsafe fn BluetoothSelectDevices(pbtsdp: *mut BLUETOOTH_SELECT_DEVICE_PARAMS) -> windows_core::Result<()> { 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 5d504cda0a..a00ef26bd9 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Communication/mod.rs @@ -44,7 +44,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lperrors.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpstat.unwrap_or(std::ptr::null_mut()))).ok() + ClearCommError(hfile.param().abi(), core::mem::transmute(lperrors.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpstat.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CommConfigDialogA(lpszname: P0, hwnd: P1, lpcc: *mut COMMCONFIG) -> windows_core::Result<()> @@ -78,7 +78,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcc.unwrap_or(std::ptr::null_mut())), lpdwsize).ok() + GetCommConfig(hcommdev.param().abi(), core::mem::transmute(lpcc.unwrap_or(core::ptr::null_mut())), lpdwsize).ok() } #[inline] pub unsafe fn GetCommMask(hfile: P0, lpevtmask: *mut COMM_EVENT_MASK) -> windows_core::Result<()> @@ -233,7 +233,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpevtmask, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut()))).ok() + WaitCommEvent(hfile.param().abi(), lpevtmask, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } pub const CE_BREAK: CLEAR_COMM_ERROR_FLAGS = CLEAR_COMM_ERROR_FLAGS(16u32); pub const CE_FRAME: CLEAR_COMM_ERROR_FLAGS = CLEAR_COMM_ERROR_FLAGS(8u32); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs index dd4765cdf5..6d41c43687 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAccess/mod.rs @@ -65,7 +65,7 @@ impl IDeviceIoControl { core::mem::transmute(outputbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), outputbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), requestcompletioncallback.param().abi(), - core::mem::transmute(cancelcontext.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(cancelcontext.unwrap_or(core::ptr::null_mut())), ) .ok() } 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 fe9da2e114..e7ce957080 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceAndDriverInstallation/mod.rs @@ -55,12 +55,12 @@ pub unsafe fn CM_Add_Range(ullstartvalue: u64, ullendvalue: u64, rlh: usize, ulf #[inline] pub unsafe fn CM_Add_Res_Des(prdresdes: Option<*mut usize>, lclogconf: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_Res_Des(prdresdes : *mut usize, lclogconf : usize, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, ulflags : u32) -> CONFIGRET); - CM_Add_Res_Des(core::mem::transmute(prdresdes.unwrap_or(std::ptr::null_mut())), lclogconf, resourceid, resourcedata, resourcelen, ulflags) + CM_Add_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::ptr::null_mut())), lclogconf, resourceid, resourcedata, resourcelen, ulflags) } #[inline] pub unsafe fn CM_Add_Res_Des_Ex(prdresdes: Option<*mut usize>, lclogconf: usize, resourceid: u32, resourcedata: *const core::ffi::c_void, resourcelen: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Add_Res_Des_Ex(prdresdes : *mut usize, lclogconf : usize, resourceid : u32, resourcedata : *const core::ffi::c_void, resourcelen : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Add_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(std::ptr::null_mut())), lclogconf, resourceid, resourcedata, resourcelen, ulflags, hmachine) + CM_Add_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::ptr::null_mut())), lclogconf, resourceid, resourcedata, resourcelen, ulflags, hmachine) } #[inline] pub unsafe fn CM_Connect_MachineA(uncservername: P0, phmachine: *mut isize) -> CONFIGRET @@ -275,12 +275,12 @@ pub unsafe fn CM_Free_Range_List(rlh: usize, ulflags: u32) -> CONFIGRET { #[inline] pub unsafe fn CM_Free_Res_Des(prdresdes: Option<*mut usize>, rdresdes: usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Free_Res_Des(prdresdes : *mut usize, rdresdes : usize, ulflags : u32) -> CONFIGRET); - CM_Free_Res_Des(core::mem::transmute(prdresdes.unwrap_or(std::ptr::null_mut())), rdresdes, ulflags) + CM_Free_Res_Des(core::mem::transmute(prdresdes.unwrap_or(core::ptr::null_mut())), rdresdes, ulflags) } #[inline] pub unsafe fn CM_Free_Res_Des_Ex(prdresdes: Option<*mut usize>, rdresdes: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Free_Res_Des_Ex(prdresdes : *mut usize, rdresdes : usize, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Free_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(std::ptr::null_mut())), rdresdes, ulflags, hmachine) + CM_Free_Res_Des_Ex(core::mem::transmute(prdresdes.unwrap_or(core::ptr::null_mut())), rdresdes, ulflags, hmachine) } #[inline] pub unsafe fn CM_Free_Res_Des_Handle(rdresdes: usize) -> CONFIGRET { @@ -346,35 +346,35 @@ pub unsafe fn CM_Get_Class_Name_ExW(classguid: *const windows_core::GUID, buffer #[inline] pub unsafe fn CM_Get_Class_PropertyW(classguid: *const windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_PropertyW(classguid : *const windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_PropertyW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags) + CM_Get_Class_PropertyW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_Class_Property_ExW(classguid: *const windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Property_ExW(classguid : *const windows_core::GUID, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Property_ExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags, hmachine) + CM_Get_Class_Property_ExW(classguid, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags, hmachine) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_Class_Property_Keys(classguid: *const windows_core::GUID, propertykeyarray: Option<*mut super::Properties::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Property_Keys(classguid : *const windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Class_Property_Keys(classguid, core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags) + CM_Get_Class_Property_Keys(classguid, core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_Class_Property_Keys_Ex(classguid: *const windows_core::GUID, propertykeyarray: Option<*mut super::Properties::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Property_Keys_Ex(classguid : *const windows_core::GUID, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Property_Keys_Ex(classguid, core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags, hmachine) + CM_Get_Class_Property_Keys_Ex(classguid, core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Class_Registry_PropertyA(classguid: *const windows_core::GUID, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Registry_PropertyA(classguid : *const windows_core::GUID, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Class_Registry_PropertyW(classguid: *const windows_core::GUID, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Class_Registry_PropertyW(classguid : *const windows_core::GUID, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Depth(puldepth: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -392,7 +392,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Custom_PropertyA(dndevinst : u32, pszcustompropertyname : windows_core::PCSTR, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Custom_PropertyA(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags) + CM_Get_DevNode_Custom_PropertyA(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags) } #[inline] pub unsafe fn CM_Get_DevNode_Custom_PropertyW(dndevinst: u32, pszcustompropertyname: P0, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32) -> CONFIGRET @@ -400,7 +400,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Custom_PropertyW(dndevinst : u32, pszcustompropertyname : windows_core::PCWSTR, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Custom_PropertyW(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags) + CM_Get_DevNode_Custom_PropertyW(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags) } #[inline] pub unsafe fn CM_Get_DevNode_Custom_Property_ExA(dndevinst: u32, pszcustompropertyname: P0, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET @@ -408,7 +408,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Custom_Property_ExA(dndevinst : u32, pszcustompropertyname : windows_core::PCSTR, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Custom_Property_ExA(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_DevNode_Custom_Property_ExA(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_DevNode_Custom_Property_ExW(dndevinst: u32, pszcustompropertyname: P0, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET @@ -416,51 +416,51 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Custom_Property_ExW(dndevinst : u32, pszcustompropertyname : windows_core::PCWSTR, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Custom_Property_ExW(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_DevNode_Custom_Property_ExW(dndevinst, pszcustompropertyname.param().abi(), core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_DevNode_PropertyW(dndevinst: u32, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_PropertyW(dndevinst : u32, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_PropertyW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags) + CM_Get_DevNode_PropertyW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_DevNode_Property_ExW(dndevinst: u32, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<*mut u8>, propertybuffersize: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_ExW(dndevinst : u32, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Property_ExW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags, hmachine) + CM_Get_DevNode_Property_ExW(dndevinst, propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags, hmachine) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_DevNode_Property_Keys(dndevinst: u32, propertykeyarray: Option<*mut super::Properties::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_Keys(dndevinst : u32, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Property_Keys(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags) + CM_Get_DevNode_Property_Keys(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn CM_Get_DevNode_Property_Keys_Ex(dndevinst: u32, propertykeyarray: Option<*mut super::Properties::DEVPROPKEY>, propertykeycount: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Property_Keys_Ex(dndevinst : u32, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Property_Keys_Ex(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags, hmachine) + CM_Get_DevNode_Property_Keys_Ex(dndevinst, core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_DevNode_Registry_PropertyA(dndevinst: u32, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Registry_PropertyA(dndevinst : u32, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags) + CM_Get_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags) } #[inline] pub unsafe fn CM_Get_DevNode_Registry_PropertyW(dndevinst: u32, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Registry_PropertyW(dndevinst : u32, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags) + CM_Get_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags) } #[inline] pub unsafe fn CM_Get_DevNode_Registry_Property_ExA(dndevinst: u32, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Registry_Property_ExA(dndevinst : u32, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_DevNode_Registry_Property_ExW(dndevinst: u32, ulproperty: u32, pulregdatatype: Option<*mut u32>, buffer: Option<*mut core::ffi::c_void>, pullength: *mut u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_DevNode_Registry_Property_ExW(dndevinst : u32, ulproperty : u32, pulregdatatype : *mut u32, buffer : *mut core::ffi::c_void, pullength : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), pullength, ulflags, hmachine) + CM_Get_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(pulregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), pullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_DevNode_Status(pulstatus: *mut CM_DEVNODE_STATUS_FLAGS, pulproblemnumber: *mut CM_PROB, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -669,7 +669,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_PropertyW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags) + CM_Get_Device_Interface_PropertyW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -678,7 +678,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Property_ExW(pszdeviceinterface : windows_core::PCWSTR, propertykey : *const super::Properties:: DEVPROPKEY, propertytype : *mut super::Properties:: DEVPROPTYPE, propertybuffer : *mut u8, propertybuffersize : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(std::ptr::null_mut())), propertybuffersize, ulflags, hmachine) + CM_Get_Device_Interface_Property_ExW(pszdeviceinterface.param().abi(), propertykey, propertytype, core::mem::transmute(propertybuffer.unwrap_or(core::ptr::null_mut())), propertybuffersize, ulflags, hmachine) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -687,7 +687,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface : windows_core::PCWSTR, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32) -> CONFIGRET); - CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags) + CM_Get_Device_Interface_Property_KeysW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -696,17 +696,17 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface : windows_core::PCWSTR, propertykeyarray : *mut super::Properties:: DEVPROPKEY, propertykeycount : *mut u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(std::ptr::null_mut())), propertykeycount, ulflags, hmachine) + CM_Get_Device_Interface_Property_Keys_ExW(pszdeviceinterface.param().abi(), core::mem::transmute(propertykeyarray.unwrap_or(core::ptr::null_mut())), propertykeycount, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_First_Log_Conf(plclogconf: Option<*mut usize>, dndevinst: u32, ulflags: CM_LOG_CONF) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_First_Log_Conf(plclogconf : *mut usize, dndevinst : u32, ulflags : CM_LOG_CONF) -> CONFIGRET); - CM_Get_First_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(std::ptr::null_mut())), dndevinst, ulflags) + CM_Get_First_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::ptr::null_mut())), dndevinst, ulflags) } #[inline] pub unsafe fn CM_Get_First_Log_Conf_Ex(plclogconf: Option<*mut usize>, dndevinst: u32, ulflags: CM_LOG_CONF, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_First_Log_Conf_Ex(plclogconf : *mut usize, dndevinst : u32, ulflags : CM_LOG_CONF, hmachine : isize) -> CONFIGRET); - CM_Get_First_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(std::ptr::null_mut())), dndevinst, ulflags, hmachine) + CM_Get_First_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::ptr::null_mut())), dndevinst, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Global_State(pulstate: *mut u32, ulflags: u32) -> CONFIGRET { @@ -783,22 +783,22 @@ pub unsafe fn CM_Get_Log_Conf_Priority_Ex(lclogconf: usize, ppriority: *mut u32, #[inline] pub unsafe fn CM_Get_Next_Log_Conf(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Next_Log_Conf(plclogconf : *mut usize, lclogconf : usize, ulflags : u32) -> CONFIGRET); - CM_Get_Next_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(std::ptr::null_mut())), lclogconf, ulflags) + CM_Get_Next_Log_Conf(core::mem::transmute(plclogconf.unwrap_or(core::ptr::null_mut())), lclogconf, ulflags) } #[inline] pub unsafe fn CM_Get_Next_Log_Conf_Ex(plclogconf: Option<*mut usize>, lclogconf: usize, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Next_Log_Conf_Ex(plclogconf : *mut usize, lclogconf : usize, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Next_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(std::ptr::null_mut())), lclogconf, ulflags, hmachine) + CM_Get_Next_Log_Conf_Ex(core::mem::transmute(plclogconf.unwrap_or(core::ptr::null_mut())), lclogconf, ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Next_Res_Des(prdresdes: *mut usize, rdresdes: usize, forresource: CM_RESTYPE, presourceid: Option<*mut CM_RESTYPE>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Next_Res_Des(prdresdes : *mut usize, rdresdes : usize, forresource : CM_RESTYPE, presourceid : *mut CM_RESTYPE, ulflags : u32) -> CONFIGRET); - CM_Get_Next_Res_Des(prdresdes, rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(std::ptr::null_mut())), ulflags) + CM_Get_Next_Res_Des(prdresdes, rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(core::ptr::null_mut())), ulflags) } #[inline] pub unsafe fn CM_Get_Next_Res_Des_Ex(prdresdes: *mut usize, rdresdes: usize, forresource: CM_RESTYPE, presourceid: Option<*mut CM_RESTYPE>, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Get_Next_Res_Des_Ex(prdresdes : *mut usize, rdresdes : usize, forresource : CM_RESTYPE, presourceid : *mut CM_RESTYPE, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Get_Next_Res_Des_Ex(prdresdes, rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(std::ptr::null_mut())), ulflags, hmachine) + CM_Get_Next_Res_Des_Ex(prdresdes, rdresdes, forresource, core::mem::transmute(presourceid.unwrap_or(core::ptr::null_mut())), ulflags, hmachine) } #[inline] pub unsafe fn CM_Get_Parent(pdndevinst: *mut u32, dndevinst: u32, ulflags: u32) -> CONFIGRET { @@ -969,7 +969,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Class_KeyA(classguid : *const windows_core::GUID, pszclassname : windows_core::PCSTR, samdesired : u32, disposition : u32, phkclass : *mut super::super::System::Registry:: HKEY, ulflags : u32) -> CONFIGRET); - CM_Open_Class_KeyA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags) + CM_Open_Class_KeyA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -978,7 +978,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Class_KeyW(classguid : *const windows_core::GUID, pszclassname : windows_core::PCWSTR, samdesired : u32, disposition : u32, phkclass : *mut super::super::System::Registry:: HKEY, ulflags : u32) -> CONFIGRET); - CM_Open_Class_KeyW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags) + CM_Open_Class_KeyW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -987,7 +987,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Class_Key_ExA(classguid : *const windows_core::GUID, pszclassname : windows_core::PCSTR, samdesired : u32, disposition : u32, phkclass : *mut super::super::System::Registry:: HKEY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Open_Class_Key_ExA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags, hmachine) + CM_Open_Class_Key_ExA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags, hmachine) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -996,7 +996,7 @@ where P0: windows_core::Param, { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Open_Class_Key_ExW(classguid : *const windows_core::GUID, pszclassname : windows_core::PCWSTR, samdesired : u32, disposition : u32, phkclass : *mut super::super::System::Registry:: HKEY, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Open_Class_Key_ExW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags, hmachine) + CM_Open_Class_Key_ExW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), pszclassname.param().abi(), samdesired, disposition, phkclass, ulflags, hmachine) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1049,22 +1049,22 @@ where #[inline] pub unsafe fn CM_Query_And_Remove_SubTreeA(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTreeA(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Query_And_Remove_SubTreeA(dnancestor, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) + CM_Query_And_Remove_SubTreeA(dnancestor, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTreeW(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTreeW(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Query_And_Remove_SubTreeW(dnancestor, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) + CM_Query_And_Remove_SubTreeW(dnancestor, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTree_ExA(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTree_ExA(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_And_Remove_SubTree_ExA(dnancestor, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) + CM_Query_And_Remove_SubTree_ExA(dnancestor, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Query_And_Remove_SubTree_ExW(dnancestor: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Query_And_Remove_SubTree_ExW(dnancestor : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Query_And_Remove_SubTree_ExW(dnancestor, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) + CM_Query_And_Remove_SubTree_ExW(dnancestor, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Query_Arbitrator_Free_Data(pdata: *mut core::ffi::c_void, datalen: u32, dndevinst: u32, resourceid: u32, ulflags: u32) -> CONFIGRET { @@ -1156,7 +1156,7 @@ where #[inline] pub unsafe fn CM_Register_Notification(pfilter: *const CM_NOTIFY_FILTER, pcontext: Option<*const core::ffi::c_void>, pcallback: PCM_NOTIFY_CALLBACK, pnotifycontext: *mut HCMNOTIFICATION) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Register_Notification(pfilter : *const CM_NOTIFY_FILTER, pcontext : *const core::ffi::c_void, pcallback : PCM_NOTIFY_CALLBACK, pnotifycontext : *mut HCMNOTIFICATION) -> CONFIGRET); - CM_Register_Notification(pfilter, core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), pcallback, pnotifycontext) + CM_Register_Notification(pfilter, core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), pcallback, pnotifycontext) } #[inline] pub unsafe fn CM_Remove_SubTree(dnancestor: u32, ulflags: u32) -> CONFIGRET { @@ -1171,22 +1171,22 @@ pub unsafe fn CM_Remove_SubTree_Ex(dnancestor: u32, ulflags: u32, hmachine: isiz #[inline] pub unsafe fn CM_Request_Device_EjectA(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_EjectA(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Request_Device_EjectA(dndevinst, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) + CM_Request_Device_EjectA(dndevinst, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Request_Device_EjectW(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_EjectW(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32) -> CONFIGRET); - CM_Request_Device_EjectW(dndevinst, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) + CM_Request_Device_EjectW(dndevinst, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags) } #[inline] pub unsafe fn CM_Request_Device_Eject_ExA(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u8]>, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_Eject_ExA(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Request_Device_Eject_ExA(dndevinst, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) + CM_Request_Device_Eject_ExA(dndevinst, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Request_Device_Eject_ExW(dndevinst: u32, pvetotype: Option<*mut PNP_VETO_TYPE>, pszvetoname: Option<&mut [u16]>, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Request_Device_Eject_ExW(dndevinst : u32, pvetotype : *mut PNP_VETO_TYPE, pszvetoname : windows_core::PWSTR, ulnamelength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Request_Device_Eject_ExW(dndevinst, core::mem::transmute(pvetotype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) + CM_Request_Device_Eject_ExW(dndevinst, core::mem::transmute(pvetotype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszvetoname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszvetoname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ulflags, hmachine) } #[inline] pub unsafe fn CM_Request_Eject_PC() -> CONFIGRET { @@ -1223,12 +1223,12 @@ pub unsafe fn CM_Set_Class_Property_ExW(classguid: *const windows_core::GUID, pr #[inline] pub unsafe fn CM_Set_Class_Registry_PropertyA(classguid: *const windows_core::GUID, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Class_Registry_PropertyA(classguid : *const windows_core::GUID, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags, hmachine) + CM_Set_Class_Registry_PropertyA(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Set_Class_Registry_PropertyW(classguid: *const windows_core::GUID, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_Class_Registry_PropertyW(classguid : *const windows_core::GUID, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags, hmachine) + CM_Set_Class_Registry_PropertyW(classguid, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Set_DevNode_Problem(dndevinst: u32, ulproblem: u32, ulflags: u32) -> CONFIGRET { @@ -1255,22 +1255,22 @@ pub unsafe fn CM_Set_DevNode_Property_ExW(dndevinst: u32, propertykey: *const su #[inline] pub unsafe fn CM_Set_DevNode_Registry_PropertyA(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Registry_PropertyA(dndevinst : u32, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32) -> CONFIGRET); - CM_Set_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags) + CM_Set_DevNode_Registry_PropertyA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags) } #[inline] pub unsafe fn CM_Set_DevNode_Registry_PropertyW(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Registry_PropertyW(dndevinst : u32, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32) -> CONFIGRET); - CM_Set_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags) + CM_Set_DevNode_Registry_PropertyW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags) } #[inline] pub unsafe fn CM_Set_DevNode_Registry_Property_ExA(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Registry_Property_ExA(dndevinst : u32, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags, hmachine) + CM_Set_DevNode_Registry_Property_ExA(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags, hmachine) } #[inline] pub unsafe fn CM_Set_DevNode_Registry_Property_ExW(dndevinst: u32, ulproperty: u32, buffer: Option<*const core::ffi::c_void>, ullength: u32, ulflags: u32, hmachine: isize) -> CONFIGRET { windows_targets::link!("cfgmgr32.dll" "system" fn CM_Set_DevNode_Registry_Property_ExW(dndevinst : u32, ulproperty : u32, buffer : *const core::ffi::c_void, ullength : u32, ulflags : u32, hmachine : isize) -> CONFIGRET); - CM_Set_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(std::ptr::null())), ullength, ulflags, hmachine) + CM_Set_DevNode_Registry_Property_ExW(dndevinst, ulproperty, core::mem::transmute(buffer.unwrap_or(core::ptr::null())), ullength, ulflags, hmachine) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -1404,7 +1404,7 @@ where P1: windows_core::Param, { 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 : DIINSTALLDEVICE_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDevice(hwndparent.param().abi(), deviceinfoset.param().abi(), deviceinfodata, core::mem::transmute(driverinfodata.unwrap_or(std::ptr::null())), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiInstallDevice(hwndparent.param().abi(), deviceinfoset.param().abi(), deviceinfodata, core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null())), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiInstallDriverA(hwndparent: P0, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1413,7 +1413,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiInstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCSTR, flags : DIINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDriverA(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiInstallDriverA(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiInstallDriverW(hwndparent: P0, infpath: P1, flags: DIINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1422,7 +1422,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiInstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCWSTR, flags : DIINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiInstallDriverW(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiInstallDriverW(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiRollbackDriver(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, hwndparent: P1, flags: DIROLLBACKDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1431,7 +1431,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiRollbackDriver(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, hwndparent : super::super::Foundation:: HWND, flags : DIROLLBACKDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiRollbackDriver(deviceinfoset.param().abi(), deviceinfodata, hwndparent.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiRollbackDriver(deviceinfoset.param().abi(), deviceinfodata, hwndparent.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiShowUpdateDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1440,7 +1440,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfoset.param().abi(), deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiShowUpdateDevice(hwndparent.param().abi(), deviceinfoset.param().abi(), deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiShowUpdateDriver(hwndparent: P0, filepath: P1, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> super::super::Foundation::BOOL @@ -1449,7 +1449,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiShowUpdateDriver(hwndparent : super::super::Foundation:: HWND, filepath : windows_core::PCWSTR, flags : u32, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiShowUpdateDriver(hwndparent.param().abi(), filepath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))) + DiShowUpdateDriver(hwndparent.param().abi(), filepath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DiUninstallDevice(hwndparent: P0, deviceinfoset: P1, deviceinfodata: *const SP_DEVINFO_DATA, flags: u32, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1458,7 +1458,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfoset.param().abi(), deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiUninstallDevice(hwndparent.param().abi(), deviceinfoset.param().abi(), deviceinfodata, flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiUninstallDriverA(hwndparent: P0, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1467,7 +1467,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverA(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCSTR, flags : DIUNINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiUninstallDriverA(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiUninstallDriverA(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiUninstallDriverW(hwndparent: P0, infpath: P1, flags: DIUNINSTALLDRIVER_FLAGS, needreboot: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -1476,7 +1476,7 @@ where P1: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn DiUninstallDriverW(hwndparent : super::super::Foundation:: HWND, infpath : windows_core::PCWSTR, flags : DIUNINSTALLDRIVER_FLAGS, needreboot : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - DiUninstallDriverW(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(std::ptr::null_mut()))).ok() + DiUninstallDriverW(hwndparent.param().abi(), infpath.param().abi(), flags, core::mem::transmute(needreboot.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn InstallHinfSectionA(window: P0, modulehandle: P1, commandline: P2, showcommand: i32) @@ -1504,7 +1504,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddInstallSectionToDiskSpaceListA(diskspace, infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddInstallSectionToDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1512,7 +1512,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddInstallSectionToDiskSpaceListW(diskspace, infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddSectionToDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1520,7 +1520,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddSectionToDiskSpaceListA(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddSectionToDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1528,7 +1528,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddSectionToDiskSpaceListW(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddToDiskSpaceListA(diskspace: *const core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1536,7 +1536,7 @@ where P0: windows_core::Param, { 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.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddToDiskSpaceListA(diskspace, targetfilespec.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddToDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P0, filesize: i64, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1544,7 +1544,7 @@ where P0: windows_core::Param, { 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.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAddToDiskSpaceListW(diskspace, targetfilespec.param().abi(), filesize, operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAddToSourceListA(flags: u32, source: P0) -> windows_core::Result<()> @@ -1568,7 +1568,7 @@ where P0: windows_core::Param, { 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.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAdjustDiskSpaceListA(diskspace, driveroot.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupAdjustDiskSpaceListW(diskspace: *const core::ffi::c_void, driveroot: P0, amount: i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -1576,7 +1576,7 @@ where P0: windows_core::Param, { 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.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupAdjustDiskSpaceListW(diskspace, driveroot.param().abi(), amount, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupBackupErrorA(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 @@ -1663,7 +1663,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyErrorA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, diskname : windows_core::PCSTR, pathtosource : windows_core::PCSTR, sourcefile : windows_core::PCSTR, targetpathfile : windows_core::PCSTR, win32errorcode : u32, style : u32, pathbuffer : windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupCopyErrorA(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(std::ptr::null_mut()))) + SetupCopyErrorA(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupCopyErrorW(hwndparent: P0, dialogtitle: P1, diskname: P2, pathtosource: P3, sourcefile: P4, targetpathfile: P5, win32errorcode: u32, style: u32, pathbuffer: Option<&mut [u16]>, pathrequiredsize: Option<*mut u32>) -> u32 @@ -1676,7 +1676,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyErrorW(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCWSTR, diskname : windows_core::PCWSTR, pathtosource : windows_core::PCWSTR, sourcefile : windows_core::PCWSTR, targetpathfile : windows_core::PCWSTR, win32errorcode : u32, style : u32, pathbuffer : windows_core::PWSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupCopyErrorW(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(std::ptr::null_mut()))) + SetupCopyErrorW(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), sourcefile.param().abi(), targetpathfile.param().abi(), win32errorcode, style, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupCopyOEMInfA(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: SP_COPY_STYLE, destinationinffilename: Option<&mut [u8]>, requiredsize: Option<*mut u32>, destinationinffilenamecomponent: Option<*mut windows_core::PSTR>) -> windows_core::Result<()> @@ -1685,7 +1685,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfA(sourceinffilename : windows_core::PCSTR, oemsourcemedialocation : windows_core::PCSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : windows_core::PSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut windows_core::PSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfA(sourceinffilename.param().abi(), oemsourcemedialocation.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(std::ptr::null_mut()))).ok() + SetupCopyOEMInfA(sourceinffilename.param().abi(), oemsourcemedialocation.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupCopyOEMInfW(sourceinffilename: P0, oemsourcemedialocation: P1, oemsourcemediatype: OEM_SOURCE_MEDIA_TYPE, copystyle: SP_COPY_STYLE, destinationinffilename: Option<&mut [u16]>, requiredsize: Option<*mut u32>, destinationinffilenamecomponent: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -1694,17 +1694,17 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupCopyOEMInfW(sourceinffilename : windows_core::PCWSTR, oemsourcemedialocation : windows_core::PCWSTR, oemsourcemediatype : OEM_SOURCE_MEDIA_TYPE, copystyle : SP_COPY_STYLE, destinationinffilename : windows_core::PWSTR, destinationinffilenamesize : u32, requiredsize : *mut u32, destinationinffilenamecomponent : *mut windows_core::PWSTR) -> super::super::Foundation:: BOOL); - SetupCopyOEMInfW(sourceinffilename.param().abi(), oemsourcemedialocation.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(std::ptr::null_mut()))).ok() + SetupCopyOEMInfW(sourceinffilename.param().abi(), oemsourcemedialocation.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(destinationinffilenamecomponent.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupCreateDiskSpaceListA(reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("setupapi.dll" "system" fn SetupCreateDiskSpaceListA(reserved1 : *const core::ffi::c_void, reserved2 : u32, flags : u32) -> *mut core::ffi::c_void); - SetupCreateDiskSpaceListA(core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2, flags) + SetupCreateDiskSpaceListA(core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, flags) } #[inline] pub unsafe fn SetupCreateDiskSpaceListW(reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("setupapi.dll" "system" fn SetupCreateDiskSpaceListW(reserved1 : *const core::ffi::c_void, reserved2 : u32, flags : u32) -> *mut core::ffi::c_void); - SetupCreateDiskSpaceListW(core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2, flags) + SetupCreateDiskSpaceListW(core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, flags) } #[inline] pub unsafe fn SetupDecompressOrCopyFileA(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1713,7 +1713,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDecompressOrCopyFileA(sourcefilename : windows_core::PCSTR, targetfilename : windows_core::PCSTR, compressiontype : *const FILE_COMPRESSION_TYPE) -> u32); - SetupDecompressOrCopyFileA(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(std::ptr::null()))) + SetupDecompressOrCopyFileA(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetupDecompressOrCopyFileW(sourcefilename: P0, targetfilename: P1, compressiontype: Option<*const FILE_COMPRESSION_TYPE>) -> u32 @@ -1722,7 +1722,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDecompressOrCopyFileW(sourcefilename : windows_core::PCWSTR, targetfilename : windows_core::PCWSTR, compressiontype : *const FILE_COMPRESSION_TYPE) -> u32); - SetupDecompressOrCopyFileW(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(std::ptr::null()))) + SetupDecompressOrCopyFileW(sourcefilename.param().abi(), targetfilename.param().abi(), core::mem::transmute(compressiontype.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetupDefaultQueueCallbackA(context: *const core::ffi::c_void, notification: u32, param1: usize, param2: usize) -> u32 { @@ -1765,7 +1765,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiAskForOEMDisk(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiAskForOEMDisk(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null()))).ok() + SetupDiAskForOEMDisk(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiBuildClassInfoList(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32) -> windows_core::Result<()> { @@ -1778,7 +1778,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiBuildClassInfoListExW(flags: u32, classguidlist: Option<&mut [windows_core::GUID]>, requiredsize: *mut u32, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1786,7 +1786,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiBuildDriverInfoList(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE) -> windows_core::Result<()> @@ -1794,7 +1794,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiBuildDriverInfoList(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA, drivertype : SETUP_DI_DRIVER_TYPE) -> super::super::Foundation:: BOOL); - SetupDiBuildDriverInfoList(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut())), drivertype).ok() + SetupDiBuildDriverInfoList(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut())), drivertype).ok() } #[inline] pub unsafe fn SetupDiCallClassInstaller(installfunction: DI_FUNCTION, deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -1802,7 +1802,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCallClassInstaller(installfunction : DI_FUNCTION, deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCallClassInstaller(installfunction, deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null()))).ok() + SetupDiCallClassInstaller(installfunction, deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiCancelDriverInfoSearch(deviceinfoset: P0) -> windows_core::Result<()> @@ -1835,7 +1835,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiClassGuidsFromNameExA(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiClassGuidsFromNameExW(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32, machinename: P1, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1844,7 +1844,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiClassGuidsFromNameExW(classname.param().abi(), core::mem::transmute(classguidlist.as_ptr()), classguidlist.len().try_into().unwrap(), requiredsize, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiClassGuidsFromNameW(classname: P0, classguidlist: &mut [windows_core::GUID], requiredsize: *mut u32) -> windows_core::Result<()> @@ -1857,7 +1857,7 @@ where #[inline] pub unsafe fn SetupDiClassNameFromGuidA(classguid: *const windows_core::GUID, classname: &mut [u8], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidA(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiClassNameFromGuidExA(classguid: *const windows_core::GUID, classname: &mut [u8], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1865,7 +1865,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiClassNameFromGuidExA(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiClassNameFromGuidExW(classguid: *const windows_core::GUID, classname: &mut [u16], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1873,12 +1873,12 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiClassNameFromGuidExW(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiClassNameFromGuidW(classguid: *const windows_core::GUID, classname: &mut [u16], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiClassNameFromGuidW(classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1888,7 +1888,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDevRegKeyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, scope : u32, hwprofile : u32, keytype : u32, infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCSTR) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiCreateDevRegKeyA(deviceinfoset.param().abi(), deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(std::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDevRegKeyA(deviceinfoset.param().abi(), deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -1899,7 +1899,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDevRegKeyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, scope : u32, hwprofile : u32, keytype : u32, infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCWSTR) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiCreateDevRegKeyW(deviceinfoset.param().abi(), deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(std::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDevRegKeyW(deviceinfoset.param().abi(), deviceinfodata, scope, hwprofile, keytype, core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1911,7 +1911,7 @@ where P3: windows_core::Param, { 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 : SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInfoA(deviceinfoset.param().abi(), devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.param().abi(), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiCreateDeviceInfoA(deviceinfoset.param().abi(), devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.param().abi(), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiCreateDeviceInfoList(classguid: Option<*const windows_core::GUID>, hwndparent: P0) -> windows_core::Result @@ -1919,7 +1919,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoList(classguid : *const windows_core::GUID, hwndparent : super::super::Foundation:: HWND) -> HDEVINFO); - let result__ = SetupDiCreateDeviceInfoList(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), hwndparent.param().abi()); + let result__ = SetupDiCreateDeviceInfoList(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), hwndparent.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1929,7 +1929,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoListExA(classguid : *const windows_core::GUID, hwndparent : super::super::Foundation:: HWND, machinename : windows_core::PCSTR, reserved : *const core::ffi::c_void) -> HDEVINFO); - let result__ = SetupDiCreateDeviceInfoListExA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiCreateDeviceInfoListExA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1939,7 +1939,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInfoListExW(classguid : *const windows_core::GUID, hwndparent : super::super::Foundation:: HWND, machinename : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> HDEVINFO); - let result__ = SetupDiCreateDeviceInfoListExW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiCreateDeviceInfoListExW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), hwndparent.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1951,7 +1951,7 @@ where P3: windows_core::Param, { 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 : SETUP_DI_DEVICE_CREATION_FLAGS, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiCreateDeviceInfoW(deviceinfoset.param().abi(), devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.param().abi(), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiCreateDeviceInfoW(deviceinfoset.param().abi(), devicename.param().abi(), classguid, devicedescription.param().abi(), hwndparent.param().abi(), creationflags, core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiCreateDeviceInterfaceA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, interfaceclassguid: *const windows_core::GUID, referencestring: P1, creationflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> @@ -1960,7 +1960,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiCreateDeviceInterfaceA(deviceinfoset.param().abi(), deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1970,7 +1970,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, reserved : u32, samdesired : u32, infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCSTR) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset.param().abi(), deviceinterfacedata, reserved, samdesired, core::mem::transmute(infhandle.unwrap_or(std::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDeviceInterfaceRegKeyA(deviceinfoset.param().abi(), deviceinterfacedata, reserved, samdesired, core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -1981,7 +1981,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset : HDEVINFO, deviceinterfacedata : *const SP_DEVICE_INTERFACE_DATA, reserved : u32, samdesired : u32, infhandle : *const core::ffi::c_void, infsectionname : windows_core::PCWSTR) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset.param().abi(), deviceinterfacedata, reserved, samdesired, core::mem::transmute(infhandle.unwrap_or(std::ptr::null())), infsectionname.param().abi()); + let result__ = SetupDiCreateDeviceInterfaceRegKeyW(deviceinfoset.param().abi(), deviceinterfacedata, reserved, samdesired, core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), infsectionname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1991,7 +1991,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiCreateDeviceInterfaceW(deviceinfoset.param().abi(), deviceinfodata, interfaceclassguid, referencestring.param().abi(), creationflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiDeleteDevRegKey(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, scope: u32, hwprofile: u32, keytype: u32) -> windows_core::Result<()> @@ -2045,7 +2045,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiDestroyDriverInfoList(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : SETUP_DI_DRIVER_TYPE) -> super::super::Foundation:: BOOL); - SetupDiDestroyDriverInfoList(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), drivertype).ok() + SetupDiDestroyDriverInfoList(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), drivertype).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2070,7 +2070,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), interfaceclassguid, memberindex, deviceinterfacedata).ok() + SetupDiEnumDeviceInterfaces(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), interfaceclassguid, memberindex, deviceinterfacedata).ok() } #[inline] pub unsafe fn SetupDiEnumDriverInfoA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_A) -> windows_core::Result<()> @@ -2078,7 +2078,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDriverInfoA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : SETUP_DI_DRIVER_TYPE, memberindex : u32, driverinfodata : *mut SP_DRVINFO_DATA_V2_A) -> super::super::Foundation:: BOOL); - SetupDiEnumDriverInfoA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), drivertype, memberindex, driverinfodata).ok() + SetupDiEnumDriverInfoA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), drivertype, memberindex, driverinfodata).ok() } #[inline] pub unsafe fn SetupDiEnumDriverInfoW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, drivertype: SETUP_DI_DRIVER_TYPE, memberindex: u32, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> windows_core::Result<()> @@ -2086,19 +2086,19 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiEnumDriverInfoW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, drivertype : SETUP_DI_DRIVER_TYPE, memberindex : u32, driverinfodata : *mut SP_DRVINFO_DATA_V2_W) -> super::super::Foundation:: BOOL); - SetupDiEnumDriverInfoW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), drivertype, memberindex, driverinfodata).ok() + SetupDiEnumDriverInfoW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), drivertype, memberindex, driverinfodata).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn SetupDiGetActualModelsSectionA(context: *const INFCONTEXT, alternateplatforminfo: Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: Option<&mut [u8]>, requiredsize: Option<*mut u32>, reserved: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetActualModelsSectionA(context, core::mem::transmute(alternateplatforminfo.unwrap_or(core::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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn SetupDiGetActualModelsSectionW(context: *const INFCONTEXT, alternateplatforminfo: Option<*const SP_ALTPLATFORM_INFO_V2>, infsectionwithext: Option<&mut [u16]>, requiredsize: Option<*mut u32>, reserved: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetActualModelsSectionW(context, core::mem::transmute(alternateplatforminfo.unwrap_or(core::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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetActualSectionToInstallA(infhandle: *const core::ffi::c_void, infsectionname: P0, infsectionwithext: Option<&mut [u8]>, requiredsize: Option<*mut u32>, extension: Option<*mut windows_core::PSTR>) -> windows_core::Result<()> @@ -2106,7 +2106,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extension.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetActualSectionToInstallA(infhandle, infsectionname.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extension.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -2118,12 +2118,12 @@ where SetupDiGetActualSectionToInstallExA( infhandle, infsectionname.param().abi(), - core::mem::transmute(alternateplatforminfo.unwrap_or(std::ptr::null())), + core::mem::transmute(alternateplatforminfo.unwrap_or(core::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().try_into().unwrap()), - core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(extension.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(reserved.unwrap_or(std::ptr::null())), + core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extension.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ) .ok() } @@ -2137,12 +2137,12 @@ where SetupDiGetActualSectionToInstallExW( infhandle, infsectionname.param().abi(), - core::mem::transmute(alternateplatforminfo.unwrap_or(std::ptr::null())), + core::mem::transmute(alternateplatforminfo.unwrap_or(core::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().try_into().unwrap()), - core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(extension.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(reserved.unwrap_or(std::ptr::null())), + core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(extension.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ) .ok() } @@ -2152,17 +2152,17 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extension.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetActualSectionToInstallW(infhandle, infsectionname.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extension.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetClassBitmapIndex(classguid: 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).ok() + SetupDiGetClassBitmapIndex(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), miniiconindex).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionA(classguid: *const windows_core::GUID, classdescription: &mut [u8], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionA(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionExA(classguid: *const windows_core::GUID, classdescription: &mut [u8], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2170,7 +2170,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassDescriptionExA(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionExW(classguid: *const windows_core::GUID, classdescription: &mut [u16], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2178,12 +2178,12 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassDescriptionExW(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetClassDescriptionW(classguid: *const windows_core::GUID, classdescription: &mut [u16], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetClassDescriptionW(classguid, core::mem::transmute(classdescription.as_ptr()), classdescription.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -2192,7 +2192,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetClassDevPropertySheetsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), propertysheettype).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_Controls", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -2201,7 +2201,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetClassDevPropertySheetsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), propertysheetheader, propertysheetheaderpagelistsize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), propertysheettype).ok() } #[inline] pub unsafe fn SetupDiGetClassDevsA(classguid: Option<*const windows_core::GUID>, enumerator: P0, hwndparent: P1, flags: SETUP_DI_GET_CLASS_DEVS_FLAGS) -> windows_core::Result @@ -2210,7 +2210,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsA(classguid : *const windows_core::GUID, enumerator : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS) -> HDEVINFO); - let result__ = SetupDiGetClassDevsA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags); + let result__ = SetupDiGetClassDevsA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2222,7 +2222,7 @@ where P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsExA(classguid : *const windows_core::GUID, enumerator : windows_core::PCSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset : HDEVINFO, machinename : windows_core::PCSTR, reserved : *const core::ffi::c_void) -> HDEVINFO); - let result__ = SetupDiGetClassDevsExA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags, deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiGetClassDevsExA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags, deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2234,7 +2234,7 @@ where P3: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsExW(classguid : *const windows_core::GUID, enumerator : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS, deviceinfoset : HDEVINFO, machinename : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> HDEVINFO); - let result__ = SetupDiGetClassDevsExW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags, deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiGetClassDevsExW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags, deviceinfoset.param().abi(), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2244,7 +2244,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetClassDevsW(classguid : *const windows_core::GUID, enumerator : windows_core::PCWSTR, hwndparent : super::super::Foundation:: HWND, flags : SETUP_DI_GET_CLASS_DEVS_FLAGS) -> HDEVINFO); - let result__ = SetupDiGetClassDevsW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags); + let result__ = SetupDiGetClassDevsW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), enumerator.param().abi(), hwndparent.param().abi(), flags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_Controls")] @@ -2266,7 +2266,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassImageListExA(classimagelistdata, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2275,7 +2275,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassImageListExW(classimagelistdata, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2283,7 +2283,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetClassInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null_mut())), classinstallparamssize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*mut SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2291,7 +2291,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetClassInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null_mut())), classinstallparamssize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2300,13 +2300,13 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn SetupDiGetClassPropertyKeys(classguid: *const windows_core::GUID, propertykeyarray: Option<&mut [super::Properties::DEVPROPKEY]>, requiredpropertykeycount: 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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(std::ptr::null_mut())), flags).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::ptr::null_mut())), flags).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2315,13 +2315,13 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(std::ptr::null_mut())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::ptr::null_mut())), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] pub unsafe fn SetupDiGetClassPropertyW(classguid: *const windows_core::GUID, propertykey: *const super::Properties::DEVPROPKEY, propertytype: *mut super::Properties::DEVPROPTYPE, propertybuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), flags).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn SetupDiGetClassRegistryPropertyA(classguid: *const windows_core::GUID, property: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2329,7 +2329,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassRegistryPropertyA(classguid, property, core::mem::transmute(propertyregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetClassRegistryPropertyW(classguid: *const windows_core::GUID, property: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2337,7 +2337,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetClassRegistryPropertyW(classguid, property, core::mem::transmute(propertyregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetCustomDevicePropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2346,7 +2346,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfodata, custompropertyname.param().abi(), flags, core::mem::transmute(propertyregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetCustomDevicePropertyA(deviceinfoset.param().abi(), deviceinfodata, custompropertyname.param().abi(), flags, core::mem::transmute(propertyregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetCustomDevicePropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, custompropertyname: P1, flags: u32, propertyregdatatype: Option<*mut u32>, propertybuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2355,7 +2355,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfodata, custompropertyname.param().abi(), flags, core::mem::transmute(propertyregdatatype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetCustomDevicePropertyW(deviceinfoset.param().abi(), deviceinfodata, custompropertyname.param().abi(), flags, core::mem::transmute(propertyregdatatype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propertybuffer.as_ptr()), propertybuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDeviceInfoListClass(deviceinfoset: P0, classguid: *mut windows_core::GUID) -> windows_core::Result<()> @@ -2387,7 +2387,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), deviceinstallparams).ok() + SetupDiGetDeviceInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), deviceinstallparams).ok() } #[inline] pub unsafe fn SetupDiGetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *mut SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> @@ -2395,7 +2395,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), deviceinstallparams).ok() + SetupDiGetDeviceInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), deviceinstallparams).ok() } #[inline] pub unsafe fn SetupDiGetDeviceInstanceIdA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2403,7 +2403,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetDeviceInstanceIdA(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDeviceInstanceIdW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, deviceinstanceid: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2411,7 +2411,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetDeviceInstanceIdW(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] 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<()> @@ -2427,7 +2427,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetDeviceInterfaceDetailA(deviceinfoset.param().abi(), deviceinterfacedata, core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::ptr::null_mut())), deviceinterfacedetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDeviceInterfaceDetailW(deviceinfoset: P0, deviceinterfacedata: *const SP_DEVICE_INTERFACE_DATA, deviceinterfacedetaildata: Option<*mut SP_DEVICE_INTERFACE_DETAIL_DATA_W>, deviceinterfacedetaildatasize: u32, requiredsize: Option<*mut u32>, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -2435,7 +2435,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetDeviceInterfaceDetailW(deviceinfoset.param().abi(), deviceinterfacedata, core::mem::transmute(deviceinterfacedetaildata.unwrap_or(core::ptr::null_mut())), deviceinterfacedetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2444,7 +2444,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(std::ptr::null_mut())), flags).ok() + SetupDiGetDeviceInterfacePropertyKeys(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::ptr::null_mut())), flags).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2453,7 +2453,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), flags).ok() + SetupDiGetDeviceInterfacePropertyW(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), flags).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2462,7 +2462,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(std::ptr::null_mut())), flags).ok() + SetupDiGetDevicePropertyKeys(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredpropertykeycount.unwrap_or(core::ptr::null_mut())), flags).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2471,7 +2471,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), flags).ok() + SetupDiGetDevicePropertyW(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertyregdatatype: Option<*mut u32>, propertybuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2479,7 +2479,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyA(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : SETUP_DI_REGISTRY_PROPERTY, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyA(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetDeviceRegistryPropertyA(deviceinfoset.param().abi(), deviceinfodata, property, core::mem::transmute(propertyregdatatype.unwrap_or(core::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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA, property: SETUP_DI_REGISTRY_PROPERTY, propertyregdatatype: Option<*mut u32>, propertybuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2487,7 +2487,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetDeviceRegistryPropertyW(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, property : SETUP_DI_REGISTRY_PROPERTY, propertyregdatatype : *mut u32, propertybuffer : *mut u8, propertybuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupDiGetDeviceRegistryPropertyW(deviceinfoset.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetDeviceRegistryPropertyW(deviceinfoset.param().abi(), deviceinfodata, property, core::mem::transmute(propertyregdatatype.unwrap_or(core::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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDriverInfoDetailA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinfodetaildata: Option<*mut SP_DRVINFO_DETAIL_DATA_A>, driverinfodetaildatasize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2495,7 +2495,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetDriverInfoDetailA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, core::mem::transmute(driverinfodetaildata.unwrap_or(core::ptr::null_mut())), driverinfodetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDriverInfoDetailW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinfodetaildata: Option<*mut SP_DRVINFO_DETAIL_DATA_W>, driverinfodetaildatasize: u32, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2503,7 +2503,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiGetDriverInfoDetailW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, core::mem::transmute(driverinfodetaildata.unwrap_or(core::ptr::null_mut())), driverinfodetaildatasize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetDriverInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_A, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> @@ -2511,7 +2511,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata, driverinstallparams).ok() + SetupDiGetDriverInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, driverinstallparams).ok() } #[inline] pub unsafe fn SetupDiGetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *mut SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> @@ -2519,12 +2519,12 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata, driverinstallparams).ok() + SetupDiGetDriverInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, driverinstallparams).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameA(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameExA(hwprofile: u32, friendlyname: &mut [u8], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2532,7 +2532,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetHwProfileFriendlyNameExA(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameExW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2540,17 +2540,17 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetHwProfileFriendlyNameExW(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileFriendlyNameW(hwprofile: u32, friendlyname: &mut [u16], requiredsize: 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().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetHwProfileFriendlyNameW(hwprofile, core::mem::transmute(friendlyname.as_ptr()), friendlyname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileList(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: 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().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetHwProfileList(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileListExA(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2558,7 +2558,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetHwProfileListExA(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetHwProfileListExW(hwprofilelist: &mut [u32], requiredsize: *mut u32, currentlyactiveindex: Option<*mut u32>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2566,7 +2566,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(std::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiGetHwProfileListExW(core::mem::transmute(hwprofilelist.as_ptr()), hwprofilelist.len().try_into().unwrap(), requiredsize, core::mem::transmute(currentlyactiveindex.unwrap_or(core::ptr::null_mut())), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiGetINFClassA(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2574,7 +2574,7 @@ where P0: windows_core::Param, { 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.param().abi(), classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetINFClassA(infname.param().abi(), classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetINFClassW(infname: P0, classguid: *mut windows_core::GUID, classname: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -2582,7 +2582,7 @@ where P0: windows_core::Param, { 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.param().abi(), classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiGetINFClassW(infname.param().abi(), classguid, core::mem::transmute(classname.as_ptr()), classname.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiGetSelectedDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> @@ -2598,7 +2598,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata).ok() + SetupDiGetSelectedDriverA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata).ok() } #[inline] pub unsafe fn SetupDiGetSelectedDriverW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *mut SP_DRVINFO_DATA_V2_W) -> windows_core::Result<()> @@ -2606,7 +2606,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata).ok() + SetupDiGetSelectedDriverW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -2615,7 +2615,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiGetWizardPage(deviceinfoset : HDEVINFO, deviceinfodata : *const SP_DEVINFO_DATA, installwizarddata : *const SP_INSTALLWIZARD_DATA, pagetype : u32, flags : u32) -> super::super::UI::Controls:: HPROPSHEETPAGE); - SetupDiGetWizardPage(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), installwizarddata, pagetype, flags) + SetupDiGetWizardPage(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), installwizarddata, pagetype, flags) } #[inline] pub unsafe fn SetupDiInstallClassA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2624,7 +2624,7 @@ where P1: windows_core::Param, { 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.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(std::ptr::null()))).ok() + SetupDiInstallClassA(hwndparent.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiInstallClassExA(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>, interfaceclassguid: Option<*const windows_core::GUID>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2633,7 +2633,7 @@ where P1: windows_core::Param, { 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.param().abi(), inffilename.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() + SetupDiInstallClassExA(hwndparent.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::ptr::null())), core::mem::transmute(interfaceclassguid.unwrap_or(core::ptr::null())), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiInstallClassExW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>, interfaceclassguid: Option<*const windows_core::GUID>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2642,7 +2642,7 @@ where P1: windows_core::Param, { 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.param().abi(), inffilename.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() + SetupDiInstallClassExW(hwndparent.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::ptr::null())), core::mem::transmute(interfaceclassguid.unwrap_or(core::ptr::null())), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiInstallClassW(hwndparent: P0, inffilename: P1, flags: u32, filequeue: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2651,7 +2651,7 @@ where P1: windows_core::Param, { 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.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(std::ptr::null()))).ok() + SetupDiInstallClassW(hwndparent.param().abi(), inffilename.param().abi(), flags, core::mem::transmute(filequeue.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiInstallDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> @@ -2681,7 +2681,7 @@ where #[inline] pub unsafe fn SetupDiLoadClassIcon(classguid: *const windows_core::GUID, largeicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>, miniiconindex: 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()))).ok() + SetupDiLoadClassIcon(classguid, core::mem::transmute(largeicon.unwrap_or(core::ptr::null_mut())), core::mem::transmute(miniiconindex.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2696,7 +2696,7 @@ where #[inline] pub unsafe fn SetupDiOpenClassRegKey(classguid: Option<*const windows_core::GUID>, samdesired: u32) -> windows_core::Result { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenClassRegKey(classguid : *const windows_core::GUID, samdesired : u32) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiOpenClassRegKey(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), samdesired); + let result__ = SetupDiOpenClassRegKey(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), samdesired); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2706,7 +2706,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenClassRegKeyExA(classguid : *const windows_core::GUID, samdesired : u32, flags : u32, machinename : windows_core::PCSTR, reserved : *const core::ffi::c_void) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiOpenClassRegKeyExA(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiOpenClassRegKeyExA(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2716,7 +2716,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiOpenClassRegKeyExW(classguid : *const windows_core::GUID, samdesired : u32, flags : u32, machinename : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> super::super::System::Registry:: HKEY); - let result__ = SetupDiOpenClassRegKeyExW(core::mem::transmute(classguid.unwrap_or(std::ptr::null())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = SetupDiOpenClassRegKeyExW(core::mem::transmute(classguid.unwrap_or(core::ptr::null())), samdesired, flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Registry")] @@ -2737,7 +2737,7 @@ where P2: windows_core::Param, { 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.param().abi(), deviceinstanceid.param().abi(), hwndparent.param().abi(), openflags, core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiOpenDeviceInfoA(deviceinfoset.param().abi(), deviceinstanceid.param().abi(), hwndparent.param().abi(), openflags, core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiOpenDeviceInfoW(deviceinfoset: P0, deviceinstanceid: P1, hwndparent: P2, openflags: u32, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -2747,7 +2747,7 @@ where P2: windows_core::Param, { 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.param().abi(), deviceinstanceid.param().abi(), hwndparent.param().abi(), openflags, core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiOpenDeviceInfoW(deviceinfoset.param().abi(), deviceinstanceid.param().abi(), hwndparent.param().abi(), openflags, core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiOpenDeviceInterfaceA(deviceinfoset: P0, devicepath: P1, openflags: u32, deviceinterfacedata: Option<*mut SP_DEVICE_INTERFACE_DATA>) -> windows_core::Result<()> @@ -2756,7 +2756,7 @@ where P1: windows_core::Param, { 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.param().abi(), devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiOpenDeviceInterfaceA(deviceinfoset.param().abi(), devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2775,7 +2775,7 @@ where P1: windows_core::Param, { 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.param().abi(), devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiOpenDeviceInterfaceW(deviceinfoset.param().abi(), devicepath.param().abi(), openflags, core::mem::transmute(deviceinterfacedata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiRegisterCoDeviceInstallers(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> @@ -2791,7 +2791,7 @@ where P0: windows_core::Param, { 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.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() + SetupDiRegisterDeviceInfo(deviceinfoset.param().abi(), deviceinfodata, flags, compareproc, core::mem::transmute(comparecontext.unwrap_or(core::ptr::null())), core::mem::transmute(dupdeviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiRemoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> super::super::Foundation::BOOL @@ -2823,7 +2823,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiSelectBestCompatDrv(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSelectBestCompatDrv(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiSelectBestCompatDrv(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiSelectDevice(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -2831,7 +2831,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupDiSelectDevice(deviceinfoset : HDEVINFO, deviceinfodata : *mut SP_DEVINFO_DATA) -> super::super::Foundation:: BOOL); - SetupDiSelectDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiSelectDevice(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiSelectOEMDrv(hwndparent: P0, deviceinfoset: P1, deviceinfodata: Option<*mut SP_DEVINFO_DATA>) -> windows_core::Result<()> @@ -2840,7 +2840,7 @@ where P1: windows_core::Param, { 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.param().abi(), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiSelectOEMDrv(hwndparent.param().abi(), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiSetClassInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> windows_core::Result<()> @@ -2848,7 +2848,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(std::ptr::null())), classinstallparamssize).ok() + SetupDiSetClassInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null())), classinstallparamssize).ok() } #[inline] pub unsafe fn SetupDiSetClassInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, classinstallparams: Option<*const SP_CLASSINSTALL_HEADER>, classinstallparamssize: u32) -> windows_core::Result<()> @@ -2856,7 +2856,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(std::ptr::null())), classinstallparamssize).ok() + SetupDiSetClassInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(classinstallparams.unwrap_or(core::ptr::null())), classinstallparamssize).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2865,7 +2865,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), flags, machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2879,7 +2879,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiSetClassRegistryPropertyW(classguid: *const windows_core::GUID, property: u32, propertybuffer: Option<&[u8]>, machinename: P0, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2887,7 +2887,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + 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().try_into().unwrap()), machinename.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupDiSetDeviceInstallParamsA(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_A) -> windows_core::Result<()> @@ -2895,7 +2895,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), deviceinstallparams).ok() + SetupDiSetDeviceInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), deviceinstallparams).ok() } #[inline] pub unsafe fn SetupDiSetDeviceInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, deviceinstallparams: *const SP_DEVINSTALL_PARAMS_W) -> windows_core::Result<()> @@ -2903,7 +2903,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), deviceinstallparams).ok() + SetupDiSetDeviceInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), deviceinstallparams).ok() } #[inline] pub unsafe fn SetupDiSetDeviceInterfaceDefault(deviceinfoset: P0, deviceinterfacedata: *mut SP_DEVICE_INTERFACE_DATA, flags: u32, reserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2911,7 +2911,7 @@ where P0: windows_core::Param, { 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.param().abi(), deviceinterfacedata, flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + SetupDiSetDeviceInterfaceDefault(deviceinfoset.param().abi(), deviceinterfacedata, flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -2953,7 +2953,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata, driverinstallparams).ok() + SetupDiSetDriverInstallParamsA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, driverinstallparams).ok() } #[inline] pub unsafe fn SetupDiSetDriverInstallParamsW(deviceinfoset: P0, deviceinfodata: Option<*const SP_DEVINFO_DATA>, driverinfodata: *const SP_DRVINFO_DATA_V2_W, driverinstallparams: *const SP_DRVINSTALL_PARAMS) -> windows_core::Result<()> @@ -2961,7 +2961,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null())), driverinfodata, driverinstallparams).ok() + SetupDiSetDriverInstallParamsW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), driverinfodata, driverinstallparams).ok() } #[inline] pub unsafe fn SetupDiSetSelectedDevice(deviceinfoset: P0, deviceinfodata: *const SP_DEVINFO_DATA) -> windows_core::Result<()> @@ -2977,7 +2977,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiSetSelectedDriverA(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiSetSelectedDriverW(deviceinfoset: P0, deviceinfodata: Option<*mut SP_DEVINFO_DATA>, driverinfodata: Option<*mut SP_DRVINFO_DATA_V2_W>) -> windows_core::Result<()> @@ -2985,7 +2985,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(std::ptr::null_mut()))).ok() + SetupDiSetSelectedDriverW(deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(driverinfodata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupDiUnremoveDevice(deviceinfoset: P0, deviceinfodata: *mut SP_DEVINFO_DATA) -> windows_core::Result<()> @@ -2998,22 +2998,22 @@ where #[inline] pub unsafe fn SetupDuplicateDiskSpaceListA(diskspace: *const core::ffi::c_void, reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("setupapi.dll" "system" fn SetupDuplicateDiskSpaceListA(diskspace : *const core::ffi::c_void, reserved1 : *const core::ffi::c_void, reserved2 : u32, flags : u32) -> *mut core::ffi::c_void); - SetupDuplicateDiskSpaceListA(diskspace, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2, flags) + SetupDuplicateDiskSpaceListA(diskspace, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, flags) } #[inline] pub unsafe fn SetupDuplicateDiskSpaceListW(diskspace: *const core::ffi::c_void, reserved1: Option<*const core::ffi::c_void>, reserved2: u32, flags: u32) -> *mut core::ffi::c_void { windows_targets::link!("setupapi.dll" "system" fn SetupDuplicateDiskSpaceListW(diskspace : *const core::ffi::c_void, reserved1 : *const core::ffi::c_void, reserved2 : u32, flags : u32) -> *mut core::ffi::c_void); - SetupDuplicateDiskSpaceListW(diskspace, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2, flags) + SetupDuplicateDiskSpaceListW(diskspace, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, flags) } #[inline] pub unsafe fn SetupEnumInfSectionsA(infhandle: *const core::ffi::c_void, index: u32, buffer: Option<&mut [u8]>, sizeneeded: 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().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupEnumInfSectionsW(infhandle: *const core::ffi::c_void, index: u32, buffer: Option<&mut [u16]>, sizeneeded: 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().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(sizeneeded.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupFindFirstLineA(infhandle: *const core::ffi::c_void, section: P0, key: P1, context: *mut INFCONTEXT) -> windows_core::Result<()> @@ -3077,7 +3077,7 @@ pub unsafe fn SetupGetBackupInformationW(queuehandle: *const core::ffi::c_void, #[inline] pub unsafe fn SetupGetBinaryField(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetFieldCount(context: *const INFCONTEXT) -> u32 { @@ -3098,7 +3098,7 @@ where P0: windows_core::Param, { 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 FILE_COMPRESSION_TYPE) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExA(sourcefilename.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().try_into().unwrap()), core::mem::transmute(requiredbufferlen.unwrap_or(std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() + SetupGetFileCompressionInfoExA(sourcefilename.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().try_into().unwrap()), core::mem::transmute(requiredbufferlen.unwrap_or(core::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[inline] pub unsafe fn SetupGetFileCompressionInfoExW(sourcefilename: P0, actualsourcefilenamebuffer: Option<&[u16]>, requiredbufferlen: Option<*mut u32>, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut FILE_COMPRESSION_TYPE) -> windows_core::Result<()> @@ -3106,7 +3106,7 @@ where P0: windows_core::Param, { 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 FILE_COMPRESSION_TYPE) -> super::super::Foundation:: BOOL); - SetupGetFileCompressionInfoExW(sourcefilename.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().try_into().unwrap()), core::mem::transmute(requiredbufferlen.unwrap_or(std::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() + SetupGetFileCompressionInfoExW(sourcefilename.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().try_into().unwrap()), core::mem::transmute(requiredbufferlen.unwrap_or(core::ptr::null_mut())), sourcefilesize, targetfilesize, compressiontype).ok() } #[inline] pub unsafe fn SetupGetFileCompressionInfoW(sourcefilename: P0, actualsourcefilename: *mut windows_core::PWSTR, sourcefilesize: *mut u32, targetfilesize: *mut u32, compressiontype: *mut FILE_COMPRESSION_TYPE) -> u32 @@ -3134,7 +3134,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(std::ptr::null())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfDriverStoreLocationA(filename.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -3144,7 +3144,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(std::ptr::null())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfDriverStoreLocationW(filename.param().abi(), core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), localename.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfFileListA(directorypath: P0, infstyle: INF_STYLE, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3152,7 +3152,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListA(directorypath : windows_core::PCSTR, infstyle : INF_STYLE, returnbuffer : windows_core::PSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListA(directorypath.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfFileListA(directorypath.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfFileListW(directorypath: P0, infstyle: INF_STYLE, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3160,17 +3160,17 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupGetInfFileListW(directorypath : windows_core::PCWSTR, infstyle : INF_STYLE, returnbuffer : windows_core::PWSTR, returnbuffersize : u32, requiredsize : *mut u32) -> super::super::Foundation:: BOOL); - SetupGetInfFileListW(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfFileListW(directorypath.param().abi(), infstyle, core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfInformationA(infspec: *const core::ffi::c_void, searchcontrol: u32, returnbuffer: Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: 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()))).ok() + SetupGetInfInformationA(infspec, searchcontrol, core::mem::transmute(returnbuffer.unwrap_or(core::ptr::null_mut())), returnbuffersize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfInformationW(infspec: *const core::ffi::c_void, searchcontrol: u32, returnbuffer: Option<*mut SP_INF_INFORMATION>, returnbuffersize: u32, requiredsize: 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()))).ok() + SetupGetInfInformationW(infspec, searchcontrol, core::mem::transmute(returnbuffer.unwrap_or(core::ptr::null_mut())), returnbuffersize, core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfPublishedNameA(driverstorelocation: P0, returnbuffer: &mut [u8], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3178,7 +3178,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfPublishedNameA(driverstorelocation.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetInfPublishedNameW(driverstorelocation: P0, returnbuffer: &mut [u16], requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3186,7 +3186,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetInfPublishedNameW(driverstorelocation.param().abi(), core::mem::transmute(returnbuffer.as_ptr()), returnbuffer.len().try_into().unwrap(), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetIntField(context: *const INFCONTEXT, fieldindex: u32, integervalue: *mut i32) -> windows_core::Result<()> { @@ -3232,7 +3232,7 @@ where P1: windows_core::Param, { 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.param().abi(), key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetLineTextA(core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), section.param().abi(), key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetLineTextW(context: Option<*const INFCONTEXT>, infhandle: Option<*const core::ffi::c_void>, section: P0, key: P1, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3241,17 +3241,17 @@ where P1: windows_core::Param, { 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.param().abi(), key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetLineTextW(core::mem::transmute(context.unwrap_or(core::ptr::null())), core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), section.param().abi(), key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetMultiSzFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetMultiSzFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: Option<&mut [u16]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetNonInteractiveMode() -> super::super::Foundation::BOOL { @@ -3264,7 +3264,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetSourceFileLocationA(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetSourceFileLocationW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P0, sourceid: *mut u32, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3272,7 +3272,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetSourceFileLocationW(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetSourceFileSizeA(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> windows_core::Result<()> @@ -3281,7 +3281,7 @@ where P1: windows_core::Param, { 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.param().abi(), section.param().abi(), filesize, roundingfactor).ok() + SetupGetSourceFileSizeA(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), section.param().abi(), filesize, roundingfactor).ok() } #[inline] pub unsafe fn SetupGetSourceFileSizeW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, filename: P0, section: P1, filesize: *mut u32, roundingfactor: u32) -> windows_core::Result<()> @@ -3290,27 +3290,27 @@ where P1: windows_core::Param, { 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.param().abi(), section.param().abi(), filesize, roundingfactor).ok() + SetupGetSourceFileSizeW(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), filename.param().abi(), section.param().abi(), filesize, roundingfactor).ok() } #[inline] pub unsafe fn SetupGetSourceInfoA(infhandle: *const core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetSourceInfoW(infhandle: *const core::ffi::c_void, sourceid: u32, infodesired: u32, returnbuffer: Option<&mut [u16]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetStringFieldA(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetStringFieldW(context: *const INFCONTEXT, fieldindex: u32, returnbuffer: Option<&mut [u16]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetTargetPathA(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, section: P0, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3318,7 +3318,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetTargetPathA(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), section.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetTargetPathW(infhandle: *const core::ffi::c_void, infcontext: Option<*const INFCONTEXT>, section: P0, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3326,7 +3326,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupGetTargetPathW(infhandle, core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), section.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupGetThreadLogToken() -> u64 { @@ -3348,7 +3348,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupInitDefaultQueueCallbackEx(ownerwindow : super::super::Foundation:: HWND, alternateprogresswindow : super::super::Foundation:: HWND, progressmessage : u32, reserved1 : u32, reserved2 : *const core::ffi::c_void) -> *mut core::ffi::c_void); - SetupInitDefaultQueueCallbackEx(ownerwindow.param().abi(), alternateprogresswindow.param().abi(), progressmessage, reserved1, core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))) + SetupInitDefaultQueueCallbackEx(ownerwindow.param().abi(), alternateprogresswindow.param().abi(), progressmessage, reserved1, core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetupInitializeFileLogA(logfilename: P0, flags: u32) -> *mut core::ffi::c_void @@ -3374,7 +3374,7 @@ where P2: windows_core::Param, { 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.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + SetupInstallFileA(core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupInstallFileExA(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_A, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -3384,7 +3384,7 @@ where P2: windows_core::Param, { 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.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(std::ptr::null())), filewasinuse).ok() + SetupInstallFileExA(core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(core::ptr::null())), filewasinuse).ok() } #[inline] pub unsafe fn SetupInstallFileExW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: Option<*const core::ffi::c_void>, filewasinuse: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -3394,7 +3394,7 @@ where P2: windows_core::Param, { 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.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(std::ptr::null())), filewasinuse).ok() + SetupInstallFileExW(core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(core::ptr::null())), filewasinuse).ok() } #[inline] pub unsafe fn SetupInstallFileW(infhandle: Option<*const core::ffi::c_void>, infcontext: Option<*const INFCONTEXT>, sourcefile: P0, sourcepathroot: P1, destinationname: P2, copystyle: SP_COPY_STYLE, copymsghandler: PSP_FILE_CALLBACK_W, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -3404,7 +3404,7 @@ where P2: windows_core::Param, { 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.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + SetupInstallFileW(core::mem::transmute(infhandle.unwrap_or(core::ptr::null())), core::mem::transmute(infcontext.unwrap_or(core::ptr::null())), sourcefile.param().abi(), sourcepathroot.param().abi(), destinationname.param().abi(), copystyle, copymsghandler, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupInstallFilesFromInfSectionA(infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, filequeue: *const core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> windows_core::Result<()> @@ -3413,7 +3413,7 @@ where P1: windows_core::Param, { 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.param().abi(), sourcerootpath.param().abi(), copyflags).ok() + SetupInstallFilesFromInfSectionA(infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } #[inline] pub unsafe fn SetupInstallFilesFromInfSectionW(infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, filequeue: *const core::ffi::c_void, sectionname: P0, sourcerootpath: P1, copyflags: u32) -> windows_core::Result<()> @@ -3422,7 +3422,7 @@ where P1: windows_core::Param, { 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.param().abi(), sourcerootpath.param().abi(), copyflags).ok() + SetupInstallFilesFromInfSectionW(infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), filequeue, sectionname.param().abi(), sourcerootpath.param().abi(), copyflags).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3435,7 +3435,7 @@ where P4: windows_core::Param, { 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.param().abi(), infhandle, sectionname.param().abi(), flags, relativekeyroot.param().abi(), sourcerootpath.param().abi(), copyflags, msghandler, core::mem::transmute(context.unwrap_or(std::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null()))).ok() + SetupInstallFromInfSectionA(owner.param().abi(), infhandle, sectionname.param().abi(), flags, relativekeyroot.param().abi(), sourcerootpath.param().abi(), copyflags, msghandler, core::mem::transmute(context.unwrap_or(core::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3448,7 +3448,7 @@ where P4: windows_core::Param, { 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.param().abi(), infhandle, sectionname.param().abi(), flags, relativekeyroot.param().abi(), sourcerootpath.param().abi(), copyflags, msghandler, core::mem::transmute(context.unwrap_or(std::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(std::ptr::null()))).ok() + SetupInstallFromInfSectionW(owner.param().abi(), infhandle, sectionname.param().abi(), flags, relativekeyroot.param().abi(), sourcerootpath.param().abi(), copyflags, msghandler, core::mem::transmute(context.unwrap_or(core::ptr::null())), deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionA(infhandle: *const core::ffi::c_void, sectionname: P0, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3465,7 +3465,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExA(infhandle : *const core::ffi::c_void, sectionname : windows_core::PCSTR, flags : SPSVCINST_FLAGS, 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.param().abi(), flags, deviceinfoset.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() + SetupInstallServicesFromInfSectionExA(infhandle, sectionname.param().abi(), flags, deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionExW(infhandle: *const core::ffi::c_void, sectionname: P0, flags: SPSVCINST_FLAGS, deviceinfoset: P1, deviceinfodata: Option<*const SP_DEVINFO_DATA>, reserved1: Option<*const core::ffi::c_void>, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -3474,7 +3474,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupInstallServicesFromInfSectionExW(infhandle : *const core::ffi::c_void, sectionname : windows_core::PCWSTR, flags : SPSVCINST_FLAGS, 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.param().abi(), flags, deviceinfoset.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() + SetupInstallServicesFromInfSectionExW(infhandle, sectionname.param().abi(), flags, deviceinfoset.param().abi(), core::mem::transmute(deviceinfodata.unwrap_or(core::ptr::null())), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupInstallServicesFromInfSectionW(infhandle: *const core::ffi::c_void, sectionname: P0, flags: SPSVCINST_FLAGS) -> windows_core::Result<()> @@ -3548,7 +3548,7 @@ where P0: windows_core::Param, { 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.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(std::ptr::null_mut()))).ok() + SetupOpenAppendInfFileA(filename.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupOpenAppendInfFileW(filename: P0, infhandle: *const core::ffi::c_void, errorline: Option<*mut u32>) -> windows_core::Result<()> @@ -3556,7 +3556,7 @@ where P0: windows_core::Param, { 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.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(std::ptr::null_mut()))).ok() + SetupOpenAppendInfFileW(filename.param().abi(), infhandle, core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupOpenFileQueue() -> *mut core::ffi::c_void { @@ -3570,7 +3570,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupOpenInfFileA(filename : windows_core::PCSTR, infclass : windows_core::PCSTR, infstyle : INF_STYLE, errorline : *mut u32) -> *mut core::ffi::c_void); - SetupOpenInfFileA(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(std::ptr::null_mut()))) + SetupOpenInfFileA(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupOpenInfFileW(filename: P0, infclass: P1, infstyle: INF_STYLE, errorline: Option<*mut u32>) -> *mut core::ffi::c_void @@ -3579,7 +3579,7 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupOpenInfFileW(filename : windows_core::PCWSTR, infclass : windows_core::PCWSTR, infstyle : INF_STYLE, errorline : *mut u32) -> *mut core::ffi::c_void); - SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(std::ptr::null_mut()))) + SetupOpenInfFileW(filename.param().abi(), infclass.param().abi(), infstyle, core::mem::transmute(errorline.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupOpenLog(erase: P0) -> windows_core::Result<()> @@ -3621,7 +3621,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupPromptForDiskA(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCSTR, diskname : windows_core::PCSTR, pathtosource : windows_core::PCSTR, filesought : windows_core::PCSTR, tagfile : windows_core::PCSTR, diskpromptstyle : u32, pathbuffer : windows_core::PSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupPromptForDiskA(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(std::ptr::null_mut()))) + SetupPromptForDiskA(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupPromptForDiskW(hwndparent: P0, dialogtitle: P1, diskname: P2, pathtosource: P3, filesought: P4, tagfile: P5, diskpromptstyle: u32, pathbuffer: Option<&mut [u16]>, pathrequiredsize: Option<*mut u32>) -> u32 @@ -3634,7 +3634,7 @@ where P5: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupPromptForDiskW(hwndparent : super::super::Foundation:: HWND, dialogtitle : windows_core::PCWSTR, diskname : windows_core::PCWSTR, pathtosource : windows_core::PCWSTR, filesought : windows_core::PCWSTR, tagfile : windows_core::PCWSTR, diskpromptstyle : u32, pathbuffer : windows_core::PWSTR, pathbuffersize : u32, pathrequiredsize : *mut u32) -> u32); - SetupPromptForDiskW(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(std::ptr::null_mut()))) + SetupPromptForDiskW(hwndparent.param().abi(), dialogtitle.param().abi(), diskname.param().abi(), pathtosource.param().abi(), filesought.param().abi(), tagfile.param().abi(), diskpromptstyle, core::mem::transmute(pathbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pathbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathrequiredsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetupPromptReboot(filequeue: Option<*const core::ffi::c_void>, owner: P0, scanonly: P1) -> i32 @@ -3643,17 +3643,17 @@ where P1: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupPromptReboot(filequeue : *const core::ffi::c_void, owner : super::super::Foundation:: HWND, scanonly : super::super::Foundation:: BOOL) -> i32); - SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(std::ptr::null())), owner.param().abi(), scanonly.param().abi()) + SetupPromptReboot(core::mem::transmute(filequeue.unwrap_or(core::ptr::null())), owner.param().abi(), scanonly.param().abi()) } #[inline] pub unsafe fn SetupQueryDrivesInDiskSpaceListA(diskspace: *const core::ffi::c_void, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryDrivesInDiskSpaceListW(diskspace: *const core::ffi::c_void, returnbuffer: Option<&mut [u16]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryFileLogA(fileloghandle: *const core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3662,7 +3662,7 @@ where P1: windows_core::Param, { 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.param().abi(), targetfilename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupQueryFileLogA(fileloghandle, logsectionname.param().abi(), targetfilename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryFileLogW(fileloghandle: *const core::ffi::c_void, logsectionname: P0, targetfilename: P1, desiredinfo: SetupFileLogInfo, dataout: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3671,29 +3671,29 @@ where P1: windows_core::Param, { 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.param().abi(), targetfilename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupQueryFileLogW(fileloghandle, logsectionname.param().abi(), targetfilename.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryInfFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: Option<&mut [u8]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryInfFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, returnbuffer: Option<&mut [u16]>, requiredsize: 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + 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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn SetupQueryInfOriginalFileInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: 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).ok() + SetupQueryInfOriginalFileInformationA(infinformation, infindex, core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), originalfileinfo).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] pub unsafe fn SetupQueryInfOriginalFileInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, alternateplatforminfo: 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).ok() + SetupQueryInfOriginalFileInformationW(infinformation, infindex, core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), originalfileinfo).ok() } #[inline] pub unsafe fn SetupQueryInfVersionInformationA(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: Option<&mut [u8]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3701,7 +3701,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupQueryInfVersionInformationA(infinformation, infindex, key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQueryInfVersionInformationW(infinformation: *const SP_INF_INFORMATION, infindex: u32, key: P0, returnbuffer: Option<&mut [u16]>, requiredsize: Option<*mut u32>) -> windows_core::Result<()> @@ -3709,7 +3709,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(std::ptr::null_mut()))).ok() + SetupQueryInfVersionInformationW(infinformation, infindex, key.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().try_into().unwrap()), core::mem::transmute(requiredsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetupQuerySourceListA(flags: u32, list: *mut *mut windows_core::PCSTR, count: *mut u32) -> windows_core::Result<()> { @@ -3727,7 +3727,7 @@ where P0: windows_core::Param, { 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.param().abi(), spacerequired, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupQuerySpaceRequiredOnDriveA(diskspace, drivespec.param().abi(), spacerequired, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupQuerySpaceRequiredOnDriveW(diskspace: *const core::ffi::c_void, drivespec: P0, spacerequired: *mut i64, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -3735,7 +3735,7 @@ where P0: windows_core::Param, { 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.param().abi(), spacerequired, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupQuerySpaceRequiredOnDriveW(diskspace, drivespec.param().abi(), spacerequired, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[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) -> windows_core::Result<()> @@ -3768,7 +3768,7 @@ where P1: windows_core::Param, { 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.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(std::ptr::null())), section.param().abi(), copystyle).ok() + SetupQueueCopySectionA(queuehandle, sourcerootpath.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi(), copystyle).ok() } #[inline] pub unsafe fn SetupQueueCopySectionW(queuehandle: *const core::ffi::c_void, sourcerootpath: P0, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, section: P1, copystyle: u32) -> windows_core::Result<()> @@ -3777,7 +3777,7 @@ where P1: windows_core::Param, { 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.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(std::ptr::null())), section.param().abi(), copystyle).ok() + SetupQueueCopySectionW(queuehandle, sourcerootpath.param().abi(), infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi(), copystyle).ok() } #[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) -> windows_core::Result<()> @@ -3828,7 +3828,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupQueueDeleteSectionA(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueDeleteSectionW(queuehandle: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, section: P0) -> windows_core::Result<()> @@ -3836,7 +3836,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupQueueDeleteSectionW(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueDeleteW(queuehandle: *const core::ffi::c_void, pathpart1: P0, pathpart2: P1) -> windows_core::Result<()> @@ -3864,7 +3864,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupQueueRenameSectionA(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueRenameSectionW(queuehandle: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, section: P0) -> windows_core::Result<()> @@ -3872,7 +3872,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupQueueRenameSectionW(queuehandle, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), section.param().abi()).ok() } #[inline] pub unsafe fn SetupQueueRenameW(queuehandle: *const core::ffi::c_void, sourcepath: P0, sourcefilename: P1, targetpath: P2, targetfilename: P3) -> windows_core::Result<()> @@ -3909,7 +3909,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveFromDiskSpaceListA(diskspace, targetfilespec.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRemoveFromDiskSpaceListW(diskspace: *const core::ffi::c_void, targetfilespec: P0, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -3917,7 +3917,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveFromDiskSpaceListW(diskspace, targetfilespec.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRemoveFromSourceListA(flags: u32, source: P0) -> windows_core::Result<()> @@ -3941,7 +3941,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveInstallSectionFromDiskSpaceListA(diskspace, infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRemoveInstallSectionFromDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, layoutinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -3949,7 +3949,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveInstallSectionFromDiskSpaceListW(diskspace, infhandle, core::mem::transmute(layoutinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRemoveSectionFromDiskSpaceListA(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -3957,7 +3957,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveSectionFromDiskSpaceListA(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRemoveSectionFromDiskSpaceListW(diskspace: *const core::ffi::c_void, infhandle: *const core::ffi::c_void, listinfhandle: Option<*const core::ffi::c_void>, sectionname: P0, operation: SETUP_FILE_OPERATION, reserved1: Option<*const core::ffi::c_void>, reserved2: u32) -> windows_core::Result<()> @@ -3965,7 +3965,7 @@ where P0: windows_core::Param, { 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.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2).ok() + SetupRemoveSectionFromDiskSpaceListW(diskspace, infhandle, core::mem::transmute(listinfhandle.unwrap_or(core::ptr::null())), sectionname.param().abi(), operation, core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2).ok() } #[inline] pub unsafe fn SetupRenameErrorA(hwndparent: P0, dialogtitle: P1, sourcefile: P2, targetfile: P3, win32errorcode: u32, style: u32) -> u32 @@ -3995,7 +3995,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupScanFileQueueA(filequeue : *const core::ffi::c_void, flags : SETUPSCANFILEQUEUE_FLAGS, 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.param().abi(), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), result).ok() + SetupScanFileQueueA(filequeue, flags, window.param().abi(), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), result).ok() } #[inline] pub unsafe fn SetupScanFileQueueW(filequeue: *const core::ffi::c_void, flags: SETUPSCANFILEQUEUE_FLAGS, window: P0, callbackroutine: PSP_FILE_CALLBACK_W, callbackcontext: Option<*const core::ffi::c_void>, result: *mut u32) -> windows_core::Result<()> @@ -4003,7 +4003,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupScanFileQueueW(filequeue : *const core::ffi::c_void, flags : SETUPSCANFILEQUEUE_FLAGS, 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.param().abi(), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), result).ok() + SetupScanFileQueueW(filequeue, flags, window.param().abi(), callbackroutine, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), result).ok() } #[inline] pub unsafe fn SetupSetDirectoryIdA(infhandle: *const core::ffi::c_void, id: u32, directory: P0) -> windows_core::Result<()> @@ -4019,7 +4019,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, reserved1, core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))).ok() + SetupSetDirectoryIdExA(infhandle, id, directory.param().abi(), flags, reserved1, core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupSetDirectoryIdExW(infhandle: *const core::ffi::c_void, id: u32, directory: P0, flags: u32, reserved1: u32, reserved2: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -4027,7 +4027,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, reserved1, core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))).ok() + SetupSetDirectoryIdExW(infhandle, id, directory.param().abi(), flags, reserved1, core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupSetDirectoryIdW(infhandle: *const core::ffi::c_void, id: u32, directory: P0) -> windows_core::Result<()> @@ -4044,7 +4044,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupSetFileQueueAlternatePlatformA(queuehandle, core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), alternatedefaultcatalogfile.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4053,7 +4053,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetupSetFileQueueAlternatePlatformW(queuehandle, core::mem::transmute(alternateplatforminfo.unwrap_or(core::ptr::null())), alternatedefaultcatalogfile.param().abi()).ok() } #[inline] pub unsafe fn SetupSetFileQueueFlags(filequeue: *const core::ffi::c_void, flagmask: u32, flags: u32) -> windows_core::Result<()> { @@ -4112,7 +4112,7 @@ pub unsafe fn SetupTerminateFileLog(fileloghandle: *const core::ffi::c_void) -> #[inline] pub unsafe fn SetupUninstallNewlyCopiedInfs(filequeue: *const core::ffi::c_void, flags: u32, reserved: 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()))).ok() + SetupUninstallNewlyCopiedInfs(filequeue, flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetupUninstallOEMInfA(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -4120,7 +4120,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupUninstallOEMInfA(inffilename : windows_core::PCSTR, flags : u32, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupUninstallOEMInfA(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + SetupUninstallOEMInfA(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetupUninstallOEMInfW(inffilename: P0, flags: u32, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -4128,7 +4128,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupUninstallOEMInfW(inffilename : windows_core::PCWSTR, flags : u32, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetupUninstallOEMInfW(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + SetupUninstallOEMInfW(inffilename.param().abi(), flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4137,7 +4137,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupVerifyInfFileA(infname : windows_core::PCSTR, altplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsignerinfo : *mut SP_INF_SIGNER_INFO_V2_A) -> super::super::Foundation:: BOOL); - SetupVerifyInfFileA(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(std::ptr::null())), infsignerinfo) + SetupVerifyInfFileA(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::ptr::null())), infsignerinfo) } #[cfg(all(feature = "Win32_System_Diagnostics_Debug", feature = "Win32_System_SystemInformation"))] #[inline] @@ -4146,7 +4146,7 @@ where P0: windows_core::Param, { windows_targets::link!("setupapi.dll" "system" fn SetupVerifyInfFileW(infname : windows_core::PCWSTR, altplatforminfo : *const SP_ALTPLATFORM_INFO_V2, infsignerinfo : *mut SP_INF_SIGNER_INFO_V2_W) -> super::super::Foundation:: BOOL); - SetupVerifyInfFileW(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(std::ptr::null())), infsignerinfo) + SetupVerifyInfFileW(infname.param().abi(), core::mem::transmute(altplatforminfo.unwrap_or(core::ptr::null())), infsignerinfo) } #[inline] pub unsafe fn SetupWriteTextLog(logtoken: u64, category: u32, flags: u32, messagestr: P0) @@ -4177,7 +4177,7 @@ where P2: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesA(hwndparent : super::super::Foundation:: HWND, hardwareid : windows_core::PCSTR, fullinfpath : windows_core::PCSTR, installflags : UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdateDriverForPlugAndPlayDevicesA(hwndparent.param().abi(), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(std::ptr::null_mut()))).ok() + UpdateDriverForPlugAndPlayDevicesA(hwndparent.param().abi(), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn UpdateDriverForPlugAndPlayDevicesW(hwndparent: P0, hardwareid: P1, fullinfpath: P2, installflags: UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> @@ -4187,7 +4187,7 @@ where P2: windows_core::Param, { windows_targets::link!("newdev.dll" "system" fn UpdateDriverForPlugAndPlayDevicesW(hwndparent : super::super::Foundation:: HWND, hardwareid : windows_core::PCWSTR, fullinfpath : windows_core::PCWSTR, installflags : UPDATEDRIVERFORPLUGANDPLAYDEVICES_FLAGS, brebootrequired : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - UpdateDriverForPlugAndPlayDevicesW(hwndparent.param().abi(), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(std::ptr::null_mut()))).ok() + UpdateDriverForPlugAndPlayDevicesW(hwndparent.param().abi(), hardwareid.param().abi(), fullinfpath.param().abi(), installflags, core::mem::transmute(brebootrequired.unwrap_or(core::ptr::null_mut()))).ok() } pub const ALLOC_LOG_CONF: CM_LOG_CONF = CM_LOG_CONF(2u32); pub const BASIC_LOG_CONF: CM_LOG_CONF = CM_LOG_CONF(0u32); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs index 6cf2fc433d..6d4733a9dd 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/DeviceQuery/mod.rs @@ -11,7 +11,7 @@ where pub unsafe fn DevCreateObjectQuery(objecttype: DEV_OBJECT_TYPE, queryflags: u32, prequestedproperties: Option<&[super::Properties::DEVPROPCOMPKEY]>, pfilter: Option<&[DEVPROP_FILTER_EXPRESSION]>, pcallback: PDEV_QUERY_RESULT_CALLBACK, pcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("api-ms-win-devices-query-l1-1-0.dll" "system" fn DevCreateObjectQuery(objecttype : DEV_OBJECT_TYPE, queryflags : u32, crequestedproperties : u32, prequestedproperties : *const super::Properties:: DEVPROPCOMPKEY, cfilterexpressioncount : u32, pfilter : *const DEVPROP_FILTER_EXPRESSION, pcallback : PDEV_QUERY_RESULT_CALLBACK, pcontext : *const core::ffi::c_void, phdevquery : *mut HDEVQUERY) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + DevCreateObjectQuery(objecttype, queryflags, prequestedproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prequestedproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Devices_Properties")] #[inline] @@ -28,7 +28,7 @@ pub unsafe fn DevCreateObjectQueryEx(objecttype: DEV_OBJECT_TYPE, queryflags: u3 pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__, ) .map(|| result__) @@ -50,7 +50,7 @@ where pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__, ) .map(|| result__) @@ -74,7 +74,7 @@ where pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__, ) .map(|| result__) @@ -96,7 +96,7 @@ where pfilter.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pfilter.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__, ) .map(|| result__) @@ -120,7 +120,7 @@ where pextendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pextendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, - core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__, ) .map(|| result__) 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 625678c1d3..2da3f2f573 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Display/mod.rs @@ -160,7 +160,7 @@ pub unsafe fn EngCreateSemaphore() -> HSEMAPHORE { #[inline] pub unsafe fn EngDeleteClip(pco: Option<*const CLIPOBJ>) { windows_targets::link!("gdi32.dll" "system" fn EngDeleteClip(pco : *const CLIPOBJ)); - EngDeleteClip(core::mem::transmute(pco.unwrap_or(std::ptr::null()))) + EngDeleteClip(core::mem::transmute(pco.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -277,7 +277,7 @@ where #[inline] pub unsafe fn EngMultiByteToUnicodeN(unicodestring: windows_core::PWSTR, maxbytesinunicodestring: u32, bytesinunicodestring: Option<*mut u32>, multibytestring: &[u8]) { windows_targets::link!("gdi32.dll" "system" fn EngMultiByteToUnicodeN(unicodestring : windows_core::PWSTR, maxbytesinunicodestring : u32, bytesinunicodestring : *mut u32, multibytestring : windows_core::PCSTR, bytesinmultibytestring : u32)); - EngMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(std::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) + EngMultiByteToUnicodeN(core::mem::transmute(unicodestring), maxbytesinunicodestring, core::mem::transmute(bytesinunicodestring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap()) } #[inline] pub unsafe fn EngMultiByteToWideChar(codepage: u32, widecharstring: windows_core::PWSTR, bytesinwidecharstring: i32, multibytestring: Option<&[u8]>) -> i32 { @@ -349,7 +349,7 @@ pub unsafe fn EngTextOut(pso: *mut SURFOBJ, pstro: *mut STROBJ, pfo: *mut FONTOB #[inline] pub unsafe fn EngTransparentBlt(psodst: *const SURFOBJ, psosrc: *const SURFOBJ, pco: Option<*const CLIPOBJ>, pxlo: Option<*const XLATEOBJ>, prcldst: *const super::super::Foundation::RECTL, prclsrc: *const super::super::Foundation::RECTL, transcolor: u32, bcalledfrombitblt: u32) -> super::super::Foundation::BOOL { windows_targets::link!("gdi32.dll" "system" fn EngTransparentBlt(psodst : *const SURFOBJ, psosrc : *const SURFOBJ, pco : *const CLIPOBJ, pxlo : *const XLATEOBJ, prcldst : *const super::super::Foundation:: RECTL, prclsrc : *const super::super::Foundation:: RECTL, transcolor : u32, bcalledfrombitblt : u32) -> super::super::Foundation:: BOOL); - EngTransparentBlt(psodst, psosrc, core::mem::transmute(pco.unwrap_or(std::ptr::null())), core::mem::transmute(pxlo.unwrap_or(std::ptr::null())), prcldst, prclsrc, transcolor, bcalledfrombitblt) + EngTransparentBlt(psodst, psosrc, core::mem::transmute(pco.unwrap_or(core::ptr::null())), core::mem::transmute(pxlo.unwrap_or(core::ptr::null())), prcldst, prclsrc, transcolor, bcalledfrombitblt) } #[inline] pub unsafe fn EngUnicodeToMultiByteN(multibytestring: &mut [u8], bytesinmultibytestring: Option<*mut u32>, unicodestring: P0, bytesinunicodestring: u32) @@ -357,7 +357,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EngUnicodeToMultiByteN(multibytestring : windows_core::PSTR, maxbytesinmultibytestring : u32, bytesinmultibytestring : *mut u32, unicodestring : windows_core::PCWSTR, bytesinunicodestring : u32)); - EngUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(std::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) + EngUnicodeToMultiByteN(core::mem::transmute(multibytestring.as_ptr()), multibytestring.len().try_into().unwrap(), core::mem::transmute(bytesinmultibytestring.unwrap_or(core::ptr::null_mut())), unicodestring.param().abi(), bytesinunicodestring) } #[inline] pub unsafe fn EngUnlockSurface(pso: *mut SURFOBJ) { @@ -559,13 +559,13 @@ where P0: windows_core::Param, { windows_targets::link!("dxva2.dll" "system" fn GetVCPFeatureAndVCPFeatureReply(hmonitor : super::super::Foundation:: HANDLE, bvcpcode : u8, pvct : *mut MC_VCP_CODE_TYPE, pdwcurrentvalue : *mut u32, pdwmaximumvalue : *mut u32) -> i32); - GetVCPFeatureAndVCPFeatureReply(hmonitor.param().abi(), bvcpcode, core::mem::transmute(pvct.unwrap_or(std::ptr::null_mut())), pdwcurrentvalue, core::mem::transmute(pdwmaximumvalue.unwrap_or(std::ptr::null_mut()))) + GetVCPFeatureAndVCPFeatureReply(hmonitor.param().abi(), bvcpcode, core::mem::transmute(pvct.unwrap_or(core::ptr::null_mut())), pdwcurrentvalue, core::mem::transmute(pdwmaximumvalue.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn HT_Get8BPPFormatPalette(ppaletteentry: Option<*mut super::super::Graphics::Gdi::PALETTEENTRY>, redgamma: u16, greengamma: u16, bluegamma: u16) -> i32 { windows_targets::link!("gdi32.dll" "system" fn HT_Get8BPPFormatPalette(ppaletteentry : *mut super::super::Graphics::Gdi:: PALETTEENTRY, redgamma : u16, greengamma : u16, bluegamma : u16) -> i32); - HT_Get8BPPFormatPalette(core::mem::transmute(ppaletteentry.unwrap_or(std::ptr::null_mut())), redgamma, greengamma, bluegamma) + HT_Get8BPPFormatPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::ptr::null_mut())), redgamma, greengamma, bluegamma) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -574,7 +574,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn HT_Get8BPPMaskPalette(ppaletteentry : *mut super::super::Graphics::Gdi:: PALETTEENTRY, use8bppmaskpal : super::super::Foundation:: BOOL, cmymask : u8, redgamma : u16, greengamma : u16, bluegamma : u16) -> i32); - HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(std::ptr::null_mut())), use8bppmaskpal.param().abi(), cmymask, redgamma, greengamma, bluegamma) + HT_Get8BPPMaskPalette(core::mem::transmute(ppaletteentry.unwrap_or(core::ptr::null_mut())), use8bppmaskpal.param().abi(), cmymask, redgamma, greengamma, bluegamma) } #[inline] pub unsafe fn PATHOBJ_bEnum(ppo: *mut PATHOBJ, ppd: *mut PATHDATA) -> super::super::Foundation::BOOL { @@ -604,7 +604,7 @@ pub unsafe fn PATHOBJ_vGetBounds(ppo: *mut PATHOBJ, prectfx: *mut RECTFX) { #[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: Option<*mut DISPLAYCONFIG_TOPOLOGY_ID>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut()))) } #[inline] pub unsafe fn RestoreMonitorFactoryColorDefaults(hmonitor: P0) -> i32 @@ -745,7 +745,7 @@ pub unsafe fn XFORMOBJ_bApplyXform(pxo: *mut XFORMOBJ, imode: u32, cpoints: u32, #[inline] pub unsafe fn XFORMOBJ_iGetXform(pxo: *const XFORMOBJ, pxform: Option<*mut XFORML>) -> u32 { windows_targets::link!("gdi32.dll" "system" fn XFORMOBJ_iGetXform(pxo : *const XFORMOBJ, pxform : *mut XFORML) -> u32); - XFORMOBJ_iGetXform(pxo, core::mem::transmute(pxform.unwrap_or(std::ptr::null_mut()))) + XFORMOBJ_iGetXform(pxo, core::mem::transmute(pxform.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn XLATEOBJ_cGetPalette(pxlo: *mut XLATEOBJ, ipal: u32, cpal: u32, ppal: *mut u32) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs index 1877db9793..ebbba966f9 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Enumeration/Pnp/mod.rs @@ -15,7 +15,7 @@ where { windows_targets::link!("cfgmgr32.dll" "system" fn SwDeviceCreate(pszenumeratorname : windows_core::PCWSTR, pszparentdeviceinstance : windows_core::PCWSTR, pcreateinfo : *const SW_DEVICE_CREATE_INFO, cpropertycount : u32, pproperties : *const super::super::Properties:: DEVPROPERTY, pcallback : SW_DEVICE_CREATE_CALLBACK, pcontext : *const core::ffi::c_void, phswdevice : *mut HSWDEVICE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + SwDeviceCreate(pszenumeratorname.param().abi(), pszparentdeviceinstance.param().abi(), pcreateinfo, pproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn SwDeviceGetLifetime(hswdevice: P0) -> windows_core::Result 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 d97f64c263..8e7245dedb 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Fax/mod.rs @@ -5397,19 +5397,19 @@ impl IStiDevice { } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadData(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteData(&self, lpbuffer: *const core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadCommand(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteCommand(&self, lpbuffer: *const core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Subscribe(&self, lpsubsribe: *mut STISUBSCRIBE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Subscribe)(windows_core::Interface::as_raw(self), lpsubsribe).ok() @@ -5582,19 +5582,19 @@ impl IStiUSD { } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadData(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadData)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteData(&self, lpbuffer: *const core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteData)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawReadCommand(&self, lpbuffer: *mut core::ffi::c_void, lpdwnumberofbytes: *mut u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawReadCommand)(windows_core::Interface::as_raw(self), lpbuffer, lpdwnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn RawWriteCommand(&self, lpbuffer: *const core::ffi::c_void, nnumberofbytes: u32, lpoverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RawWriteCommand)(windows_core::Interface::as_raw(self), lpbuffer, nnumberofbytes, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetNotificationHandle(&self, hevent: P0) -> windows_core::Result<()> where @@ -5690,7 +5690,7 @@ impl IStillImageW { (windows_core::Interface::vtable(self).SetDeviceValue)(windows_core::Interface::as_raw(self), pwszdevicename.param().abi(), pvaluename.param().abi(), r#type, core::mem::transmute(pdata.as_ptr()), pdata.len().try_into().unwrap()).ok() } pub unsafe fn GetSTILaunchInformation(&self, pwszdevicename: &mut [u16; 128], pdweventcode: Option<*mut u32>, pwszeventname: &mut [u16; 128]) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSTILaunchInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszdevicename.as_ptr()), core::mem::transmute(pdweventcode.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pwszeventname.as_ptr())).ok() + (windows_core::Interface::vtable(self).GetSTILaunchInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszdevicename.as_ptr()), core::mem::transmute(pdweventcode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwszeventname.as_ptr())).ok() } pub unsafe fn RegisterLaunchApplication(&self, pwszappname: P0, pwszcommandline: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs index 026c3396de..0c124e09e2 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/HumanInterfaceDevice/mod.rs @@ -345,7 +345,7 @@ where #[inline] pub unsafe fn HidP_TranslateUsagesToI8042ScanCodes(changedusagelist: &[u16], keyaction: HIDP_KEYBOARD_DIRECTION, modifierstate: *mut HIDP_KEYBOARD_MODIFIER_STATE, insertcodesprocedure: PHIDP_INSERT_SCANCODES, insertcodescontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::NTSTATUS { windows_targets::link!("hid.dll" "system" fn HidP_TranslateUsagesToI8042ScanCodes(changedusagelist : *const u16, usagelistlength : u32, keyaction : HIDP_KEYBOARD_DIRECTION, modifierstate : *mut HIDP_KEYBOARD_MODIFIER_STATE, insertcodesprocedure : PHIDP_INSERT_SCANCODES, insertcodescontext : *const core::ffi::c_void) -> super::super::Foundation:: NTSTATUS); - HidP_TranslateUsagesToI8042ScanCodes(core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), keyaction, modifierstate, insertcodesprocedure, core::mem::transmute(insertcodescontext.unwrap_or(std::ptr::null()))) + HidP_TranslateUsagesToI8042ScanCodes(core::mem::transmute(changedusagelist.as_ptr()), changedusagelist.len().try_into().unwrap(), keyaction, modifierstate, insertcodesprocedure, core::mem::transmute(insertcodescontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HidP_UnsetUsages(reporttype: HIDP_REPORT_TYPE, usagepage: u16, linkcollection: u16, usagelist: *mut u16, usagelength: *mut u32, preparseddata: P0, report: &[u8]) -> super::super::Foundation::NTSTATUS diff --git a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs index 75ab0d5c94..70c0392c49 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/ImageAcquisition/mod.rs @@ -245,7 +245,7 @@ impl IWiaDataTransfer { (windows_core::Interface::vtable(self).idtGetBandedData)(windows_core::Interface::as_raw(self), pwiadatatransinfo, piwiadatacallback.param().abi()).ok() } pub unsafe fn idtQueryGetData(&self, pfe: Option<*const WIA_FORMAT_INFO>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).idtQueryGetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfe.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).idtQueryGetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfe.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn idtEnumWIA_FORMAT_INFO(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -738,7 +738,7 @@ impl IWiaItem2 { } pub unsafe fn EnumChildItems(&self, pcategoryguid: Option<*const windows_core::GUID>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumChildItems)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategoryguid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumChildItems)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategoryguid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn FindItemByName(&self, lflags: i32, bstrfullitemname: P0) -> windows_core::Result where @@ -761,7 +761,7 @@ impl IWiaItem2 { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), lflags, hwndparent.param().abi(), bstrfoldername.param().abi(), bstrfilename.param().abi(), plnumfiles, ppbstrfilepaths, core::mem::transmute(ppitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeviceDlg)(windows_core::Interface::as_raw(self), lflags, hwndparent.param().abi(), bstrfoldername.param().abi(), bstrfilename.param().abi(), plnumfiles, ppbstrfilepaths, core::mem::transmute(ppitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DeviceCommand(&self, lflags: i32, pcmdguid: *const windows_core::GUID, ppiwiaitem2: *mut Option) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DeviceCommand)(windows_core::Interface::as_raw(self), lflags, pcmdguid, core::mem::transmute(ppiwiaitem2)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs index c3b0feae58..91eecdc39f 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/PortableDevices/mod.rs @@ -1226,7 +1226,7 @@ impl core::ops::Deref for IPortableDeviceUnitsStream { windows_core::imp::interface_hierarchy!(IPortableDeviceUnitsStream, windows_core::IUnknown); impl IPortableDeviceUnitsStream { pub unsafe fn SeekInUnits(&self, dlibmove: i64, units: WPD_STREAM_UNITS, dworigin: u32, plibnewposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SeekInUnits)(windows_core::Interface::as_raw(self), dlibmove, units, dworigin, core::mem::transmute(plibnewposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SeekInUnits)(windows_core::Interface::as_raw(self), dlibmove, units, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Cancel(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs index d72810b316..d000b60861 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Sensors/mod.rs @@ -211,7 +211,7 @@ where #[inline] pub unsafe fn PropVariantGetInformation(propvariantvalue: *const super::super::System::Com::StructuredStorage::PROPVARIANT, propvariantoffset: Option<*mut u32>, propvariantsize: Option<*mut u32>, propvariantpointer: Option<*mut *mut core::ffi::c_void>, remappedtype: Option<*mut super::Properties::DEVPROPTYPE>) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn PropVariantGetInformation(propvariantvalue : *const core::mem::MaybeUninit < super::super::System::Com::StructuredStorage:: PROPVARIANT >, propvariantoffset : *mut u32, propvariantsize : *mut u32, propvariantpointer : *mut *mut core::ffi::c_void, remappedtype : *mut super::Properties:: DEVPROPTYPE) -> super::super::Foundation:: NTSTATUS); - PropVariantGetInformation(core::mem::transmute(propvariantvalue), core::mem::transmute(propvariantoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(propvariantsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(propvariantpointer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remappedtype.unwrap_or(std::ptr::null_mut()))) + PropVariantGetInformation(core::mem::transmute(propvariantvalue), core::mem::transmute(propvariantoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propvariantsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(propvariantpointer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remappedtype.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] #[inline] @@ -228,7 +228,7 @@ pub unsafe fn PropertiesListGetFillableCount(buffersizebytes: u32) -> u32 { #[inline] pub unsafe fn SensorCollectionGetAt(index: u32, psensorslist: *const SENSOR_COLLECTION_LIST, pkey: Option<*mut super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> super::super::Foundation::NTSTATUS { windows_targets::link!("sensorsutilsv2.dll" "system" fn SensorCollectionGetAt(index : u32, psensorslist : *const SENSOR_COLLECTION_LIST, pkey : *mut super::super::UI::Shell::PropertiesSystem:: PROPERTYKEY, pvalue : *mut core::mem::MaybeUninit < super::super::System::Com::StructuredStorage:: PROPVARIANT >) -> super::super::Foundation:: NTSTATUS); - SensorCollectionGetAt(index, psensorslist, core::mem::transmute(pkey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(std::ptr::null_mut()))) + SensorCollectionGetAt(index, psensorslist, core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SerializationBufferAllocate(sizeinbytes: u32, pbuffer: *mut *mut u8) -> super::super::Foundation::NTSTATUS { @@ -238,7 +238,7 @@ pub unsafe fn SerializationBufferAllocate(sizeinbytes: u32, pbuffer: *mut *mut u #[inline] pub unsafe fn SerializationBufferFree(buffer: Option<*const u8>) { windows_targets::link!("sensorsutilsv2.dll" "system" fn SerializationBufferFree(buffer : *const u8)); - SerializationBufferFree(core::mem::transmute(buffer.unwrap_or(std::ptr::null()))) + SerializationBufferFree(core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) } windows_core::imp::define_interface!(ILocationPermissions, ILocationPermissions_Vtbl, 0xd5fb0a7f_e74e_44f5_8e02_4806863a274f); impl core::ops::Deref for ILocationPermissions { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs index 1ffe30b81a..c41676a2b6 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/SerialCommunication/mod.rs @@ -13,7 +13,7 @@ where P1: windows_core::Param, { windows_targets::link!("msports.dll" "system" fn ComDBClaimPort(hcomdb : HCOMDB, comnumber : u32, forceclaim : super::super::Foundation:: BOOL, forced : *mut super::super::Foundation:: BOOL) -> i32); - ComDBClaimPort(hcomdb.param().abi(), comnumber, forceclaim.param().abi(), core::mem::transmute(forced.unwrap_or(std::ptr::null_mut()))) + ComDBClaimPort(hcomdb.param().abi(), comnumber, forceclaim.param().abi(), core::mem::transmute(forced.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ComDBClose(hcomdb: P0) -> i32 @@ -29,7 +29,7 @@ where P0: windows_core::Param, { windows_targets::link!("msports.dll" "system" fn ComDBGetCurrentPortUsage(hcomdb : HCOMDB, buffer : *mut u8, buffersize : u32, reporttype : u32, maxportsreported : *mut u32) -> i32); - ComDBGetCurrentPortUsage(hcomdb.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().try_into().unwrap()), reporttype, core::mem::transmute(maxportsreported.unwrap_or(std::ptr::null_mut()))) + ComDBGetCurrentPortUsage(hcomdb.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().try_into().unwrap()), reporttype, core::mem::transmute(maxportsreported.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ComDBOpen(phcomdb: *mut HCOMDB) -> i32 { diff --git a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs index b68b5faf1f..91b7c53067 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Tapi/mod.rs @@ -1694,7 +1694,7 @@ windows_core::imp::interface_hierarchy!(IEnumAddress, windows_core::IUnknown); impl IEnumAddress { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1833,7 +1833,7 @@ impl core::ops::Deref for IEnumBstr { windows_core::imp::interface_hierarchy!(IEnumBstr, windows_core::IUnknown); impl IEnumBstr { pub unsafe fn Next(&self, ppstrings: &mut [windows_core::BSTR], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstrings.len().try_into().unwrap(), core::mem::transmute(ppstrings.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppstrings.len().try_into().unwrap(), core::mem::transmute(ppstrings.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1865,7 +1865,7 @@ windows_core::imp::interface_hierarchy!(IEnumCall, windows_core::IUnknown); impl IEnumCall { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1900,7 +1900,7 @@ windows_core::imp::interface_hierarchy!(IEnumCallHub, windows_core::IUnknown); impl IEnumCallHub { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1935,7 +1935,7 @@ windows_core::imp::interface_hierarchy!(IEnumCallingCard, windows_core::IUnknown impl IEnumCallingCard { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1969,7 +1969,7 @@ impl core::ops::Deref for IEnumDialableAddrs { windows_core::imp::interface_hierarchy!(IEnumDialableAddrs, windows_core::IUnknown); impl IEnumDialableAddrs { pub unsafe fn Next(&self, ppelements: &mut [windows_core::BSTR], pcfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2001,7 +2001,7 @@ windows_core::imp::interface_hierarchy!(IEnumDirectory, windows_core::IUnknown); impl IEnumDirectory { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pcfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2036,7 +2036,7 @@ windows_core::imp::interface_hierarchy!(IEnumDirectoryObject, windows_core::IUnk impl IEnumDirectoryObject { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, pval: &mut [Option], pcfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pval.len().try_into().unwrap(), core::mem::transmute(pval.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pval.len().try_into().unwrap(), core::mem::transmute(pval.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2071,7 +2071,7 @@ windows_core::imp::interface_hierarchy!(IEnumLocation, windows_core::IUnknown); impl IEnumLocation { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2106,7 +2106,7 @@ windows_core::imp::interface_hierarchy!(IEnumMcastScope, windows_core::IUnknown) impl IEnumMcastScope { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppscopes: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppscopes), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppscopes), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2141,7 +2141,7 @@ windows_core::imp::interface_hierarchy!(IEnumPhone, windows_core::IUnknown); impl IEnumPhone { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2176,7 +2176,7 @@ windows_core::imp::interface_hierarchy!(IEnumPluggableSuperclassInfo, windows_co impl IEnumPluggableSuperclassInfo { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2211,7 +2211,7 @@ windows_core::imp::interface_hierarchy!(IEnumPluggableTerminalClassInfo, windows impl IEnumPluggableTerminalClassInfo { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2281,7 +2281,7 @@ windows_core::imp::interface_hierarchy!(IEnumStream, windows_core::IUnknown); impl IEnumStream { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2316,7 +2316,7 @@ windows_core::imp::interface_hierarchy!(IEnumSubStream, windows_core::IUnknown); impl IEnumSubStream { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2351,7 +2351,7 @@ windows_core::imp::interface_hierarchy!(IEnumTerminal, windows_core::IUnknown); impl IEnumTerminal { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, celt: u32, ppelements: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(ppelements), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -2385,7 +2385,7 @@ impl core::ops::Deref for IEnumTerminalClass { windows_core::imp::interface_hierarchy!(IEnumTerminalClass, windows_core::IUnknown); impl IEnumTerminalClass { pub unsafe fn Next(&self, pelements: &mut [windows_core::GUID], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pelements.len().try_into().unwrap(), core::mem::transmute(pelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pelements.len().try_into().unwrap(), core::mem::transmute(pelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() 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 913da0fe79..de61249164 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/Usb/mod.rs @@ -13,7 +13,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(lengthtransferred.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_ControlTransfer(interfacehandle.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().try_into().unwrap()), core::mem::transmute(lengthtransferred.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinUsb_FlushPipe(interfacehandle: P0, pipeid: u8) -> windows_core::Result<()> @@ -156,7 +156,7 @@ where #[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: 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().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_ReadIsochPipe(bufferhandle, offset, length, framenumber, isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -165,7 +165,7 @@ where P0: windows_core::Param, { 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.param().abi(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_ReadIsochPipeAsap(bufferhandle, offset, length, continuestream.param().abi(), isopacketdescriptors.len().try_into().unwrap(), core::mem::transmute(isopacketdescriptors.as_ptr()), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -174,7 +174,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(lengthtransferred.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_ReadPipe(interfacehandle.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().try_into().unwrap()), core::mem::transmute(lengthtransferred.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WinUsb_RegisterIsochBuffer(interfacehandle: P0, pipeid: u8, buffer: &mut [u8], isochbufferhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -241,7 +241,7 @@ pub unsafe fn WinUsb_UnregisterIsochBuffer(isochbufferhandle: *const core::ffi:: #[inline] pub unsafe fn WinUsb_WriteIsochPipe(bufferhandle: *const core::ffi::c_void, offset: u32, length: u32, framenumber: *mut u32, overlapped: 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()))).ok() + WinUsb_WriteIsochPipe(bufferhandle, offset, length, framenumber, core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -250,7 +250,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_WriteIsochPipeAsap(bufferhandle, offset, length, continuestream.param().abi(), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -259,7 +259,7 @@ where P0: windows_core::Param, { 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.param().abi(), pipeid, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(lengthtransferred.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))).ok() + WinUsb_WritePipe(interfacehandle.param().abi(), pipeid, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(lengthtransferred.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))).ok() } pub const ALLOW_PARTIAL_READS: WINUSB_PIPE_POLICY = WINUSB_PIPE_POLICY(5u32); pub const ALL_PIPE: PIPE_TYPE = PIPE_TYPE(3i32); diff --git a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs index 0d1e44f7ab..c416fe8814 100644 --- a/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Devices/WebServicesOnDevices/mod.rs @@ -168,7 +168,7 @@ where { windows_targets::link!("wsdapi.dll" "system" fn WSDGenerateFaultEx(pcode : *const WSDXML_NAME, psubcode : *const WSDXML_NAME, preasons : *const WSD_LOCALIZED_STRING_LIST, pszdetail : windows_core::PCWSTR, ppfault : *mut *mut WSD_SOAP_FAULT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WSDGenerateFaultEx(pcode, core::mem::transmute(psubcode.unwrap_or(std::ptr::null())), preasons, pszdetail.param().abi(), &mut result__).map(|| result__) + WSDGenerateFaultEx(pcode, core::mem::transmute(psubcode.unwrap_or(core::ptr::null())), preasons, pszdetail.param().abi(), &mut result__).map(|| result__) } #[inline] pub unsafe fn WSDGetConfigurationOption(dwoption: u32, pvoid: *mut core::ffi::c_void, cboutbuffer: u32) -> windows_core::Result<()> { @@ -183,12 +183,12 @@ pub unsafe fn WSDSetConfigurationOption(dwoption: u32, pvoid: *const core::ffi:: #[inline] pub unsafe fn WSDUriDecode(source: &[u16], destout: *mut windows_core::PWSTR, cchdestout: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDUriDecode(source : windows_core::PCWSTR, cchsource : u32, destout : *mut windows_core::PWSTR, cchdestout : *mut u32) -> windows_core::HRESULT); - WSDUriDecode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, core::mem::transmute(cchdestout.unwrap_or(std::ptr::null_mut()))).ok() + WSDUriDecode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, core::mem::transmute(cchdestout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WSDUriEncode(source: &[u16], destout: *mut windows_core::PWSTR, cchdestout: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("wsdapi.dll" "system" fn WSDUriEncode(source : windows_core::PCWSTR, cchsource : u32, destout : *mut windows_core::PWSTR, cchdestout : *mut u32) -> windows_core::HRESULT); - WSDUriEncode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, core::mem::transmute(cchdestout.unwrap_or(std::ptr::null_mut()))).ok() + WSDUriEncode(core::mem::transmute(source.as_ptr()), source.len().try_into().unwrap(), destout, core::mem::transmute(cchdestout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WSDXMLAddChild(pparent: *mut WSDXML_ELEMENT, pchild: *mut WSDXML_ELEMENT) -> windows_core::Result<()> { @@ -384,7 +384,7 @@ impl IWSDDeviceHost { (windows_core::Interface::vtable(self).RegisterPortType)(windows_core::Interface::as_raw(self), pporttype).ok() } pub unsafe fn SetMetadata(&self, pthismodelmetadata: *const WSD_THIS_MODEL_METADATA, pthisdevicemetadata: *const WSD_THIS_DEVICE_METADATA, phostmetadata: Option<*const WSD_HOST_METADATA>, pcustommetadata: Option<*const WSD_METADATA_SECTION_LIST>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetMetadata)(windows_core::Interface::as_raw(self), pthismodelmetadata, pthisdevicemetadata, core::mem::transmute(phostmetadata.unwrap_or(std::ptr::null())), core::mem::transmute(pcustommetadata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetMetadata)(windows_core::Interface::as_raw(self), pthismodelmetadata, pthisdevicemetadata, core::mem::transmute(phostmetadata.unwrap_or(core::ptr::null())), core::mem::transmute(pcustommetadata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn RegisterService(&self, pszserviceid: P0, pservice: P1) -> windows_core::Result<()> where @@ -405,7 +405,7 @@ impl IWSDDeviceHost { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).AddDynamicService)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), pszendpointaddress.param().abi(), core::mem::transmute(pporttype.unwrap_or(std::ptr::null())), core::mem::transmute(pportname.unwrap_or(std::ptr::null())), core::mem::transmute(pany.unwrap_or(std::ptr::null())), pservice.param().abi()).ok() + (windows_core::Interface::vtable(self).AddDynamicService)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), pszendpointaddress.param().abi(), core::mem::transmute(pporttype.unwrap_or(core::ptr::null())), core::mem::transmute(pportname.unwrap_or(core::ptr::null())), core::mem::transmute(pany.unwrap_or(core::ptr::null())), pservice.param().abi()).ok() } pub unsafe fn RemoveDynamicService(&self, pszserviceid: P0) -> windows_core::Result<()> where @@ -424,7 +424,7 @@ impl IWSDDeviceHost { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SignalEvent)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), core::mem::transmute(pbody.unwrap_or(std::ptr::null())), poperation).ok() + (windows_core::Interface::vtable(self).SignalEvent)(windows_core::Interface::as_raw(self), pszserviceid.param().abi(), core::mem::transmute(pbody.unwrap_or(core::ptr::null())), poperation).ok() } } #[repr(C)] @@ -553,7 +553,7 @@ impl IWSDEndpointProxy { (windows_core::Interface::vtable(self).SendOneWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation).ok() } pub unsafe fn SendTwoWayRequest(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, presponsecontext: Option<*const WSD_SYNCHRONOUS_RESPONSE_CONTEXT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SendTwoWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation, core::mem::transmute(presponsecontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SendTwoWayRequest)(windows_core::Interface::as_raw(self), pbody, poperation, core::mem::transmute(presponsecontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SendTwoWayRequestAsync(&self, pbody: *const core::ffi::c_void, poperation: *const WSD_OPERATION, pasyncstate: P0, pcallback: P1) -> windows_core::Result where @@ -934,13 +934,13 @@ impl IWSDServiceMessaging { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody.unwrap_or(std::ptr::null())), poperation, pmessageparameters.param().abi()).ok() + (windows_core::Interface::vtable(self).SendResponse)(windows_core::Interface::as_raw(self), core::mem::transmute(pbody.unwrap_or(core::ptr::null())), poperation, pmessageparameters.param().abi()).ok() } pub unsafe fn FaultRequest(&self, prequestheader: *const WSD_SOAP_HEADER, pmessageparameters: P0, pfault: Option<*const WSD_SOAP_FAULT>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), prequestheader, pmessageparameters.param().abi(), core::mem::transmute(pfault.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).FaultRequest)(windows_core::Interface::as_raw(self), prequestheader, pmessageparameters.param().abi(), core::mem::transmute(pfault.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -977,7 +977,7 @@ impl IWSDServiceProxy { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), poperation, punknown.param().abi(), pany, core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SubscribeToOperation)(windows_core::Interface::as_raw(self), poperation, punknown.param().abi(), pany, core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnsubscribeToOperation(&self, poperation: *const WSD_OPERATION) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnsubscribeToOperation)(windows_core::Interface::as_raw(self), poperation).ok() @@ -1017,7 +1017,7 @@ impl IWSDServiceProxyEventing { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), punknown.param().abi(), core::mem::transmute(pexpires.unwrap_or(std::ptr::null())), core::mem::transmute(pany.unwrap_or(std::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), punknown.param().abi(), core::mem::transmute(pexpires.unwrap_or(core::ptr::null())), core::mem::transmute(pany.unwrap_or(core::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BeginSubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], punknown: P0, pexpires: Option<*const WSD_EVENTING_EXPIRES>, pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P1, pasynccallback: P2) -> windows_core::Result where @@ -1026,13 +1026,13 @@ impl IWSDServiceProxyEventing { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).BeginSubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), punknown.param().abi(), core::mem::transmute(pexpires.unwrap_or(std::ptr::null())), core::mem::transmute(pany.unwrap_or(std::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginSubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), punknown.param().abi(), core::mem::transmute(pexpires.unwrap_or(core::ptr::null())), core::mem::transmute(pany.unwrap_or(core::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndSubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], presult: P0, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EndSubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndSubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: *const WSDXML_ELEMENT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnsubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), pany).ok() @@ -1043,7 +1043,7 @@ impl IWSDServiceProxyEventing { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).BeginUnsubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(std::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginUnsubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(core::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndUnsubscribeToMultipleOperations(&self, poperations: &[WSD_OPERATION], presult: P0) -> windows_core::Result<()> where @@ -1052,7 +1052,7 @@ impl IWSDServiceProxyEventing { (windows_core::Interface::vtable(self).EndUnsubscribeToMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi()).ok() } pub unsafe fn RenewMultipleOperations(&self, poperations: &[WSD_OPERATION], pexpires: Option<*const WSD_EVENTING_EXPIRES>, pany: Option<*const WSDXML_ELEMENT>, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pexpires.unwrap_or(std::ptr::null())), core::mem::transmute(pany.unwrap_or(std::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).RenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pexpires.unwrap_or(core::ptr::null())), core::mem::transmute(pany.unwrap_or(core::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BeginRenewMultipleOperations(&self, poperations: &[WSD_OPERATION], pexpires: Option<*const WSD_EVENTING_EXPIRES>, pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P0, pasynccallback: P1) -> windows_core::Result where @@ -1060,16 +1060,16 @@ impl IWSDServiceProxyEventing { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).BeginRenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pexpires.unwrap_or(std::ptr::null())), core::mem::transmute(pany.unwrap_or(std::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginRenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pexpires.unwrap_or(core::ptr::null())), core::mem::transmute(pany.unwrap_or(core::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndRenewMultipleOperations(&self, poperations: &[WSD_OPERATION], presult: P0, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EndRenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndRenewMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: Option<*const WSDXML_ELEMENT>, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(std::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(core::ptr::null())), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BeginGetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], pany: Option<*const WSDXML_ELEMENT>, pasyncstate: P0, pasynccallback: P1) -> windows_core::Result where @@ -1077,13 +1077,13 @@ impl IWSDServiceProxyEventing { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).BeginGetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(std::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginGetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), core::mem::transmute(pany.unwrap_or(core::ptr::null())), pasyncstate.param().abi(), pasynccallback.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndGetStatusForMultipleOperations(&self, poperations: &[WSD_OPERATION], presult: P0, ppexpires: Option<*mut *mut WSD_EVENTING_EXPIRES>, ppany: Option<*mut *mut WSDXML_ELEMENT>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EndGetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndGetStatusForMultipleOperations)(windows_core::Interface::as_raw(self), core::mem::transmute(poperations.as_ptr()), poperations.len().try_into().unwrap(), presult.param().abi(), core::mem::transmute(ppexpires.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppany.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1120,13 +1120,13 @@ impl IWSDSignatureProperty { (windows_core::Interface::vtable(self).IsMessageSignatureTrusted)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetKeyInfo(&self, pbkeyinfo: Option<*mut u8>, pdwkeyinfosize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbkeyinfo.unwrap_or(std::ptr::null_mut())), pdwkeyinfosize).ok() + (windows_core::Interface::vtable(self).GetKeyInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(pbkeyinfo.unwrap_or(core::ptr::null_mut())), pdwkeyinfosize).ok() } pub unsafe fn GetSignature(&self, pbsignature: Option<*mut u8>, pdwsignaturesize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignature.unwrap_or(std::ptr::null_mut())), pdwsignaturesize).ok() + (windows_core::Interface::vtable(self).GetSignature)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), pdwsignaturesize).ok() } pub unsafe fn GetSignedInfoHash(&self, pbsignedinfohash: Option<*mut u8>, pdwhashsize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSignedInfoHash)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignedinfohash.unwrap_or(std::ptr::null_mut())), pdwhashsize).ok() + (windows_core::Interface::vtable(self).GetSignedInfoHash)(windows_core::Interface::as_raw(self), core::mem::transmute(pbsignedinfohash.unwrap_or(core::ptr::null_mut())), pdwhashsize).ok() } } #[repr(C)] @@ -1285,14 +1285,14 @@ impl IWSDXMLContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszsuggestedprefix.param().abi(), core::mem::transmute(ppnamespace.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszsuggestedprefix.param().abi(), core::mem::transmute(ppnamespace.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddNameToNamespace(&self, pszuri: P0, pszname: P1, ppname: Option<*mut *mut WSDXML_NAME>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddNameToNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszname.param().abi(), core::mem::transmute(ppname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddNameToNamespace)(windows_core::Interface::as_raw(self), pszuri.param().abi(), pszname.param().abi(), core::mem::transmute(ppname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetNamespaces(&self, pnamespaces: &[*const WSDXML_NAMESPACE], blayernumber: u8) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetNamespaces)(windows_core::Interface::as_raw(self), core::mem::transmute(pnamespaces.as_ptr()), pnamespaces.len().try_into().unwrap(), blayernumber).ok() @@ -1417,7 +1417,7 @@ impl IWSDiscoveryProvider { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SearchByType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), pszmatchby.param().abi(), psztag.param().abi()).ok() + (windows_core::Interface::vtable(self).SearchByType)(windows_core::Interface::as_raw(self), core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), pszmatchby.param().abi(), psztag.param().abi()).ok() } pub unsafe fn GetXMLContext(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1506,14 +1506,14 @@ impl IWSDiscoveryPublisher { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Publish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn UnPublish(&self, pszid: P0, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P1, pany: Option<*const WSDXML_ELEMENT>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(pany.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UnPublish)(windows_core::Interface::as_raw(self), pszid.param().abi(), ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(pany.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn MatchProbe(&self, pprobemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: P0, pszid: P1, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P2, ptypeslist: Option<*const WSD_NAME_LIST>, pscopeslist: Option<*const WSD_URI_LIST>, pxaddrslist: Option<*const WSD_URI_LIST>) -> windows_core::Result<()> where @@ -1521,7 +1521,7 @@ impl IWSDiscoveryPublisher { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), pprobemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).MatchProbe)(windows_core::Interface::as_raw(self), pprobemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn MatchResolve(&self, presolvemessage: *const WSD_SOAP_MESSAGE, pmessageparameters: P0, pszid: P1, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P2, ptypeslist: Option<*const WSD_NAME_LIST>, pscopeslist: Option<*const WSD_URI_LIST>, pxaddrslist: Option<*const WSD_URI_LIST>) -> windows_core::Result<()> where @@ -1529,7 +1529,7 @@ impl IWSDiscoveryPublisher { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), presolvemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).MatchResolve)(windows_core::Interface::as_raw(self), presolvemessage, pmessageparameters.param().abi(), pszid.param().abi(), ullmetadataversion, ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn PublishEx(&self, pszid: P0, ullmetadataversion: u64, ullinstanceid: u64, ullmessagenumber: u64, pszsessionid: P1, ptypeslist: Option<*const WSD_NAME_LIST>, pscopeslist: Option<*const WSD_URI_LIST>, pxaddrslist: Option<*const WSD_URI_LIST>, pheaderany: Option<*const WSDXML_ELEMENT>, preferenceparameterany: Option<*const WSDXML_ELEMENT>, ppolicyany: Option<*const WSDXML_ELEMENT>, pendpointreferenceany: Option<*const WSDXML_ELEMENT>, pany: Option<*const WSDXML_ELEMENT>) -> windows_core::Result<()> where @@ -1543,14 +1543,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), - core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pheaderany.unwrap_or(std::ptr::null())), - core::mem::transmute(preferenceparameterany.unwrap_or(std::ptr::null())), - core::mem::transmute(ppolicyany.unwrap_or(std::ptr::null())), - core::mem::transmute(pendpointreferenceany.unwrap_or(std::ptr::null())), - core::mem::transmute(pany.unwrap_or(std::ptr::null())), + core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pheaderany.unwrap_or(core::ptr::null())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::ptr::null())), + core::mem::transmute(ppolicyany.unwrap_or(core::ptr::null())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::ptr::null())), + core::mem::transmute(pany.unwrap_or(core::ptr::null())), ) .ok() } @@ -1569,14 +1569,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), - core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pheaderany.unwrap_or(std::ptr::null())), - core::mem::transmute(preferenceparameterany.unwrap_or(std::ptr::null())), - core::mem::transmute(ppolicyany.unwrap_or(std::ptr::null())), - core::mem::transmute(pendpointreferenceany.unwrap_or(std::ptr::null())), - core::mem::transmute(pany.unwrap_or(std::ptr::null())), + core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pheaderany.unwrap_or(core::ptr::null())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::ptr::null())), + core::mem::transmute(ppolicyany.unwrap_or(core::ptr::null())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::ptr::null())), + core::mem::transmute(pany.unwrap_or(core::ptr::null())), ) .ok() } @@ -1595,14 +1595,14 @@ impl IWSDiscoveryPublisher { ullinstanceid, ullmessagenumber, pszsessionid.param().abi(), - core::mem::transmute(ptypeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pscopeslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pxaddrslist.unwrap_or(std::ptr::null())), - core::mem::transmute(pheaderany.unwrap_or(std::ptr::null())), - core::mem::transmute(preferenceparameterany.unwrap_or(std::ptr::null())), - core::mem::transmute(ppolicyany.unwrap_or(std::ptr::null())), - core::mem::transmute(pendpointreferenceany.unwrap_or(std::ptr::null())), - core::mem::transmute(pany.unwrap_or(std::ptr::null())), + core::mem::transmute(ptypeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pscopeslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pxaddrslist.unwrap_or(core::ptr::null())), + core::mem::transmute(pheaderany.unwrap_or(core::ptr::null())), + core::mem::transmute(preferenceparameterany.unwrap_or(core::ptr::null())), + core::mem::transmute(ppolicyany.unwrap_or(core::ptr::null())), + core::mem::transmute(pendpointreferenceany.unwrap_or(core::ptr::null())), + core::mem::transmute(pany.unwrap_or(core::ptr::null())), ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs index a520b37f17..2c184e414e 100644 --- a/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Gaming/mod.rs @@ -16,7 +16,7 @@ where #[inline] pub unsafe fn CheckGamingPrivilegeWithUI(privilegeid: u32, scope: &windows_core::HSTRING, policy: &windows_core::HSTRING, friendlymessage: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-1.dll" "system" fn CheckGamingPrivilegeWithUI(privilegeid : u32, scope : core::mem::MaybeUninit < windows_core::HSTRING >, policy : core::mem::MaybeUninit < windows_core::HSTRING >, friendlymessage : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - CheckGamingPrivilegeWithUI(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + CheckGamingPrivilegeWithUI(privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CheckGamingPrivilegeWithUIForUser(user: P0, privilegeid: u32, scope: &windows_core::HSTRING, policy: &windows_core::HSTRING, friendlymessage: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -24,7 +24,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn CheckGamingPrivilegeWithUIForUser(user : * mut core::ffi::c_void, privilegeid : u32, scope : core::mem::MaybeUninit < windows_core::HSTRING >, policy : core::mem::MaybeUninit < windows_core::HSTRING >, friendlymessage : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - CheckGamingPrivilegeWithUIForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + CheckGamingPrivilegeWithUIForUser(user.param().abi(), privilegeid, core::mem::transmute_copy(scope), core::mem::transmute_copy(policy), core::mem::transmute_copy(friendlymessage), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn GetExpandedResourceExclusiveCpuCount() -> windows_core::Result { @@ -60,7 +60,7 @@ pub unsafe fn ReleaseExclusiveCpuSets() -> windows_core::Result<()> { #[inline] pub unsafe fn ShowChangeFriendRelationshipUI(targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowChangeFriendRelationshipUI(targetuserxuid : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowChangeFriendRelationshipUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowChangeFriendRelationshipUIForUser(user: P0, targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -68,12 +68,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowChangeFriendRelationshipUIForUser(user : * mut core::ffi::c_void, targetuserxuid : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowChangeFriendRelationshipUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowCustomizeUserProfileUI(completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowCustomizeUserProfileUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowCustomizeUserProfileUI(completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowCustomizeUserProfileUI(completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowCustomizeUserProfileUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -81,12 +81,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowCustomizeUserProfileUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowCustomizeUserProfileUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowCustomizeUserProfileUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowFindFriendsUI(completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowFindFriendsUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowFindFriendsUI(completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowFindFriendsUI(completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowFindFriendsUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -94,12 +94,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowFindFriendsUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowFindFriendsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowFindFriendsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInfoUI(titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowGameInfoUI(titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInfoUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInfoUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInfoUIForUser(user: P0, titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -107,12 +107,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowGameInfoUIForUser(user : * mut core::ffi::c_void, titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInfoUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInfoUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInviteUI(serviceconfigurationid: &windows_core::HSTRING, sessiontemplatename: &windows_core::HSTRING, sessionid: &windows_core::HSTRING, invitationdisplaytext: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowGameInviteUI(serviceconfigurationid : core::mem::MaybeUninit < windows_core::HSTRING >, sessiontemplatename : core::mem::MaybeUninit < windows_core::HSTRING >, sessionid : core::mem::MaybeUninit < windows_core::HSTRING >, invitationdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInviteUI(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInviteUI(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInviteUIForUser(user: P0, serviceconfigurationid: &windows_core::HSTRING, sessiontemplatename: &windows_core::HSTRING, sessionid: &windows_core::HSTRING, invitationdisplaytext: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -120,12 +120,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowGameInviteUIForUser(user : * mut core::ffi::c_void, serviceconfigurationid : core::mem::MaybeUninit < windows_core::HSTRING >, sessiontemplatename : core::mem::MaybeUninit < windows_core::HSTRING >, sessionid : core::mem::MaybeUninit < windows_core::HSTRING >, invitationdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInviteUIForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInviteUIForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInviteUIWithContext(serviceconfigurationid: &windows_core::HSTRING, sessiontemplatename: &windows_core::HSTRING, sessionid: &windows_core::HSTRING, invitationdisplaytext: &windows_core::HSTRING, customactivationcontext: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-3.dll" "system" fn ShowGameInviteUIWithContext(serviceconfigurationid : core::mem::MaybeUninit < windows_core::HSTRING >, sessiontemplatename : core::mem::MaybeUninit < windows_core::HSTRING >, sessionid : core::mem::MaybeUninit < windows_core::HSTRING >, invitationdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, customactivationcontext : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInviteUIWithContext(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInviteUIWithContext(core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowGameInviteUIWithContextForUser(user: P0, serviceconfigurationid: &windows_core::HSTRING, sessiontemplatename: &windows_core::HSTRING, sessionid: &windows_core::HSTRING, invitationdisplaytext: &windows_core::HSTRING, customactivationcontext: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -133,12 +133,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-3.dll" "system" fn ShowGameInviteUIWithContextForUser(user : * mut core::ffi::c_void, serviceconfigurationid : core::mem::MaybeUninit < windows_core::HSTRING >, sessiontemplatename : core::mem::MaybeUninit < windows_core::HSTRING >, sessionid : core::mem::MaybeUninit < windows_core::HSTRING >, invitationdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, customactivationcontext : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowGameInviteUIWithContextForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowGameInviteUIWithContextForUser(user.param().abi(), core::mem::transmute_copy(serviceconfigurationid), core::mem::transmute_copy(sessiontemplatename), core::mem::transmute_copy(sessionid), core::mem::transmute_copy(invitationdisplaytext), core::mem::transmute_copy(customactivationcontext), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowPlayerPickerUI(promptdisplaytext: &windows_core::HSTRING, xuids: &[windows_core::HSTRING], preselectedxuids: Option<&[windows_core::HSTRING]>, minselectioncount: usize, maxselectioncount: usize, completionroutine: PlayerPickerUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowPlayerPickerUI(promptdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, xuids : *const core::mem::MaybeUninit < windows_core::HSTRING >, xuidscount : usize, preselectedxuids : *const core::mem::MaybeUninit < windows_core::HSTRING >, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowPlayerPickerUI(core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowPlayerPickerUI(core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowPlayerPickerUIForUser(user: P0, promptdisplaytext: &windows_core::HSTRING, xuids: &[windows_core::HSTRING], preselectedxuids: Option<&[windows_core::HSTRING]>, minselectioncount: usize, maxselectioncount: usize, completionroutine: PlayerPickerUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -146,12 +146,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowPlayerPickerUIForUser(user : * mut core::ffi::c_void, promptdisplaytext : core::mem::MaybeUninit < windows_core::HSTRING >, xuids : *const core::mem::MaybeUninit < windows_core::HSTRING >, xuidscount : usize, preselectedxuids : *const core::mem::MaybeUninit < windows_core::HSTRING >, preselectedxuidscount : usize, minselectioncount : usize, maxselectioncount : usize, completionroutine : PlayerPickerUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowPlayerPickerUIForUser(user.param().abi(), core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowPlayerPickerUIForUser(user.param().abi(), core::mem::transmute_copy(promptdisplaytext), core::mem::transmute(xuids.as_ptr()), xuids.len().try_into().unwrap(), core::mem::transmute(preselectedxuids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), preselectedxuids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), minselectioncount, maxselectioncount, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowProfileCardUI(targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowProfileCardUI(targetuserxuid : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowProfileCardUI(core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowProfileCardUIForUser(user: P0, targetuserxuid: &windows_core::HSTRING, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -159,12 +159,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowProfileCardUIForUser(user : * mut core::ffi::c_void, targetuserxuid : core::mem::MaybeUninit < windows_core::HSTRING >, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowProfileCardUIForUser(user.param().abi(), core::mem::transmute_copy(targetuserxuid), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowTitleAchievementsUI(titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-0.dll" "system" fn ShowTitleAchievementsUI(titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowTitleAchievementsUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowTitleAchievementsUI(titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowTitleAchievementsUIForUser(user: P0, titleid: u32, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -172,12 +172,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-2.dll" "system" fn ShowTitleAchievementsUIForUser(user : * mut core::ffi::c_void, titleid : u32, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowTitleAchievementsUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowTitleAchievementsUIForUser(user.param().abi(), titleid, completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowUserSettingsUI(completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowUserSettingsUI(completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowUserSettingsUI(completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowUserSettingsUI(completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ShowUserSettingsUIForUser(user: P0, completionroutine: GameUICompletionRoutine, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -185,7 +185,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-gaming-tcui-l1-1-4.dll" "system" fn ShowUserSettingsUIForUser(user : * mut core::ffi::c_void, completionroutine : GameUICompletionRoutine, context : *const core::ffi::c_void) -> windows_core::HRESULT); - ShowUserSettingsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + ShowUserSettingsUIForUser(user.param().abi(), completionroutine, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn TryCancelPendingGameUI() -> super::Foundation::BOOL { @@ -307,7 +307,7 @@ impl IGameStatistics { (windows_core::Interface::vtable(self).GetCategoryTitle)(windows_core::Interface::as_raw(self), categoryindex, &mut result__).map(|| result__) } pub unsafe fn GetStatistic(&self, categoryindex: u16, statindex: u16, pname: Option<*mut windows_core::PWSTR>, pvalue: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStatistic)(windows_core::Interface::as_raw(self), categoryindex, statindex, core::mem::transmute(pname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatistic)(windows_core::Interface::as_raw(self), categoryindex, statindex, core::mem::transmute(pname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetStatistic(&self, categoryindex: u16, statindex: u16, name: P0, value: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs index 77550c8154..d2cf31c4ed 100644 --- a/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Globalization/mod.rs @@ -15,7 +15,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CompareStringEx(lplocalename : windows_core::PCWSTR, dwcmpflags : COMPARE_STRING_FLAGS, lpstring1 : windows_core::PCWSTR, cchcount1 : i32, lpstring2 : windows_core::PCWSTR, cchcount2 : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, lparam : super::Foundation:: LPARAM) -> COMPARESTRING_RESULT); - CompareStringEx(lplocalename.param().abi(), dwcmpflags, core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), core::mem::transmute(lpversioninformation.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), lparam.param().abi()) + CompareStringEx(lplocalename.param().abi(), dwcmpflags, core::mem::transmute(lpstring1.as_ptr()), lpstring1.len().try_into().unwrap(), core::mem::transmute(lpstring2.as_ptr()), lpstring2.len().try_into().unwrap(), core::mem::transmute(lpversioninformation.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), lparam.param().abi()) } #[inline] pub unsafe fn CompareStringOrdinal(lpstring1: &[u16], lpstring2: &[u16], bignorecase: P0) -> COMPARESTRING_RESULT @@ -158,7 +158,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + EnumSystemLocalesEx(lplocaleenumprocex, dwflags, lparam.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumSystemLocalesW(lplocaleenumproc: LOCALE_ENUMPROCW, dwflags: u32) -> windows_core::Result<()> { @@ -197,7 +197,7 @@ pub unsafe fn EnumUILanguagesW(lpuilanguageenumproc: UILANGUAGE_ENUMPROCW, dwfla #[inline] pub unsafe fn FindNLSString(locale: u32, dwfindnlsstringflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], pcchfound: Option<*mut i32>) -> i32 { windows_targets::link!("kernel32.dll" "system" fn FindNLSString(locale : u32, dwfindnlsstringflags : u32, lpstringsource : windows_core::PCWSTR, cchsource : i32, lpstringvalue : windows_core::PCWSTR, cchvalue : i32, pcchfound : *mut i32) -> i32); - FindNLSString(locale, dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(std::ptr::null_mut()))) + FindNLSString(locale, dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FindNLSStringEx(lplocalename: P0, dwfindnlsstringflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], pcchfound: Option<*mut i32>, lpversioninformation: Option<*const NLSVERSIONINFO>, lpreserved: Option<*const core::ffi::c_void>, sorthandle: P1) -> i32 @@ -206,7 +206,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindNLSStringEx(lplocalename : windows_core::PCWSTR, dwfindnlsstringflags : u32, lpstringsource : windows_core::PCWSTR, cchsource : i32, lpstringvalue : windows_core::PCWSTR, cchvalue : i32, pcchfound : *mut i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); - FindNLSStringEx(lplocalename.param().abi(), dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpversioninformation.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), sorthandle.param().abi()) + FindNLSStringEx(lplocalename.param().abi(), dwfindnlsstringflags, core::mem::transmute(lpstringsource.as_ptr()), lpstringsource.len().try_into().unwrap(), core::mem::transmute(lpstringvalue.as_ptr()), lpstringvalue.len().try_into().unwrap(), core::mem::transmute(pcchfound.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpversioninformation.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), sorthandle.param().abi()) } #[inline] pub unsafe fn FindStringOrdinal(dwfindstringordinalflags: u32, lpstringsource: &[u16], lpstringvalue: &[u16], bignorecase: P0) -> i32 @@ -258,7 +258,7 @@ where #[inline] pub unsafe fn GetCalendarInfoA(locale: u32, calendar: u32, caltype: u32, lpcaldata: Option<&mut [u8]>, lpvalue: Option<*mut u32>) -> i32 { windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoA(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_core::PSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoA(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(std::ptr::null_mut()))) + GetCalendarInfoA(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCalendarInfoEx(lplocalename: P0, calendar: u32, lpreserved: P1, caltype: u32, lpcaldata: Option<&mut [u16]>, lpvalue: Option<*mut u32>) -> i32 @@ -267,12 +267,12 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoEx(lplocalename : windows_core::PCWSTR, calendar : u32, lpreserved : windows_core::PCWSTR, caltype : u32, lpcaldata : windows_core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoEx(lplocalename.param().abi(), calendar, lpreserved.param().abi(), caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(std::ptr::null_mut()))) + GetCalendarInfoEx(lplocalename.param().abi(), calendar, lpreserved.param().abi(), caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCalendarInfoW(locale: u32, calendar: u32, caltype: u32, lpcaldata: Option<&mut [u16]>, lpvalue: Option<*mut u32>) -> i32 { windows_targets::link!("kernel32.dll" "system" fn GetCalendarInfoW(locale : u32, calendar : u32, caltype : u32, lpcaldata : windows_core::PWSTR, cchdata : i32, lpvalue : *mut u32) -> i32); - GetCalendarInfoW(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(std::ptr::null_mut()))) + GetCalendarInfoW(locale, calendar, caltype, core::mem::transmute(lpcaldata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcaldata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCalendarSupportedDateRange(calendar: u32, lpcalmindatetime: *mut CALDATETIME, lpcalmaxdatetime: *mut CALDATETIME) -> super::Foundation::BOOL { @@ -285,7 +285,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatA(locale : u32, dwflags : u32, lpvalue : windows_core::PCSTR, lpformat : *const CURRENCYFMTA, lpcurrencystr : windows_core::PSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatA(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetCurrencyFormatA(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetCurrencyFormatEx(lplocalename: P0, dwflags: u32, lpvalue: P1, lpformat: Option<*const CURRENCYFMTW>, lpcurrencystr: Option<&mut [u16]>) -> i32 @@ -294,7 +294,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatEx(lplocalename : windows_core::PCWSTR, dwflags : u32, lpvalue : windows_core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : windows_core::PWSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetCurrencyFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetCurrencyFormatW(locale: u32, dwflags: u32, lpvalue: P0, lpformat: Option<*const CURRENCYFMTW>, lpcurrencystr: Option<&mut [u16]>) -> i32 @@ -302,7 +302,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCurrencyFormatW(locale : u32, dwflags : u32, lpvalue : windows_core::PCWSTR, lpformat : *const CURRENCYFMTW, lpcurrencystr : windows_core::PWSTR, cchcurrency : i32) -> i32); - GetCurrencyFormatW(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetCurrencyFormatW(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpcurrencystr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpcurrencystr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetDateFormatA(locale: u32, dwflags: u32, lpdate: Option<*const super::Foundation::SYSTEMTIME>, lpformat: P0, lpdatestr: Option<&mut [u8]>) -> i32 @@ -310,7 +310,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDateFormatA(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCSTR, lpdatestr : windows_core::PSTR, cchdate : i32) -> i32); - GetDateFormatA(locale, dwflags, core::mem::transmute(lpdate.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetDateFormatA(locale, dwflags, core::mem::transmute(lpdate.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetDateFormatEx(lplocalename: P0, dwflags: ENUM_DATE_FORMATS_FLAGS, lpdate: Option<*const super::Foundation::SYSTEMTIME>, lpformat: P1, lpdatestr: Option<&mut [u16]>, lpcalendar: P2) -> i32 @@ -320,7 +320,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDateFormatEx(lplocalename : windows_core::PCWSTR, dwflags : ENUM_DATE_FORMATS_FLAGS, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCWSTR, lpdatestr : windows_core::PWSTR, cchdate : i32, lpcalendar : windows_core::PCWSTR) -> i32); - GetDateFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lpdate.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpcalendar.param().abi()) + GetDateFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lpdate.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpcalendar.param().abi()) } #[inline] pub unsafe fn GetDateFormatW(locale: u32, dwflags: u32, lpdate: Option<*const super::Foundation::SYSTEMTIME>, lpformat: P0, lpdatestr: Option<&mut [u16]>) -> i32 @@ -328,7 +328,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDateFormatW(locale : u32, dwflags : u32, lpdate : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCWSTR, lpdatestr : windows_core::PWSTR, cchdate : i32) -> i32); - GetDateFormatW(locale, dwflags, core::mem::transmute(lpdate.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetDateFormatW(locale, dwflags, core::mem::transmute(lpdate.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lpdatestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdatestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetDistanceOfClosestLanguageInList(pszlanguage: P0, pszlanguageslist: P1, wchlistdelimiter: u16) -> windows_core::Result @@ -346,7 +346,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDurationFormat(locale : u32, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : windows_core::PCWSTR, lpdurationstr : windows_core::PWSTR, cchduration : i32) -> i32); - GetDurationFormat(locale, dwflags, core::mem::transmute(lpduration.unwrap_or(std::ptr::null())), ullduration, lpformat.param().abi(), core::mem::transmute(lpdurationstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdurationstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetDurationFormat(locale, dwflags, core::mem::transmute(lpduration.unwrap_or(core::ptr::null())), ullduration, lpformat.param().abi(), core::mem::transmute(lpdurationstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdurationstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetDurationFormatEx(lplocalename: P0, dwflags: u32, lpduration: Option<*const super::Foundation::SYSTEMTIME>, ullduration: u64, lpformat: P1, lpdurationstr: Option<&mut [u16]>) -> i32 @@ -355,7 +355,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetDurationFormatEx(lplocalename : windows_core::PCWSTR, dwflags : u32, lpduration : *const super::Foundation:: SYSTEMTIME, ullduration : u64, lpformat : windows_core::PCWSTR, lpdurationstr : windows_core::PWSTR, cchduration : i32) -> i32); - GetDurationFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lpduration.unwrap_or(std::ptr::null())), ullduration, lpformat.param().abi(), core::mem::transmute(lpdurationstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdurationstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetDurationFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lpduration.unwrap_or(core::ptr::null())), ullduration, lpformat.param().abi(), core::mem::transmute(lpdurationstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdurationstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetFileMUIInfo(dwflags: u32, pcwszfilepath: P0, pfilemuiinfo: Option<*mut FILEMUIINFO>, pcbfilemuiinfo: *mut u32) -> windows_core::Result<()> @@ -363,7 +363,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pfilemuiinfo.unwrap_or(std::ptr::null_mut())), pcbfilemuiinfo).ok() + GetFileMUIInfo(dwflags, pcwszfilepath.param().abi(), core::mem::transmute(pfilemuiinfo.unwrap_or(core::ptr::null_mut())), pcbfilemuiinfo).ok() } #[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) -> windows_core::Result<()> @@ -428,7 +428,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatA(locale : u32, dwflags : u32, lpvalue : windows_core::PCSTR, lpformat : *const NUMBERFMTA, lpnumberstr : windows_core::PSTR, cchnumber : i32) -> i32); - GetNumberFormatA(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetNumberFormatA(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetNumberFormatEx(lplocalename: P0, dwflags: u32, lpvalue: P1, lpformat: Option<*const NUMBERFMTW>, lpnumberstr: Option<&mut [u16]>) -> i32 @@ -437,7 +437,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatEx(lplocalename : windows_core::PCWSTR, dwflags : u32, lpvalue : windows_core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : windows_core::PWSTR, cchnumber : i32) -> i32); - GetNumberFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetNumberFormatEx(lplocalename.param().abi(), dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetNumberFormatW(locale: u32, dwflags: u32, lpvalue: P0, lpformat: Option<*const NUMBERFMTW>, lpnumberstr: Option<&mut [u16]>) -> i32 @@ -445,7 +445,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNumberFormatW(locale : u32, dwflags : u32, lpvalue : windows_core::PCWSTR, lpformat : *const NUMBERFMTW, lpnumberstr : windows_core::PWSTR, cchnumber : i32) -> i32); - GetNumberFormatW(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(std::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetNumberFormatW(locale, dwflags, lpvalue.param().abi(), core::mem::transmute(lpformat.unwrap_or(core::ptr::null())), core::mem::transmute(lpnumberstr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpnumberstr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetOEMCP() -> u32 { @@ -532,7 +532,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextCharsetInfo(hdc : super::Graphics::Gdi:: HDC, lpsig : *mut FONTSIGNATURE, dwflags : u32) -> i32); - GetTextCharsetInfo(hdc.param().abi(), core::mem::transmute(lpsig.unwrap_or(std::ptr::null_mut())), dwflags) + GetTextCharsetInfo(hdc.param().abi(), core::mem::transmute(lpsig.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn GetThreadLocale() -> u32 { @@ -555,7 +555,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatA(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCSTR, lptimestr : windows_core::PSTR, cchtime : i32) -> i32); - GetTimeFormatA(locale, dwflags, core::mem::transmute(lptime.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetTimeFormatA(locale, dwflags, core::mem::transmute(lptime.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetTimeFormatEx(lplocalename: P0, dwflags: TIME_FORMAT_FLAGS, lptime: Option<*const super::Foundation::SYSTEMTIME>, lpformat: P1, lptimestr: Option<&mut [u16]>) -> i32 @@ -564,7 +564,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatEx(lplocalename : windows_core::PCWSTR, dwflags : TIME_FORMAT_FLAGS, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCWSTR, lptimestr : windows_core::PWSTR, cchtime : i32) -> i32); - GetTimeFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lptime.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetTimeFormatEx(lplocalename.param().abi(), dwflags, core::mem::transmute(lptime.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetTimeFormatW(locale: u32, dwflags: u32, lptime: Option<*const super::Foundation::SYSTEMTIME>, lpformat: P0, lptimestr: Option<&mut [u16]>) -> i32 @@ -572,7 +572,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetTimeFormatW(locale : u32, dwflags : u32, lptime : *const super::Foundation:: SYSTEMTIME, lpformat : windows_core::PCWSTR, lptimestr : windows_core::PWSTR, cchtime : i32) -> i32); - GetTimeFormatW(locale, dwflags, core::mem::transmute(lptime.unwrap_or(std::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetTimeFormatW(locale, dwflags, core::mem::transmute(lptime.unwrap_or(core::ptr::null())), lpformat.param().abi(), core::mem::transmute(lptimestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lptimestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn GetUILanguageInfo(dwflags: u32, pwmszlanguage: P0, pwszfallbacklanguages: windows_core::PWSTR, pcchfallbacklanguages: Option<*mut u32>, pattributes: *mut u32) -> windows_core::Result<()> @@ -580,7 +580,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pwszfallbacklanguages), core::mem::transmute(pcchfallbacklanguages.unwrap_or(std::ptr::null_mut())), pattributes).ok() + GetUILanguageInfo(dwflags, pwmszlanguage.param().abi(), core::mem::transmute(pwszfallbacklanguages), core::mem::transmute(pcchfallbacklanguages.unwrap_or(core::ptr::null_mut())), pattributes).ok() } #[inline] pub unsafe fn GetUserDefaultGeoName(geoname: &mut [u16]) -> i32 { @@ -660,7 +660,7 @@ pub unsafe fn IsNormalizedString(normform: NORM_FORM, lpstring: &[u16]) -> windo #[inline] pub unsafe fn IsTextUnicode(lpv: *const core::ffi::c_void, isize: i32, lpiresult: Option<*mut IS_TEXT_UNICODE_RESULT>) -> super::Foundation::BOOL { windows_targets::link!("advapi32.dll" "system" fn IsTextUnicode(lpv : *const core::ffi::c_void, isize : i32, lpiresult : *mut IS_TEXT_UNICODE_RESULT) -> super::Foundation:: BOOL); - IsTextUnicode(lpv, isize, core::mem::transmute(lpiresult.unwrap_or(std::ptr::null_mut()))) + IsTextUnicode(lpv, isize, core::mem::transmute(lpiresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IsValidCodePage(codepage: u32) -> super::Foundation::BOOL { @@ -718,7 +718,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn LCMapStringEx(lplocalename : windows_core::PCWSTR, dwmapflags : u32, lpsrcstr : windows_core::PCWSTR, cchsrc : i32, lpdeststr : windows_core::PWSTR, cchdest : i32, lpversioninformation : *const NLSVERSIONINFO, lpreserved : *const core::ffi::c_void, sorthandle : super::Foundation:: LPARAM) -> i32); - LCMapStringEx(lplocalename.param().abi(), dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpversioninformation.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), sorthandle.param().abi()) + LCMapStringEx(lplocalename.param().abi(), dwmapflags, core::mem::transmute(lpsrcstr.as_ptr()), lpsrcstr.len().try_into().unwrap(), core::mem::transmute(lpdeststr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpdeststr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpversioninformation.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), sorthandle.param().abi()) } #[inline] pub unsafe fn LCMapStringW(locale: u32, dwmapflags: u32, lpsrcstr: &[u16], lpdeststr: windows_core::PWSTR, cchdest: i32) -> i32 { @@ -754,12 +754,12 @@ pub unsafe fn MappingFreeServices(pserviceinfo: *const MAPPING_SERVICE_INFO) -> #[inline] pub unsafe fn MappingGetServices(poptions: Option<*const MAPPING_ENUM_OPTIONS>, prgservices: *mut *mut MAPPING_SERVICE_INFO, pdwservicescount: *mut u32) -> windows_core::Result<()> { windows_targets::link!("elscore.dll" "system" fn MappingGetServices(poptions : *const MAPPING_ENUM_OPTIONS, prgservices : *mut *mut MAPPING_SERVICE_INFO, pdwservicescount : *mut u32) -> windows_core::HRESULT); - MappingGetServices(core::mem::transmute(poptions.unwrap_or(std::ptr::null())), prgservices, pdwservicescount).ok() + MappingGetServices(core::mem::transmute(poptions.unwrap_or(core::ptr::null())), prgservices, pdwservicescount).ok() } #[inline] pub unsafe fn MappingRecognizeText(pserviceinfo: *const MAPPING_SERVICE_INFO, psztext: &[u16], dwindex: u32, poptions: Option<*const MAPPING_OPTIONS>, pbag: *mut MAPPING_PROPERTY_BAG) -> windows_core::Result<()> { windows_targets::link!("elscore.dll" "system" fn MappingRecognizeText(pserviceinfo : *const MAPPING_SERVICE_INFO, psztext : windows_core::PCWSTR, dwlength : u32, dwindex : u32, poptions : *const MAPPING_OPTIONS, pbag : *mut MAPPING_PROPERTY_BAG) -> windows_core::HRESULT); - MappingRecognizeText(pserviceinfo, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwindex, core::mem::transmute(poptions.unwrap_or(std::ptr::null())), pbag).ok() + MappingRecognizeText(pserviceinfo, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwindex, core::mem::transmute(poptions.unwrap_or(core::ptr::null())), pbag).ok() } #[inline] pub unsafe fn MultiByteToWideChar(codepage: u32, dwflags: MULTI_BYTE_TO_WIDE_CHAR_FLAGS, lpmultibytestr: &[u8], lpwidecharstr: Option<&mut [u16]>) -> i32 { @@ -778,7 +778,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn NotifyUILanguageChange(dwflags : u32, pcwstrnewlanguage : windows_core::PCWSTR, pcwstrpreviouslanguage : windows_core::PCWSTR, dwreserved : u32, pdwstatusrtrn : *mut u32) -> super::Foundation:: BOOL); - NotifyUILanguageChange(dwflags, pcwstrnewlanguage.param().abi(), pcwstrpreviouslanguage.param().abi(), dwreserved, core::mem::transmute(pdwstatusrtrn.unwrap_or(std::ptr::null_mut()))) + NotifyUILanguageChange(dwflags, pcwstrnewlanguage.param().abi(), pcwstrpreviouslanguage.param().abi(), dwreserved, core::mem::transmute(pdwstatusrtrn.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResolveLocaleName(lpnametoresolve: P0, lplocalename: Option<&mut [u16]>) -> i32 @@ -805,7 +805,7 @@ pub unsafe fn ScriptApplyDigitSubstitution(psds: *const SCRIPT_DIGITSUBSTITUTE, #[inline] pub unsafe fn ScriptApplyLogicalWidth(pidx: *const i32, cchars: i32, cglyphs: i32, pwlogclust: *const u16, psva: *const SCRIPT_VISATTR, piadvance: *const i32, psa: *const SCRIPT_ANALYSIS, pabc: Option<*mut super::Graphics::Gdi::ABC>, pijustify: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptApplyLogicalWidth(pidx : *const i32, cchars : i32, cglyphs : i32, pwlogclust : *const u16, psva : *const SCRIPT_VISATTR, piadvance : *const i32, psa : *const SCRIPT_ANALYSIS, pabc : *mut super::Graphics::Gdi:: ABC, pijustify : *mut i32) -> windows_core::HRESULT); - ScriptApplyLogicalWidth(pidx, cchars, cglyphs, pwlogclust, psva, piadvance, psa, core::mem::transmute(pabc.unwrap_or(std::ptr::null_mut())), pijustify).ok() + ScriptApplyLogicalWidth(pidx, cchars, cglyphs, pwlogclust, psva, piadvance, psa, core::mem::transmute(pabc.unwrap_or(core::ptr::null_mut())), pijustify).ok() } #[inline] pub unsafe fn ScriptBreak(pwcchars: P0, cchars: i32, psa: *const SCRIPT_ANALYSIS, psla: *mut SCRIPT_LOGATTR) -> windows_core::Result<()> @@ -854,7 +854,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptGetFontAlternateGlyphs(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, wglyphid : u16, cmaxalternates : i32, palternateglyphs : *mut u16, pcalternates : *mut i32) -> windows_core::HRESULT); - ScriptGetFontAlternateGlyphs(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), pcalternates).ok() + ScriptGetFontAlternateGlyphs(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), tagscript, taglangsys, tagfeature, wglyphid, palternateglyphs.len().try_into().unwrap(), core::mem::transmute(palternateglyphs.as_ptr()), pcalternates).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -863,7 +863,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptGetFontFeatureTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, cmaxtags : i32, pfeaturetags : *mut u32, pctags : *mut i32) -> windows_core::HRESULT); - ScriptGetFontFeatureTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), tagscript, taglangsys, pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), pctags).ok() + ScriptGetFontFeatureTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), tagscript, taglangsys, pfeaturetags.len().try_into().unwrap(), core::mem::transmute(pfeaturetags.as_ptr()), pctags).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -872,7 +872,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptGetFontLanguageTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, cmaxtags : i32, plangsystags : *mut u32, pctags : *mut i32) -> windows_core::HRESULT); - ScriptGetFontLanguageTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), tagscript, plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), pctags).ok() + ScriptGetFontLanguageTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), tagscript, plangsystags.len().try_into().unwrap(), core::mem::transmute(plangsystags.as_ptr()), pctags).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -890,7 +890,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptGetFontScriptTags(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, cmaxtags : i32, pscripttags : *mut u32, pctags : *mut i32) -> windows_core::HRESULT); - ScriptGetFontScriptTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), pscripttags.len().try_into().unwrap(), core::mem::transmute(pscripttags.as_ptr()), pctags).ok() + ScriptGetFontScriptTags(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), pscripttags.len().try_into().unwrap(), core::mem::transmute(pscripttags.as_ptr()), pctags).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -919,12 +919,12 @@ pub unsafe fn ScriptIsComplex(pwcinchars: &[u16], dwflags: SCRIPT_IS_COMPLEX_FLA #[inline] pub unsafe fn ScriptItemize(pwcinchars: &[u16], pscontrol: Option<*const SCRIPT_CONTROL>, psstate: Option<*const SCRIPT_STATE>, pitems: &mut [SCRIPT_ITEM], pcitems: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptItemize(pwcinchars : windows_core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pcitems : *mut i32) -> windows_core::HRESULT); - ScriptItemize(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), pitems.len().try_into().unwrap(), core::mem::transmute(pscontrol.unwrap_or(std::ptr::null())), core::mem::transmute(psstate.unwrap_or(std::ptr::null())), core::mem::transmute(pitems.as_ptr()), pcitems).ok() + ScriptItemize(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), pitems.len().try_into().unwrap(), core::mem::transmute(pscontrol.unwrap_or(core::ptr::null())), core::mem::transmute(psstate.unwrap_or(core::ptr::null())), core::mem::transmute(pitems.as_ptr()), pcitems).ok() } #[inline] pub unsafe fn ScriptItemizeOpenType(pwcinchars: &[u16], cmaxitems: i32, pscontrol: Option<*const SCRIPT_CONTROL>, psstate: Option<*const SCRIPT_STATE>, pitems: *mut SCRIPT_ITEM, pscripttags: *mut u32, pcitems: *mut i32) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptItemizeOpenType(pwcinchars : windows_core::PCWSTR, cinchars : i32, cmaxitems : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pitems : *mut SCRIPT_ITEM, pscripttags : *mut u32, pcitems : *mut i32) -> windows_core::HRESULT); - ScriptItemizeOpenType(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), cmaxitems, core::mem::transmute(pscontrol.unwrap_or(std::ptr::null())), core::mem::transmute(psstate.unwrap_or(std::ptr::null())), pitems, pscripttags, pcitems).ok() + ScriptItemizeOpenType(core::mem::transmute(pwcinchars.as_ptr()), pwcinchars.len().try_into().unwrap(), cmaxitems, core::mem::transmute(pscontrol.unwrap_or(core::ptr::null())), core::mem::transmute(psstate.unwrap_or(core::ptr::null())), pitems, pscripttags, pcitems).ok() } #[inline] pub unsafe fn ScriptJustify(psva: *const SCRIPT_VISATTR, piadvance: *const i32, cglyphs: i32, idx: i32, iminkashida: i32, pijustify: *mut i32) -> windows_core::Result<()> { @@ -934,7 +934,7 @@ pub unsafe fn ScriptJustify(psva: *const SCRIPT_VISATTR, piadvance: *const i32, #[inline] pub unsafe fn ScriptLayout(cruns: i32, pblevel: *const u8, pivisualtological: Option<*mut i32>, pilogicaltovisual: Option<*mut i32>) -> windows_core::Result<()> { windows_targets::link!("usp10.dll" "system" fn ScriptLayout(cruns : i32, pblevel : *const u8, pivisualtological : *mut i32, pilogicaltovisual : *mut i32) -> windows_core::HRESULT); - ScriptLayout(cruns, pblevel, core::mem::transmute(pivisualtological.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pilogicaltovisual.unwrap_or(std::ptr::null_mut()))).ok() + ScriptLayout(cruns, pblevel, core::mem::transmute(pivisualtological.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pilogicaltovisual.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -943,7 +943,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptPlace(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, pwglyphs : *const u16, cglyphs : i32, psva : *const SCRIPT_VISATTR, psa : *mut SCRIPT_ANALYSIS, piadvance : *mut i32, pgoffset : *mut GOFFSET, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_core::HRESULT); - ScriptPlace(hdc.param().abi(), psc, pwglyphs, cglyphs, psva, psa, piadvance, core::mem::transmute(pgoffset.unwrap_or(std::ptr::null_mut())), pabc).ok() + ScriptPlace(hdc.param().abi(), psc, pwglyphs, cglyphs, psva, psa, piadvance, core::mem::transmute(pgoffset.unwrap_or(core::ptr::null_mut())), pabc).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -953,7 +953,7 @@ where P1: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptPlaceOpenType(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *mut SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, rcrangechars : *const i32, rprangeproperties : *const *const TEXTRANGE_PROPERTIES, cranges : i32, pwcchars : windows_core::PCWSTR, pwlogclust : *const u16, pcharprops : *const SCRIPT_CHARPROP, cchars : i32, pwglyphs : *const u16, pglyphprops : *const SCRIPT_GLYPHPROP, cglyphs : i32, piadvance : *mut i32, pgoffset : *mut GOFFSET, pabc : *mut super::Graphics::Gdi:: ABC) -> windows_core::HRESULT); - ScriptPlaceOpenType(hdc.param().abi(), psc, psa, tagscript, taglangsys, core::mem::transmute(rcrangechars.unwrap_or(std::ptr::null())), core::mem::transmute(rprangeproperties.unwrap_or(std::ptr::null())), cranges, pwcchars.param().abi(), pwlogclust, pcharprops, cchars, pwglyphs, pglyphprops, cglyphs, piadvance, pgoffset, core::mem::transmute(pabc.unwrap_or(std::ptr::null_mut()))).ok() + ScriptPlaceOpenType(hdc.param().abi(), psc, psa, tagscript, taglangsys, core::mem::transmute(rcrangechars.unwrap_or(core::ptr::null())), core::mem::transmute(rprangeproperties.unwrap_or(core::ptr::null())), cranges, pwcchars.param().abi(), pwlogclust, pcharprops, cchars, pwglyphs, pglyphprops, cglyphs, piadvance, pgoffset, core::mem::transmute(pabc.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -962,7 +962,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptPositionSingleGlyph(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, lparameter : i32, wglyphid : u16, iadvance : i32, goffset : GOFFSET, pioutadvance : *mut i32, poutgoffset : *mut GOFFSET) -> windows_core::HRESULT); - ScriptPositionSingleGlyph(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, iadvance, core::mem::transmute(goffset), pioutadvance, poutgoffset).ok() + ScriptPositionSingleGlyph(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, iadvance, core::mem::transmute(goffset), pioutadvance, poutgoffset).ok() } #[inline] pub unsafe fn ScriptRecordDigitSubstitution(locale: u32) -> windows_core::Result { @@ -988,7 +988,7 @@ where P1: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptShapeOpenType(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *mut SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, rcrangechars : *const i32, rprangeproperties : *const *const TEXTRANGE_PROPERTIES, cranges : i32, pwcchars : windows_core::PCWSTR, cchars : i32, cmaxglyphs : i32, pwlogclust : *mut u16, pcharprops : *mut SCRIPT_CHARPROP, pwoutglyphs : *mut u16, poutglyphprops : *mut SCRIPT_GLYPHPROP, pcglyphs : *mut i32) -> windows_core::HRESULT); - ScriptShapeOpenType(hdc.param().abi(), psc, psa, tagscript, taglangsys, core::mem::transmute(rcrangechars.unwrap_or(std::ptr::null())), core::mem::transmute(rprangeproperties.unwrap_or(std::ptr::null())), cranges, pwcchars.param().abi(), cchars, cmaxglyphs, pwlogclust, pcharprops, pwoutglyphs, poutglyphprops, pcglyphs).ok() + ScriptShapeOpenType(hdc.param().abi(), psc, psa, tagscript, taglangsys, core::mem::transmute(rcrangechars.unwrap_or(core::ptr::null())), core::mem::transmute(rprangeproperties.unwrap_or(core::ptr::null())), cranges, pwcchars.param().abi(), cchars, cmaxglyphs, pwlogclust, pcharprops, pwoutglyphs, poutglyphprops, pcglyphs).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -997,7 +997,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptStringAnalyse(hdc : super::Graphics::Gdi:: HDC, pstring : *const core::ffi::c_void, cstring : i32, cglyphs : i32, icharset : i32, dwflags : u32, ireqwidth : i32, pscontrol : *const SCRIPT_CONTROL, psstate : *const SCRIPT_STATE, pidx : *const i32, ptabdef : *const SCRIPT_TABDEF, pbinclass : *const u8, pssa : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - ScriptStringAnalyse(hdc.param().abi(), pstring, cstring, cglyphs, icharset, dwflags, ireqwidth, core::mem::transmute(pscontrol.unwrap_or(std::ptr::null())), core::mem::transmute(psstate.unwrap_or(std::ptr::null())), core::mem::transmute(pidx.unwrap_or(std::ptr::null())), core::mem::transmute(ptabdef.unwrap_or(std::ptr::null())), pbinclass, pssa).ok() + ScriptStringAnalyse(hdc.param().abi(), pstring, cstring, cglyphs, icharset, dwflags, ireqwidth, core::mem::transmute(pscontrol.unwrap_or(core::ptr::null())), core::mem::transmute(psstate.unwrap_or(core::ptr::null())), core::mem::transmute(pidx.unwrap_or(core::ptr::null())), core::mem::transmute(ptabdef.unwrap_or(core::ptr::null())), pbinclass, pssa).ok() } #[inline] pub unsafe fn ScriptStringCPtoX(ssa: *const core::ffi::c_void, icp: i32, ftrailing: P0) -> windows_core::Result @@ -1030,7 +1030,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptStringOut(ssa : *const core::ffi::c_void, ix : i32, iy : i32, uoptions : super::Graphics::Gdi:: ETO_OPTIONS, prc : *const super::Foundation:: RECT, iminsel : i32, imaxsel : i32, fdisabled : super::Foundation:: BOOL) -> windows_core::HRESULT); - ScriptStringOut(ssa, ix, iy, uoptions, core::mem::transmute(prc.unwrap_or(std::ptr::null())), iminsel, imaxsel, fdisabled.param().abi()).ok() + ScriptStringOut(ssa, ix, iy, uoptions, core::mem::transmute(prc.unwrap_or(core::ptr::null())), iminsel, imaxsel, fdisabled.param().abi()).ok() } #[inline] pub unsafe fn ScriptStringValidate(ssa: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1064,7 +1064,7 @@ where P0: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptSubstituteSingleGlyph(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, psa : *const SCRIPT_ANALYSIS, tagscript : u32, taglangsys : u32, tagfeature : u32, lparameter : i32, wglyphid : u16, pwoutglyphid : *mut u16) -> windows_core::HRESULT); - ScriptSubstituteSingleGlyph(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(std::ptr::null())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, pwoutglyphid).ok() + ScriptSubstituteSingleGlyph(hdc.param().abi(), psc, core::mem::transmute(psa.unwrap_or(core::ptr::null())), tagscript, taglangsys, tagfeature, lparameter, wglyphid, pwoutglyphid).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1074,7 +1074,7 @@ where P1: windows_core::Param, { windows_targets::link!("usp10.dll" "system" fn ScriptTextOut(hdc : super::Graphics::Gdi:: HDC, psc : *mut *mut core::ffi::c_void, x : i32, y : i32, fuoptions : u32, lprc : *const super::Foundation:: RECT, psa : *const SCRIPT_ANALYSIS, pwcreserved : windows_core::PCWSTR, ireserved : i32, pwglyphs : *const u16, cglyphs : i32, piadvance : *const i32, pijustify : *const i32, pgoffset : *const GOFFSET) -> windows_core::HRESULT); - ScriptTextOut(hdc.param().abi(), psc, x, y, fuoptions, core::mem::transmute(lprc.unwrap_or(std::ptr::null())), psa, pwcreserved.param().abi(), ireserved, pwglyphs, cglyphs, piadvance, core::mem::transmute(pijustify.unwrap_or(std::ptr::null())), pgoffset).ok() + ScriptTextOut(hdc.param().abi(), psc, x, y, fuoptions, core::mem::transmute(lprc.unwrap_or(core::ptr::null())), psa, pwcreserved.param().abi(), ireserved, pwglyphs, cglyphs, piadvance, core::mem::transmute(pijustify.unwrap_or(core::ptr::null())), pgoffset).ok() } #[inline] pub unsafe fn ScriptXtoCP(ix: i32, cglyphs: i32, pwlogclust: &[u16], psva: *const SCRIPT_VISATTR, piadvance: *const i32, psa: *const SCRIPT_ANALYSIS, picp: *mut i32, pitrailing: *mut i32) -> windows_core::Result<()> { @@ -1119,7 +1119,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetProcessPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_core::PCWSTR, pulnumlanguages : *mut u32) -> super::Foundation:: BOOL); - SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(std::ptr::null_mut()))).ok() + SetProcessPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetThreadLocale(locale: u32) -> super::Foundation::BOOL { @@ -1132,7 +1132,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages(dwflags : u32, pwszlanguagesbuffer : windows_core::PCWSTR, pulnumlanguages : *mut u32) -> super::Foundation:: BOOL); - SetThreadPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(std::ptr::null_mut()))) + SetThreadPreferredUILanguages(dwflags, pwszlanguagesbuffer.param().abi(), core::mem::transmute(pulnumlanguages.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetThreadPreferredUILanguages2(flags: u32, languages: P0, numlanguagesset: Option<*mut u32>, snapshot: Option<*mut HSAVEDUILANGUAGES>) -> super::Foundation::BOOL @@ -1140,7 +1140,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadPreferredUILanguages2(flags : u32, languages : windows_core::PCWSTR, numlanguagesset : *mut u32, snapshot : *mut HSAVEDUILANGUAGES) -> super::Foundation:: BOOL); - SetThreadPreferredUILanguages2(flags, languages.param().abi(), core::mem::transmute(numlanguagesset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(snapshot.unwrap_or(std::ptr::null_mut()))) + SetThreadPreferredUILanguages2(flags, languages.param().abi(), core::mem::transmute(numlanguagesset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(snapshot.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetThreadUILanguage(langid: u16) -> u16 { @@ -1237,7 +1237,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WideCharToMultiByte(codepage : u32, dwflags : u32, lpwidecharstr : windows_core::PCWSTR, cchwidechar : i32, lpmultibytestr : windows_core::PSTR, cbmultibyte : i32, lpdefaultchar : windows_core::PCSTR, lpuseddefaultchar : *mut super::Foundation:: BOOL) -> i32); - WideCharToMultiByte(codepage, dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(lpmultibytestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpdefaultchar.param().abi(), core::mem::transmute(lpuseddefaultchar.unwrap_or(std::ptr::null_mut()))) + WideCharToMultiByte(codepage, dwflags, core::mem::transmute(lpwidecharstr.as_ptr()), lpwidecharstr.len().try_into().unwrap(), core::mem::transmute(lpmultibytestr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpmultibytestr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), lpdefaultchar.param().abi(), core::mem::transmute(lpuseddefaultchar.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn lstrcatA(lpstring1: windows_core::PSTR, lpstring2: P0) -> windows_core::PSTR @@ -7086,10 +7086,10 @@ impl core::ops::Deref for IEnumCodePage { windows_core::imp::interface_hierarchy!(IEnumCodePage, windows_core::IUnknown); impl IEnumCodePage { pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Next(&self, celt: u32, rgelt: *mut MIMECPINFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -7116,10 +7116,10 @@ impl core::ops::Deref for IEnumRfc1766 { windows_core::imp::interface_hierarchy!(IEnumRfc1766, windows_core::IUnknown); impl IEnumRfc1766 { pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Next(&self, celt: u32, rgelt: *mut RFC1766INFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -7146,10 +7146,10 @@ impl core::ops::Deref for IEnumScript { windows_core::imp::interface_hierarchy!(IEnumScript, windows_core::IUnknown); impl IEnumScript { pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Next(&self, celt: u32, rgelt: *mut SCRIPTINFO, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, rgelt, core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -7198,7 +7198,7 @@ impl IMLangCodePages { (windows_core::Interface::vtable(self).GetCharCodePages)(windows_core::Interface::as_raw(self), chsrc, &mut result__).map(|| result__) } pub unsafe fn GetStrCodePages(&self, pszsrc: &[u16], dwprioritycodepages: u32, pdwcodepages: Option<*mut u32>, pcchcodepages: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStrCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, core::mem::transmute(pdwcodepages.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchcodepages.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrCodePages)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), dwprioritycodepages, core::mem::transmute(pdwcodepages.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchcodepages.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CodePageToCodePages(&self, ucodepage: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7242,19 +7242,19 @@ impl IMLangConvertCharset { (windows_core::Interface::vtable(self).GetProperty)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn DoConversion(&self, psrcstr: *const u8, pcsrcsize: Option<*mut u32>, pdststr: *mut u8, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DoConversion)(windows_core::Interface::as_raw(self), psrcstr, core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), pdststr, core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DoConversion)(windows_core::Interface::as_raw(self), psrcstr, core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), pdststr, core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DoConversionToUnicode(&self, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DoConversionToUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DoConversionToUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DoConversionFromUnicode(&self, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DoConversionFromUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DoConversionFromUnicode)(windows_core::Interface::as_raw(self), psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7283,7 +7283,7 @@ impl IMLangFontLink { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc.param().abi(), hfont.param().abi(), core::mem::transmute(pdwcodepages.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc.param().abi(), hfont.param().abi(), core::mem::transmute(pdwcodepages.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn MapFont(&self, hdc: P0, dwcodepages: u32, hsrcfont: P1, phdestfont: Option<*mut super::Graphics::Gdi::HFONT>) -> windows_core::Result<()> @@ -7291,7 +7291,7 @@ impl IMLangFontLink { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), dwcodepages, hsrcfont.param().abi(), core::mem::transmute(phdestfont.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), dwcodepages, hsrcfont.param().abi(), core::mem::transmute(phdestfont.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseFont(&self, hfont: P0) -> windows_core::Result<()> @@ -7336,7 +7336,7 @@ impl IMLangFontLink2 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc.param().abi(), hfont.param().abi(), core::mem::transmute(pdwcodepages.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontCodePages)(windows_core::Interface::as_raw(self), hdc.param().abi(), hfont.param().abi(), core::mem::transmute(pdwcodepages.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn ReleaseFont(&self, hfont: P0) -> windows_core::Result<()> @@ -7353,17 +7353,17 @@ impl IMLangFontLink2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), dwcodepages, chsrc, core::mem::transmute(pfont.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapFont)(windows_core::Interface::as_raw(self), hdc.param().abi(), dwcodepages, chsrc, core::mem::transmute(pfont.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetFontUnicodeRanges(&self, hdc: P0, puiranges: *const u32, puranges: Option<*mut UNICODERANGE>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFontUnicodeRanges)(windows_core::Interface::as_raw(self), hdc.param().abi(), puiranges, core::mem::transmute(puranges.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontUnicodeRanges)(windows_core::Interface::as_raw(self), hdc.param().abi(), puiranges, core::mem::transmute(puranges.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetScriptFontInfo(&self, sid: u8, dwflags: u32, puifonts: *mut u32, pscriptfont: Option<*mut SCRIPTFONTINFO>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScriptFontInfo)(windows_core::Interface::as_raw(self), sid, dwflags, puifonts, core::mem::transmute(pscriptfont.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetScriptFontInfo)(windows_core::Interface::as_raw(self), sid, dwflags, puifonts, core::mem::transmute(pscriptfont.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CodePageToScriptID(&self, uicodepage: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7406,13 +7406,13 @@ impl IMLangLineBreakConsole { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), lsrcpos, lsrclen, cmincolumns, cmaxcolumns, core::mem::transmute(pllinelen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plskiplen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineML)(windows_core::Interface::as_raw(self), psrcmlstr.param().abi(), lsrcpos, lsrclen, cmincolumns, cmaxcolumns, core::mem::transmute(pllinelen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plskiplen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BreakLineW(&self, locale: u32, pszsrc: &[u16], cmaxcolumns: i32, pcchline: Option<*mut i32>, pcchskip: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).BreakLineW)(windows_core::Interface::as_raw(self), locale, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineW)(windows_core::Interface::as_raw(self), locale, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BreakLineA(&self, locale: u32, ucodepage: u32, pszsrc: &[u8], cmaxcolumns: i32, pcchline: Option<*mut i32>, pcchskip: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).BreakLineA)(windows_core::Interface::as_raw(self), locale, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BreakLineA)(windows_core::Interface::as_raw(self), locale, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), cmaxcolumns, core::mem::transmute(pcchline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchskip.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7438,7 +7438,7 @@ impl IMLangString { (windows_core::Interface::vtable(self).Sync)(windows_core::Interface::as_raw(self), fnoaccess.param().abi()).ok() } pub unsafe fn GetLength(&self, pllen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pllen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLength)(windows_core::Interface::as_raw(self), core::mem::transmute(pllen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetMLStr(&self, ldestpos: i32, ldestlen: i32, psrcmlstr: P0, lsrcpos: i32, lsrclen: i32) -> windows_core::Result<()> where @@ -7450,7 +7450,7 @@ impl IMLangString { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.param().abi(), dwclscontext, piid, core::mem::transmute(ppdestmlstr), core::mem::transmute(pldestpos.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetMLStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, punkouter.param().abi(), dwclscontext, piid, core::mem::transmute(ppdestmlstr), core::mem::transmute(pldestpos.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7471,31 +7471,31 @@ impl core::ops::Deref for IMLangStringAStr { windows_core::imp::interface_hierarchy!(IMLangStringAStr, windows_core::IUnknown, IMLangString); impl IMLangStringAStr { pub unsafe fn SetAStr(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, pszsrc: &[u8], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetAStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetAStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetStrBufA(&self, ldestpos: i32, ldestlen: i32, ucodepage: u32, psrcbuf: P0, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetStrBufA)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, ucodepage, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetAStr(&self, lsrcpos: i32, lsrclen: i32, ucodepagein: u32, pucodepageout: Option<*const u32>, pszdest: Option<&mut [u8]>, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, core::mem::transmute(pucodepageout.unwrap_or(std::ptr::null())), core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, ucodepagein, core::mem::transmute(pucodepageout.unwrap_or(core::ptr::null())), core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStrBufA(&self, lsrcpos: i32, lsrcmaxlen: i32, pudestcodepage: Option<*mut u32>, ppdestbuf: *mut Option, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStrBufA)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(pudestcodepage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrBufA)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(pudestcodepage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn LockAStr(&self, lsrcpos: i32, lsrclen: i32, lflags: i32, ucodepagein: u32, cchrequest: i32, pucodepageout: Option<*mut u32>, ppszdest: Option<*mut windows_core::PSTR>, pcchdest: Option<*mut i32>, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LockAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, ucodepagein, cchrequest, core::mem::transmute(pucodepageout.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppszdest.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchdest.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockAStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, ucodepagein, cchrequest, core::mem::transmute(pucodepageout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppszdest.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchdest.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnlockAStr(&self, pszsrc: &[u8], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).UnlockAStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).UnlockAStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetLocale)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() } pub unsafe fn GetLocale(&self, lsrcpos: i32, lsrcmaxlen: i32, plocale: Option<*mut u32>, pllocalepos: Option<*mut i32>, pllocalelen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(plocale.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pllocalepos.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pllocalelen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(plocale.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pllocalepos.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pllocalelen.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7520,10 +7520,10 @@ impl core::ops::Deref for IMLangStringBufA { windows_core::imp::interface_hierarchy!(IMLangStringBufA, windows_core::IUnknown); impl IMLangStringBufA { pub unsafe fn GetStatus(&self, plflags: Option<*mut i32>, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn LockBuf(&self, cchoffset: i32, cchmaxlock: i32, ppszbuf: *mut *mut i8, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf, core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf, core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -7532,7 +7532,7 @@ impl IMLangStringBufA { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), cchoffset, cchwrite).ok() } pub unsafe fn Insert(&self, cchoffset: i32, cchmaxinsert: i32, pcchactual: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Delete(&self, cchoffset: i32, cchdelete: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), cchoffset, cchdelete).ok() @@ -7557,10 +7557,10 @@ impl core::ops::Deref for IMLangStringBufW { windows_core::imp::interface_hierarchy!(IMLangStringBufW, windows_core::IUnknown); impl IMLangStringBufW { pub unsafe fn GetStatus(&self, plflags: Option<*mut i32>, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(plflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn LockBuf(&self, cchoffset: i32, cchmaxlock: i32, ppszbuf: *mut *mut u16, pcchbuf: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf, core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockBuf)(windows_core::Interface::as_raw(self), cchoffset, cchmaxlock, ppszbuf, core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnlockBuf(&self, pszbuf: P0, cchoffset: i32, cchwrite: i32) -> windows_core::Result<()> where @@ -7569,7 +7569,7 @@ impl IMLangStringBufW { (windows_core::Interface::vtable(self).UnlockBuf)(windows_core::Interface::as_raw(self), pszbuf.param().abi(), cchoffset, cchwrite).ok() } pub unsafe fn Insert(&self, cchoffset: i32, cchmaxinsert: i32, pcchactual: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert)(windows_core::Interface::as_raw(self), cchoffset, cchmaxinsert, core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Delete(&self, cchoffset: i32, cchdelete: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), cchoffset, cchdelete).ok() @@ -7594,31 +7594,31 @@ impl core::ops::Deref for IMLangStringWStr { windows_core::imp::interface_hierarchy!(IMLangStringWStr, windows_core::IUnknown, IMLangString); impl IMLangStringWStr { pub unsafe fn SetWStr(&self, ldestpos: i32, ldestlen: i32, pszsrc: &[u16], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetWStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetWStr)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetStrBufW(&self, ldestpos: i32, ldestlen: i32, psrcbuf: P0, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetStrBufW)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, psrcbuf.param().abi(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetWStr(&self, lsrcpos: i32, lsrclen: i32, pszdest: Option<&mut [u16]>, pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, core::mem::transmute(pszdest.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszdest.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStrBufW(&self, lsrcpos: i32, lsrcmaxlen: i32, ppdestbuf: *mut Option, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStrBufW)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrBufW)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(ppdestbuf), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn LockWStr(&self, lsrcpos: i32, lsrclen: i32, lflags: i32, cchrequest: i32, ppszdest: Option<*mut windows_core::PWSTR>, pcchdest: Option<*mut i32>, pldestlen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LockWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, cchrequest, core::mem::transmute(ppszdest.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchdest.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockWStr)(windows_core::Interface::as_raw(self), lsrcpos, lsrclen, lflags, cchrequest, core::mem::transmute(ppszdest.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchdest.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pldestlen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnlockWStr(&self, pszsrc: &[u16], pcchactual: Option<*mut i32>, plactuallen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).UnlockWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).UnlockWStr)(windows_core::Interface::as_raw(self), core::mem::transmute(pszsrc.as_ptr()), pszsrc.len().try_into().unwrap(), core::mem::transmute(pcchactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plactuallen.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetLocale(&self, ldestpos: i32, ldestlen: i32, locale: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetLocale)(windows_core::Interface::as_raw(self), ldestpos, ldestlen, locale).ok() } pub unsafe fn GetLocale(&self, lsrcpos: i32, lsrcmaxlen: i32, plocale: Option<*mut u32>, pllocalepos: Option<*mut i32>, pllocalelen: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(plocale.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pllocalepos.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pllocalelen.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocale)(windows_core::Interface::as_raw(self), lsrcpos, lsrcmaxlen, core::mem::transmute(plocale.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pllocalepos.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pllocalelen.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7667,19 +7667,19 @@ impl IMultiLanguage { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), dwsrcencoding, dwdstencoding).ok() } pub unsafe fn ConvertString(&self, pdwmode: Option<*mut u32>, dwsrcencoding: u32, dwdstencoding: u32, psrcstr: Option<*const u8>, pcsrcsize: Option<*mut u32>, pdststr: Option<*mut u8>, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwsrcencoding, dwdstencoding, core::mem::transmute(psrcstr.unwrap_or(std::ptr::null())), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwsrcencoding, dwdstencoding, core::mem::transmute(psrcstr.unwrap_or(core::ptr::null())), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() @@ -7759,19 +7759,19 @@ impl IMultiLanguage2 { (windows_core::Interface::vtable(self).IsConvertible)(windows_core::Interface::as_raw(self), dwsrcencoding, dwdstencoding).ok() } pub unsafe fn ConvertString(&self, pdwmode: Option<*mut u32>, dwsrcencoding: u32, dwdstencoding: u32, psrcstr: Option<*const u8>, pcsrcsize: Option<*mut u32>, pdststr: Option<*mut u8>, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwsrcencoding, dwdstencoding, core::mem::transmute(psrcstr.unwrap_or(std::ptr::null())), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertString)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwsrcencoding, dwdstencoding, core::mem::transmute(psrcstr.unwrap_or(core::ptr::null())), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringToUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertStringToUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringFromUnicode(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ConvertStringFromUnicode)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertStringReset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertStringReset)(windows_core::Interface::as_raw(self)).ok() @@ -7804,21 +7804,21 @@ impl IMultiLanguage2 { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringInIStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwflag, lpfallback.param().abi(), dwsrcencoding, dwdstencoding, pstmin.param().abi(), pstmout.param().abi()).ok() + (windows_core::Interface::vtable(self).ConvertStringInIStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwflag, lpfallback.param().abi(), dwsrcencoding, dwdstencoding, pstmin.param().abi(), pstmout.param().abi()).ok() } pub unsafe fn ConvertStringToUnicodeEx(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PWSTR, pcdstsize: Option<*mut u32>, dwflag: u32, lpfallback: P1) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut())), dwflag, lpfallback.param().abi()).ok() + (windows_core::Interface::vtable(self).ConvertStringToUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut())), dwflag, lpfallback.param().abi()).ok() } pub unsafe fn ConvertStringFromUnicodeEx(&self, pdwmode: Option<*mut u32>, dwencoding: u32, psrcstr: P0, pcsrcsize: Option<*mut u32>, pdststr: windows_core::PSTR, pcdstsize: Option<*mut u32>, dwflag: u32, lpfallback: P1) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(std::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(std::ptr::null_mut())), dwflag, lpfallback.param().abi()).ok() + (windows_core::Interface::vtable(self).ConvertStringFromUnicodeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwmode.unwrap_or(core::ptr::null_mut())), dwencoding, psrcstr.param().abi(), core::mem::transmute(pcsrcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdststr), core::mem::transmute(pcdstsize.unwrap_or(core::ptr::null_mut())), dwflag, lpfallback.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn DetectCodepageInIStream(&self, dwflag: u32, dwprefwincodepage: u32, pstmin: P0, lpencoding: *mut DetectEncodingInfo, pnscores: *mut i32) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs index c82032991d..e568ac675c 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DXCore/mod.rs @@ -36,13 +36,13 @@ impl IDXCoreAdapter { (windows_core::Interface::vtable(self).IsQueryStateSupported)(windows_core::Interface::as_raw(self), property) } pub unsafe fn QueryState(&self, state: DXCoreAdapterState, inputstatedetailssize: usize, inputstatedetails: Option<*const core::ffi::c_void>, outputbuffersize: usize, outputbuffer: *mut core::ffi::c_void) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).QueryState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(std::ptr::null())), outputbuffersize, outputbuffer).ok() + (windows_core::Interface::vtable(self).QueryState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(core::ptr::null())), outputbuffersize, outputbuffer).ok() } pub unsafe fn IsSetStateSupported(&self, property: DXCoreAdapterState) -> bool { (windows_core::Interface::vtable(self).IsSetStateSupported)(windows_core::Interface::as_raw(self), property) } pub unsafe fn SetState(&self, state: DXCoreAdapterState, inputstatedetailssize: usize, inputstatedetails: Option<*const core::ffi::c_void>, inputdatasize: usize, inputdata: *const core::ffi::c_void) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(std::ptr::null())), inputdatasize, inputdata).ok() + (windows_core::Interface::vtable(self).SetState)(windows_core::Interface::as_raw(self), state, inputstatedetailssize, core::mem::transmute(inputstatedetails.unwrap_or(core::ptr::null())), inputdatasize, inputdata).ok() } pub unsafe fn GetFactory(&self) -> windows_core::Result where @@ -97,7 +97,7 @@ impl IDXCoreAdapterFactory { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterEventNotification)(windows_core::Interface::as_raw(self), dxcoreobject.param().abi(), notificationtype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterEventNotification)(windows_core::Interface::as_raw(self), dxcoreobject.param().abi(), notificationtype, callbackfunction, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } pub unsafe fn UnregisterEventNotification(&self, eventcookie: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnregisterEventNotification)(windows_core::Interface::as_raw(self), eventcookie).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs index 09df654589..be2ed0d1bb 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct2D/mod.rs @@ -20,7 +20,7 @@ where { windows_targets::link!("d2d1.dll" "system" fn D2D1CreateDevice(dxgidevice : * mut core::ffi::c_void, creationproperties : *const D2D1_CREATION_PROPERTIES, d2ddevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - D2D1CreateDevice(dxgidevice.param().abi(), core::mem::transmute(creationproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDevice(dxgidevice.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Dxgi")] #[inline] @@ -30,7 +30,7 @@ where { windows_targets::link!("d2d1.dll" "system" fn D2D1CreateDeviceContext(dxgisurface : * mut core::ffi::c_void, creationproperties : *const D2D1_CREATION_PROPERTIES, d2ddevicecontext : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - D2D1CreateDeviceContext(dxgisurface.param().abi(), core::mem::transmute(creationproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateDeviceContext(dxgisurface.param().abi(), core::mem::transmute(creationproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn D2D1CreateFactory(factorytype: D2D1_FACTORY_TYPE, pfactoryoptions: Option<*const D2D1_FACTORY_OPTIONS>) -> windows_core::Result @@ -39,7 +39,7 @@ where { windows_targets::link!("d2d1.dll" "system" fn D2D1CreateFactory(factorytype : D2D1_FACTORY_TYPE, riid : *const windows_core::GUID, pfactoryoptions : *const D2D1_FACTORY_OPTIONS, ppifactory : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - D2D1CreateFactory(factorytype, &T::IID, core::mem::transmute(pfactoryoptions.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + D2D1CreateFactory(factorytype, &T::IID, core::mem::transmute(pfactoryoptions.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] #[inline] @@ -141,18 +141,18 @@ impl ID2D1Bitmap { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyFromBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(std::ptr::null())), bitmap.param().abi(), core::mem::transmute(srcrect.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CopyFromBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(core::ptr::null())), bitmap.param().abi(), core::mem::transmute(srcrect.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CopyFromRenderTarget(&self, destpoint: Option<*const Common::D2D_POINT_2U>, rendertarget: P0, srcrect: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyFromRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(std::ptr::null())), rendertarget.param().abi(), core::mem::transmute(srcrect.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CopyFromRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(destpoint.unwrap_or(core::ptr::null())), rendertarget.param().abi(), core::mem::transmute(srcrect.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CopyFromMemory(&self, dstrect: Option<*const Common::D2D_RECT_U>, srcdata: *const core::ffi::c_void, pitch: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CopyFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(dstrect.unwrap_or(std::ptr::null())), srcdata, pitch).ok() + (windows_core::Interface::vtable(self).CopyFromMemory)(windows_core::Interface::as_raw(self), core::mem::transmute(dstrect.unwrap_or(core::ptr::null())), srcdata, pitch).ok() } } unsafe impl Send for ID2D1Bitmap {} @@ -584,14 +584,14 @@ impl ID2D1CommandSink { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn Clear(&self, color: Option<*const Common::D2D1_COLOR_F>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(color.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(color.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub unsafe fn DrawGlyphRun(&self, baselineorigin: Common::D2D_POINT_2F, glyphrun: *const super::DirectWrite::DWRITE_GLYPH_RUN, glyphrundescription: Option<*const super::DirectWrite::DWRITE_GLYPH_RUN_DESCRIPTION>, foregroundbrush: P0, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), foregroundbrush.param().abi(), measuringmode).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), measuringmode).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawLine(&self, point0: Common::D2D_POINT_2F, point1: Common::D2D_POINT_2F, brush: P0, strokewidth: f32, strokestyle: P1) -> windows_core::Result<()> @@ -622,21 +622,21 @@ impl ID2D1CommandSink { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawImage(&self, image: P0, targetoffset: Option<*const Common::D2D_POINT_2F>, imagerectangle: Option<*const Common::D2D_RECT_F>, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(std::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(std::ptr::null())), interpolationmode, compositemode).ok() + (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), interpolationmode, compositemode).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawGdiMetafile(&self, gdimetafile: P0, targetoffset: Option<*const Common::D2D_POINT_2F>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn FillMesh(&self, mesh: P0, brush: P1) -> windows_core::Result<()> where @@ -651,7 +651,7 @@ impl ID2D1CommandSink { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn FillGeometry(&self, geometry: P0, brush: P1, opacitybrush: P2) -> windows_core::Result<()> where @@ -804,7 +804,7 @@ impl ID2D1CommandSink2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))).ok() } } unsafe impl Send for ID2D1CommandSink2 {} @@ -877,7 +877,7 @@ impl ID2D1CommandSink5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(std::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(std::ptr::null())), interpolationmode).ok() + (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), interpolationmode).ok() } } unsafe impl Send for ID2D1CommandSink5 {} @@ -1022,7 +1022,7 @@ impl ID2D1Device { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePrintControl)(windows_core::Interface::as_raw(self), wicfactory.param().abi(), documenttarget.param().abi(), core::mem::transmute(printcontrolproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePrintControl)(windows_core::Interface::as_raw(self), wicfactory.param().abi(), documenttarget.param().abi(), core::mem::transmute(printcontrolproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn SetMaximumTextureMemory(&self, maximuminbytes: u64) { (windows_core::Interface::vtable(self).SetMaximumTextureMemory)(windows_core::Interface::as_raw(self), maximuminbytes) @@ -1239,7 +1239,7 @@ impl ID2D1DeviceContext { #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateBitmap(&self, size: Common::D2D_SIZE_U, sourcedata: Option<*const core::ffi::c_void>, pitch: u32, bitmapproperties: *const D2D1_BITMAP_PROPERTIES1) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(sourcedata.unwrap_or(std::ptr::null())), pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(sourcedata.unwrap_or(core::ptr::null())), pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub unsafe fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: P0, bitmapproperties: Option<*const D2D1_BITMAP_PROPERTIES1>) -> windows_core::Result @@ -1247,7 +1247,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapFromWicBitmap)(windows_core::Interface::as_raw(self), wicbitmapsource.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapFromWicBitmap)(windows_core::Interface::as_raw(self), wicbitmapsource.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateColorContext(&self, space: D2D1_COLOR_SPACE, profile: Option<&[u8]>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1274,7 +1274,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapFromDxgiSurface)(windows_core::Interface::as_raw(self), surface.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapFromDxgiSurface)(windows_core::Interface::as_raw(self), surface.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateEffect(&self, effectid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1291,7 +1291,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateImageBrush)(windows_core::Interface::as_raw(self), image.param().abi(), imagebrushproperties, core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateImageBrush)(windows_core::Interface::as_raw(self), image.param().abi(), imagebrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn CreateBitmapBrush(&self, bitmap: P0, bitmapbrushproperties: Option<*const D2D1_BITMAP_BRUSH_PROPERTIES1>, brushproperties: Option<*const D2D1_BRUSH_PROPERTIES>) -> windows_core::Result @@ -1299,7 +1299,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapBrush)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(bitmapbrushproperties.unwrap_or(std::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapBrush)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(bitmapbrushproperties.unwrap_or(core::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCommandList(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1376,28 +1376,28 @@ impl ID2D1DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), foregroundbrush.param().abi(), measuringmode) + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), measuringmode) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawImage(&self, image: P0, targetoffset: Option<*const Common::D2D_POINT_2F>, imagerectangle: Option<*const Common::D2D_RECT_F>, interpolationmode: D2D1_INTERPOLATION_MODE, compositemode: Common::D2D1_COMPOSITE_MODE) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(std::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(std::ptr::null())), interpolationmode, compositemode) + (windows_core::Interface::vtable(self).DrawImage)(windows_core::Interface::as_raw(self), image.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), interpolationmode, compositemode) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawGdiMetafile(&self, gdimetafile: P0, targetoffset: Option<*const Common::D2D_POINT_2F>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(targetoffset.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawBitmap(&self, bitmap: P0, destinationrectangle: Option<*const Common::D2D_RECT_F>, opacity: f32, interpolationmode: D2D1_INTERPOLATION_MODE, sourcerectangle: Option<*const Common::D2D_RECT_F>, perspectivetransform: Option<*const Common::D2D_MATRIX_4X4_F>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null())), core::mem::transmute(perspectivetransform.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS1, layer: P0) @@ -1432,7 +1432,7 @@ impl ID2D1DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEffectRequiredInputRectangles)(windows_core::Interface::as_raw(self), rendereffect.param().abi(), core::mem::transmute(renderimagerectangle.unwrap_or(std::ptr::null())), inputdescriptions, requiredinputrects, inputcount).ok() + (windows_core::Interface::vtable(self).GetEffectRequiredInputRectangles)(windows_core::Interface::as_raw(self), rendereffect.param().abi(), core::mem::transmute(renderimagerectangle.unwrap_or(core::ptr::null())), inputdescriptions, requiredinputrects, inputcount).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn FillOpacityMask(&self, opacitymask: P0, brush: P1, destinationrectangle: Option<*const Common::D2D_RECT_F>, sourcerectangle: Option<*const Common::D2D_RECT_F>) @@ -1440,7 +1440,7 @@ impl ID2D1DeviceContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) } } unsafe impl Send for ID2D1DeviceContext {} @@ -1607,7 +1607,7 @@ impl ID2D1DeviceContext2 { #[cfg(feature = "Foundation_Numerics")] pub unsafe fn CreateInkStyle(&self, inkstyleproperties: Option<*const D2D1_INK_STYLE_PROPERTIES>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateInkStyle)(windows_core::Interface::as_raw(self), core::mem::transmute(inkstyleproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateInkStyle)(windows_core::Interface::as_raw(self), core::mem::transmute(inkstyleproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientMesh(&self, patches: &[D2D1_GRADIENT_MESH_PATCH]) -> windows_core::Result { @@ -1658,7 +1658,7 @@ impl ID2D1DeviceContext2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DrawGdiMetafile)(windows_core::Interface::as_raw(self), gdimetafile.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) } pub unsafe fn CreateTransformedImageSource(&self, imagesource: P0, properties: *const D2D1_TRANSFORMED_IMAGE_SOURCE_PROPERTIES) -> windows_core::Result where @@ -1781,7 +1781,7 @@ impl ID2D1DeviceContext4 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), glyphimageformat, core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), dpix, dpiy, glyphtransform, core::mem::transmute(glyphimage)).ok() + (windows_core::Interface::vtable(self).GetColorBitmapGlyphImage)(windows_core::Interface::as_raw(self), glyphimageformat, core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), dpix, dpiy, glyphtransform, core::mem::transmute(glyphimage)).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub unsafe fn GetSvgGlyphImage(&self, glyphorigin: Common::D2D_POINT_2F, fontface: P0, fontemsize: f32, glyphindex: u16, issideways: P1, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, defaultfillbrush: P2, svgglyphstyle: P3, colorpaletteindex: u32, glyphtransform: *mut super::super::super::Foundation::Numerics::Matrix3x2, glyphimage: *mut Option) -> windows_core::Result<()> @@ -1791,7 +1791,7 @@ impl ID2D1DeviceContext4 { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, glyphtransform, core::mem::transmute(glyphimage)).ok() + (windows_core::Interface::vtable(self).GetSvgGlyphImage)(windows_core::Interface::as_raw(self), core::mem::transmute(glyphorigin), fontface.param().abi(), fontemsize, glyphindex, issideways.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), defaultfillbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, glyphtransform, core::mem::transmute(glyphimage)).ok() } } unsafe impl Send for ID2D1DeviceContext4 {} @@ -1892,7 +1892,7 @@ impl ID2D1DeviceContext6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(std::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(std::ptr::null())), interpolationmode) + (windows_core::Interface::vtable(self).BlendImage)(windows_core::Interface::as_raw(self), image.param().abi(), blendmode, core::mem::transmute(targetoffset.unwrap_or(core::ptr::null())), core::mem::transmute(imagerectangle.unwrap_or(core::ptr::null())), interpolationmode) } } unsafe impl Send for ID2D1DeviceContext6 {} @@ -1931,7 +1931,7 @@ impl ID2D1DeviceContext7 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), foregroundbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, measuringmode, bitmapsnapoption) + (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), foregroundbrush.param().abi(), svgglyphstyle.param().abi(), colorpaletteindex, measuringmode, bitmapsnapoption) } } unsafe impl Send for ID2D1DeviceContext7 {} @@ -1980,7 +1980,7 @@ impl ID2D1DrawInfo { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), vertexoptions, core::mem::transmute(blenddescription.unwrap_or(std::ptr::null())), core::mem::transmute(vertexrange.unwrap_or(std::ptr::null())), core::mem::transmute(vertexshader.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetVertexProcessing)(windows_core::Interface::as_raw(self), vertexbuffer.param().abi(), vertexoptions, core::mem::transmute(blenddescription.unwrap_or(core::ptr::null())), core::mem::transmute(vertexrange.unwrap_or(core::ptr::null())), core::mem::transmute(vertexshader.unwrap_or(core::ptr::null()))).ok() } } unsafe impl Send for ID2D1DrawInfo {} @@ -2204,7 +2204,7 @@ impl ID2D1EffectContext { } pub unsafe fn CreateResourceTexture(&self, resourceid: Option<*const windows_core::GUID>, resourcetextureproperties: *const D2D1_RESOURCE_TEXTURE_PROPERTIES, data: Option<&[u8]>, strides: Option<*const u32>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateResourceTexture)(windows_core::Interface::as_raw(self), core::mem::transmute(resourceid.unwrap_or(std::ptr::null())), resourcetextureproperties, core::mem::transmute(data.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(strides.unwrap_or(std::ptr::null())), data.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateResourceTexture)(windows_core::Interface::as_raw(self), core::mem::transmute(resourceid.unwrap_or(core::ptr::null())), resourcetextureproperties, core::mem::transmute(data.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(strides.unwrap_or(core::ptr::null())), data.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn FindResourceTexture(&self, resourceid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2213,7 +2213,7 @@ impl ID2D1EffectContext { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateVertexBuffer(&self, vertexbufferproperties: *const D2D1_VERTEX_BUFFER_PROPERTIES, resourceid: Option<*const windows_core::GUID>, customvertexbufferproperties: Option<*const D2D1_CUSTOM_VERTEX_BUFFER_PROPERTIES>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), vertexbufferproperties, core::mem::transmute(resourceid.unwrap_or(std::ptr::null())), core::mem::transmute(customvertexbufferproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateVertexBuffer)(windows_core::Interface::as_raw(self), vertexbufferproperties, core::mem::transmute(resourceid.unwrap_or(core::ptr::null())), core::mem::transmute(customvertexbufferproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn FindVertexBuffer(&self, resourceid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2454,7 +2454,7 @@ impl ID2D1Factory { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDrawingStateBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(drawingstatedescription.unwrap_or(std::ptr::null())), textrenderingparams.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDrawingStateBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(drawingstatedescription.unwrap_or(core::ptr::null())), textrenderingparams.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub unsafe fn CreateWicBitmapRenderTarget(&self, target: P0, rendertargetproperties: *const D2D1_RENDER_TARGET_PROPERTIES) -> windows_core::Result @@ -2564,7 +2564,7 @@ impl ID2D1Factory1 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDrawingStateBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(drawingstatedescription.unwrap_or(std::ptr::null())), textrenderingparams.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDrawingStateBlock)(windows_core::Interface::as_raw(self), core::mem::transmute(drawingstatedescription.unwrap_or(core::ptr::null())), textrenderingparams.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateGdiMetafile(&self, metafilestream: P0) -> windows_core::Result @@ -2591,7 +2591,7 @@ impl ID2D1Factory1 { (windows_core::Interface::vtable(self).UnregisterEffect)(windows_core::Interface::as_raw(self), classid).ok() } pub unsafe fn GetRegisteredEffects(&self, effects: Option<&mut [windows_core::GUID]>, effectsreturned: Option<*mut u32>, effectsregistered: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRegisteredEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(effects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(effectsreturned.unwrap_or(std::ptr::null_mut())), core::mem::transmute(effectsregistered.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRegisteredEffects)(windows_core::Interface::as_raw(self), core::mem::transmute(effects.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), effects.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(effectsreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(effectsregistered.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEffectProperties(&self, effectid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2837,7 +2837,7 @@ impl ID2D1GdiInteropRenderTarget { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), mode, &mut result__).map(|| result__) } pub unsafe fn ReleaseDC(&self, update: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(update.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(update.unwrap_or(core::ptr::null()))).ok() } } unsafe impl Send for ID2D1GdiInteropRenderTarget {} @@ -2922,7 +2922,7 @@ impl core::ops::Deref for ID2D1GdiMetafileSink { windows_core::imp::interface_hierarchy!(ID2D1GdiMetafileSink, windows_core::IUnknown); impl ID2D1GdiMetafileSink { pub unsafe fn ProcessRecord(&self, recordtype: u32, recorddata: Option<*const core::ffi::c_void>, recorddatasize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(std::ptr::null())), recorddatasize).ok() + (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(core::ptr::null())), recorddatasize).ok() } } unsafe impl Send for ID2D1GdiMetafileSink {} @@ -2942,7 +2942,7 @@ impl core::ops::Deref for ID2D1GdiMetafileSink1 { windows_core::imp::interface_hierarchy!(ID2D1GdiMetafileSink1, windows_core::IUnknown, ID2D1GdiMetafileSink); impl ID2D1GdiMetafileSink1 { pub unsafe fn ProcessRecord(&self, recordtype: u32, recorddata: Option<*const core::ffi::c_void>, recorddatasize: u32, flags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(std::ptr::null())), recorddatasize, flags).ok() + (windows_core::Interface::vtable(self).ProcessRecord)(windows_core::Interface::as_raw(self), recordtype, core::mem::transmute(recorddata.unwrap_or(core::ptr::null())), recorddatasize, flags).ok() } } unsafe impl Send for ID2D1GdiMetafileSink1 {} @@ -2964,7 +2964,7 @@ impl ID2D1Geometry { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetBounds(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetWidenedBounds(&self, strokewidth: f32, strokestyle: P0, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result @@ -2972,7 +2972,7 @@ impl ID2D1Geometry { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetWidenedBounds)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn StrokeContainsPoint(&self, point: Common::D2D_POINT_2F, strokewidth: f32, strokestyle: P0, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result @@ -2980,12 +2980,12 @@ impl ID2D1Geometry { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).StrokeContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).StrokeContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn FillContainsPoint(&self, point: Common::D2D_POINT_2F, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FillContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).FillContainsPoint)(windows_core::Interface::as_raw(self), core::mem::transmute(point), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn CompareWithGeometry(&self, inputgeometry: P0, inputgeometrytransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result @@ -2993,21 +2993,21 @@ impl ID2D1Geometry { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CompareWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), core::mem::transmute(inputgeometrytransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CompareWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), core::mem::transmute(inputgeometrytransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn Simplify(&self, simplificationoption: D2D1_GEOMETRY_SIMPLIFICATION_OPTION, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, geometrysink: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), simplificationoption, core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Simplify)(windows_core::Interface::as_raw(self), simplificationoption, core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn Tessellate(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, tessellationsink: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, tessellationsink.param().abi()).ok() + (windows_core::Interface::vtable(self).Tessellate)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, tessellationsink.param().abi()).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn CombineWithGeometry(&self, inputgeometry: P0, combinemode: D2D1_COMBINE_MODE, inputgeometrytransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, geometrysink: P1) -> windows_core::Result<()> @@ -3015,28 +3015,28 @@ impl ID2D1Geometry { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), combinemode, core::mem::transmute(inputgeometrytransform.unwrap_or(std::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).CombineWithGeometry)(windows_core::Interface::as_raw(self), inputgeometry.param().abi(), combinemode, core::mem::transmute(inputgeometrytransform.unwrap_or(core::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn Outline(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, geometrysink: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Outline)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn ComputeArea(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ComputeArea)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeArea)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn ComputeLength(&self, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ComputeLength)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeLength)(windows_core::Interface::as_raw(self), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, &mut result__).map(|| result__) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn ComputePointAtLength(&self, length: f32, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, point: Option<*mut Common::D2D_POINT_2F>, unittangentvector: Option<*mut Common::D2D_POINT_2F>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ComputePointAtLength)(windows_core::Interface::as_raw(self), length, core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, core::mem::transmute(point.unwrap_or(std::ptr::null_mut())), core::mem::transmute(unittangentvector.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ComputePointAtLength)(windows_core::Interface::as_raw(self), length, core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, core::mem::transmute(point.unwrap_or(core::ptr::null_mut())), core::mem::transmute(unittangentvector.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn Widen(&self, strokewidth: f32, strokestyle: P0, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, geometrysink: P1) -> windows_core::Result<()> @@ -3044,7 +3044,7 @@ impl ID2D1Geometry { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).Widen)(windows_core::Interface::as_raw(self), strokewidth, strokestyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() } } unsafe impl Send for ID2D1Geometry {} @@ -3473,11 +3473,11 @@ windows_core::imp::interface_hierarchy!(ID2D1ImageSourceFromWic, windows_core::I impl ID2D1ImageSourceFromWic { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn EnsureCached(&self, rectangletofill: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnsureCached)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletofill.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).EnsureCached)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletofill.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn TrimCache(&self, rectangletopreserve: Option<*const Common::D2D_RECT_U>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).TrimCache)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletopreserve.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).TrimCache)(windows_core::Interface::as_raw(self), core::mem::transmute(rectangletopreserve.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Imaging")] pub unsafe fn GetSource(&self) -> windows_core::Result { @@ -3545,7 +3545,7 @@ impl ID2D1Ink { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StreamAsGeometry)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).StreamAsGeometry)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, geometrysink.param().abi()).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetBounds(&self, inkstyle: P0, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>) -> windows_core::Result @@ -3553,7 +3553,7 @@ impl ID2D1Ink { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetBounds)(windows_core::Interface::as_raw(self), inkstyle.param().abi(), core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } } unsafe impl Send for ID2D1Ink {} @@ -3849,7 +3849,7 @@ windows_core::imp::interface_hierarchy!(ID2D1PathGeometry1, windows_core::IUnkno impl ID2D1PathGeometry1 { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn ComputePointAndSegmentAtLength(&self, length: f32, startsegment: u32, worldtransform: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, flatteningtolerance: f32, pointdescription: *mut D2D1_POINT_DESCRIPTION) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ComputePointAndSegmentAtLength)(windows_core::Interface::as_raw(self), length, startsegment, core::mem::transmute(worldtransform.unwrap_or(std::ptr::null())), flatteningtolerance, pointdescription).ok() + (windows_core::Interface::vtable(self).ComputePointAndSegmentAtLength)(windows_core::Interface::as_raw(self), length, startsegment, core::mem::transmute(worldtransform.unwrap_or(core::ptr::null())), flatteningtolerance, pointdescription).ok() } } unsafe impl Send for ID2D1PathGeometry1 {} @@ -3877,7 +3877,7 @@ impl ID2D1PrintControl { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPage)(windows_core::Interface::as_raw(self), commandlist.param().abi(), core::mem::transmute(pagesize), pageprintticketstream.param().abi(), core::mem::transmute(tag1.unwrap_or(std::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddPage)(windows_core::Interface::as_raw(self), commandlist.param().abi(), core::mem::transmute(pagesize), pageprintticketstream.param().abi(), core::mem::transmute(tag1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -4111,7 +4111,7 @@ impl ID2D1RenderTarget { #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateBitmap(&self, size: Common::D2D_SIZE_U, srcdata: Option<*const core::ffi::c_void>, pitch: u32, bitmapproperties: *const D2D1_BITMAP_PROPERTIES) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(srcdata.unwrap_or(std::ptr::null())), pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmap)(windows_core::Interface::as_raw(self), core::mem::transmute(size), core::mem::transmute(srcdata.unwrap_or(core::ptr::null())), pitch, bitmapproperties, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common", feature = "Win32_Graphics_Imaging"))] pub unsafe fn CreateBitmapFromWicBitmap(&self, wicbitmapsource: P0, bitmapproperties: Option<*const D2D1_BITMAP_PROPERTIES>) -> windows_core::Result @@ -4119,11 +4119,11 @@ impl ID2D1RenderTarget { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapFromWicBitmap)(windows_core::Interface::as_raw(self), wicbitmapsource.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapFromWicBitmap)(windows_core::Interface::as_raw(self), wicbitmapsource.param().abi(), core::mem::transmute(bitmapproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateSharedBitmap(&self, riid: *const windows_core::GUID, data: *mut core::ffi::c_void, bitmapproperties: Option<*const D2D1_BITMAP_PROPERTIES>, bitmap: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSharedBitmap)(windows_core::Interface::as_raw(self), riid, data, core::mem::transmute(bitmapproperties.unwrap_or(std::ptr::null())), core::mem::transmute(bitmap)).ok() + (windows_core::Interface::vtable(self).CreateSharedBitmap)(windows_core::Interface::as_raw(self), riid, data, core::mem::transmute(bitmapproperties.unwrap_or(core::ptr::null())), core::mem::transmute(bitmap)).ok() } #[cfg(feature = "Foundation_Numerics")] pub unsafe fn CreateBitmapBrush(&self, bitmap: P0, bitmapbrushproperties: Option<*const D2D1_BITMAP_BRUSH_PROPERTIES>, brushproperties: Option<*const D2D1_BRUSH_PROPERTIES>) -> windows_core::Result @@ -4131,12 +4131,12 @@ impl ID2D1RenderTarget { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBitmapBrush)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(bitmapbrushproperties.unwrap_or(std::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBitmapBrush)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(bitmapbrushproperties.unwrap_or(core::ptr::null())), core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn CreateSolidColorBrush(&self, color: *const Common::D2D1_COLOR_F, brushproperties: Option<*const D2D1_BRUSH_PROPERTIES>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSolidColorBrush)(windows_core::Interface::as_raw(self), color, core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSolidColorBrush)(windows_core::Interface::as_raw(self), color, core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateGradientStopCollection(&self, gradientstops: &[Common::D2D1_GRADIENT_STOP], colorinterpolationgamma: D2D1_GAMMA, extendmode: D2D1_EXTEND_MODE) -> windows_core::Result { @@ -4149,7 +4149,7 @@ impl ID2D1RenderTarget { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateLinearGradientBrush)(windows_core::Interface::as_raw(self), lineargradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateLinearGradientBrush)(windows_core::Interface::as_raw(self), lineargradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn CreateRadialGradientBrush(&self, radialgradientbrushproperties: *const D2D1_RADIAL_GRADIENT_BRUSH_PROPERTIES, brushproperties: Option<*const D2D1_BRUSH_PROPERTIES>, gradientstopcollection: P0) -> windows_core::Result @@ -4157,17 +4157,17 @@ impl ID2D1RenderTarget { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateRadialGradientBrush)(windows_core::Interface::as_raw(self), radialgradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(std::ptr::null())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateRadialGradientBrush)(windows_core::Interface::as_raw(self), radialgradientbrushproperties, core::mem::transmute(brushproperties.unwrap_or(core::ptr::null())), gradientstopcollection.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateCompatibleRenderTarget(&self, desiredsize: Option<*const Common::D2D_SIZE_F>, desiredpixelsize: Option<*const Common::D2D_SIZE_U>, desiredformat: Option<*const Common::D2D1_PIXEL_FORMAT>, options: D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateCompatibleRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(desiredsize.unwrap_or(std::ptr::null())), core::mem::transmute(desiredpixelsize.unwrap_or(std::ptr::null())), core::mem::transmute(desiredformat.unwrap_or(std::ptr::null())), options, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCompatibleRenderTarget)(windows_core::Interface::as_raw(self), core::mem::transmute(desiredsize.unwrap_or(core::ptr::null())), core::mem::transmute(desiredpixelsize.unwrap_or(core::ptr::null())), core::mem::transmute(desiredformat.unwrap_or(core::ptr::null())), options, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn CreateLayer(&self, size: Option<*const Common::D2D_SIZE_F>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateLayer)(windows_core::Interface::as_raw(self), core::mem::transmute(size.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateLayer)(windows_core::Interface::as_raw(self), core::mem::transmute(size.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateMesh(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4255,14 +4255,14 @@ impl ID2D1RenderTarget { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), content, core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).FillOpacityMask)(windows_core::Interface::as_raw(self), opacitymask.param().abi(), brush.param().abi(), content, core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn DrawBitmap(&self, bitmap: P0, destinationrectangle: Option<*const Common::D2D_RECT_F>, opacity: f32, interpolationmode: D2D1_BITMAP_INTERPOLATION_MODE, sourcerectangle: Option<*const Common::D2D_RECT_F>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(std::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DrawBitmap)(windows_core::Interface::as_raw(self), bitmap.param().abi(), core::mem::transmute(destinationrectangle.unwrap_or(core::ptr::null())), opacity, interpolationmode, core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_DirectWrite"))] pub unsafe fn DrawText(&self, string: &[u16], textformat: P0, layoutrect: *const Common::D2D_RECT_F, defaultfillbrush: P1, options: D2D1_DRAW_TEXT_OPTIONS, measuringmode: super::DirectWrite::DWRITE_MEASURING_MODE) @@ -4324,7 +4324,7 @@ impl ID2D1RenderTarget { (windows_core::Interface::vtable(self).SetTags)(windows_core::Interface::as_raw(self), tag1, tag2) } pub unsafe fn GetTags(&self, tag1: Option<*mut u64>, tag2: Option<*mut u64>) { - (windows_core::Interface::vtable(self).GetTags)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(std::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetTags)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn PushLayer(&self, layerparameters: *const D2D1_LAYER_PARAMETERS, layer: P0) @@ -4337,7 +4337,7 @@ impl ID2D1RenderTarget { (windows_core::Interface::vtable(self).PopLayer)(windows_core::Interface::as_raw(self)) } pub unsafe fn Flush(&self, tag1: Option<*mut u64>, tag2: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(std::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SaveDrawingState(&self, drawingstateblock: P0) where @@ -4360,13 +4360,13 @@ impl ID2D1RenderTarget { } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn Clear(&self, clearcolor: Option<*const Common::D2D1_COLOR_F>) { - (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(clearcolor.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).Clear)(windows_core::Interface::as_raw(self), core::mem::transmute(clearcolor.unwrap_or(core::ptr::null()))) } pub unsafe fn BeginDraw(&self) { (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self)) } pub unsafe fn EndDraw(&self, tag1: Option<*mut u64>, tag2: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(std::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(tag1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(tag2.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct2D_Common", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn GetPixelFormat(&self) -> Common::D2D1_PIXEL_FORMAT { @@ -4590,7 +4590,7 @@ impl core::ops::Deref for ID2D1ResourceTexture { windows_core::imp::interface_hierarchy!(ID2D1ResourceTexture, windows_core::IUnknown); impl ID2D1ResourceTexture { pub unsafe fn Update(&self, minimumextents: Option<*const u32>, maximimumextents: Option<*const u32>, strides: Option<*const u32>, dimensions: u32, data: &[u8]) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(minimumextents.unwrap_or(std::ptr::null())), core::mem::transmute(maximimumextents.unwrap_or(std::ptr::null())), core::mem::transmute(strides.unwrap_or(std::ptr::null())), dimensions, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), core::mem::transmute(minimumextents.unwrap_or(core::ptr::null())), core::mem::transmute(maximimumextents.unwrap_or(core::ptr::null())), core::mem::transmute(strides.unwrap_or(core::ptr::null())), dimensions, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap()).ok() } } unsafe impl Send for ID2D1ResourceTexture {} @@ -4703,15 +4703,15 @@ windows_core::imp::interface_hierarchy!(ID2D1SpriteBatch, windows_core::IUnknown impl ID2D1SpriteBatch { #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn AddSprites(&self, spritecount: u32, destinationrectangles: *const Common::D2D_RECT_F, sourcerectangles: Option<*const Common::D2D_RECT_U>, colors: Option<*const Common::D2D1_COLOR_F>, transforms: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, destinationrectanglesstride: u32, sourcerectanglesstride: u32, colorsstride: u32, transformsstride: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddSprites)(windows_core::Interface::as_raw(self), spritecount, destinationrectangles, core::mem::transmute(sourcerectangles.unwrap_or(std::ptr::null())), core::mem::transmute(colors.unwrap_or(std::ptr::null())), core::mem::transmute(transforms.unwrap_or(std::ptr::null())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() + (windows_core::Interface::vtable(self).AddSprites)(windows_core::Interface::as_raw(self), spritecount, destinationrectangles, core::mem::transmute(sourcerectangles.unwrap_or(core::ptr::null())), core::mem::transmute(colors.unwrap_or(core::ptr::null())), core::mem::transmute(transforms.unwrap_or(core::ptr::null())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn SetSprites(&self, startindex: u32, spritecount: u32, destinationrectangles: Option<*const Common::D2D_RECT_F>, sourcerectangles: Option<*const Common::D2D_RECT_U>, colors: Option<*const Common::D2D1_COLOR_F>, transforms: Option<*const super::super::super::Foundation::Numerics::Matrix3x2>, destinationrectanglesstride: u32, sourcerectanglesstride: u32, colorsstride: u32, transformsstride: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, core::mem::transmute(destinationrectangles.unwrap_or(std::ptr::null())), core::mem::transmute(sourcerectangles.unwrap_or(std::ptr::null())), core::mem::transmute(colors.unwrap_or(std::ptr::null())), core::mem::transmute(transforms.unwrap_or(std::ptr::null())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() + (windows_core::Interface::vtable(self).SetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, core::mem::transmute(destinationrectangles.unwrap_or(core::ptr::null())), core::mem::transmute(sourcerectangles.unwrap_or(core::ptr::null())), core::mem::transmute(colors.unwrap_or(core::ptr::null())), core::mem::transmute(transforms.unwrap_or(core::ptr::null())), destinationrectanglesstride, sourcerectanglesstride, colorsstride, transformsstride).ok() } #[cfg(all(feature = "Foundation_Numerics", feature = "Win32_Graphics_Direct2D_Common"))] pub unsafe fn GetSprites(&self, startindex: u32, spritecount: u32, destinationrectangles: Option<*mut Common::D2D_RECT_F>, sourcerectangles: Option<*mut Common::D2D_RECT_U>, colors: Option<*mut Common::D2D1_COLOR_F>, transforms: Option<*mut super::super::super::Foundation::Numerics::Matrix3x2>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, core::mem::transmute(destinationrectangles.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sourcerectangles.unwrap_or(std::ptr::null_mut())), core::mem::transmute(colors.unwrap_or(std::ptr::null_mut())), core::mem::transmute(transforms.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSprites)(windows_core::Interface::as_raw(self), startindex, spritecount, core::mem::transmute(destinationrectangles.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sourcerectangles.unwrap_or(core::ptr::null_mut())), core::mem::transmute(colors.unwrap_or(core::ptr::null_mut())), core::mem::transmute(transforms.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSpriteCount(&self) -> u32 { (windows_core::Interface::vtable(self).GetSpriteCount)(windows_core::Interface::as_raw(self)) @@ -4898,7 +4898,7 @@ impl ID2D1SvgDocument { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreatePaint)(windows_core::Interface::as_raw(self), painttype, core::mem::transmute(color.unwrap_or(std::ptr::null())), id.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreatePaint)(windows_core::Interface::as_raw(self), painttype, core::mem::transmute(color.unwrap_or(core::ptr::null())), id.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateStrokeDashArray(&self, dashes: Option<&[D2D1_SVG_LENGTH]>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5041,16 +5041,16 @@ impl ID2D1SvgElement { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).IsAttributeSpecified)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(inherited.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IsAttributeSpecified)(windows_core::Interface::as_raw(self), name.param().abi(), core::mem::transmute(inherited.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetSpecifiedAttributeCount(&self) -> u32 { (windows_core::Interface::vtable(self).GetSpecifiedAttributeCount)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetSpecifiedAttributeName(&self, index: u32, name: &mut [u16], inherited: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), core::mem::transmute(inherited.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecifiedAttributeName)(windows_core::Interface::as_raw(self), index, core::mem::transmute(name.as_ptr()), name.len().try_into().unwrap(), core::mem::transmute(inherited.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSpecifiedAttributeNameLength(&self, index: u32, namelength: *mut u32, inherited: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecifiedAttributeNameLength)(windows_core::Interface::as_raw(self), index, namelength, core::mem::transmute(inherited.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecifiedAttributeNameLength)(windows_core::Interface::as_raw(self), index, namelength, core::mem::transmute(inherited.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveAttribute(&self, name: P0) -> windows_core::Result<()> where @@ -5181,7 +5181,7 @@ impl ID2D1SvgGlyphStyle { (windows_core::Interface::vtable(self).GetStrokeDashesCount)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetStroke(&self, brush: Option<*mut Option>, strokewidth: Option<*mut f32>, dashes: Option<&mut [f32]>, dashoffset: Option<*mut f32>) { - (windows_core::Interface::vtable(self).GetStroke)(windows_core::Interface::as_raw(self), core::mem::transmute(brush.unwrap_or(std::ptr::null_mut())), core::mem::transmute(strokewidth.unwrap_or(std::ptr::null_mut())), core::mem::transmute(dashes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dashoffset.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetStroke)(windows_core::Interface::as_raw(self), core::mem::transmute(brush.unwrap_or(core::ptr::null_mut())), core::mem::transmute(strokewidth.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dashes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dashes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dashoffset.unwrap_or(core::ptr::null_mut()))) } } unsafe impl Send for ID2D1SvgGlyphStyle {} diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs index 041dc9a94a..4f4b161fe8 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Dxc/mod.rs @@ -197,8 +197,8 @@ impl IDxcCompiler2 { pdefines.len().try_into().unwrap(), pincludehandler.param().abi(), core::mem::transmute(ppresult), - core::mem::transmute(ppdebugblobname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppdebugblob.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppdebugblobname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppdebugblob.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -371,7 +371,7 @@ impl IDxcExtraOutputs { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uindex, &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(ppoutputtype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoutputname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutput)(windows_core::Interface::as_raw(self), uindex, &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(ppoutputtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoutputname.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -430,7 +430,7 @@ impl IDxcLibrary { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateBlobFromFile)(windows_core::Interface::as_raw(self), pfilename.param().abi(), core::mem::transmute(codepage.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateBlobFromFile)(windows_core::Interface::as_raw(self), pfilename.param().abi(), core::mem::transmute(codepage.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateBlobWithEncodingFromPinned(&self, ptext: *const core::ffi::c_void, size: u32, codepage: DXC_CP) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -579,7 +579,7 @@ impl IDxcOptimizer { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).RunOptimizer)(windows_core::Interface::as_raw(self), pblob.param().abi(), core::mem::transmute(ppoptions.as_ptr()), ppoptions.len().try_into().unwrap(), core::mem::transmute(poutputmodule), core::mem::transmute(ppoutputtext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).RunOptimizer)(windows_core::Interface::as_raw(self), pblob.param().abi(), core::mem::transmute(ppoptions.as_ptr()), ppoptions.len().try_into().unwrap(), core::mem::transmute(poutputmodule), core::mem::transmute(ppoutputtext.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -839,7 +839,7 @@ impl IDxcUtils { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).LoadFile)(windows_core::Interface::as_raw(self), pfilename.param().abi(), core::mem::transmute(pcodepage.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).LoadFile)(windows_core::Interface::as_raw(self), pfilename.param().abi(), core::mem::transmute(pcodepage.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateReadOnlyStreamFromBlob(&self, pblob: P0) -> windows_core::Result @@ -948,7 +948,7 @@ impl IDxcValidator2 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ValidateWithDebug)(windows_core::Interface::as_raw(self), pshader.param().abi(), flags, core::mem::transmute(poptdebugbitcode.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ValidateWithDebug)(windows_core::Interface::as_raw(self), pshader.param().abi(), flags, core::mem::transmute(poptdebugbitcode.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs index 70625a954c..646e4e364b 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/Fxc/mod.rs @@ -7,7 +7,7 @@ where P3: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DCompile(psrcdata : *const core::ffi::c_void, srcdatasize : usize, psourcename : windows_core::PCSTR, pdefines : *const super:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, pentrypoint : windows_core::PCSTR, ptarget : windows_core::PCSTR, flags1 : u32, flags2 : u32, ppcode : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3DCompile(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3DCompile(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3DCompile2(psrcdata: *const core::ffi::c_void, srcdatasize: usize, psourcename: P0, pdefines: Option<*const super::D3D_SHADER_MACRO>, pinclude: P1, pentrypoint: P2, ptarget: P3, flags1: u32, flags2: u32, secondarydataflags: u32, psecondarydata: Option<*const core::ffi::c_void>, secondarydatasize: usize, ppcode: *mut Option, pperrormsgs: Option<*mut Option>) -> windows_core::Result<()> @@ -18,7 +18,7 @@ where P3: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DCompile2(psrcdata : *const core::ffi::c_void, srcdatasize : usize, psourcename : windows_core::PCSTR, pdefines : *const super:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, pentrypoint : windows_core::PCSTR, ptarget : windows_core::PCSTR, flags1 : u32, flags2 : u32, secondarydataflags : u32, psecondarydata : *const core::ffi::c_void, secondarydatasize : usize, ppcode : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3DCompile2(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, secondarydataflags, core::mem::transmute(psecondarydata.unwrap_or(std::ptr::null())), secondarydatasize, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3DCompile2(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, secondarydataflags, core::mem::transmute(psecondarydata.unwrap_or(core::ptr::null())), secondarydatasize, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3DCompileFromFile(pfilename: P0, pdefines: Option<*const super::D3D_SHADER_MACRO>, pinclude: P1, pentrypoint: P2, ptarget: P3, flags1: u32, flags2: u32, ppcode: *mut Option, pperrormsgs: Option<*mut Option>) -> windows_core::Result<()> @@ -29,7 +29,7 @@ where P3: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DCompileFromFile(pfilename : windows_core::PCWSTR, pdefines : *const super:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, pentrypoint : windows_core::PCSTR, ptarget : windows_core::PCSTR, flags1 : u32, flags2 : u32, ppcode : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3DCompileFromFile(pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3DCompileFromFile(pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), pentrypoint.param().abi(), ptarget.param().abi(), flags1, flags2, core::mem::transmute(ppcode), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3DCompressShaders(pshaderdata: &[D3D_SHADER_DATA], uflags: u32) -> windows_core::Result { @@ -60,7 +60,7 @@ pub unsafe fn D3DCreateLinker() -> windows_core::Result, uflags: u32, ppshaders: *mut Option, ptotalshaders: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DDecompressShaders(psrcdata : *const core::ffi::c_void, srcdatasize : usize, unumshaders : u32, ustartindex : u32, pindices : *const u32, uflags : u32, ppshaders : *mut * mut core::ffi::c_void, ptotalshaders : *mut u32) -> windows_core::HRESULT); - D3DDecompressShaders(psrcdata, srcdatasize, unumshaders, ustartindex, core::mem::transmute(pindices.unwrap_or(std::ptr::null())), uflags, core::mem::transmute(ppshaders), core::mem::transmute(ptotalshaders.unwrap_or(std::ptr::null_mut()))).ok() + D3DDecompressShaders(psrcdata, srcdatasize, unumshaders, ustartindex, core::mem::transmute(pindices.unwrap_or(core::ptr::null())), uflags, core::mem::transmute(ppshaders), core::mem::transmute(ptotalshaders.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3DDisassemble(psrcdata: *const core::ffi::c_void, srcdatasize: usize, flags: u32, szcomments: P0) -> windows_core::Result @@ -87,7 +87,7 @@ where P0: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DDisassembleRegion(psrcdata : *const core::ffi::c_void, srcdatasize : usize, flags : u32, szcomments : windows_core::PCSTR, startbyteoffset : usize, numinsts : usize, pfinishbyteoffset : *mut usize, ppdisassembly : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3DDisassembleRegion(psrcdata, srcdatasize, flags, szcomments.param().abi(), startbyteoffset, numinsts, core::mem::transmute(pfinishbyteoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdisassembly)).ok() + D3DDisassembleRegion(psrcdata, srcdatasize, flags, szcomments.param().abi(), startbyteoffset, numinsts, core::mem::transmute(pfinishbyteoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdisassembly)).ok() } #[inline] pub unsafe fn D3DGetBlobPart(psrcdata: *const core::ffi::c_void, srcdatasize: usize, part: D3D_BLOB_PART, flags: u32) -> windows_core::Result { @@ -122,7 +122,7 @@ pub unsafe fn D3DGetOutputSignatureBlob(psrcdata: *const core::ffi::c_void, srcd #[inline] pub unsafe fn D3DGetTraceInstructionOffsets(psrcdata: *const core::ffi::c_void, srcdatasize: usize, flags: u32, startinstindex: usize, poffsets: Option<&mut [usize]>, ptotalinsts: Option<*mut usize>) -> windows_core::Result<()> { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DGetTraceInstructionOffsets(psrcdata : *const core::ffi::c_void, srcdatasize : usize, flags : u32, startinstindex : usize, numinsts : usize, poffsets : *mut usize, ptotalinsts : *mut usize) -> windows_core::HRESULT); - D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ptotalinsts.unwrap_or(std::ptr::null_mut()))).ok() + D3DGetTraceInstructionOffsets(psrcdata, srcdatasize, flags, startinstindex, poffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ptotalinsts.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D11")] #[inline] @@ -138,7 +138,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3dcompiler_47.dll" "system" fn D3DPreprocess(psrcdata : *const core::ffi::c_void, srcdatasize : usize, psourcename : windows_core::PCSTR, pdefines : *const super:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, ppcodetext : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3DPreprocess(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), core::mem::transmute(ppcodetext), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3DPreprocess(psrcdata, srcdatasize, psourcename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), core::mem::transmute(ppcodetext), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3DReadFileToBlob(pfilename: P0) -> windows_core::Result diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/impl.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/impl.rs index 1ff9392453..fcc1daa18f 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D/impl.rs @@ -74,7 +74,7 @@ impl ID3DInclude_Vtbl { } } #[doc(hidden)] -struct ID3DInclude_ImplVtbl(std::marker::PhantomData); +struct ID3DInclude_ImplVtbl(core::marker::PhantomData); impl ID3DInclude_ImplVtbl { const VTABLE: ID3DInclude_Vtbl = ID3DInclude_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/impl.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/impl.rs index 35328d75e6..0e4068d263 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/impl.rs @@ -1023,7 +1023,7 @@ impl ID3D10EffectBlendVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectBlendVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectBlendVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectBlendVariable_ImplVtbl { const VTABLE: ID3D10EffectBlendVariable_Vtbl = ID3D10EffectBlendVariable_Vtbl::new::(); } @@ -1084,7 +1084,7 @@ impl ID3D10EffectConstantBuffer_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectConstantBuffer_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectConstantBuffer_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectConstantBuffer_ImplVtbl { const VTABLE: ID3D10EffectConstantBuffer_Vtbl = ID3D10EffectConstantBuffer_Vtbl::new::(); } @@ -1121,7 +1121,7 @@ impl ID3D10EffectDepthStencilVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectDepthStencilVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectDepthStencilVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectDepthStencilVariable_ImplVtbl { const VTABLE: ID3D10EffectDepthStencilVariable_Vtbl = ID3D10EffectDepthStencilVariable_Vtbl::new::(); } @@ -1176,7 +1176,7 @@ impl ID3D10EffectDepthStencilViewVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectDepthStencilViewVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectDepthStencilViewVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectDepthStencilViewVariable_ImplVtbl { const VTABLE: ID3D10EffectDepthStencilViewVariable_Vtbl = ID3D10EffectDepthStencilViewVariable_Vtbl::new::(); } @@ -1253,7 +1253,7 @@ impl ID3D10EffectMatrixVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectMatrixVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectMatrixVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectMatrixVariable_ImplVtbl { const VTABLE: ID3D10EffectMatrixVariable_Vtbl = ID3D10EffectMatrixVariable_Vtbl::new::(); } @@ -1336,7 +1336,7 @@ impl ID3D10EffectPass_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectPass_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectPass_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectPass_ImplVtbl { const VTABLE: ID3D10EffectPass_Vtbl = ID3D10EffectPass_Vtbl::new::(); } @@ -1389,7 +1389,7 @@ impl ID3D10EffectRasterizerVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectRasterizerVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectRasterizerVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectRasterizerVariable_ImplVtbl { const VTABLE: ID3D10EffectRasterizerVariable_Vtbl = ID3D10EffectRasterizerVariable_Vtbl::new::(); } @@ -1444,7 +1444,7 @@ impl ID3D10EffectRenderTargetViewVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectRenderTargetViewVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectRenderTargetViewVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectRenderTargetViewVariable_ImplVtbl { const VTABLE: ID3D10EffectRenderTargetViewVariable_Vtbl = ID3D10EffectRenderTargetViewVariable_Vtbl::new::(); } @@ -1481,7 +1481,7 @@ impl ID3D10EffectSamplerVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectSamplerVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectSamplerVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectSamplerVariable_ImplVtbl { const VTABLE: ID3D10EffectSamplerVariable_Vtbl = ID3D10EffectSamplerVariable_Vtbl::new::(); } @@ -1604,7 +1604,7 @@ impl ID3D10EffectScalarVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectScalarVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectScalarVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectScalarVariable_ImplVtbl { const VTABLE: ID3D10EffectScalarVariable_Vtbl = ID3D10EffectScalarVariable_Vtbl::new::(); } @@ -1659,7 +1659,7 @@ impl ID3D10EffectShaderResourceVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectShaderResourceVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectShaderResourceVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectShaderResourceVariable_ImplVtbl { const VTABLE: ID3D10EffectShaderResourceVariable_Vtbl = ID3D10EffectShaderResourceVariable_Vtbl::new::(); } @@ -1743,7 +1743,7 @@ impl ID3D10EffectShaderVariable_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D10EffectShaderVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectShaderVariable_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectShaderVariable_ImplVtbl { const VTABLE: ID3D10EffectShaderVariable_Vtbl = ID3D10EffectShaderVariable_Vtbl::new::(); @@ -1782,7 +1782,7 @@ impl ID3D10EffectStringVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectStringVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectStringVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectStringVariable_ImplVtbl { const VTABLE: ID3D10EffectStringVariable_Vtbl = ID3D10EffectStringVariable_Vtbl::new::(); } @@ -1851,7 +1851,7 @@ impl ID3D10EffectTechnique_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectTechnique_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectTechnique_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectTechnique_ImplVtbl { const VTABLE: ID3D10EffectTechnique_Vtbl = ID3D10EffectTechnique_Vtbl::new::(); } @@ -1923,7 +1923,7 @@ impl ID3D10EffectType_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D10EffectType_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectType_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10EffectType_ImplVtbl { const VTABLE: ID3D10EffectType_Vtbl = ID3D10EffectType_Vtbl::new::(); @@ -2120,7 +2120,7 @@ impl ID3D10EffectVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectVariable_ImplVtbl { const VTABLE: ID3D10EffectVariable_Vtbl = ID3D10EffectVariable_Vtbl::new::(); } @@ -2225,7 +2225,7 @@ impl ID3D10EffectVectorVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10EffectVectorVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10EffectVectorVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10EffectVectorVariable_ImplVtbl { const VTABLE: ID3D10EffectVectorVariable_Vtbl = ID3D10EffectVectorVariable_Vtbl::new::(); } @@ -2863,7 +2863,7 @@ impl ID3D10ShaderReflectionConstantBuffer_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D10ShaderReflectionConstantBuffer_ImplVtbl(std::marker::PhantomData); +struct ID3D10ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D10ShaderReflectionConstantBuffer_Vtbl = ID3D10ShaderReflectionConstantBuffer_Vtbl::new::(); @@ -2916,7 +2916,7 @@ impl ID3D10ShaderReflectionType_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D10ShaderReflectionType_ImplVtbl(std::marker::PhantomData); +struct ID3D10ShaderReflectionType_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D10ShaderReflectionType_ImplVtbl { const VTABLE: ID3D10ShaderReflectionType_Vtbl = ID3D10ShaderReflectionType_Vtbl::new::(); @@ -2949,7 +2949,7 @@ impl ID3D10ShaderReflectionVariable_Vtbl { } } #[doc(hidden)] -struct ID3D10ShaderReflectionVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D10ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); impl ID3D10ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D10ShaderReflectionVariable_Vtbl = ID3D10ShaderReflectionVariable_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs index 2fe453ad13..923cbf3946 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D10/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10CompileEffectFromMemory(pdata : *const core::ffi::c_void, datalength : usize, psrcfilename : windows_core::PCSTR, pdefines : *const super::Direct3D:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, hlslflags : u32, fxflags : u32, ppcompiledeffect : *mut * mut core::ffi::c_void, pperrors : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CompileEffectFromMemory(pdata, datalength, psrcfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), hlslflags, fxflags, core::mem::transmute(ppcompiledeffect), core::mem::transmute(pperrors.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CompileEffectFromMemory(pdata, datalength, psrcfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), hlslflags, fxflags, core::mem::transmute(ppcompiledeffect), core::mem::transmute(pperrors.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] @@ -18,7 +18,7 @@ where P3: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10CompileShader(psrcdata : windows_core::PCSTR, srcdatasize : usize, pfilename : windows_core::PCSTR, pdefines : *const super::Direct3D:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, pfunctionname : windows_core::PCSTR, pprofile : windows_core::PCSTR, flags : u32, ppshader : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CompileShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), pfunctionname.param().abi(), pprofile.param().abi(), flags, core::mem::transmute(ppshader), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CompileShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), pfunctionname.param().abi(), pprofile.param().abi(), flags, core::mem::transmute(ppshader), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] @@ -35,7 +35,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10CreateDevice(padapter : * mut core::ffi::c_void, drivertype : D3D10_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : u32, sdkversion : u32, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CreateDevice(padapter.param().abi(), drivertype, software.param().abi(), flags, sdkversion, core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CreateDevice(padapter.param().abi(), drivertype, software.param().abi(), flags, sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi")] #[inline] @@ -45,7 +45,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10_1.dll" "system" fn D3D10CreateDevice1(padapter : * mut core::ffi::c_void, drivertype : D3D10_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : u32, hardwarelevel : D3D10_FEATURE_LEVEL1, sdkversion : u32, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CreateDevice1(padapter.param().abi(), drivertype, software.param().abi(), flags, hardwarelevel, sdkversion, core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CreateDevice1(padapter.param().abi(), drivertype, software.param().abi(), flags, hardwarelevel, sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] @@ -55,7 +55,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10CreateDeviceAndSwapChain(padapter : * mut core::ffi::c_void, drivertype : D3D10_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : u32, sdkversion : u32, pswapchaindesc : *const super::Dxgi:: DXGI_SWAP_CHAIN_DESC, ppswapchain : *mut * mut core::ffi::c_void, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CreateDeviceAndSwapChain(padapter.param().abi(), drivertype, software.param().abi(), flags, sdkversion, core::mem::transmute(pswapchaindesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppswapchain.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CreateDeviceAndSwapChain(padapter.param().abi(), drivertype, software.param().abi(), flags, sdkversion, core::mem::transmute(pswapchaindesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppswapchain.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] #[inline] @@ -65,7 +65,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10_1.dll" "system" fn D3D10CreateDeviceAndSwapChain1(padapter : * mut core::ffi::c_void, drivertype : D3D10_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : u32, hardwarelevel : D3D10_FEATURE_LEVEL1, sdkversion : u32, pswapchaindesc : *const super::Dxgi:: DXGI_SWAP_CHAIN_DESC, ppswapchain : *mut * mut core::ffi::c_void, ppdevice : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10CreateDeviceAndSwapChain1(padapter.param().abi(), drivertype, software.param().abi(), flags, hardwarelevel, sdkversion, core::mem::transmute(pswapchaindesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppswapchain.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut()))).ok() + D3D10CreateDeviceAndSwapChain1(padapter.param().abi(), drivertype, software.param().abi(), flags, hardwarelevel, sdkversion, core::mem::transmute(pswapchaindesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppswapchain.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3D10CreateEffectFromMemory(pdata: *const core::ffi::c_void, datalength: usize, fxflags: u32, pdevice: P0, peffectpool: P1) -> windows_core::Result @@ -177,7 +177,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d10.dll" "system" fn D3D10PreprocessShader(psrcdata : windows_core::PCSTR, srcdatasize : usize, pfilename : windows_core::PCSTR, pdefines : *const super::Direct3D:: D3D_SHADER_MACRO, pinclude : * mut core::ffi::c_void, ppshadertext : *mut * mut core::ffi::c_void, pperrormsgs : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D10PreprocessShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(std::ptr::null())), pinclude.param().abi(), core::mem::transmute(ppshadertext), core::mem::transmute(pperrormsgs.unwrap_or(std::ptr::null_mut()))).ok() + D3D10PreprocessShader(core::mem::transmute(psrcdata.as_ptr()), psrcdata.len().try_into().unwrap(), pfilename.param().abi(), core::mem::transmute(pdefines.unwrap_or(core::ptr::null())), pinclude.param().abi(), core::mem::transmute(ppshadertext), core::mem::transmute(pperrormsgs.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn D3D10ReflectShader(pshaderbytecode: *const core::ffi::c_void, bytecodelength: usize) -> windows_core::Result { @@ -241,7 +241,7 @@ impl ID3D10Asynchronous { (windows_core::Interface::vtable(self).End)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetData(&self, pdata: Option<*mut core::ffi::c_void>, datasize: u32, getdataflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), datasize, getdataflags).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), datasize, getdataflags).ok() } pub unsafe fn GetDataSize(&self) -> u32 { (windows_core::Interface::vtable(self).GetDataSize)(windows_core::Interface::as_raw(self)) @@ -493,7 +493,7 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).IASetInputLayout)(windows_core::Interface::as_raw(self), pinputlayout.param().abi()) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*const Option>, pstrides: Option<*const u32>, poffsets: Option<*const u32>) { - (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pstrides.unwrap_or(std::ptr::null())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pstrides.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -559,7 +559,7 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), stencilref) } pub unsafe fn SOSetTargets(&self, numbuffers: u32, ppsotargets: Option<*const Option>, poffsets: Option<*const u32>) { - (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(std::ptr::null())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) } pub unsafe fn DrawAuto(&self) { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) @@ -581,7 +581,7 @@ impl ID3D10Device { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -594,7 +594,7 @@ impl ID3D10Device { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(std::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) + (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) } pub unsafe fn ClearRenderTargetView(&self, prendertargetview: P0, colorrgba: &[f32; 4]) where @@ -650,11 +650,11 @@ impl ID3D10Device { windows_core::Type::from_abi(result__) } pub unsafe fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*mut Option>, pstrides: Option<*mut u32>, poffsets: Option<*mut u32>) { - (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstrides.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstrides.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IAGetIndexBuffer(&self, pindexbuffer: Option<*mut Option>, format: Option<*mut super::Dxgi::Common::DXGI_FORMAT>, offset: Option<*mut u32>) { - (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(format.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(format.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -677,7 +677,7 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn GetPredication(&self, pppredicate: Option<*mut Option>, ppredicatevalue: Option<*mut super::super::Foundation::BOOL>) { - (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -686,16 +686,16 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn OMGetRenderTargets(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>) { - (windows_core::Interface::vtable(self).OMGetRenderTargets)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppdepthstencilview.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetRenderTargets)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn OMGetBlendState(&self, ppblendstate: Option<*mut Option>, blendfactor: Option<&mut [f32; 4]>, psamplemask: Option<*mut u32>) { - (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn OMGetDepthStencilState(&self, ppdepthstencilstate: Option<*mut Option>, pstencilref: Option<*mut u32>) { - (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, numbuffers: u32, ppsotargets: Option<*mut Option>, poffsets: Option<*mut u32>) { - (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn RSGetState(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -703,10 +703,10 @@ impl ID3D10Device { windows_core::Type::from_abi(result__) } pub unsafe fn RSGetViewports(&self, numviewports: *mut u32, pviewports: Option<*mut D3D10_VIEWPORT>) { - (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), numviewports, core::mem::transmute(pviewports.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), numviewports, core::mem::transmute(pviewports.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn RSGetScissorRects(&self, numrects: *mut u32, prects: Option<*mut super::super::Foundation::RECT>) { - (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), numrects, core::mem::transmute(prects.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), numrects, core::mem::transmute(prects.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetDeviceRemovedReason(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetDeviceRemovedReason)(windows_core::Interface::as_raw(self)).ok() @@ -718,10 +718,10 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).GetExceptionMode)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -736,80 +736,80 @@ impl ID3D10Device { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)) } pub unsafe fn CreateBuffer(&self, pdesc: *const D3D10_BUFFER_DESC, pinitialdata: Option<*const D3D10_SUBRESOURCE_DATA>, ppbuffer: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture1D(&self, pdesc: *const D3D10_TEXTURE1D_DESC, pinitialdata: Option<*const D3D10_SUBRESOURCE_DATA>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture2D(&self, pdesc: *const D3D10_TEXTURE2D_DESC, pinitialdata: Option<*const D3D10_SUBRESOURCE_DATA>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture3D(&self, pdesc: *const D3D10_TEXTURE3D_DESC, pinitialdata: Option<*const D3D10_SUBRESOURCE_DATA>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateShaderResourceView(&self, presource: P0, pdesc: Option<*const D3D10_SHADER_RESOURCE_VIEW_DESC>, ppsrview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateRenderTargetView(&self, presource: P0, pdesc: Option<*const D3D10_RENDER_TARGET_VIEW_DESC>, pprtview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(pprtview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(pprtview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateDepthStencilView(&self, presource: P0, pdesc: Option<*const D3D10_DEPTH_STENCIL_VIEW_DESC>, ppdepthstencilview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D10_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateInputLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), core::mem::transmute(ppinputlayout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateInputLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), core::mem::transmute(ppinputlayout.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], ppvertexshader: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateVertexShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(ppvertexshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVertexShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(ppvertexshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateGeometryShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(ppgeometryshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateGeometryShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(ppgeometryshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: Option<&[D3D10_SO_DECLARATION_ENTRY]>, outputstreamstride: u32, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(psodeclaration.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, core::mem::transmute(ppgeometryshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateGeometryShaderWithStreamOutput)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(psodeclaration.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psodeclaration.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), outputstreamstride, core::mem::transmute(ppgeometryshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreatePixelShader(&self, pshaderbytecode: &[u8], pppixelshader: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreatePixelShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(pppixelshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePixelShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), core::mem::transmute(pppixelshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateBlendState(&self, pblendstatedesc: *const D3D10_BLEND_DESC, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D10_DEPTH_STENCIL_DESC, ppdepthstencilstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateRasterizerState(&self, prasterizerdesc: *const D3D10_RASTERIZER_DESC, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateSamplerState(&self, psamplerdesc: *const D3D10_SAMPLER_DESC, ppsamplerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateQuery(&self, pquerydesc: *const D3D10_QUERY_DESC, ppquery: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreatePredicate(&self, ppredicatedesc: *const D3D10_QUERY_DESC, pppredicate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateCounter(&self, pcounterdesc: *const D3D10_COUNTER_DESC, ppcounter: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckFormatSupport(&self, format: super::Dxgi::Common::DXGI_FORMAT) -> windows_core::Result { @@ -827,7 +827,7 @@ impl ID3D10Device { result__ } pub unsafe fn CheckCounter(&self, pdesc: *const D3D10_COUNTER_DESC, ptype: *mut D3D10_COUNTER_TYPE, pactivecounters: *mut u32, szname: windows_core::PSTR, pnamelength: Option<*mut u32>, szunits: windows_core::PSTR, punitslength: Option<*mut u32>, szdescription: windows_core::PSTR, pdescriptionlength: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype, pactivecounters, core::mem::transmute(szname), core::mem::transmute(pnamelength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szunits), core::mem::transmute(punitslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szdescription), core::mem::transmute(pdescriptionlength.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype, pactivecounters, core::mem::transmute(szname), core::mem::transmute(pnamelength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szunits), core::mem::transmute(punitslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdescription), core::mem::transmute(pdescriptionlength.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCreationFlags(&self) -> u32 { (windows_core::Interface::vtable(self).GetCreationFlags)(windows_core::Interface::as_raw(self)) @@ -836,13 +836,13 @@ impl ID3D10Device { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource.param().abi(), returnedinterface, core::mem::transmute(ppresource.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenSharedResource)(windows_core::Interface::as_raw(self), hresource.param().abi(), returnedinterface, core::mem::transmute(ppresource.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextFilterSize(&self, width: u32, height: u32) { (windows_core::Interface::vtable(self).SetTextFilterSize)(windows_core::Interface::as_raw(self), width, height) } pub unsafe fn GetTextFilterSize(&self, pwidth: Option<*mut u32>, pheight: Option<*mut u32>) { - (windows_core::Interface::vtable(self).GetTextFilterSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pheight.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetTextFilterSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pwidth.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pheight.unwrap_or(core::ptr::null_mut()))) } } unsafe impl Send for ID3D10Device {} @@ -1002,10 +1002,10 @@ impl ID3D10Device1 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateBlendState1(&self, pblendstatedesc: *const D3D10_BLEND_DESC1, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFeatureLevel(&self) -> D3D10_FEATURE_LEVEL1 { (windows_core::Interface::vtable(self).GetFeatureLevel)(windows_core::Interface::as_raw(self)) @@ -1038,10 +1038,10 @@ impl ID3D10DeviceChild { windows_core::Type::from_abi(result__) } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -1950,7 +1950,7 @@ impl ID3D10InfoQueue { (windows_core::Interface::vtable(self).ClearStoredMessages)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetMessage(&self, messageindex: u64, pmessage: Option<*mut D3D10_MESSAGE>, pmessagebytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(std::ptr::null_mut())), pmessagebytelength).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), pmessagebytelength).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -1974,7 +1974,7 @@ impl ID3D10InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D10_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -1998,7 +1998,7 @@ impl ID3D10InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D10_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearRetrievalFilter(&self) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/impl.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/impl.rs index 3e259c4390..6aad2d1adf 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/impl.rs @@ -2030,7 +2030,7 @@ impl ID3D11FunctionParameterReflection_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D11FunctionParameterReflection_ImplVtbl(std::marker::PhantomData); +struct ID3D11FunctionParameterReflection_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionParameterReflection_ImplVtbl { const VTABLE: ID3D11FunctionParameterReflection_Vtbl = ID3D11FunctionParameterReflection_Vtbl::new::(); @@ -2104,7 +2104,7 @@ impl ID3D11FunctionReflection_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D11FunctionReflection_ImplVtbl(std::marker::PhantomData); +struct ID3D11FunctionReflection_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11FunctionReflection_ImplVtbl { const VTABLE: ID3D11FunctionReflection_Vtbl = ID3D11FunctionReflection_Vtbl::new::(); @@ -2959,7 +2959,7 @@ impl ID3D11ShaderReflectionConstantBuffer_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D11ShaderReflectionConstantBuffer_ImplVtbl(std::marker::PhantomData); +struct ID3D11ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D11ShaderReflectionConstantBuffer_Vtbl = ID3D11ShaderReflectionConstantBuffer_Vtbl::new::(); @@ -3061,7 +3061,7 @@ impl ID3D11ShaderReflectionType_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D11ShaderReflectionType_ImplVtbl(std::marker::PhantomData); +struct ID3D11ShaderReflectionType_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D11ShaderReflectionType_ImplVtbl { const VTABLE: ID3D11ShaderReflectionType_Vtbl = ID3D11ShaderReflectionType_Vtbl::new::(); @@ -3106,7 +3106,7 @@ impl ID3D11ShaderReflectionVariable_Vtbl { } } #[doc(hidden)] -struct ID3D11ShaderReflectionVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D11ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); impl ID3D11ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D11ShaderReflectionVariable_Vtbl = ID3D11ShaderReflectionVariable_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs index fc39796a47..2a9b71c65d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("d3d11.dll" "system" fn D3D11CreateDevice(padapter : * mut core::ffi::c_void, drivertype : super::Direct3D:: D3D_DRIVER_TYPE, software : super::super::Foundation:: HMODULE, flags : D3D11_CREATE_DEVICE_FLAG, pfeaturelevels : *const super::Direct3D:: D3D_FEATURE_LEVEL, featurelevels : u32, sdkversion : u32, ppdevice : *mut * mut core::ffi::c_void, pfeaturelevel : *mut super::Direct3D:: D3D_FEATURE_LEVEL, ppimmediatecontext : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D11CreateDevice(padapter.param().abi(), drivertype, software.param().abi(), flags, core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfeaturelevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppimmediatecontext.unwrap_or(std::ptr::null_mut()))).ok() + D3D11CreateDevice(padapter.param().abi(), drivertype, software.param().abi(), flags, core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfeaturelevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppimmediatecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] #[inline] @@ -24,11 +24,11 @@ where core::mem::transmute(pfeaturelevels.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pfeaturelevels.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), sdkversion, - core::mem::transmute(pswapchaindesc.unwrap_or(std::ptr::null())), - core::mem::transmute(ppswapchain.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfeaturelevel.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppimmediatecontext.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pswapchaindesc.unwrap_or(core::ptr::null())), + core::mem::transmute(ppswapchain.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfeaturelevel.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppimmediatecontext.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -517,63 +517,63 @@ impl core::ops::Deref for ID3D11Device { windows_core::imp::interface_hierarchy!(ID3D11Device, windows_core::IUnknown); impl ID3D11Device { pub unsafe fn CreateBuffer(&self, pdesc: *const D3D11_BUFFER_DESC, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, ppbuffer: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBuffer)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture1D(&self, pdesc: *const D3D11_TEXTURE1D_DESC, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, pptexture1d: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(pptexture1d.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture1D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture1d.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture2D(&self, pdesc: *const D3D11_TEXTURE2D_DESC, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, pptexture2d: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture2D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture3D(&self, pdesc: *const D3D11_TEXTURE3D_DESC, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, pptexture3d: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture3D)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateShaderResourceView(&self, presource: P0, pdesc: Option<*const D3D11_SHADER_RESOURCE_VIEW_DESC>, ppsrview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppsrview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateUnorderedAccessView(&self, presource: P0, pdesc: Option<*const D3D11_UNORDERED_ACCESS_VIEW_DESC>, ppuaview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppuaview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppuaview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateRenderTargetView(&self, presource: P0, pdesc: Option<*const D3D11_RENDER_TARGET_VIEW_DESC>, pprtview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(pprtview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(pprtview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateDepthStencilView(&self, presource: P0, pdesc: Option<*const D3D11_DEPTH_STENCIL_VIEW_DESC>, ppdepthstencilview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateInputLayout(&self, pinputelementdescs: &[D3D11_INPUT_ELEMENT_DESC], pshaderbytecodewithinputsignature: &[u8], ppinputlayout: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateInputLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), core::mem::transmute(ppinputlayout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateInputLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(pinputelementdescs.as_ptr()), pinputelementdescs.len().try_into().unwrap(), core::mem::transmute(pshaderbytecodewithinputsignature.as_ptr()), pshaderbytecodewithinputsignature.len().try_into().unwrap(), core::mem::transmute(ppinputlayout.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateVertexShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppvertexshader: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVertexShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppvertexshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVertexShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppvertexshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateGeometryShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppgeometryshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateGeometryShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppgeometryshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateGeometryShaderWithStreamOutput(&self, pshaderbytecode: &[u8], psodeclaration: Option<&[D3D11_SO_DECLARATION_ENTRY]>, pbufferstrides: Option<&[u32]>, rasterizedstream: u32, pclasslinkage: P0, ppgeometryshader: Option<*mut Option>) -> windows_core::Result<()> where @@ -589,7 +589,7 @@ impl ID3D11Device { pbufferstrides.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), rasterizedstream, pclasslinkage.param().abi(), - core::mem::transmute(ppgeometryshader.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppgeometryshader.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -597,53 +597,53 @@ impl ID3D11Device { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreatePixelShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(pppixelshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePixelShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(pppixelshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateHullShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, pphullshader: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateHullShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(pphullshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateHullShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(pphullshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateDomainShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppdomainshader: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateDomainShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppdomainshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDomainShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppdomainshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateComputeShader(&self, pshaderbytecode: &[u8], pclasslinkage: P0, ppcomputeshader: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateComputeShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppcomputeshader.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateComputeShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pshaderbytecode.as_ptr()), pshaderbytecode.len().try_into().unwrap(), pclasslinkage.param().abi(), core::mem::transmute(ppcomputeshader.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateClassLinkage(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).CreateClassLinkage)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateBlendState(&self, pblendstatedesc: *const D3D11_BLEND_DESC, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateDepthStencilState(&self, pdepthstencildesc: *const D3D11_DEPTH_STENCIL_DESC, ppdepthstencilstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencildesc, core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateRasterizerState(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateSamplerState(&self, psamplerdesc: *const D3D11_SAMPLER_DESC, ppsamplerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSamplerState)(windows_core::Interface::as_raw(self), psamplerdesc, core::mem::transmute(ppsamplerstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateQuery(&self, pquerydesc: *const D3D11_QUERY_DESC, ppquery: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery)(windows_core::Interface::as_raw(self), pquerydesc, core::mem::transmute(ppquery.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreatePredicate(&self, ppredicatedesc: *const D3D11_QUERY_DESC, pppredicate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreatePredicate)(windows_core::Interface::as_raw(self), ppredicatedesc, core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateCounter(&self, pcounterdesc: *const D3D11_COUNTER_DESC, ppcounter: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateCounter)(windows_core::Interface::as_raw(self), pcounterdesc, core::mem::transmute(ppcounter.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateDeferredContext(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDeferredContext)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OpenSharedResource(&self, hresource: P0, result__: *mut Option) -> windows_core::Result<()> where @@ -668,16 +668,16 @@ impl ID3D11Device { result__ } pub unsafe fn CheckCounter(&self, pdesc: *const D3D11_COUNTER_DESC, ptype: *mut D3D11_COUNTER_TYPE, pactivecounters: *mut u32, szname: windows_core::PSTR, pnamelength: Option<*mut u32>, szunits: windows_core::PSTR, punitslength: Option<*mut u32>, szdescription: windows_core::PSTR, pdescriptionlength: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype, pactivecounters, core::mem::transmute(szname), core::mem::transmute(pnamelength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szunits), core::mem::transmute(punitslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szdescription), core::mem::transmute(pdescriptionlength.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CheckCounter)(windows_core::Interface::as_raw(self), pdesc, ptype, pactivecounters, core::mem::transmute(szname), core::mem::transmute(pnamelength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szunits), core::mem::transmute(punitslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdescription), core::mem::transmute(pdescriptionlength.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CheckFeatureSupport(&self, feature: D3D11_FEATURE, pfeaturesupportdata: *mut core::ffi::c_void, featuresupportdatasize: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckFeatureSupport)(windows_core::Interface::as_raw(self), feature, pfeaturesupportdata, featuresupportdatasize).ok() } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -801,17 +801,17 @@ impl ID3D11Device1 { windows_core::Type::from_abi(result__) } pub unsafe fn CreateDeferredContext1(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDeferredContext1)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext1)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateBlendState1(&self, pblendstatedesc: *const D3D11_BLEND_DESC1, ppblendstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateBlendState1)(windows_core::Interface::as_raw(self), pblendstatedesc, core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateRasterizerState1(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC1, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateRasterizerState1)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState1)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn CreateDeviceContextState(&self, flags: u32, pfeaturelevels: &[super::Direct3D::D3D_FEATURE_LEVEL], sdkversion: u32, emulatedinterface: *const windows_core::GUID, pchosenfeaturelevel: Option<*mut super::Direct3D::D3D_FEATURE_LEVEL>, ppcontextstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDeviceContextState)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, core::mem::transmute(pchosenfeaturelevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppcontextstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeviceContextState)(windows_core::Interface::as_raw(self), flags, core::mem::transmute(pfeaturelevels.as_ptr()), pfeaturelevels.len().try_into().unwrap(), sdkversion, emulatedinterface, core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppcontextstate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OpenSharedResource1(&self, hresource: P0) -> windows_core::Result where @@ -861,13 +861,13 @@ impl ID3D11Device2 { windows_core::Type::from_abi(result__) } pub unsafe fn CreateDeferredContext2(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDeferredContext2)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext2)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetResourceTiling(&self, ptiledresource: P0, pnumtilesforentireresource: Option<*mut u32>, ppackedmipdesc: Option<*mut D3D11_PACKED_MIP_DESC>, pstandardtileshapefornonpackedmips: Option<*mut D3D11_TILE_SHAPE>, pnumsubresourcetilings: Option<*mut u32>, firstsubresourcetilingtoget: u32, psubresourcetilingsfornonpackedmips: *mut D3D11_SUBRESOURCE_TILING) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), core::mem::transmute(pnumtilesforentireresource.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppackedmipdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumsubresourcetilings.unwrap_or(std::ptr::null_mut())), firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips) + (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), core::mem::transmute(pnumtilesforentireresource.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppackedmipdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumsubresourcetilings.unwrap_or(core::ptr::null_mut())), firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckMultisampleQualityLevels1(&self, format: super::Dxgi::Common::DXGI_FORMAT, samplecount: u32, flags: u32) -> windows_core::Result { @@ -899,38 +899,38 @@ windows_core::imp::interface_hierarchy!(ID3D11Device3, windows_core::IUnknown, I impl ID3D11Device3 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture2D1(&self, pdesc1: *const D3D11_TEXTURE2D_DESC1, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, pptexture2d: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateTexture2D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture2D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture2d.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateTexture3D1(&self, pdesc1: *const D3D11_TEXTURE3D_DESC1, pinitialdata: Option<*const D3D11_SUBRESOURCE_DATA>, pptexture3d: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateTexture3D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(std::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateTexture3D1)(windows_core::Interface::as_raw(self), pdesc1, core::mem::transmute(pinitialdata.unwrap_or(core::ptr::null())), core::mem::transmute(pptexture3d.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateRasterizerState2(&self, prasterizerdesc: *const D3D11_RASTERIZER_DESC2, pprasterizerstate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateRasterizerState2)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRasterizerState2)(windows_core::Interface::as_raw(self), prasterizerdesc, core::mem::transmute(pprasterizerstate.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Graphics_Direct3D", feature = "Win32_Graphics_Dxgi_Common"))] pub unsafe fn CreateShaderResourceView1(&self, presource: P0, pdesc1: Option<*const D3D11_SHADER_RESOURCE_VIEW_DESC1>, ppsrview1: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(std::ptr::null())), core::mem::transmute(ppsrview1.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateShaderResourceView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(core::ptr::null())), core::mem::transmute(ppsrview1.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateUnorderedAccessView1(&self, presource: P0, pdesc1: Option<*const D3D11_UNORDERED_ACCESS_VIEW_DESC1>, ppuaview1: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateUnorderedAccessView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(std::ptr::null())), core::mem::transmute(ppuaview1.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateUnorderedAccessView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(core::ptr::null())), core::mem::transmute(ppuaview1.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateRenderTargetView1(&self, presource: P0, pdesc1: Option<*const D3D11_RENDER_TARGET_VIEW_DESC1>, pprtview1: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRenderTargetView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(std::ptr::null())), core::mem::transmute(pprtview1.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateRenderTargetView1)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc1.unwrap_or(core::ptr::null())), core::mem::transmute(pprtview1.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateQuery1(&self, pquerydesc1: *const D3D11_QUERY_DESC1, ppquery1: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateQuery1)(windows_core::Interface::as_raw(self), pquerydesc1, core::mem::transmute(ppquery1.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateQuery1)(windows_core::Interface::as_raw(self), pquerydesc1, core::mem::transmute(ppquery1.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetImmediateContext3(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -938,19 +938,19 @@ impl ID3D11Device3 { windows_core::Type::from_abi(result__) } pub unsafe fn CreateDeferredContext3(&self, contextflags: u32, ppdeferredcontext: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateDeferredContext3)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDeferredContext3)(windows_core::Interface::as_raw(self), contextflags, core::mem::transmute(ppdeferredcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteToSubresource(&self, pdstresource: P0, dstsubresource: u32, pdstbox: Option<*const D3D11_BOX>, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(std::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) + (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) } pub unsafe fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, psrcresource: P0, srcsubresource: u32, psrcbox: Option<*const D3D11_BOX>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata, dstrowpitch, dstdepthpitch, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata, dstrowpitch, dstdepthpitch, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) } } unsafe impl Send for ID3D11Device3 {} @@ -1059,10 +1059,10 @@ impl ID3D11DeviceChild { windows_core::Type::from_abi(result__) } pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -1121,7 +1121,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), subresource, maptype, mapflags, core::mem::transmute(pmappedresource.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), presource.param().abi(), subresource, maptype, mapflags, core::mem::transmute(pmappedresource.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Unmap(&self, presource: P0, subresource: u32) where @@ -1139,7 +1139,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).IASetInputLayout)(windows_core::Interface::as_raw(self), pinputlayout.param().abi()) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*const Option>, pstrides: Option<*const u32>, poffsets: Option<*const u32>) { - (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pstrides.unwrap_or(std::ptr::null())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pstrides.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pindexbuffer: P0, format: super::Dxgi::Common::DXGI_FORMAT, offset: u32) @@ -1189,7 +1189,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), datasize, getdataflags).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), pasync.param().abi(), core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), datasize, getdataflags).ok() } pub unsafe fn SetPredication(&self, ppredicate: P0, predicatevalue: P1) where @@ -1214,7 +1214,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.param().abi(), uavstartslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(std::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).OMSetRenderTargetsAndUnorderedAccessViews)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdepthstencilview.param().abi(), uavstartslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(core::ptr::null()))) } pub unsafe fn OMSetBlendState(&self, pblendstate: P0, blendfactor: Option<&[f32; 4]>, samplemask: u32) where @@ -1229,7 +1229,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).OMSetDepthStencilState)(windows_core::Interface::as_raw(self), pdepthstencilstate.param().abi(), stencilref) } pub unsafe fn SOSetTargets(&self, numbuffers: u32, ppsotargets: Option<*const Option>, poffsets: Option<*const u32>) { - (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(std::ptr::null())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).SOSetTargets)(windows_core::Interface::as_raw(self), numbuffers, core::mem::transmute(ppsotargets.unwrap_or(core::ptr::null())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null()))) } pub unsafe fn DrawAuto(&self) { (windows_core::Interface::vtable(self).DrawAuto)(windows_core::Interface::as_raw(self)) @@ -1272,7 +1272,7 @@ impl ID3D11DeviceContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).CopySubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -1285,7 +1285,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(std::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) + (windows_core::Interface::vtable(self).UpdateSubresource)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch) } pub unsafe fn CopyStructureCount(&self, pdstbuffer: P0, dstalignedbyteoffset: u32, psrcview: P1) where @@ -1385,7 +1385,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).CSSetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn CSSetUnorderedAccessViews(&self, startslot: u32, numuavs: u32, ppunorderedaccessviews: Option<*const Option>, puavinitialcounts: Option<*const u32>) { - (windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(std::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).CSSetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, numuavs, core::mem::transmute(ppunorderedaccessviews.unwrap_or(core::ptr::null())), core::mem::transmute(puavinitialcounts.unwrap_or(core::ptr::null()))) } pub unsafe fn CSSetShader(&self, pcomputeshader: P0, ppclassinstances: Option<&[Option]>) where @@ -1406,13 +1406,13 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).PSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn PSGetShader(&self, pppixelshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).PSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pppixelshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).PSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pppixelshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn PSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).PSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn VSGetShader(&self, ppvertexshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).VSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvertexshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppvertexshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).PSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1423,17 +1423,17 @@ impl ID3D11DeviceContext { windows_core::Type::from_abi(result__) } pub unsafe fn IAGetVertexBuffers(&self, startslot: u32, numbuffers: u32, ppvertexbuffers: Option<*mut Option>, pstrides: Option<*mut u32>, poffsets: Option<*mut u32>) { - (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstrides.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppvertexbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstrides.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poffsets.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IAGetIndexBuffer(&self, pindexbuffer: Option<*mut Option>, format: Option<*mut super::Dxgi::Common::DXGI_FORMAT>, offset: Option<*mut u32>) { - (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(format.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IAGetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pindexbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(format.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers(&self, startslot: u32, ppconstantbuffers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetConstantBuffers)(windows_core::Interface::as_raw(self), startslot, ppconstantbuffers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppconstantbuffers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn GSGetShader(&self, ppgeometryshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).GSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppgeometryshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppgeometryshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn IAGetPrimitiveTopology(&self) -> super::Direct3D::D3D_PRIMITIVE_TOPOLOGY { @@ -1448,7 +1448,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).VSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn GetPredication(&self, pppredicate: Option<*mut Option>, ppredicatevalue: Option<*mut super::super::Foundation::BOOL>) { - (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetPredication)(windows_core::Interface::as_raw(self), core::mem::transmute(pppredicate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppredicatevalue.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).GSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1457,24 +1457,24 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).GSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn OMGetRenderTargets(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>) { - (windows_core::Interface::vtable(self).OMGetRenderTargets)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppdepthstencilview.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetRenderTargets)(windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppdepthstencilview.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn OMGetRenderTargetsAndUnorderedAccessViews(&self, pprendertargetviews: Option<&mut [Option]>, ppdepthstencilview: Option<*mut Option>, uavstartslot: u32, ppunorderedaccessviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).OMGetRenderTargetsAndUnorderedAccessViews)( windows_core::Interface::as_raw(self), pprendertargetviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pprendertargetviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(ppdepthstencilview.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppdepthstencilview.unwrap_or(core::ptr::null_mut())), uavstartslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ) } pub unsafe fn OMGetBlendState(&self, ppblendstate: Option<*mut Option>, blendfactor: Option<&mut [f32; 4]>, psamplemask: Option<*mut u32>) { - (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetBlendState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppblendstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(blendfactor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(psamplemask.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn OMGetDepthStencilState(&self, ppdepthstencilstate: Option<*mut Option>, pstencilref: Option<*mut u32>) { - (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).OMGetDepthStencilState)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdepthstencilstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstencilref.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn SOGetTargets(&self, ppsotargets: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).SOGetTargets)(windows_core::Interface::as_raw(self), ppsotargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsotargets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1485,16 +1485,16 @@ impl ID3D11DeviceContext { windows_core::Type::from_abi(result__) } pub unsafe fn RSGetViewports(&self, pnumviewports: *mut u32, pviewports: Option<*mut D3D11_VIEWPORT>) { - (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), pnumviewports, core::mem::transmute(pviewports.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetViewports)(windows_core::Interface::as_raw(self), pnumviewports, core::mem::transmute(pviewports.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn RSGetScissorRects(&self, pnumrects: *mut u32, prects: Option<*mut super::super::Foundation::RECT>) { - (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), pnumrects, core::mem::transmute(prects.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).RSGetScissorRects)(windows_core::Interface::as_raw(self), pnumrects, core::mem::transmute(prects.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn HSGetShaderResources(&self, startslot: u32, ppshaderresourceviews: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).HSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn HSGetShader(&self, pphullshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).HSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pphullshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).HSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(pphullshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn HSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).HSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1506,7 +1506,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).DSGetShaderResources)(windows_core::Interface::as_raw(self), startslot, ppshaderresourceviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppshaderresourceviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn DSGetShader(&self, ppdomainshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).DSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomainshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).DSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppdomainshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn DSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).DSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1521,7 +1521,7 @@ impl ID3D11DeviceContext { (windows_core::Interface::vtable(self).CSGetUnorderedAccessViews)(windows_core::Interface::as_raw(self), startslot, ppunorderedaccessviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppunorderedaccessviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub unsafe fn CSGetShader(&self, ppcomputeshader: *mut Option, ppclassinstances: Option<*mut Option>, pnumclassinstances: Option<*mut u32>) { - (windows_core::Interface::vtable(self).CSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomputeshader), core::mem::transmute(ppclassinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).CSGetShader)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomputeshader), core::mem::transmute(ppclassinstances.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumclassinstances.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn CSGetSamplers(&self, startslot: u32, ppsamplers: Option<&mut [Option]>) { (windows_core::Interface::vtable(self).CSGetSamplers)(windows_core::Interface::as_raw(self), startslot, ppsamplers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppsamplers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -1545,7 +1545,7 @@ impl ID3D11DeviceContext { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.param().abi(), core::mem::transmute(ppcommandlist.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FinishCommandList)(windows_core::Interface::as_raw(self), restoredeferredcontextstate.param().abi(), core::mem::transmute(ppcommandlist.unwrap_or(core::ptr::null_mut()))).ok() } } unsafe impl Send for ID3D11DeviceContext {} @@ -1691,13 +1691,13 @@ impl ID3D11DeviceContext1 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null())), copyflags) + (windows_core::Interface::vtable(self).CopySubresourceRegion1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, dstz, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null())), copyflags) } pub unsafe fn UpdateSubresource1(&self, pdstresource: P0, dstsubresource: u32, pdstbox: Option<*const D3D11_BOX>, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32, copyflags: u32) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateSubresource1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(std::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch, copyflags) + (windows_core::Interface::vtable(self).UpdateSubresource1)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch, copyflags) } pub unsafe fn DiscardResource(&self, presource: P0) where @@ -1712,46 +1712,46 @@ impl ID3D11DeviceContext1 { (windows_core::Interface::vtable(self).DiscardView)(windows_core::Interface::as_raw(self), presourceview.param().abi()) } pub unsafe fn VSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).VSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn HSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).HSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).HSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn DSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).DSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn GSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).GSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).GSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn PSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).PSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).PSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn CSSetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*const Option>, pfirstconstant: Option<*const u32>, pnumconstants: Option<*const u32>) { - (windows_core::Interface::vtable(self).CSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).CSSetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null()))) } pub unsafe fn VSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).VSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn HSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).HSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).HSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn DSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).DSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).DSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).GSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn PSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).PSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).PSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn CSGetConstantBuffers1(&self, startslot: u32, numbuffers: u32, ppconstantbuffers: Option<*mut Option>, pfirstconstant: Option<*mut u32>, pnumconstants: Option<*mut u32>) { - (windows_core::Interface::vtable(self).CSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).CSGetConstantBuffers1)(windows_core::Interface::as_raw(self), startslot, numbuffers, core::mem::transmute(ppconstantbuffers.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfirstconstant.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumconstants.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn SwapDeviceContextState(&self, pstate: P0, pppreviousstate: Option<*mut Option>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SwapDeviceContextState)(windows_core::Interface::as_raw(self), pstate.param().abi(), core::mem::transmute(pppreviousstate.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).SwapDeviceContextState)(windows_core::Interface::as_raw(self), pstate.param().abi(), core::mem::transmute(pppreviousstate.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn ClearView(&self, pview: P0, color: &[f32; 4], prect: Option<&[super::super::Foundation::RECT]>) where @@ -1809,13 +1809,13 @@ impl ID3D11DeviceContext2 { windows_core::Interface::as_raw(self), ptiledresource.param().abi(), numtiledresourceregions, - core::mem::transmute(ptiledresourceregionstartcoordinates.unwrap_or(std::ptr::null())), - core::mem::transmute(ptiledresourceregionsizes.unwrap_or(std::ptr::null())), + core::mem::transmute(ptiledresourceregionstartcoordinates.unwrap_or(core::ptr::null())), + core::mem::transmute(ptiledresourceregionsizes.unwrap_or(core::ptr::null())), ptilepool.param().abi(), numranges, - core::mem::transmute(prangeflags.unwrap_or(std::ptr::null())), - core::mem::transmute(ptilepoolstartoffsets.unwrap_or(std::ptr::null())), - core::mem::transmute(prangetilecounts.unwrap_or(std::ptr::null())), + core::mem::transmute(prangeflags.unwrap_or(core::ptr::null())), + core::mem::transmute(ptilepoolstartoffsets.unwrap_or(core::ptr::null())), + core::mem::transmute(prangetilecounts.unwrap_or(core::ptr::null())), flags, ) .ok() @@ -1984,7 +1984,7 @@ impl ID3D11Fence { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(pattributes.unwrap_or(std::ptr::null())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(pattributes.unwrap_or(core::ptr::null())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetCompletedValue(&self) -> u64 { (windows_core::Interface::vtable(self).GetCompletedValue)(windows_core::Interface::as_raw(self)) @@ -2019,7 +2019,7 @@ windows_core::imp::interface_hierarchy!(ID3D11FunctionLinkingGraph, windows_core impl ID3D11FunctionLinkingGraph { #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn CreateModuleInstance(&self, ppmoduleinstance: *mut Option, pperrorbuffer: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateModuleInstance)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmoduleinstance), core::mem::transmute(pperrorbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateModuleInstance)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmoduleinstance), core::mem::transmute(pperrorbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SetInputSignature(&self, pinputparameters: &[D3D11_PARAMETER_DESC]) -> windows_core::Result { @@ -2058,7 +2058,7 @@ impl ID3D11FunctionLinkingGraph { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GetLastError(&self, pperrorbuffer: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(pperrorbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastError)(windows_core::Interface::as_raw(self), core::mem::transmute(pperrorbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn GenerateHlsl(&self, uflags: u32) -> windows_core::Result { @@ -2214,7 +2214,7 @@ impl ID3D11InfoQueue { (windows_core::Interface::vtable(self).ClearStoredMessages)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetMessage(&self, messageindex: u64, pmessage: Option<*mut D3D11_MESSAGE>, pmessagebytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(std::ptr::null_mut())), pmessagebytelength).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), pmessagebytelength).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -2238,7 +2238,7 @@ impl ID3D11InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D11_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -2262,7 +2262,7 @@ impl ID3D11InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D11_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearRetrievalFilter(&self) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) @@ -2428,7 +2428,7 @@ impl ID3D11Linker { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Link)(windows_core::Interface::as_raw(self), pentry.param().abi(), pentryname.param().abi(), ptargetname.param().abi(), uflags, core::mem::transmute(ppshaderblob), core::mem::transmute(pperrorbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Link)(windows_core::Interface::as_raw(self), pentry.param().abi(), pentryname.param().abi(), ptargetname.param().abi(), uflags, core::mem::transmute(ppshaderblob), core::mem::transmute(pperrorbuffer.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UseLibrary(&self, plibrarymi: P0) -> windows_core::Result<()> where @@ -2948,7 +2948,7 @@ impl ID3D11ShaderReflection { (windows_core::Interface::vtable(self).GetMinFeatureLevel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetThreadGroupSize(&self, psizex: Option<*mut u32>, psizey: Option<*mut u32>, psizez: Option<*mut u32>) -> u32 { - (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetRequiresFlags(&self) -> u64 { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) @@ -3180,7 +3180,7 @@ impl core::ops::Deref for ID3D11ShaderTrace { windows_core::imp::interface_hierarchy!(ID3D11ShaderTrace, windows_core::IUnknown); impl ID3D11ShaderTrace { pub unsafe fn TraceReady(&self, ptestcount: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).TraceReady)(windows_core::Interface::as_raw(self), core::mem::transmute(ptestcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).TraceReady)(windows_core::Interface::as_raw(self), core::mem::transmute(ptestcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ResetTrace(&self) { (windows_core::Interface::vtable(self).ResetTrace)(windows_core::Interface::as_raw(self)) @@ -3505,7 +3505,7 @@ impl ID3D11VideoContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DecoderBeginFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DecoderBeginFrame)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn DecoderEndFrame(&self, pdecoder: P0) -> windows_core::Result<()> where @@ -3530,7 +3530,7 @@ impl ID3D11VideoContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.param().abi(), core::mem::transmute(prect.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputTargetRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::ptr::null()))) } pub unsafe fn VideoProcessorSetOutputBackgroundColor(&self, pvideoprocessor: P0, ycbcr: P1, pcolor: *const D3D11_VIDEO_COLOR) where @@ -3635,21 +3635,21 @@ impl ID3D11VideoContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, outputrate, repeatframe.param().abi(), core::mem::transmute(pcustomrate.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamOutputRate)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, outputrate, repeatframe.param().abi(), core::mem::transmute(pcustomrate.unwrap_or(core::ptr::null()))) } pub unsafe fn VideoProcessorSetStreamSourceRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P1, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(prect.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamSourceRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::ptr::null()))) } pub unsafe fn VideoProcessorSetStreamDestRect(&self, pvideoprocessor: P0, streamindex: u32, enable: P1, prect: Option<*const super::super::Foundation::RECT>) where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(prect.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamDestRect)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(prect.unwrap_or(core::ptr::null()))) } pub unsafe fn VideoProcessorSetStreamAlpha(&self, pvideoprocessor: P0, streamindex: u32, enable: P1, alpha: f32) where @@ -3670,7 +3670,7 @@ impl ID3D11VideoContext { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(psourceaspectratio.unwrap_or(std::ptr::null())), core::mem::transmute(pdestinationaspectratio.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamPixelAspectRatio)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, enable.param().abi(), core::mem::transmute(psourceaspectratio.unwrap_or(core::ptr::null())), core::mem::transmute(pdestinationaspectratio.unwrap_or(core::ptr::null()))) } pub unsafe fn VideoProcessorSetStreamLumaKey(&self, pvideoprocessor: P0, streamindex: u32, enable: P1, lower: f32, upper: f32) where @@ -3813,7 +3813,7 @@ impl ID3D11VideoContext { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), ivsize, core::mem::transmute(piv.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).EncryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), ivsize, core::mem::transmute(piv.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn DecryptionBlt(&self, pcryptosession: P0, psrcsurface: P1, pdstsurface: P2, pencryptedblockinfo: Option<*const D3D11_ENCRYPTED_BLOCK_INFO>, contentkeysize: u32, pcontentkey: Option<*const core::ffi::c_void>, ivsize: u32, piv: Option<*mut core::ffi::c_void>) where @@ -3821,7 +3821,7 @@ impl ID3D11VideoContext { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), core::mem::transmute(pencryptedblockinfo.unwrap_or(std::ptr::null())), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(std::ptr::null())), ivsize, core::mem::transmute(piv.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).DecryptionBlt)(windows_core::Interface::as_raw(self), pcryptosession.param().abi(), psrcsurface.param().abi(), pdstsurface.param().abi(), core::mem::transmute(pencryptedblockinfo.unwrap_or(core::ptr::null())), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null())), ivsize, core::mem::transmute(piv.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn StartSessionKeyRefresh(&self, pcryptosession: P0, randomnumbersize: u32, prandomnumber: *mut core::ffi::c_void) where @@ -4118,28 +4118,28 @@ impl ID3D11VideoContext2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Dxgi")] pub unsafe fn VideoProcessorGetOutputHDRMetaData(&self, pvideoprocessor: P0, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: Option<*mut core::ffi::c_void>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorGetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), ptype, size, core::mem::transmute(pmetadata.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VideoProcessorGetOutputHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), ptype, size, core::mem::transmute(pmetadata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Dxgi")] pub unsafe fn VideoProcessorSetStreamHDRMetaData(&self, pvideoprocessor: P0, streamindex: u32, r#type: super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, phdrmetadata: Option<*const core::ffi::c_void>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorSetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).VideoProcessorSetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, r#type, size, core::mem::transmute(phdrmetadata.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Dxgi")] pub unsafe fn VideoProcessorGetStreamHDRMetaData(&self, pvideoprocessor: P0, streamindex: u32, ptype: *mut super::Dxgi::DXGI_HDR_METADATA_TYPE, size: u32, pmetadata: Option<*mut core::ffi::c_void>) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessorGetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, ptype, size, core::mem::transmute(pmetadata.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).VideoProcessorGetStreamHDRMetaData)(windows_core::Interface::as_raw(self), pvideoprocessor.param().abi(), streamindex, ptype, size, core::mem::transmute(pmetadata.unwrap_or(core::ptr::null_mut()))) } } unsafe impl Send for ID3D11VideoContext2 {} @@ -4178,7 +4178,7 @@ impl ID3D11VideoContext3 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DecoderBeginFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(std::ptr::null())), numcomponenthistograms, core::mem::transmute(phistogramoffsets.unwrap_or(std::ptr::null())), core::mem::transmute(pphistogrambuffers.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DecoderBeginFrame1)(windows_core::Interface::as_raw(self), pdecoder.param().abi(), pview.param().abi(), contentkeysize, core::mem::transmute(pcontentkey.unwrap_or(core::ptr::null())), numcomponenthistograms, core::mem::transmute(phistogramoffsets.unwrap_or(core::ptr::null())), core::mem::transmute(pphistogrambuffers.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SubmitDecoderBuffers2(&self, pdecoder: P0, pbufferdesc: &[D3D11_VIDEO_DECODER_BUFFER_DESC2]) -> windows_core::Result<()> where @@ -4271,27 +4271,27 @@ impl ID3D11VideoDevice { } pub unsafe fn CreateCryptoSession(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: Option<*const windows_core::GUID>, pkeyexchangetype: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(std::ptr::null())), pkeyexchangetype, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateCryptoSession)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), pkeyexchangetype, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateVideoDecoderOutputView(&self, presource: P0, pdesc: *const D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC, ppvdovview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoDecoderOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc, core::mem::transmute(ppvdovview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoDecoderOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), pdesc, core::mem::transmute(ppvdovview.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateVideoProcessorInputView(&self, presource: P0, penum: P1, pdesc: *const D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC, ppvpiview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoProcessorInputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpiview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoProcessorInputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpiview.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateVideoProcessorOutputView(&self, presource: P0, penum: P1, pdesc: *const D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC, ppvpoview: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateVideoProcessorOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpoview.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoProcessorOutputView)(windows_core::Interface::as_raw(self), presource.param().abi(), penum.param().abi(), pdesc, core::mem::transmute(ppvpoview.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateVideoProcessorEnumerator(&self, pdesc: *const D3D11_VIDEO_PROCESSOR_CONTENT_DESC) -> windows_core::Result { @@ -4320,14 +4320,14 @@ impl ID3D11VideoDevice { (windows_core::Interface::vtable(self).GetVideoDecoderConfig)(windows_core::Interface::as_raw(self), pdesc, index, pconfig).ok() } pub unsafe fn GetContentProtectionCaps(&self, pcryptotype: Option<*const windows_core::GUID>, pdecoderprofile: Option<*const windows_core::GUID>, pcaps: *mut D3D11_VIDEO_CONTENT_PROTECTION_CAPS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype.unwrap_or(std::ptr::null())), core::mem::transmute(pdecoderprofile.unwrap_or(std::ptr::null())), pcaps).ok() + (windows_core::Interface::vtable(self).GetContentProtectionCaps)(windows_core::Interface::as_raw(self), core::mem::transmute(pcryptotype.unwrap_or(core::ptr::null())), core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), pcaps).ok() } pub unsafe fn CheckCryptoKeyExchange(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: Option<*const windows_core::GUID>, index: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CheckCryptoKeyExchange)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(std::ptr::null())), index, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CheckCryptoKeyExchange)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), index, &mut result__).map(|| result__) } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -4384,12 +4384,12 @@ impl core::ops::Deref for ID3D11VideoDevice1 { windows_core::imp::interface_hierarchy!(ID3D11VideoDevice1, windows_core::IUnknown, ID3D11VideoDevice); impl ID3D11VideoDevice1 { pub unsafe fn GetCryptoSessionPrivateDataSize(&self, pcryptotype: *const windows_core::GUID, pdecoderprofile: Option<*const windows_core::GUID>, pkeyexchangetype: *const windows_core::GUID, pprivateinputsize: *mut u32, pprivateoutputsize: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCryptoSessionPrivateDataSize)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(std::ptr::null())), pkeyexchangetype, pprivateinputsize, pprivateoutputsize).ok() + (windows_core::Interface::vtable(self).GetCryptoSessionPrivateDataSize)(windows_core::Interface::as_raw(self), pcryptotype, core::mem::transmute(pdecoderprofile.unwrap_or(core::ptr::null())), pkeyexchangetype, pprivateinputsize, pprivateoutputsize).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetVideoDecoderCaps(&self, pdecoderprofile: *const windows_core::GUID, samplewidth: u32, sampleheight: u32, pframerate: *const super::Dxgi::Common::DXGI_RATIONAL, bitrate: u32, pcryptotype: Option<*const windows_core::GUID>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetVideoDecoderCaps)(windows_core::Interface::as_raw(self), pdecoderprofile, samplewidth, sampleheight, pframerate, bitrate, core::mem::transmute(pcryptotype.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetVideoDecoderCaps)(windows_core::Interface::as_raw(self), pdecoderprofile, samplewidth, sampleheight, pframerate, bitrate, core::mem::transmute(pcryptotype.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CheckVideoDecoderDownsampling(&self, pinputdesc: *const D3D11_VIDEO_DECODER_DESC, inputcolorspace: super::Dxgi::Common::DXGI_COLOR_SPACE_TYPE, pinputconfig: *const D3D11_VIDEO_DECODER_CONFIG, pframerate: *const super::Dxgi::Common::DXGI_RATIONAL, poutputdesc: *const D3D11_VIDEO_SAMPLE_DESC, psupported: *mut super::super::Foundation::BOOL, prealtimehint: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs index 6978d43772..fea9693eaa 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D11on12/mod.rs @@ -13,9 +13,9 @@ where core::mem::transmute(ppcommandqueues.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ppcommandqueues.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), nodemask, - core::mem::transmute(ppdevice.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppimmediatecontext.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pchosenfeaturelevel.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppdevice.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppimmediatecontext.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pchosenfeaturelevel.unwrap_or(core::ptr::null_mut())), ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/impl.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/impl.rs index 94a942a946..8ea5429578 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/impl.rs @@ -1641,7 +1641,7 @@ impl ID3D12FunctionParameterReflection_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D12FunctionParameterReflection_ImplVtbl(std::marker::PhantomData); +struct ID3D12FunctionParameterReflection_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionParameterReflection_ImplVtbl { const VTABLE: ID3D12FunctionParameterReflection_Vtbl = ID3D12FunctionParameterReflection_Vtbl::new::(); @@ -1715,7 +1715,7 @@ impl ID3D12FunctionReflection_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D12FunctionReflection_ImplVtbl(std::marker::PhantomData); +struct ID3D12FunctionReflection_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12FunctionReflection_ImplVtbl { const VTABLE: ID3D12FunctionReflection_Vtbl = ID3D12FunctionReflection_Vtbl::new::(); @@ -3395,7 +3395,7 @@ impl ID3D12ShaderReflectionConstantBuffer_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D12ShaderReflectionConstantBuffer_ImplVtbl(std::marker::PhantomData); +struct ID3D12ShaderReflectionConstantBuffer_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionConstantBuffer_ImplVtbl { const VTABLE: ID3D12ShaderReflectionConstantBuffer_Vtbl = ID3D12ShaderReflectionConstantBuffer_Vtbl::new::(); @@ -3497,7 +3497,7 @@ impl ID3D12ShaderReflectionType_Vtbl { } #[doc(hidden)] #[cfg(feature = "Win32_Graphics_Direct3D")] -struct ID3D12ShaderReflectionType_ImplVtbl(std::marker::PhantomData); +struct ID3D12ShaderReflectionType_ImplVtbl(core::marker::PhantomData); #[cfg(feature = "Win32_Graphics_Direct3D")] impl ID3D12ShaderReflectionType_ImplVtbl { const VTABLE: ID3D12ShaderReflectionType_Vtbl = ID3D12ShaderReflectionType_Vtbl::new::(); @@ -3542,7 +3542,7 @@ impl ID3D12ShaderReflectionVariable_Vtbl { } } #[doc(hidden)] -struct ID3D12ShaderReflectionVariable_ImplVtbl(std::marker::PhantomData); +struct ID3D12ShaderReflectionVariable_ImplVtbl(core::marker::PhantomData); impl ID3D12ShaderReflectionVariable_ImplVtbl { const VTABLE: ID3D12ShaderReflectionVariable_Vtbl = ID3D12ShaderReflectionVariable_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs index ea500b1ce8..5c9daf5c11 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Direct3D12/mod.rs @@ -21,7 +21,7 @@ pub unsafe fn D3D12CreateVersionedRootSignatureDeserializer(psrcdata: *const cor #[inline] pub unsafe fn D3D12EnableExperimentalFeatures(numfeatures: u32, piids: *const windows_core::GUID, pconfigurationstructs: Option<*const core::ffi::c_void>, pconfigurationstructsizes: Option<*const u32>) -> windows_core::Result<()> { windows_targets::link!("d3d12.dll" "system" fn D3D12EnableExperimentalFeatures(numfeatures : u32, piids : *const windows_core::GUID, pconfigurationstructs : *const core::ffi::c_void, pconfigurationstructsizes : *const u32) -> windows_core::HRESULT); - D3D12EnableExperimentalFeatures(numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(std::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(std::ptr::null()))).ok() + D3D12EnableExperimentalFeatures(numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(core::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn D3D12GetDebugInterface(result__: *mut Option) -> windows_core::Result<()> @@ -43,13 +43,13 @@ where #[inline] pub unsafe fn D3D12SerializeRootSignature(prootsignature: *const D3D12_ROOT_SIGNATURE_DESC, version: D3D_ROOT_SIGNATURE_VERSION, ppblob: *mut Option, pperrorblob: Option<*mut Option>) -> windows_core::Result<()> { windows_targets::link!("d3d12.dll" "system" fn D3D12SerializeRootSignature(prootsignature : *const D3D12_ROOT_SIGNATURE_DESC, version : D3D_ROOT_SIGNATURE_VERSION, ppblob : *mut * mut core::ffi::c_void, pperrorblob : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D12SerializeRootSignature(prootsignature, version, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(std::ptr::null_mut()))).ok() + D3D12SerializeRootSignature(prootsignature, version, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] #[inline] pub unsafe fn D3D12SerializeVersionedRootSignature(prootsignature: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppblob: *mut Option, pperrorblob: Option<*mut Option>) -> windows_core::Result<()> { windows_targets::link!("d3d12.dll" "system" fn D3D12SerializeVersionedRootSignature(prootsignature : *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppblob : *mut * mut core::ffi::c_void, pperrorblob : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - D3D12SerializeVersionedRootSignature(prootsignature, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(std::ptr::null_mut()))).ok() + D3D12SerializeVersionedRootSignature(prootsignature, core::mem::transmute(ppblob), core::mem::transmute(pperrorblob.unwrap_or(core::ptr::null_mut()))).ok() } windows_core::imp::define_interface!(ID3D12CommandAllocator, ID3D12CommandAllocator_Vtbl, 0x6102dee4_af59_4b09_b999_b44d73f09b24); impl core::ops::Deref for ID3D12CommandAllocator { @@ -109,13 +109,13 @@ impl ID3D12CommandQueue { windows_core::Interface::as_raw(self), presource.param().abi(), numresourceregions, - core::mem::transmute(presourceregionstartcoordinates.unwrap_or(std::ptr::null())), - core::mem::transmute(presourceregionsizes.unwrap_or(std::ptr::null())), + core::mem::transmute(presourceregionstartcoordinates.unwrap_or(core::ptr::null())), + core::mem::transmute(presourceregionsizes.unwrap_or(core::ptr::null())), pheap.param().abi(), numranges, - core::mem::transmute(prangeflags.unwrap_or(std::ptr::null())), - core::mem::transmute(pheaprangestartoffsets.unwrap_or(std::ptr::null())), - core::mem::transmute(prangetilecounts.unwrap_or(std::ptr::null())), + core::mem::transmute(prangeflags.unwrap_or(core::ptr::null())), + core::mem::transmute(pheaprangestartoffsets.unwrap_or(core::ptr::null())), + core::mem::transmute(prangetilecounts.unwrap_or(core::ptr::null())), flags, ) } @@ -130,10 +130,10 @@ impl ID3D12CommandQueue { (windows_core::Interface::vtable(self).ExecuteCommandLists)(windows_core::Interface::as_raw(self), ppcommandlists.len().try_into().unwrap(), core::mem::transmute(ppcommandlists.as_ptr())) } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -723,14 +723,14 @@ impl ID3D12Device { (windows_core::Interface::vtable(self).CreateRootSignature)(windows_core::Interface::as_raw(self), nodemask, core::mem::transmute(pblobwithrootsignature.as_ptr()), pblobwithrootsignature.len().try_into().unwrap(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateConstantBufferView(&self, pdesc: Option<*const D3D12_CONSTANT_BUFFER_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { - (windows_core::Interface::vtable(self).CreateConstantBufferView)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(destdescriptor)) + (windows_core::Interface::vtable(self).CreateConstantBufferView)(windows_core::Interface::as_raw(self), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(destdescriptor)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateShaderResourceView(&self, presource: P0, pdesc: Option<*const D3D12_SHADER_RESOURCE_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(destdescriptor)) + (windows_core::Interface::vtable(self).CreateShaderResourceView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(destdescriptor)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateUnorderedAccessView(&self, presource: P0, pcounterresource: P1, pdesc: Option<*const D3D12_UNORDERED_ACCESS_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) @@ -738,27 +738,27 @@ impl ID3D12Device { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), pcounterresource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(destdescriptor)) + (windows_core::Interface::vtable(self).CreateUnorderedAccessView)(windows_core::Interface::as_raw(self), presource.param().abi(), pcounterresource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(destdescriptor)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateRenderTargetView(&self, presource: P0, pdesc: Option<*const D3D12_RENDER_TARGET_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(destdescriptor)) + (windows_core::Interface::vtable(self).CreateRenderTargetView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(destdescriptor)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateDepthStencilView(&self, presource: P0, pdesc: Option<*const D3D12_DEPTH_STENCIL_VIEW_DESC>, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(std::ptr::null())), core::mem::transmute(destdescriptor)) + (windows_core::Interface::vtable(self).CreateDepthStencilView)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pdesc.unwrap_or(core::ptr::null())), core::mem::transmute(destdescriptor)) } pub unsafe fn CreateSampler(&self, pdesc: *const D3D12_SAMPLER_DESC, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) { (windows_core::Interface::vtable(self).CreateSampler)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(destdescriptor)) } pub unsafe fn CopyDescriptors(&self, numdestdescriptorranges: u32, pdestdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, pdestdescriptorrangesizes: Option<*const u32>, numsrcdescriptorranges: u32, psrcdescriptorrangestarts: *const D3D12_CPU_DESCRIPTOR_HANDLE, psrcdescriptorrangesizes: Option<*const u32>, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE) { - (windows_core::Interface::vtable(self).CopyDescriptors)(windows_core::Interface::as_raw(self), numdestdescriptorranges, pdestdescriptorrangestarts, core::mem::transmute(pdestdescriptorrangesizes.unwrap_or(std::ptr::null())), numsrcdescriptorranges, psrcdescriptorrangestarts, core::mem::transmute(psrcdescriptorrangesizes.unwrap_or(std::ptr::null())), descriptorheapstype) + (windows_core::Interface::vtable(self).CopyDescriptors)(windows_core::Interface::as_raw(self), numdestdescriptorranges, pdestdescriptorrangestarts, core::mem::transmute(pdestdescriptorrangesizes.unwrap_or(core::ptr::null())), numsrcdescriptorranges, psrcdescriptorrangestarts, core::mem::transmute(psrcdescriptorrangesizes.unwrap_or(core::ptr::null())), descriptorheapstype) } pub unsafe fn CopyDescriptorsSimple(&self, numdescriptors: u32, destdescriptorrangestart: D3D12_CPU_DESCRIPTOR_HANDLE, srcdescriptorrangestart: D3D12_CPU_DESCRIPTOR_HANDLE, descriptorheapstype: D3D12_DESCRIPTOR_HEAP_TYPE) { (windows_core::Interface::vtable(self).CopyDescriptorsSimple)(windows_core::Interface::as_raw(self), numdescriptors, core::mem::transmute(destdescriptorrangestart), core::mem::transmute(srcdescriptorrangestart), descriptorheapstype) @@ -779,7 +779,7 @@ impl ID3D12Device { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateCommittedResource)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateHeap(&self, pdesc: *const D3D12_HEAP_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -793,14 +793,14 @@ impl ID3D12Device { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreatePlacedResource)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreatePlacedResource)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateReservedResource(&self, pdesc: *const D3D12_RESOURCE_DESC, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: Option<*const D3D12_CLEAR_VALUE>, result__: *mut Option) -> windows_core::Result<()> where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateReservedResource)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateReservedResource)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Security")] pub unsafe fn CreateSharedHandle(&self, pobject: P0, pattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, access: u32, name: P1) -> windows_core::Result @@ -809,7 +809,7 @@ impl ID3D12Device { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pobject.param().abi(), core::mem::transmute(pattributes.unwrap_or(std::ptr::null())), access, name.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), pobject.param().abi(), core::mem::transmute(pattributes.unwrap_or(core::ptr::null())), access, name.param().abi(), &mut result__).map(|| result__) } pub unsafe fn OpenSharedHandle(&self, nthandle: P0, result__: *mut Option) -> windows_core::Result<()> where @@ -843,7 +843,7 @@ impl ID3D12Device { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetCopyableFootprints(&self, presourcedesc: *const D3D12_RESOURCE_DESC, firstsubresource: u32, numsubresources: u32, baseoffset: u64, playouts: Option<*mut D3D12_PLACED_SUBRESOURCE_FOOTPRINT>, pnumrows: Option<*mut u32>, prowsizeinbytes: Option<*mut u64>, ptotalbytes: Option<*mut u64>) { - (windows_core::Interface::vtable(self).GetCopyableFootprints)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, core::mem::transmute(playouts.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumrows.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prowsizeinbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ptotalbytes.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetCopyableFootprints)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, core::mem::transmute(playouts.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumrows.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prowsizeinbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ptotalbytes.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn CreateQueryHeap(&self, pdesc: *const D3D12_QUERY_HEAP_DESC, result__: *mut Option) -> windows_core::Result<()> where @@ -868,7 +868,7 @@ impl ID3D12Device { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), core::mem::transmute(pnumtilesforentireresource.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppackedmipdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumsubresourcetilings.unwrap_or(std::ptr::null_mut())), firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips) + (windows_core::Interface::vtable(self).GetResourceTiling)(windows_core::Interface::as_raw(self), ptiledresource.param().abi(), core::mem::transmute(pnumtilesforentireresource.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppackedmipdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstandardtileshapefornonpackedmips.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumsubresourcetilings.unwrap_or(core::ptr::null_mut())), firstsubresourcetilingtoget, psubresourcetilingsfornonpackedmips) } pub unsafe fn GetAdapterLuid(&self) -> super::super::Foundation::LUID { let mut result__ = core::mem::zeroed(); @@ -1002,7 +1002,7 @@ impl ID3D12Device10 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource3)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pprotectedsession.param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateCommittedResource3)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pprotectedsession.param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreatePlacedResource2(&self, pheap: P0, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: Option<*const D3D12_CLEAR_VALUE>, pcastableformats: Option<&[super::Dxgi::Common::DXGI_FORMAT]>, result__: *mut Option) -> windows_core::Result<()> @@ -1010,7 +1010,7 @@ impl ID3D12Device10 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreatePlacedResource2)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreatePlacedResource2)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateReservedResource2(&self, pdesc: *const D3D12_RESOURCE_DESC, initiallayout: D3D12_BARRIER_LAYOUT, poptimizedclearvalue: Option<*const D3D12_CLEAR_VALUE>, pprotectedsession: P0, pcastableformats: Option<&[super::Dxgi::Common::DXGI_FORMAT]>, result__: *mut Option) -> windows_core::Result<()> @@ -1018,7 +1018,7 @@ impl ID3D12Device10 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pprotectedsession.param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateReservedResource2)(windows_core::Interface::as_raw(self), pdesc, initiallayout, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pprotectedsession.param().abi(), pcastableformats.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcastableformats.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &T::IID, result__ as *mut _ as *mut _).ok() } } unsafe impl Send for ID3D12Device10 {} @@ -1071,7 +1071,7 @@ impl ID3D12Device12 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo3(&self, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC1, pnumcastableformats: Option<*const u32>, ppcastableformats: Option<*const *const super::Dxgi::Common::DXGI_FORMAT>, presourceallocationinfo1: Option<*mut D3D12_RESOURCE_ALLOCATION_INFO1>) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo3)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(pnumcastableformats.unwrap_or(std::ptr::null())), core::mem::transmute(ppcastableformats.unwrap_or(std::ptr::null())), core::mem::transmute(presourceallocationinfo1.unwrap_or(std::ptr::null_mut()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo3)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(pnumcastableformats.unwrap_or(core::ptr::null())), core::mem::transmute(ppcastableformats.unwrap_or(core::ptr::null())), core::mem::transmute(presourceallocationinfo1.unwrap_or(core::ptr::null_mut()))); result__ } } @@ -1227,7 +1227,7 @@ impl ID3D12Device4 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource1)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateCommittedResource1)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateHeap1(&self, pdesc: *const D3D12_HEAP_DESC, pprotectedsession: P0, result__: *mut Option) -> windows_core::Result<()> where @@ -1242,12 +1242,12 @@ impl ID3D12Device4 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateReservedResource1)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateReservedResource1)(windows_core::Interface::as_raw(self), pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo1(&self, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC, presourceallocationinfo1: Option<*mut D3D12_RESOURCE_ALLOCATION_INFO1>) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo1)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(std::ptr::null_mut()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo1)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(core::ptr::null_mut()))); result__ } } @@ -1293,17 +1293,17 @@ impl ID3D12Device5 { (windows_core::Interface::vtable(self).RemoveDevice)(windows_core::Interface::as_raw(self)) } pub unsafe fn EnumerateMetaCommands(&self, pnummetacommands: *mut u32, pdescs: Option<*mut D3D12_META_COMMAND_DESC>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumerateMetaCommands)(windows_core::Interface::as_raw(self), pnummetacommands, core::mem::transmute(pdescs.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumerateMetaCommands)(windows_core::Interface::as_raw(self), pnummetacommands, core::mem::transmute(pdescs.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EnumerateMetaCommandParameters(&self, commandid: *const windows_core::GUID, stage: D3D12_META_COMMAND_PARAMETER_STAGE, ptotalstructuresizeinbytes: Option<*mut u32>, pparametercount: *mut u32, pparameterdescs: Option<*mut D3D12_META_COMMAND_PARAMETER_DESC>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumerateMetaCommandParameters)(windows_core::Interface::as_raw(self), commandid, stage, core::mem::transmute(ptotalstructuresizeinbytes.unwrap_or(std::ptr::null_mut())), pparametercount, core::mem::transmute(pparameterdescs.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumerateMetaCommandParameters)(windows_core::Interface::as_raw(self), commandid, stage, core::mem::transmute(ptotalstructuresizeinbytes.unwrap_or(core::ptr::null_mut())), pparametercount, core::mem::transmute(pparameterdescs.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateMetaCommand(&self, commandid: *const windows_core::GUID, nodemask: u32, pcreationparametersdata: Option<*const core::ffi::c_void>, creationparametersdatasizeinbytes: usize) -> windows_core::Result where T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateMetaCommand)(windows_core::Interface::as_raw(self), commandid, nodemask, core::mem::transmute(pcreationparametersdata.unwrap_or(std::ptr::null())), creationparametersdatasizeinbytes, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateMetaCommand)(windows_core::Interface::as_raw(self), commandid, nodemask, core::mem::transmute(pcreationparametersdata.unwrap_or(core::ptr::null())), creationparametersdatasizeinbytes, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateStateObject(&self, pdesc: *const D3D12_STATE_OBJECT_DESC) -> windows_core::Result where @@ -1350,7 +1350,7 @@ impl ID3D12Device6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), mode, measurementsaction, heventtosignaluponcompletion.param().abi(), core::mem::transmute(pbfurthermeasurementsdesired.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetBackgroundProcessingMode)(windows_core::Interface::as_raw(self), mode, measurementsaction, heventtosignaluponcompletion.param().abi(), core::mem::transmute(pbfurthermeasurementsdesired.unwrap_or(core::ptr::null_mut()))).ok() } } unsafe impl Send for ID3D12Device6 {} @@ -1405,7 +1405,7 @@ impl ID3D12Device8 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetResourceAllocationInfo2(&self, visiblemask: u32, numresourcedescs: u32, presourcedescs: *const D3D12_RESOURCE_DESC1, presourceallocationinfo1: Option<*mut D3D12_RESOURCE_ALLOCATION_INFO1>) -> D3D12_RESOURCE_ALLOCATION_INFO { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetResourceAllocationInfo2)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(std::ptr::null_mut()))); + (windows_core::Interface::vtable(self).GetResourceAllocationInfo2)(windows_core::Interface::as_raw(self), &mut result__, visiblemask, numresourcedescs, presourcedescs, core::mem::transmute(presourceallocationinfo1.unwrap_or(core::ptr::null_mut()))); result__ } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] @@ -1414,7 +1414,7 @@ impl ID3D12Device8 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreateCommittedResource2)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreateCommittedResource2)(windows_core::Interface::as_raw(self), pheapproperties, heapflags, pdesc, initialresourcestate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), pprotectedsession.param().abi(), &T::IID, result__ as *mut _ as *mut _).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreatePlacedResource1(&self, pheap: P0, heapoffset: u64, pdesc: *const D3D12_RESOURCE_DESC1, initialstate: D3D12_RESOURCE_STATES, poptimizedclearvalue: Option<*const D3D12_CLEAR_VALUE>, result__: *mut Option) -> windows_core::Result<()> @@ -1422,7 +1422,7 @@ impl ID3D12Device8 { P0: windows_core::Param, T: windows_core::Interface, { - (windows_core::Interface::vtable(self).CreatePlacedResource1)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(std::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() + (windows_core::Interface::vtable(self).CreatePlacedResource1)(windows_core::Interface::as_raw(self), pheap.param().abi(), heapoffset, pdesc, initialstate, core::mem::transmute(poptimizedclearvalue.unwrap_or(core::ptr::null())), &T::IID, result__ as *mut _ as *mut _).ok() } pub unsafe fn CreateSamplerFeedbackUnorderedAccessView(&self, ptargetedresource: P0, pfeedbackresource: P1, destdescriptor: D3D12_CPU_DESCRIPTOR_HANDLE) where @@ -1433,7 +1433,7 @@ impl ID3D12Device8 { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetCopyableFootprints1(&self, presourcedesc: *const D3D12_RESOURCE_DESC1, firstsubresource: u32, numsubresources: u32, baseoffset: u64, playouts: Option<*mut D3D12_PLACED_SUBRESOURCE_FOOTPRINT>, pnumrows: Option<*mut u32>, prowsizeinbytes: Option<*mut u64>, ptotalbytes: Option<*mut u64>) { - (windows_core::Interface::vtable(self).GetCopyableFootprints1)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, core::mem::transmute(playouts.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumrows.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prowsizeinbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ptotalbytes.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetCopyableFootprints1)(windows_core::Interface::as_raw(self), presourcedesc, firstsubresource, numsubresources, baseoffset, core::mem::transmute(playouts.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumrows.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prowsizeinbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ptotalbytes.unwrap_or(core::ptr::null_mut()))) } } unsafe impl Send for ID3D12Device8 {} @@ -1536,7 +1536,7 @@ impl ID3D12DeviceConfiguration { } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn SerializeVersionedRootSignature(&self, pdesc: *const D3D12_VERSIONED_ROOT_SIGNATURE_DESC, ppresult: *mut Option, pperror: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SerializeVersionedRootSignature)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(ppresult), core::mem::transmute(pperror.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SerializeVersionedRootSignature)(windows_core::Interface::as_raw(self), pdesc, core::mem::transmute(ppresult), core::mem::transmute(pperror.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateVersionedRootSignatureDeserializer(&self, pblob: *const core::ffi::c_void, size: usize) -> windows_core::Result where @@ -1613,7 +1613,7 @@ impl ID3D12DeviceFactory { (windows_core::Interface::vtable(self).GetConfigurationInterface)(windows_core::Interface::as_raw(self), clsid, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EnableExperimentalFeatures(&self, numfeatures: u32, piids: *const windows_core::GUID, pconfigurationstructs: Option<*const core::ffi::c_void>, pconfigurationstructsizes: Option<*const u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnableExperimentalFeatures)(windows_core::Interface::as_raw(self), numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(std::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).EnableExperimentalFeatures)(windows_core::Interface::as_raw(self), numfeatures, piids, core::mem::transmute(pconfigurationstructs.unwrap_or(core::ptr::null())), core::mem::transmute(pconfigurationstructsizes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D")] pub unsafe fn CreateDevice(&self, adapter: P0, featurelevel: super::Direct3D::D3D_FEATURE_LEVEL, result__: *mut Option) -> windows_core::Result<()> @@ -1945,7 +1945,7 @@ impl ID3D12GBVDiagnostics { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGBVResourceInfo)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(presourcedesc.unwrap_or(std::ptr::null())), core::mem::transmute(presourcehash.unwrap_or(std::ptr::null())), core::mem::transmute(psubresourcestatesbyteoffset.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetGBVResourceInfo)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(presourcedesc.unwrap_or(core::ptr::null())), core::mem::transmute(presourcehash.unwrap_or(core::ptr::null())), core::mem::transmute(psubresourcestatesbyteoffset.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GBVReserved0(&self) { (windows_core::Interface::vtable(self).GBVReserved0)(windows_core::Interface::as_raw(self)) @@ -2012,7 +2012,7 @@ impl ID3D12GraphicsCommandList { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CopyTextureRegion(&self, pdst: *const D3D12_TEXTURE_COPY_LOCATION, dstx: u32, dsty: u32, dstz: u32, psrc: *const D3D12_TEXTURE_COPY_LOCATION, psrcbox: Option<*const D3D12_BOX>) { - (windows_core::Interface::vtable(self).CopyTextureRegion)(windows_core::Interface::as_raw(self), pdst, dstx, dsty, dstz, psrc, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).CopyTextureRegion)(windows_core::Interface::as_raw(self), pdst, dstx, dsty, dstz, psrc, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))) } pub unsafe fn CopyResource(&self, pdstresource: P0, psrcresource: P1) where @@ -2120,7 +2120,7 @@ impl ID3D12GraphicsCommandList { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn IASetIndexBuffer(&self, pview: Option<*const D3D12_INDEX_BUFFER_VIEW>) { - (windows_core::Interface::vtable(self).IASetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pview.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).IASetIndexBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(pview.unwrap_or(core::ptr::null()))) } pub unsafe fn IASetVertexBuffers(&self, startslot: u32, pviews: Option<&[D3D12_VERTEX_BUFFER_VIEW]>) { (windows_core::Interface::vtable(self).IASetVertexBuffers)(windows_core::Interface::as_raw(self), startslot, pviews.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pviews.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) @@ -2132,7 +2132,7 @@ impl ID3D12GraphicsCommandList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), numrendertargetdescriptors, core::mem::transmute(prendertargetdescriptors.unwrap_or(std::ptr::null())), rtssinglehandletodescriptorrange.param().abi(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).OMSetRenderTargets)(windows_core::Interface::as_raw(self), numrendertargetdescriptors, core::mem::transmute(prendertargetdescriptors.unwrap_or(core::ptr::null())), rtssinglehandletodescriptorrange.param().abi(), core::mem::transmute(pdepthstencildescriptor.unwrap_or(core::ptr::null()))) } pub unsafe fn ClearDepthStencilView(&self, depthstencilview: D3D12_CPU_DESCRIPTOR_HANDLE, clearflags: D3D12_CLEAR_FLAGS, depth: f32, stencil: u8, prects: &[super::super::Foundation::RECT]) { (windows_core::Interface::vtable(self).ClearDepthStencilView)(windows_core::Interface::as_raw(self), core::mem::transmute(depthstencilview), clearflags, depth, stencil, prects.len().try_into().unwrap(), core::mem::transmute(prects.as_ptr())) @@ -2156,7 +2156,7 @@ impl ID3D12GraphicsCommandList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::ptr::null()))) } pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: D3D12_QUERY_TYPE, index: u32) where @@ -2184,10 +2184,10 @@ impl ID3D12GraphicsCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -2305,7 +2305,7 @@ impl ID3D12GraphicsCommandList1 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcrect.unwrap_or(std::ptr::null())), format, resolvemode) + (windows_core::Interface::vtable(self).ResolveSubresourceRegion)(windows_core::Interface::as_raw(self), pdstresource.param().abi(), dstsubresource, dstx, dsty, psrcresource.param().abi(), srcsubresource, core::mem::transmute(psrcrect.unwrap_or(core::ptr::null())), format, resolvemode) } pub unsafe fn SetViewInstanceMask(&self, mask: u32) { (windows_core::Interface::vtable(self).SetViewInstanceMask)(windows_core::Interface::as_raw(self), mask) @@ -2360,7 +2360,7 @@ impl core::ops::Deref for ID3D12GraphicsCommandList2 { windows_core::imp::interface_hierarchy!(ID3D12GraphicsCommandList2, windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12CommandList, ID3D12GraphicsCommandList, ID3D12GraphicsCommandList1); impl ID3D12GraphicsCommandList2 { pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const D3D12_WRITEBUFFERIMMEDIATE_MODE>) { - (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) } } unsafe impl Send for ID3D12GraphicsCommandList2 {} @@ -2404,7 +2404,7 @@ windows_core::imp::interface_hierarchy!(ID3D12GraphicsCommandList4, windows_core impl ID3D12GraphicsCommandList4 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BeginRenderPass(&self, prendertargets: Option<&[D3D12_RENDER_PASS_RENDER_TARGET_DESC]>, pdepthstencil: Option<*const D3D12_RENDER_PASS_DEPTH_STENCIL_DESC>, flags: D3D12_RENDER_PASS_FLAGS) { - (windows_core::Interface::vtable(self).BeginRenderPass)(windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prendertargets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdepthstencil.unwrap_or(std::ptr::null())), flags) + (windows_core::Interface::vtable(self).BeginRenderPass)(windows_core::Interface::as_raw(self), prendertargets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prendertargets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdepthstencil.unwrap_or(core::ptr::null())), flags) } pub unsafe fn EndRenderPass(&self) { (windows_core::Interface::vtable(self).EndRenderPass)(windows_core::Interface::as_raw(self)) @@ -2413,13 +2413,13 @@ impl ID3D12GraphicsCommandList4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pinitializationparametersdata.unwrap_or(std::ptr::null())), initializationparametersdatasizeinbytes) + (windows_core::Interface::vtable(self).InitializeMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pinitializationparametersdata.unwrap_or(core::ptr::null())), initializationparametersdatasizeinbytes) } pub unsafe fn ExecuteMetaCommand(&self, pmetacommand: P0, pexecutionparametersdata: Option<*const core::ffi::c_void>, executionparametersdatasizeinbytes: usize) where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ExecuteMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pexecutionparametersdata.unwrap_or(std::ptr::null())), executionparametersdatasizeinbytes) + (windows_core::Interface::vtable(self).ExecuteMetaCommand)(windows_core::Interface::as_raw(self), pmetacommand.param().abi(), core::mem::transmute(pexecutionparametersdata.unwrap_or(core::ptr::null())), executionparametersdatasizeinbytes) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn BuildRaytracingAccelerationStructure(&self, pdesc: *const D3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC, ppostbuildinfodescs: Option<&[D3D12_RAYTRACING_ACCELERATION_STRUCTURE_POSTBUILD_INFO_DESC]>) { @@ -2472,7 +2472,7 @@ impl core::ops::Deref for ID3D12GraphicsCommandList5 { windows_core::imp::interface_hierarchy!(ID3D12GraphicsCommandList5, windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12CommandList, ID3D12GraphicsCommandList, ID3D12GraphicsCommandList1, ID3D12GraphicsCommandList2, ID3D12GraphicsCommandList3, ID3D12GraphicsCommandList4); impl ID3D12GraphicsCommandList5 { pub unsafe fn RSSetShadingRate(&self, baseshadingrate: D3D12_SHADING_RATE, combiners: Option<*const D3D12_SHADING_RATE_COMBINER>) { - (windows_core::Interface::vtable(self).RSSetShadingRate)(windows_core::Interface::as_raw(self), baseshadingrate, core::mem::transmute(combiners.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).RSSetShadingRate)(windows_core::Interface::as_raw(self), baseshadingrate, core::mem::transmute(combiners.unwrap_or(core::ptr::null()))) } pub unsafe fn RSSetShadingRateImage(&self, shadingrateimage: P0) where @@ -2634,7 +2634,7 @@ impl ID3D12InfoQueue { (windows_core::Interface::vtable(self).ClearStoredMessages)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetMessage(&self, messageindex: u64, pmessage: Option<*mut D3D12_MESSAGE>, pmessagebytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(std::ptr::null_mut())), pmessagebytelength).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), messageindex, core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), pmessagebytelength).ok() } pub unsafe fn GetNumMessagesAllowedByStorageFilter(&self) -> u64 { (windows_core::Interface::vtable(self).GetNumMessagesAllowedByStorageFilter)(windows_core::Interface::as_raw(self)) @@ -2658,7 +2658,7 @@ impl ID3D12InfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetStorageFilter(&self, pfilter: Option<*mut D3D12_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearStorageFilter(&self) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self)) @@ -2682,7 +2682,7 @@ impl ID3D12InfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), pfilter).ok() } pub unsafe fn GetRetrievalFilter(&self, pfilter: Option<*mut D3D12_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearRetrievalFilter(&self) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self)) @@ -2894,7 +2894,7 @@ impl core::ops::Deref for ID3D12ManualWriteTrackingResource { windows_core::imp::interface_hierarchy!(ID3D12ManualWriteTrackingResource, windows_core::IUnknown); impl ID3D12ManualWriteTrackingResource { pub unsafe fn TrackWrite(&self, subresource: u32, pwrittenrange: Option<*const D3D12_RANGE>) { - (windows_core::Interface::vtable(self).TrackWrite)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).TrackWrite)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(core::ptr::null()))) } } unsafe impl Send for ID3D12ManualWriteTrackingResource {} @@ -2934,10 +2934,10 @@ impl core::ops::Deref for ID3D12Object { windows_core::imp::interface_hierarchy!(ID3D12Object, windows_core::IUnknown); impl ID3D12Object { pub unsafe fn GetPrivateData(&self, guid: *const windows_core::GUID, pdatasize: *mut u32, pdata: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPrivateData)(windows_core::Interface::as_raw(self), guid, pdatasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetPrivateData(&self, guid: *const windows_core::GUID, datasize: u32, pdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPrivateData)(windows_core::Interface::as_raw(self), guid, datasize, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPrivateDataInterface(&self, guid: *const windows_core::GUID, pdata: P0) -> windows_core::Result<()> where @@ -3177,10 +3177,10 @@ impl core::ops::Deref for ID3D12Resource { windows_core::imp::interface_hierarchy!(ID3D12Resource, windows_core::IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12Pageable); impl ID3D12Resource { pub unsafe fn Map(&self, subresource: u32, preadrange: Option<*const D3D12_RANGE>, ppdata: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(preadrange.unwrap_or(std::ptr::null())), core::mem::transmute(ppdata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Map)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(preadrange.unwrap_or(core::ptr::null())), core::mem::transmute(ppdata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Unmap(&self, subresource: u32, pwrittenrange: Option<*const D3D12_RANGE>) { - (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).Unmap)(windows_core::Interface::as_raw(self), subresource, core::mem::transmute(pwrittenrange.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self) -> D3D12_RESOURCE_DESC { @@ -3192,13 +3192,13 @@ impl ID3D12Resource { (windows_core::Interface::vtable(self).GetGPUVirtualAddress)(windows_core::Interface::as_raw(self)) } pub unsafe fn WriteToSubresource(&self, dstsubresource: u32, pdstbox: Option<*const D3D12_BOX>, psrcdata: *const core::ffi::c_void, srcrowpitch: u32, srcdepthpitch: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(std::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch).ok() + (windows_core::Interface::vtable(self).WriteToSubresource)(windows_core::Interface::as_raw(self), dstsubresource, core::mem::transmute(pdstbox.unwrap_or(core::ptr::null())), psrcdata, srcrowpitch, srcdepthpitch).ok() } pub unsafe fn ReadFromSubresource(&self, pdstdata: *mut core::ffi::c_void, dstrowpitch: u32, dstdepthpitch: u32, srcsubresource: u32, psrcbox: Option<*const D3D12_BOX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata, dstrowpitch, dstdepthpitch, srcsubresource, core::mem::transmute(psrcbox.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReadFromSubresource)(windows_core::Interface::as_raw(self), pdstdata, dstrowpitch, dstdepthpitch, srcsubresource, core::mem::transmute(psrcbox.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetHeapProperties(&self, pheapproperties: Option<*mut D3D12_HEAP_PROPERTIES>, pheapflags: Option<*mut D3D12_HEAP_FLAGS>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetHeapProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pheapflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHeapProperties)(windows_core::Interface::as_raw(self), core::mem::transmute(pheapproperties.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pheapflags.unwrap_or(core::ptr::null_mut()))).ok() } } unsafe impl Send for ID3D12Resource {} @@ -3466,7 +3466,7 @@ impl ID3D12ShaderReflection { (windows_core::Interface::vtable(self).GetMinFeatureLevel)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetThreadGroupSize(&self, psizex: Option<*mut u32>, psizey: Option<*mut u32>, psizez: Option<*mut u32>) -> u32 { - (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).GetThreadGroupSize)(windows_core::Interface::as_raw(self), core::mem::transmute(psizex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psizez.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetRequiresFlags(&self) -> u64 { (windows_core::Interface::vtable(self).GetRequiresFlags)(windows_core::Interface::as_raw(self)) diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs index 9e0f070ac3..62d2ca6c00 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectComposition/mod.rs @@ -62,7 +62,7 @@ where pub unsafe fn DCompositionCreateSurfaceHandle(desiredaccess: u32, securityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>) -> windows_core::Result { windows_targets::link!("dcomp.dll" "system" fn DCompositionCreateSurfaceHandle(desiredaccess : u32, securityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, surfacehandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DCompositionCreateSurfaceHandle(desiredaccess, core::mem::transmute(securityattributes.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + DCompositionCreateSurfaceHandle(desiredaccess, core::mem::transmute(securityattributes.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn DCompositionGetFrameId(frameidtype: COMPOSITION_FRAME_ID_TYPE) -> windows_core::Result { @@ -73,7 +73,7 @@ pub unsafe fn DCompositionGetFrameId(frameidtype: COMPOSITION_FRAME_ID_TYPE) -> #[inline] pub unsafe fn DCompositionGetStatistics(frameid: u64, framestats: *mut COMPOSITION_FRAME_STATS, targetidcount: u32, targetids: Option<*mut COMPOSITION_TARGET_ID>, actualtargetidcount: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("dcomp.dll" "system" fn DCompositionGetStatistics(frameid : u64, framestats : *mut COMPOSITION_FRAME_STATS, targetidcount : u32, targetids : *mut COMPOSITION_TARGET_ID, actualtargetidcount : *mut u32) -> windows_core::HRESULT); - DCompositionGetStatistics(frameid, framestats, targetidcount, core::mem::transmute(targetids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(actualtargetidcount.unwrap_or(std::ptr::null_mut()))).ok() + DCompositionGetStatistics(frameid, framestats, targetidcount, core::mem::transmute(targetids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(actualtargetidcount.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DCompositionGetTargetStatistics(frameid: u64, targetid: *const COMPOSITION_TARGET_ID, targetstats: *mut COMPOSITION_TARGET_STATS) -> windows_core::Result<()> { @@ -1875,7 +1875,7 @@ impl IDCompositionSurface { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(updaterect.unwrap_or(std::ptr::null())), &T::IID, &mut result__, updateoffset).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(updaterect.unwrap_or(core::ptr::null())), &T::IID, &mut result__, updateoffset).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndDraw(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self)).ok() @@ -1887,7 +1887,7 @@ impl IDCompositionSurface { (windows_core::Interface::vtable(self).ResumeDraw)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Scroll(&self, scrollrect: Option<*const super::super::Foundation::RECT>, cliprect: Option<*const super::super::Foundation::RECT>, offsetx: i32, offsety: i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(std::ptr::null())), core::mem::transmute(cliprect.unwrap_or(std::ptr::null())), offsetx, offsety).ok() + (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(core::ptr::null())), core::mem::transmute(cliprect.unwrap_or(core::ptr::null())), offsetx, offsety).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs index ccae94e154..ec076bb4a8 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectDraw/mod.rs @@ -63,7 +63,7 @@ impl IDDVideoPortContainer { (windows_core::Interface::vtable(self).EnumVideoPorts)(windows_core::Interface::as_raw(self), param0, param1, param2, param3).ok() } pub unsafe fn GetVideoPortConnectInfo(&self, param0: u32, pcinfo: *mut u32, param2: Option<*mut DDVIDEOPORTCONNECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVideoPortConnectInfo)(windows_core::Interface::as_raw(self), param0, pcinfo, core::mem::transmute(param2.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoPortConnectInfo)(windows_core::Interface::as_raw(self), param0, pcinfo, core::mem::transmute(param2.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn QueryVideoPortStatus(&self, param0: u32, param1: *mut DDVIDEOPORTSTATUS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryVideoPortStatus)(windows_core::Interface::as_raw(self), param0, param1).ok() @@ -1904,10 +1904,10 @@ impl IDirectDrawVideoPort { (windows_core::Interface::vtable(self).GetColorControls)(windows_core::Interface::as_raw(self), param0).ok() } pub unsafe fn GetInputFormats(&self, lpnumformats: *mut u32, param1: Option<*mut DDPIXELFORMAT>, param2: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInputFormats)(windows_core::Interface::as_raw(self), lpnumformats, core::mem::transmute(param1.unwrap_or(std::ptr::null_mut())), param2).ok() + (windows_core::Interface::vtable(self).GetInputFormats)(windows_core::Interface::as_raw(self), lpnumformats, core::mem::transmute(param1.unwrap_or(core::ptr::null_mut())), param2).ok() } pub unsafe fn GetOutputFormats(&self, param0: *mut DDPIXELFORMAT, lpnumformats: *mut u32, param2: Option<*mut DDPIXELFORMAT>, param3: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputFormats)(windows_core::Interface::as_raw(self), param0, lpnumformats, core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3).ok() + (windows_core::Interface::vtable(self).GetOutputFormats)(windows_core::Interface::as_raw(self), param0, lpnumformats, core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3).ok() } pub unsafe fn GetFieldPolarity(&self, param0: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetFieldPolarity)(windows_core::Interface::as_raw(self), param0).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs index 27fda680b6..e219d0d83d 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectManipulation/mod.rs @@ -109,7 +109,7 @@ impl IDirectManipulationContent { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where @@ -498,7 +498,7 @@ impl IDirectManipulationViewport { where T: windows_core::Interface, { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), &T::IID, result__ as *mut _ as *mut _, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTag(&self, object: P0, id: u32) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs index 278cbfa446..a0e4fd72df 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/DirectWrite/mod.rs @@ -45,7 +45,7 @@ impl IDWriteBitmapRenderTarget { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, renderingparams.param().abi(), textcolor.param().abi(), core::mem::transmute(blackboxrect.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, renderingparams.param().abi(), textcolor.param().abi(), core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn GetMemoryDC(&self) -> super::Gdi::HDC { @@ -61,7 +61,7 @@ impl IDWriteBitmapRenderTarget { (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), transform).ok() } pub unsafe fn SetCurrentTransform(&self, transform: Option<*const DWRITE_MATRIX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(transform.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetSize(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -149,14 +149,14 @@ impl IDWriteBitmapRenderTarget3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, glyphimageformat, textcolor.param().abi(), colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DrawPaintGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, glyphimageformat, textcolor.param().abi(), colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DrawGlyphRunWithColorSupport(&self, baselineoriginx: f32, baselineoriginy: f32, measuringmode: DWRITE_MEASURING_MODE, glyphrun: *const DWRITE_GLYPH_RUN, renderingparams: P0, textcolor: P1, colorpaletteindex: u32, blackboxrect: Option<*mut super::super::Foundation::RECT>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, renderingparams.param().abi(), textcolor.param().abi(), colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DrawGlyphRunWithColorSupport)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, measuringmode, glyphrun, renderingparams.param().abi(), textcolor.param().abi(), colorpaletteindex, core::mem::transmute(blackboxrect.unwrap_or(core::ptr::null_mut()))).ok() } } unsafe impl Send for IDWriteBitmapRenderTarget3 {} @@ -254,7 +254,7 @@ impl IDWriteFactory { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFontFileReference)(windows_core::Interface::as_raw(self), filepath.param().abi(), core::mem::transmute(lastwritetime.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFontFileReference)(windows_core::Interface::as_raw(self), filepath.param().abi(), core::mem::transmute(lastwritetime.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCustomFontFileReference(&self, fontfilereferencekey: *const core::ffi::c_void, fontfilereferencekeysize: u32, fontfileloader: P0) -> windows_core::Result where @@ -325,7 +325,7 @@ impl IDWriteFactory { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), layoutwidth, layoutheight, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), usegdinatural.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGdiCompatibleTextLayout)(windows_core::Interface::as_raw(self), core::mem::transmute(string.as_ptr()), string.len().try_into().unwrap(), textformat.param().abi(), layoutwidth, layoutheight, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateEllipsisTrimmingSign(&self, textformat: P0) -> windows_core::Result where @@ -348,7 +348,7 @@ impl IDWriteFactory { } pub unsafe fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, renderingmode: DWRITE_RENDERING_MODE, measuringmode: DWRITE_MEASURING_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), renderingmode, measuringmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), renderingmode, measuringmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } unsafe impl Send for IDWriteFactory {} @@ -428,7 +428,7 @@ impl IDWriteFactory2 { } pub unsafe fn TranslateColorGlyphRun(&self, baselineoriginx: f32, baselineoriginy: f32, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: Option<*const DWRITE_GLYPH_RUN_DESCRIPTION>, measuringmode: DWRITE_MEASURING_MODE, worldtodevicetransform: Option<*const DWRITE_MATRIX>, colorpaletteindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), measuringmode, core::mem::transmute(worldtodevicetransform.unwrap_or(std::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), baselineoriginx, baselineoriginy, glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), measuringmode, core::mem::transmute(worldtodevicetransform.unwrap_or(core::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, grayscaleenhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE, gridfitmode: DWRITE_GRID_FIT_MODE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -436,7 +436,7 @@ impl IDWriteFactory2 { } pub unsafe fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, transform: Option<*const DWRITE_MATRIX>, renderingmode: DWRITE_RENDERING_MODE, measuringmode: DWRITE_MEASURING_MODE, gridfitmode: DWRITE_GRID_FIT_MODE, antialiasmode: DWRITE_TEXT_ANTIALIAS_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, core::mem::transmute(transform.unwrap_or(std::ptr::null())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, core::mem::transmute(transform.unwrap_or(core::ptr::null())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } unsafe impl Send for IDWriteFactory2 {} @@ -461,7 +461,7 @@ windows_core::imp::interface_hierarchy!(IDWriteFactory3, windows_core::IUnknown, impl IDWriteFactory3 { pub unsafe fn CreateGlyphRunAnalysis(&self, glyphrun: *const DWRITE_GLYPH_RUN, transform: Option<*const DWRITE_MATRIX>, renderingmode: DWRITE_RENDERING_MODE1, measuringmode: DWRITE_MEASURING_MODE, gridfitmode: DWRITE_GRID_FIT_MODE, antialiasmode: DWRITE_TEXT_ANTIALIAS_MODE, baselineoriginx: f32, baselineoriginy: f32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, core::mem::transmute(transform.unwrap_or(std::ptr::null())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateGlyphRunAnalysis)(windows_core::Interface::as_raw(self), glyphrun, core::mem::transmute(transform.unwrap_or(core::ptr::null())), renderingmode, measuringmode, gridfitmode, antialiasmode, baselineoriginx, baselineoriginy, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateCustomRenderingParams(&self, gamma: f32, enhancedcontrast: f32, grayscaleenhancedcontrast: f32, cleartypelevel: f32, pixelgeometry: DWRITE_PIXEL_GEOMETRY, renderingmode: DWRITE_RENDERING_MODE1, gridfitmode: DWRITE_GRID_FIT_MODE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -479,7 +479,7 @@ impl IDWriteFactory3 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFontFaceReference2)(windows_core::Interface::as_raw(self), filepath.param().abi(), core::mem::transmute(lastwritetime.unwrap_or(std::ptr::null())), faceindex, fontsimulations, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFontFaceReference2)(windows_core::Interface::as_raw(self), filepath.param().abi(), core::mem::transmute(lastwritetime.unwrap_or(core::ptr::null())), faceindex, fontsimulations, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetSystemFontSet(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -535,7 +535,7 @@ impl IDWriteFactory4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn TranslateColorGlyphRun(&self, baselineorigin: super::Direct2D::Common::D2D_POINT_2F, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: Option<*const DWRITE_GLYPH_RUN_DESCRIPTION>, desiredglyphimageformats: DWRITE_GLYPH_IMAGE_FORMATS, measuringmode: DWRITE_MEASURING_MODE, worldanddpitransform: Option<*const DWRITE_MATRIX>, colorpaletteindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), desiredglyphimageformats, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(std::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), desiredglyphimageformats, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn ComputeGlyphOrigins(&self, glyphrun: *const DWRITE_GLYPH_RUN, baselineorigin: super::Direct2D::Common::D2D_POINT_2F) -> windows_core::Result { @@ -545,7 +545,7 @@ impl IDWriteFactory4 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn ComputeGlyphOrigins2(&self, glyphrun: *const DWRITE_GLYPH_RUN, measuringmode: DWRITE_MEASURING_MODE, baselineorigin: super::Direct2D::Common::D2D_POINT_2F, worldanddpitransform: Option<*const DWRITE_MATRIX>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ComputeGlyphOrigins2)(windows_core::Interface::as_raw(self), glyphrun, measuringmode, core::mem::transmute(baselineorigin), core::mem::transmute(worldanddpitransform.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ComputeGlyphOrigins2)(windows_core::Interface::as_raw(self), glyphrun, measuringmode, core::mem::transmute(baselineorigin), core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } } unsafe impl Send for IDWriteFactory4 {} @@ -725,7 +725,7 @@ impl IDWriteFactory8 { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn TranslateColorGlyphRun(&self, baselineorigin: super::Direct2D::Common::D2D_POINT_2F, glyphrun: *const DWRITE_GLYPH_RUN, glyphrundescription: Option<*const DWRITE_GLYPH_RUN_DESCRIPTION>, desiredglyphimageformats: DWRITE_GLYPH_IMAGE_FORMATS, paintfeaturelevel: DWRITE_PAINT_FEATURE_LEVEL, measuringmode: DWRITE_MEASURING_MODE, worldanddpitransform: Option<*const DWRITE_MATRIX>, colorpaletteindex: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(std::ptr::null())), desiredglyphimageformats, paintfeaturelevel, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(std::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).TranslateColorGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(baselineorigin), glyphrun, core::mem::transmute(glyphrundescription.unwrap_or(core::ptr::null())), desiredglyphimageformats, paintfeaturelevel, measuringmode, core::mem::transmute(worldanddpitransform.unwrap_or(core::ptr::null())), colorpaletteindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } unsafe impl Send for IDWriteFactory8 {} @@ -1129,7 +1129,7 @@ impl IDWriteFontFace { (windows_core::Interface::vtable(self).GetType)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetFiles(&self, numberoffiles: *mut u32, fontfiles: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFiles)(windows_core::Interface::as_raw(self), numberoffiles, core::mem::transmute(fontfiles.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFiles)(windows_core::Interface::as_raw(self), numberoffiles, core::mem::transmute(fontfiles.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetIndex(&self) -> u32 { (windows_core::Interface::vtable(self).GetIndex)(windows_core::Interface::as_raw(self)) @@ -1168,7 +1168,7 @@ impl IDWriteFontFace { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), emsize, glyphindices, core::mem::transmute(glyphadvances.unwrap_or(std::ptr::null())), core::mem::transmute(glyphoffsets.unwrap_or(std::ptr::null())), glyphcount, issideways.param().abi(), isrighttoleft.param().abi(), geometrysink.param().abi()).ok() + (windows_core::Interface::vtable(self).GetGlyphRunOutline)(windows_core::Interface::as_raw(self), emsize, glyphindices, core::mem::transmute(glyphadvances.unwrap_or(core::ptr::null())), core::mem::transmute(glyphoffsets.unwrap_or(core::ptr::null())), glyphcount, issideways.param().abi(), isrighttoleft.param().abi(), geometrysink.param().abi()).ok() } pub unsafe fn GetRecommendedRenderingMode(&self, emsize: f32, pixelsperdip: f32, measuringmode: DWRITE_MEASURING_MODE, renderingparams: P0) -> windows_core::Result where @@ -1178,14 +1178,14 @@ impl IDWriteFontFace { (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, measuringmode, renderingparams.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, fontfacemetrics: *mut DWRITE_FONT_METRICS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), fontfacemetrics).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), fontfacemetrics).ok() } pub unsafe fn GetGdiCompatibleGlyphMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P0, glyphindices: *const u16, glyphcount: u32, glyphmetrics: *mut DWRITE_GLYPH_METRICS, issideways: P1) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), usegdinatural.param().abi(), glyphindices, glyphcount, glyphmetrics, issideways.param().abi()).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), glyphindices, glyphcount, glyphmetrics, issideways.param().abi()).ok() } } unsafe impl Send for IDWriteFontFace {} @@ -1225,7 +1225,7 @@ impl IDWriteFontFace1 { (windows_core::Interface::vtable(self).GetMetrics)(windows_core::Interface::as_raw(self), fontmetrics) } pub unsafe fn GetGdiCompatibleMetrics(&self, emsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, fontmetrics: *mut DWRITE_FONT_METRICS1) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), fontmetrics).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleMetrics)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), fontmetrics).ok() } pub unsafe fn GetCaretMetrics(&self) -> DWRITE_CARET_METRICS { let mut result__ = core::mem::zeroed(); @@ -1249,7 +1249,7 @@ impl IDWriteFontFace1 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(std::ptr::null())), usegdinatural.param().abi(), issideways.param().abi(), glyphcount, glyphindices, glyphadvances).ok() + (windows_core::Interface::vtable(self).GetGdiCompatibleGlyphAdvances)(windows_core::Interface::as_raw(self), emsize, pixelsperdip, core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), issideways.param().abi(), glyphcount, glyphindices, glyphadvances).ok() } pub unsafe fn GetKerningPairAdjustments(&self, glyphcount: u32, glyphindices: *const u16, glyphadvanceadjustments: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetKerningPairAdjustments)(windows_core::Interface::as_raw(self), glyphcount, glyphindices, glyphadvanceadjustments).ok() @@ -1262,7 +1262,7 @@ impl IDWriteFontFace1 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(std::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, &mut result__).map(|| result__) } pub unsafe fn GetVerticalGlyphVariants(&self, glyphcount: u32, nominalglyphindices: *const u16, verticalglyphindices: *mut u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetVerticalGlyphVariants)(windows_core::Interface::as_raw(self), glyphcount, nominalglyphindices, verticalglyphindices).ok() @@ -1315,7 +1315,7 @@ impl IDWriteFontFace2 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(std::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode, gridfitmode).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode, gridfitmode).ok() } } unsafe impl Send for IDWriteFontFace2 {} @@ -1375,7 +1375,7 @@ impl IDWriteFontFace3 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(std::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode, gridfitmode).ok() + (windows_core::Interface::vtable(self).GetRecommendedRenderingMode)(windows_core::Interface::as_raw(self), fontemsize, dpix, dpiy, core::mem::transmute(transform.unwrap_or(core::ptr::null())), issideways.param().abi(), outlinethreshold, measuringmode, renderingparams.param().abi(), renderingmode, gridfitmode).ok() } pub unsafe fn IsCharacterLocal(&self, unicodevalue: u32) -> super::super::Foundation::BOOL { (windows_core::Interface::vtable(self).IsCharacterLocal)(windows_core::Interface::as_raw(self), unicodevalue) @@ -1845,7 +1845,7 @@ impl IDWriteFontFile { (windows_core::Interface::vtable(self).GetLoader)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Analyze(&self, issupportedfonttype: *mut super::super::Foundation::BOOL, fontfiletype: *mut DWRITE_FONT_FILE_TYPE, fontfacetype: Option<*mut DWRITE_FONT_FACE_TYPE>, numberoffaces: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Analyze)(windows_core::Interface::as_raw(self), issupportedfonttype, fontfiletype, core::mem::transmute(fontfacetype.unwrap_or(std::ptr::null_mut())), numberoffaces).ok() + (windows_core::Interface::vtable(self).Analyze)(windows_core::Interface::as_raw(self), issupportedfonttype, fontfiletype, core::mem::transmute(fontfacetype.unwrap_or(core::ptr::null_mut())), numberoffaces).ok() } } unsafe impl Send for IDWriteFontFile {} @@ -2172,7 +2172,7 @@ windows_core::imp::interface_hierarchy!(IDWriteFontSet1, windows_core::IUnknown, impl IDWriteFontSet1 { pub unsafe fn GetMatchingFonts(&self, fontproperty: Option<*const DWRITE_FONT_PROPERTY>, fontaxisvalues: &[DWRITE_FONT_AXIS_VALUE]) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMatchingFonts)(windows_core::Interface::as_raw(self), core::mem::transmute(fontproperty.unwrap_or(std::ptr::null())), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetMatchingFonts)(windows_core::Interface::as_raw(self), core::mem::transmute(fontproperty.unwrap_or(core::ptr::null())), core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetFirstFontResources(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2630,7 +2630,7 @@ impl IDWriteInlineObject { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), renderer.param().abi(), originx, originy, issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), renderer.param().abi(), originx, originy, issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() } pub unsafe fn GetMetrics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2755,7 +2755,7 @@ windows_core::imp::interface_hierarchy!(IDWritePaintReader, windows_core::IUnkno impl IDWritePaintReader { #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn SetCurrentGlyph(&self, glyphindex: u32, paintelement: *mut DWRITE_PAINT_ELEMENT, structsize: u32, clipbox: *mut super::Direct2D::Common::D2D_RECT_F, glyphattributes: Option<*mut DWRITE_PAINT_ATTRIBUTES>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetCurrentGlyph)(windows_core::Interface::as_raw(self), glyphindex, paintelement, structsize, clipbox, core::mem::transmute(glyphattributes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetCurrentGlyph)(windows_core::Interface::as_raw(self), glyphindex, paintelement, structsize, clipbox, core::mem::transmute(glyphattributes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextColor(&self, textcolor: *const DWRITE_COLOR_F) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetTextColor)(windows_core::Interface::as_raw(self), textcolor).ok() @@ -2823,14 +2823,14 @@ windows_core::imp::interface_hierarchy!(IDWritePixelSnapping, windows_core::IUnk impl IDWritePixelSnapping { pub unsafe fn IsPixelSnappingDisabled(&self, clientdrawingcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).IsPixelSnappingDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).IsPixelSnappingDisabled)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } pub unsafe fn GetCurrentTransform(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, transform: *mut DWRITE_MATRIX) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), transform).ok() + (windows_core::Interface::vtable(self).GetCurrentTransform)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), transform).ok() } pub unsafe fn GetPixelsPerDip(&self, clientdrawingcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetPixelsPerDip)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetPixelsPerDip)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } } unsafe impl Send for IDWritePixelSnapping {} @@ -3207,7 +3207,7 @@ impl IDWriteTextAnalyzer { P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlyphs)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), scriptanalysis, localename.param().abi(), numbersubstitution.param().abi(), core::mem::transmute(features.unwrap_or(std::ptr::null())), core::mem::transmute(featurerangelengths.unwrap_or(std::ptr::null())), featureranges, maxglyphcount, clustermap, textprops, glyphindices, glyphprops, actualglyphcount).ok() + (windows_core::Interface::vtable(self).GetGlyphs)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), scriptanalysis, localename.param().abi(), numbersubstitution.param().abi(), core::mem::transmute(features.unwrap_or(core::ptr::null())), core::mem::transmute(featurerangelengths.unwrap_or(core::ptr::null())), featureranges, maxglyphcount, clustermap, textprops, glyphindices, glyphprops, actualglyphcount).ok() } pub unsafe fn GetGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *mut DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P1, fontemsize: f32, issideways: P2, isrighttoleft: P3, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P4, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where @@ -3217,7 +3217,7 @@ impl IDWriteTextAnalyzer { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).GetGlyphPlacements)(windows_core::Interface::as_raw(self), textstring.param().abi(), clustermap, textprops, textlength, glyphindices, glyphprops, glyphcount, fontface.param().abi(), fontemsize, issideways.param().abi(), isrighttoleft.param().abi(), scriptanalysis, localename.param().abi(), core::mem::transmute(features.unwrap_or(std::ptr::null())), core::mem::transmute(featurerangelengths.unwrap_or(std::ptr::null())), featureranges, glyphadvances, glyphoffsets).ok() + (windows_core::Interface::vtable(self).GetGlyphPlacements)(windows_core::Interface::as_raw(self), textstring.param().abi(), clustermap, textprops, textlength, glyphindices, glyphprops, glyphcount, fontface.param().abi(), fontemsize, issideways.param().abi(), isrighttoleft.param().abi(), scriptanalysis, localename.param().abi(), core::mem::transmute(features.unwrap_or(core::ptr::null())), core::mem::transmute(featurerangelengths.unwrap_or(core::ptr::null())), featureranges, glyphadvances, glyphoffsets).ok() } pub unsafe fn GetGdiCompatibleGlyphPlacements(&self, textstring: P0, clustermap: *const u16, textprops: *const DWRITE_SHAPING_TEXT_PROPERTIES, textlength: u32, glyphindices: *const u16, glyphprops: *const DWRITE_SHAPING_GLYPH_PROPERTIES, glyphcount: u32, fontface: P1, fontemsize: f32, pixelsperdip: f32, transform: Option<*const DWRITE_MATRIX>, usegdinatural: P2, issideways: P3, isrighttoleft: P4, scriptanalysis: *const DWRITE_SCRIPT_ANALYSIS, localename: P5, features: Option<*const *const DWRITE_TYPOGRAPHIC_FEATURES>, featurerangelengths: Option<*const u32>, featureranges: u32, glyphadvances: *mut f32, glyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where @@ -3240,14 +3240,14 @@ impl IDWriteTextAnalyzer { fontface.param().abi(), fontemsize, pixelsperdip, - core::mem::transmute(transform.unwrap_or(std::ptr::null())), + core::mem::transmute(transform.unwrap_or(core::ptr::null())), usegdinatural.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), scriptanalysis, localename.param().abi(), - core::mem::transmute(features.unwrap_or(std::ptr::null())), - core::mem::transmute(featurerangelengths.unwrap_or(std::ptr::null())), + core::mem::transmute(features.unwrap_or(core::ptr::null())), + core::mem::transmute(featurerangelengths.unwrap_or(core::ptr::null())), featureranges, glyphadvances, glyphoffsets, @@ -3310,7 +3310,7 @@ impl IDWriteTextAnalyzer1 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), istextsimple, textlengthread, core::mem::transmute(glyphindices.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextComplexity)(windows_core::Interface::as_raw(self), textstring.param().abi(), textlength, fontface.param().abi(), istextsimple, textlengthread, core::mem::transmute(glyphindices.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetJustificationOpportunities(&self, fontface: P0, fontemsize: f32, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, textstring: P1, clustermap: *const u16, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, justificationopportunities: *mut DWRITE_JUSTIFICATION_OPPORTUNITY) -> windows_core::Result<()> where @@ -3320,13 +3320,13 @@ impl IDWriteTextAnalyzer1 { (windows_core::Interface::vtable(self).GetJustificationOpportunities)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, textstring.param().abi(), clustermap, glyphproperties, justificationopportunities).ok() } pub unsafe fn JustifyGlyphAdvances(&self, linewidth: f32, glyphcount: u32, justificationopportunities: *const DWRITE_JUSTIFICATION_OPPORTUNITY, glyphadvances: *const f32, glyphoffsets: *const DWRITE_GLYPH_OFFSET, justifiedglyphadvances: *mut f32, justifiedglyphoffsets: Option<*mut DWRITE_GLYPH_OFFSET>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).JustifyGlyphAdvances)(windows_core::Interface::as_raw(self), linewidth, glyphcount, justificationopportunities, glyphadvances, glyphoffsets, justifiedglyphadvances, core::mem::transmute(justifiedglyphoffsets.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).JustifyGlyphAdvances)(windows_core::Interface::as_raw(self), linewidth, glyphcount, justificationopportunities, glyphadvances, glyphoffsets, justifiedglyphadvances, core::mem::transmute(justifiedglyphoffsets.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetJustifiedGlyphs(&self, fontface: P0, fontemsize: f32, scriptanalysis: DWRITE_SCRIPT_ANALYSIS, textlength: u32, glyphcount: u32, maxglyphcount: u32, clustermap: Option<*const u16>, glyphindices: *const u16, glyphadvances: *const f32, justifiedglyphadvances: *const f32, justifiedglyphoffsets: *const DWRITE_GLYPH_OFFSET, glyphproperties: *const DWRITE_SHAPING_GLYPH_PROPERTIES, actualglyphcount: *mut u32, modifiedclustermap: Option<*mut u16>, modifiedglyphindices: *mut u16, modifiedglyphadvances: *mut f32, modifiedglyphoffsets: *mut DWRITE_GLYPH_OFFSET) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetJustifiedGlyphs)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, maxglyphcount, core::mem::transmute(clustermap.unwrap_or(std::ptr::null())), glyphindices, glyphadvances, justifiedglyphadvances, justifiedglyphoffsets, glyphproperties, actualglyphcount, core::mem::transmute(modifiedclustermap.unwrap_or(std::ptr::null_mut())), modifiedglyphindices, modifiedglyphadvances, modifiedglyphoffsets).ok() + (windows_core::Interface::vtable(self).GetJustifiedGlyphs)(windows_core::Interface::as_raw(self), fontface.param().abi(), fontemsize, core::mem::transmute(scriptanalysis), textlength, glyphcount, maxglyphcount, core::mem::transmute(clustermap.unwrap_or(core::ptr::null())), glyphindices, glyphadvances, justifiedglyphadvances, justifiedglyphoffsets, glyphproperties, actualglyphcount, core::mem::transmute(modifiedclustermap.unwrap_or(core::ptr::null_mut())), modifiedglyphindices, modifiedglyphadvances, modifiedglyphoffsets).ok() } } unsafe impl Send for IDWriteTextAnalyzer1 {} @@ -3700,52 +3700,52 @@ impl IDWriteTextLayout { (windows_core::Interface::vtable(self).GetMaxHeight)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetFontCollection(&self, currentposition: u32, fontcollection: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontCollection)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontcollection), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontCollection)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontcollection), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontFamilyNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontFamilyNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontFamilyName(&self, currentposition: u32, fontfamilyname: &mut [u16], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontFamilyName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontFamilyName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontfamilyname.as_ptr()), fontfamilyname.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontWeight(&self, currentposition: u32, fontweight: *mut DWRITE_FONT_WEIGHT, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontWeight)(windows_core::Interface::as_raw(self), currentposition, fontweight, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontWeight)(windows_core::Interface::as_raw(self), currentposition, fontweight, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontStyle(&self, currentposition: u32, fontstyle: *mut DWRITE_FONT_STYLE, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), currentposition, fontstyle, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontStyle)(windows_core::Interface::as_raw(self), currentposition, fontstyle, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontStretch(&self, currentposition: u32, fontstretch: *mut DWRITE_FONT_STRETCH, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontStretch)(windows_core::Interface::as_raw(self), currentposition, fontstretch, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontStretch)(windows_core::Interface::as_raw(self), currentposition, fontstretch, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFontSize(&self, currentposition: u32, fontsize: *mut f32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), currentposition, fontsize, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontSize)(windows_core::Interface::as_raw(self), currentposition, fontsize, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetUnderline(&self, currentposition: u32, hasunderline: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetUnderline)(windows_core::Interface::as_raw(self), currentposition, hasunderline, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUnderline)(windows_core::Interface::as_raw(self), currentposition, hasunderline, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStrikethrough(&self, currentposition: u32, hasstrikethrough: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStrikethrough)(windows_core::Interface::as_raw(self), currentposition, hasstrikethrough, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStrikethrough)(windows_core::Interface::as_raw(self), currentposition, hasstrikethrough, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetDrawingEffect(&self, currentposition: u32, drawingeffect: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDrawingEffect)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(drawingeffect), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDrawingEffect)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(drawingeffect), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetInlineObject(&self, currentposition: u32, inlineobject: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(inlineobject), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInlineObject)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(inlineobject), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypography(&self, currentposition: u32, typography: *mut Option, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypography)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(typography), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypography)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(typography), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleNameLength(&self, currentposition: u32, namelength: *mut u32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocaleNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocaleNameLength)(windows_core::Interface::as_raw(self), currentposition, namelength, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLocaleName(&self, currentposition: u32, localename: &mut [u16], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocaleName)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(localename.as_ptr()), localename.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Draw(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, renderer: P0, originx: f32, originy: f32) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), renderer.param().abi(), originx, originy).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), renderer.param().abi(), originx, originy).ok() } pub unsafe fn GetLineMetrics(&self, linemetrics: Option<&mut [DWRITE_LINE_METRICS]>, actuallinecount: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetLineMetrics)(windows_core::Interface::as_raw(self), core::mem::transmute(linemetrics.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), linemetrics.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), actuallinecount).ok() @@ -3838,13 +3838,13 @@ impl IDWriteTextLayout1 { (windows_core::Interface::vtable(self).SetPairKerning)(windows_core::Interface::as_raw(self), ispairkerningenabled.param().abi(), core::mem::transmute(textrange)).ok() } pub unsafe fn GetPairKerning(&self, currentposition: u32, ispairkerningenabled: *mut super::super::Foundation::BOOL, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), currentposition, ispairkerningenabled, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPairKerning)(windows_core::Interface::as_raw(self), currentposition, ispairkerningenabled, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCharacterSpacing(&self, leadingspacing: f32, trailingspacing: f32, minimumadvancewidth: f32, textrange: DWRITE_TEXT_RANGE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCharacterSpacing)(windows_core::Interface::as_raw(self), leadingspacing, trailingspacing, minimumadvancewidth, core::mem::transmute(textrange)).ok() } pub unsafe fn GetCharacterSpacing(&self, currentposition: u32, leadingspacing: *mut f32, trailingspacing: *mut f32, minimumadvancewidth: *mut f32, textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCharacterSpacing)(windows_core::Interface::as_raw(self), currentposition, leadingspacing, trailingspacing, minimumadvancewidth, core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCharacterSpacing)(windows_core::Interface::as_raw(self), currentposition, leadingspacing, trailingspacing, minimumadvancewidth, core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } } unsafe impl Send for IDWriteTextLayout1 {} @@ -3964,7 +3964,7 @@ impl IDWriteTextLayout4 { (windows_core::Interface::vtable(self).GetFontAxisValueCount)(windows_core::Interface::as_raw(self), currentposition) } pub unsafe fn GetFontAxisValues(&self, currentposition: u32, fontaxisvalues: &mut [DWRITE_FONT_AXIS_VALUE], textrange: Option<*mut DWRITE_TEXT_RANGE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFontAxisValues)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFontAxisValues)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(fontaxisvalues.as_ptr()), fontaxisvalues.len().try_into().unwrap(), core::mem::transmute(textrange.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetAutomaticFontAxes(&self) -> DWRITE_AUTOMATIC_FONT_AXES { (windows_core::Interface::vtable(self).GetAutomaticFontAxes)(windows_core::Interface::as_raw(self)) @@ -3997,19 +3997,19 @@ impl IDWriteTextRenderer { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, measuringmode, glyphrun, glyphrundescription, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, measuringmode, glyphrun, glyphrundescription, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawUnderline(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, underline, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, underline, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawStrikethrough(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, strikethrough, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, strikethrough, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, inlineobject: P0, issideways: P1, isrighttoleft: P2, clientdrawingeffect: P3) -> windows_core::Result<()> where @@ -4018,7 +4018,7 @@ impl IDWriteTextRenderer { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), originx, originy, inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), originx, originy, inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() } } unsafe impl Send for IDWriteTextRenderer {} @@ -4044,19 +4044,19 @@ impl IDWriteTextRenderer1 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, measuringmode, glyphrun, glyphrundescription, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawGlyphRun)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, measuringmode, glyphrun, glyphrundescription, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawUnderline(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, underline: *const DWRITE_UNDERLINE, clientdrawingeffect: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, underline, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawUnderline)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, underline, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawStrikethrough(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, baselineoriginx: f32, baselineoriginy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, strikethrough: *const DWRITE_STRIKETHROUGH, clientdrawingeffect: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, strikethrough, clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawStrikethrough)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), baselineoriginx, baselineoriginy, orientationangle, strikethrough, clientdrawingeffect.param().abi()).ok() } pub unsafe fn DrawInlineObject(&self, clientdrawingcontext: Option<*const core::ffi::c_void>, originx: f32, originy: f32, orientationangle: DWRITE_GLYPH_ORIENTATION_ANGLE, inlineobject: P0, issideways: P1, isrighttoleft: P2, clientdrawingeffect: P3) -> windows_core::Result<()> where @@ -4065,7 +4065,7 @@ impl IDWriteTextRenderer1 { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(std::ptr::null())), originx, originy, orientationangle, inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() + (windows_core::Interface::vtable(self).DrawInlineObject)(windows_core::Interface::as_raw(self), core::mem::transmute(clientdrawingcontext.unwrap_or(core::ptr::null())), originx, originy, orientationangle, inlineobject.param().abi(), issideways.param().abi(), isrighttoleft.param().abi(), clientdrawingeffect.param().abi()).ok() } } unsafe impl Send for IDWriteTextRenderer1 {} diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs index 702310e4a1..4e3661b3c2 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dwm/mod.rs @@ -166,7 +166,7 @@ where P1: windows_core::Param, { windows_targets::link!("dwmapi.dll" "system" fn DwmSetIconicLivePreviewBitmap(hwnd : super::super::Foundation:: HWND, hbmp : super::Gdi:: HBITMAP, pptclient : *const super::super::Foundation:: POINT, dwsitflags : u32) -> windows_core::HRESULT); - DwmSetIconicLivePreviewBitmap(hwnd.param().abi(), hbmp.param().abi(), core::mem::transmute(pptclient.unwrap_or(std::ptr::null())), dwsitflags).ok() + DwmSetIconicLivePreviewBitmap(hwnd.param().abi(), hbmp.param().abi(), core::mem::transmute(pptclient.unwrap_or(core::ptr::null())), dwsitflags).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs index c4e50abc40..82453709b6 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Dxgi/mod.rs @@ -305,7 +305,7 @@ impl IDXGIDevice { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateSurface(&self, pdesc: *const DXGI_SURFACE_DESC, usage: DXGI_USAGE, psharedresource: Option<*const DXGI_SHARED_RESOURCE>, ppsurface: &mut [Option]) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, core::mem::transmute(psharedresource.unwrap_or(std::ptr::null())), core::mem::transmute(ppsurface.as_ptr())).ok() + (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), pdesc, ppsurface.len().try_into().unwrap(), usage, core::mem::transmute(psharedresource.unwrap_or(core::ptr::null())), core::mem::transmute(ppsurface.as_ptr())).ok() } pub unsafe fn QueryResourceResidency(&self, ppresources: *const Option, presidencystatus: *mut DXGI_RESIDENCY, numresources: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).QueryResourceResidency)(windows_core::Interface::as_raw(self), core::mem::transmute(ppresources), presidencystatus, numresources).ok() @@ -370,7 +370,7 @@ impl IDXGIDevice2 { (windows_core::Interface::vtable(self).OfferResources)(windows_core::Interface::as_raw(self), ppresources.len().try_into().unwrap(), core::mem::transmute(ppresources.as_ptr()), priority).ok() } pub unsafe fn ReclaimResources(&self, numresources: u32, ppresources: *const Option, pdiscarded: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReclaimResources)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), core::mem::transmute(pdiscarded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReclaimResources)(windows_core::Interface::as_raw(self), numresources, core::mem::transmute(ppresources), core::mem::transmute(pdiscarded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EnqueueSetEvent(&self, hevent: P0) -> windows_core::Result<()> where @@ -580,7 +580,7 @@ impl IDXGIFactory2 { P2: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSwapChainForHwnd)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hwnd.param().abi(), pdesc, core::mem::transmute(pfullscreendesc.unwrap_or(std::ptr::null())), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateSwapChainForHwnd)(windows_core::Interface::as_raw(self), pdevice.param().abi(), hwnd.param().abi(), pdesc, core::mem::transmute(pfullscreendesc.unwrap_or(core::ptr::null())), prestricttooutput.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn CreateSwapChainForCoreWindow(&self, pdevice: P0, pwindow: P1, pdesc: *const DXGI_SWAP_CHAIN_DESC1, prestricttooutput: P2) -> windows_core::Result @@ -850,7 +850,7 @@ impl IDXGIInfoQueue { (windows_core::Interface::vtable(self).ClearStoredMessages)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) } pub unsafe fn GetMessage(&self, producer: windows_core::GUID, messageindex: u64, pmessage: Option<*mut DXGI_INFO_QUEUE_MESSAGE>, pmessagebytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), messageindex, core::mem::transmute(pmessage.unwrap_or(std::ptr::null_mut())), pmessagebytelength).ok() + (windows_core::Interface::vtable(self).GetMessage)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), messageindex, core::mem::transmute(pmessage.unwrap_or(core::ptr::null_mut())), pmessagebytelength).ok() } pub unsafe fn GetNumStoredMessagesAllowedByRetrievalFilters(&self, producer: windows_core::GUID) -> u64 { (windows_core::Interface::vtable(self).GetNumStoredMessagesAllowedByRetrievalFilters)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) @@ -874,7 +874,7 @@ impl IDXGIInfoQueue { (windows_core::Interface::vtable(self).AddStorageFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter).ok() } pub unsafe fn GetStorageFilter(&self, producer: windows_core::GUID, pfilter: Option<*mut DXGI_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearStorageFilter(&self, producer: windows_core::GUID) { (windows_core::Interface::vtable(self).ClearStorageFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) @@ -901,7 +901,7 @@ impl IDXGIInfoQueue { (windows_core::Interface::vtable(self).AddRetrievalFilterEntries)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), pfilter).ok() } pub unsafe fn GetRetrievalFilter(&self, producer: windows_core::GUID, pfilter: Option<*mut DXGI_INFO_QUEUE_FILTER>, pfilterbytelength: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(pfilter.unwrap_or(std::ptr::null_mut())), pfilterbytelength).ok() + (windows_core::Interface::vtable(self).GetRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer), core::mem::transmute(pfilter.unwrap_or(core::ptr::null_mut())), pfilterbytelength).ok() } pub unsafe fn ClearRetrievalFilter(&self, producer: windows_core::GUID) { (windows_core::Interface::vtable(self).ClearRetrievalFilter)(windows_core::Interface::as_raw(self), core::mem::transmute(producer)) @@ -1095,7 +1095,7 @@ impl IDXGIOutput { } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDisplayModeList(&self, enumformat: Common::DXGI_FORMAT, flags: DXGI_ENUM_MODES, pnummodes: *mut u32, pdesc: Option<*mut Common::DXGI_MODE_DESC>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDisplayModeList)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes, core::mem::transmute(pdesc.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayModeList)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes, core::mem::transmute(pdesc.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn FindClosestMatchingMode(&self, pmodetomatch: *const Common::DXGI_MODE_DESC, pclosestmatch: *mut Common::DXGI_MODE_DESC, pconcerneddevice: P0) -> windows_core::Result<()> @@ -1192,7 +1192,7 @@ windows_core::imp::interface_hierarchy!(IDXGIOutput1, windows_core::IUnknown, ID impl IDXGIOutput1 { #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDisplayModeList1(&self, enumformat: Common::DXGI_FORMAT, flags: DXGI_ENUM_MODES, pnummodes: *mut u32, pdesc: Option<*mut DXGI_MODE_DESC1>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDisplayModeList1)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes, core::mem::transmute(pdesc.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayModeList1)(windows_core::Interface::as_raw(self), enumformat, flags, pnummodes, core::mem::transmute(pdesc.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn FindClosestMatchingMode1(&self, pmodetomatch: *const DXGI_MODE_DESC1, pclosestmatch: *mut DXGI_MODE_DESC1, pconcerneddevice: P0) -> windows_core::Result<()> @@ -1474,7 +1474,7 @@ impl IDXGIResource1 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(pattributes.unwrap_or(std::ptr::null())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).CreateSharedHandle)(windows_core::Interface::as_raw(self), core::mem::transmute(pattributes.unwrap_or(core::ptr::null())), dwaccess, lpname.param().abi(), &mut result__).map(|| result__) } } unsafe impl Send for IDXGIResource1 {} @@ -1539,7 +1539,7 @@ impl IDXGISurface1 { (windows_core::Interface::vtable(self).GetDC)(windows_core::Interface::as_raw(self), discard.param().abi(), &mut result__).map(|| result__) } pub unsafe fn ReleaseDC(&self, pdirtyrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(pdirtyrect.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReleaseDC)(windows_core::Interface::as_raw(self), core::mem::transmute(pdirtyrect.unwrap_or(core::ptr::null()))).ok() } } unsafe impl Send for IDXGISurface1 {} @@ -1604,7 +1604,7 @@ impl IDXGISwapChain { (windows_core::Interface::vtable(self).SetFullscreenState)(windows_core::Interface::as_raw(self), fullscreen.param().abi(), ptarget.param().abi()).ok() } pub unsafe fn GetFullscreenState(&self, pfullscreen: Option<*mut super::super::Foundation::BOOL>, pptarget: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFullscreenState)(windows_core::Interface::as_raw(self), core::mem::transmute(pfullscreen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptarget.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFullscreenState)(windows_core::Interface::as_raw(self), core::mem::transmute(pfullscreen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptarget.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Dxgi_Common")] pub unsafe fn GetDesc(&self) -> windows_core::Result { 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 9485d98b68..526a9a51b9 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Gdi/mod.rs @@ -9,7 +9,7 @@ where #[inline] pub unsafe fn AddFontMemResourceEx(pfileview: *const core::ffi::c_void, cjsize: u32, pvresrved: Option<*const core::ffi::c_void>, pnumfonts: *const u32) -> super::super::Foundation::HANDLE { windows_targets::link!("gdi32.dll" "system" fn AddFontMemResourceEx(pfileview : *const core::ffi::c_void, cjsize : u32, pvresrved : *const core::ffi::c_void, pnumfonts : *const u32) -> super::super::Foundation:: HANDLE); - AddFontMemResourceEx(pfileview, cjsize, core::mem::transmute(pvresrved.unwrap_or(std::ptr::null())), pnumfonts) + AddFontMemResourceEx(pfileview, cjsize, core::mem::transmute(pvresrved.unwrap_or(core::ptr::null())), pnumfonts) } #[inline] pub unsafe fn AddFontResourceA(param0: P0) -> i32 @@ -25,7 +25,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn AddFontResourceExA(name : windows_core::PCSTR, fl : FONT_RESOURCE_CHARACTERISTICS, res : *const core::ffi::c_void) -> i32); - AddFontResourceExA(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(std::ptr::null()))) + AddFontResourceExA(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AddFontResourceExW(name: P0, fl: FONT_RESOURCE_CHARACTERISTICS, res: Option<*const core::ffi::c_void>) -> i32 @@ -33,7 +33,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn AddFontResourceExW(name : windows_core::PCWSTR, fl : FONT_RESOURCE_CHARACTERISTICS, res : *const core::ffi::c_void) -> i32); - AddFontResourceExW(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(std::ptr::null()))) + AddFontResourceExW(name.param().abi(), fl, core::mem::transmute(res.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AddFontResourceW(param0: P0) -> i32 @@ -120,7 +120,7 @@ where #[inline] pub unsafe fn ChangeDisplaySettingsA(lpdevmode: Option<*const DEVMODEA>, dwflags: CDS_TYPE) -> DISP_CHANGE { windows_targets::link!("user32.dll" "system" fn ChangeDisplaySettingsA(lpdevmode : *const DEVMODEA, dwflags : CDS_TYPE) -> DISP_CHANGE); - ChangeDisplaySettingsA(core::mem::transmute(lpdevmode.unwrap_or(std::ptr::null())), dwflags) + ChangeDisplaySettingsA(core::mem::transmute(lpdevmode.unwrap_or(core::ptr::null())), dwflags) } #[inline] pub unsafe fn ChangeDisplaySettingsExA(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEA>, hwnd: P1, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE @@ -129,7 +129,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ChangeDisplaySettingsExA(lpszdevicename : windows_core::PCSTR, lpdevmode : *const DEVMODEA, hwnd : super::super::Foundation:: HWND, dwflags : CDS_TYPE, lparam : *const core::ffi::c_void) -> DISP_CHANGE); - ChangeDisplaySettingsExA(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(std::ptr::null())), hwnd.param().abi(), dwflags, core::mem::transmute(lparam.unwrap_or(std::ptr::null()))) + ChangeDisplaySettingsExA(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::ptr::null())), hwnd.param().abi(), dwflags, core::mem::transmute(lparam.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ChangeDisplaySettingsExW(lpszdevicename: P0, lpdevmode: Option<*const DEVMODEW>, hwnd: P1, dwflags: CDS_TYPE, lparam: Option<*const core::ffi::c_void>) -> DISP_CHANGE @@ -138,12 +138,12 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ChangeDisplaySettingsExW(lpszdevicename : windows_core::PCWSTR, lpdevmode : *const DEVMODEW, hwnd : super::super::Foundation:: HWND, dwflags : CDS_TYPE, lparam : *const core::ffi::c_void) -> DISP_CHANGE); - ChangeDisplaySettingsExW(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(std::ptr::null())), hwnd.param().abi(), dwflags, core::mem::transmute(lparam.unwrap_or(std::ptr::null()))) + ChangeDisplaySettingsExW(lpszdevicename.param().abi(), core::mem::transmute(lpdevmode.unwrap_or(core::ptr::null())), hwnd.param().abi(), dwflags, core::mem::transmute(lparam.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ChangeDisplaySettingsW(lpdevmode: Option<*const DEVMODEW>, dwflags: CDS_TYPE) -> DISP_CHANGE { windows_targets::link!("user32.dll" "system" fn ChangeDisplaySettingsW(lpdevmode : *const DEVMODEW, dwflags : CDS_TYPE) -> DISP_CHANGE); - ChangeDisplaySettingsW(core::mem::transmute(lpdevmode.unwrap_or(std::ptr::null())), dwflags) + ChangeDisplaySettingsW(core::mem::transmute(lpdevmode.unwrap_or(core::ptr::null())), dwflags) } #[inline] pub unsafe fn Chord(hdc: P0, x1: i32, y1: i32, x2: i32, y2: i32, x3: i32, y3: i32, x4: i32, y4: i32) -> super::super::Foundation::BOOL @@ -244,7 +244,7 @@ pub unsafe fn CopyRect(lprcdst: *mut super::super::Foundation::RECT, lprcsrc: *c #[inline] pub unsafe fn CreateBitmap(nwidth: i32, nheight: i32, nplanes: u32, nbitcount: u32, lpbits: Option<*const core::ffi::c_void>) -> HBITMAP { windows_targets::link!("gdi32.dll" "system" fn CreateBitmap(nwidth : i32, nheight : i32, nplanes : u32, nbitcount : u32, lpbits : *const core::ffi::c_void) -> HBITMAP); - CreateBitmap(nwidth, nheight, nplanes, nbitcount, core::mem::transmute(lpbits.unwrap_or(std::ptr::null()))) + CreateBitmap(nwidth, nheight, nplanes, nbitcount, core::mem::transmute(lpbits.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateBitmapIndirect(pbm: *const BITMAP) -> HBITMAP { @@ -280,7 +280,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateDCA(pwszdriver : windows_core::PCSTR, pwszdevice : windows_core::PCSTR, pszport : windows_core::PCSTR, pdm : *const DEVMODEA) -> HDC); - CreateDCA(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(std::ptr::null()))) + CreateDCA(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateDCW(pwszdriver: P0, pwszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -290,7 +290,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateDCW(pwszdriver : windows_core::PCWSTR, pwszdevice : windows_core::PCWSTR, pszport : windows_core::PCWSTR, pdm : *const DEVMODEW) -> HDC); - CreateDCW(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(std::ptr::null()))) + CreateDCW(pwszdriver.param().abi(), pwszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateDIBPatternBrush(h: P0, iusage: DIB_USAGE) -> HBRUSH @@ -321,7 +321,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateDIBitmap(hdc : HDC, pbmih : *const BITMAPINFOHEADER, flinit : u32, pjbits : *const core::ffi::c_void, pbmi : *const BITMAPINFO, iusage : DIB_USAGE) -> HBITMAP); - CreateDIBitmap(hdc.param().abi(), core::mem::transmute(pbmih.unwrap_or(std::ptr::null())), flinit, core::mem::transmute(pjbits.unwrap_or(std::ptr::null())), core::mem::transmute(pbmi.unwrap_or(std::ptr::null())), iusage) + CreateDIBitmap(hdc.param().abi(), core::mem::transmute(pbmih.unwrap_or(core::ptr::null())), flinit, core::mem::transmute(pjbits.unwrap_or(core::ptr::null())), core::mem::transmute(pbmi.unwrap_or(core::ptr::null())), iusage) } #[inline] pub unsafe fn CreateDiscardableBitmap(hdc: P0, cx: i32, cy: i32) -> HBITMAP @@ -349,7 +349,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateEnhMetaFileA(hdc : HDC, lpfilename : windows_core::PCSTR, lprc : *const super::super::Foundation:: RECT, lpdesc : windows_core::PCSTR) -> HDC); - CreateEnhMetaFileA(hdc.param().abi(), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(std::ptr::null())), lpdesc.param().abi()) + CreateEnhMetaFileA(hdc.param().abi(), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(core::ptr::null())), lpdesc.param().abi()) } #[inline] pub unsafe fn CreateEnhMetaFileW(hdc: P0, lpfilename: P1, lprc: Option<*const super::super::Foundation::RECT>, lpdesc: P2) -> HDC @@ -359,7 +359,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateEnhMetaFileW(hdc : HDC, lpfilename : windows_core::PCWSTR, lprc : *const super::super::Foundation:: RECT, lpdesc : windows_core::PCWSTR) -> HDC); - CreateEnhMetaFileW(hdc.param().abi(), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(std::ptr::null())), lpdesc.param().abi()) + CreateEnhMetaFileW(hdc.param().abi(), lpfilename.param().abi(), core::mem::transmute(lprc.unwrap_or(core::ptr::null())), lpdesc.param().abi()) } #[inline] pub unsafe fn CreateFontA(cheight: i32, cwidth: i32, cescapement: i32, corientation: i32, cweight: i32, bitalic: u32, bunderline: u32, bstrikeout: u32, icharset: u32, ioutprecision: u32, iclipprecision: u32, iquality: u32, ipitchandfamily: u32, pszfacename: P0) -> HFONT @@ -426,7 +426,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateICA(pszdriver : windows_core::PCSTR, pszdevice : windows_core::PCSTR, pszport : windows_core::PCSTR, pdm : *const DEVMODEA) -> HDC); - CreateICA(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(std::ptr::null()))) + CreateICA(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateICW(pszdriver: P0, pszdevice: P1, pszport: P2, pdm: Option<*const DEVMODEW>) -> HDC @@ -436,7 +436,7 @@ where P2: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn CreateICW(pszdriver : windows_core::PCWSTR, pszdevice : windows_core::PCWSTR, pszport : windows_core::PCWSTR, pdm : *const DEVMODEW) -> HDC); - CreateICW(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(std::ptr::null()))) + CreateICW(pszdriver.param().abi(), pszdevice.param().abi(), pszport.param().abi(), core::mem::transmute(pdm.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateMetaFileA(pszfile: P0) -> HDC @@ -658,7 +658,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DrawTextExA(hdc : HDC, lpchtext : windows_core::PSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT, lpdtp : *const DRAWTEXTPARAMS) -> i32); - DrawTextExA(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, core::mem::transmute(lpdtp.unwrap_or(std::ptr::null()))) + DrawTextExA(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, core::mem::transmute(lpdtp.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DrawTextExW(hdc: P0, lpchtext: &mut [u16], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT, lpdtp: Option<*const DRAWTEXTPARAMS>) -> i32 @@ -666,7 +666,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DrawTextExW(hdc : HDC, lpchtext : windows_core::PWSTR, cchtext : i32, lprc : *mut super::super::Foundation:: RECT, format : DRAW_TEXT_FORMAT, lpdtp : *const DRAWTEXTPARAMS) -> i32); - DrawTextExW(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, core::mem::transmute(lpdtp.unwrap_or(std::ptr::null()))) + DrawTextExW(hdc.param().abi(), core::mem::transmute(lpchtext.as_ptr()), lpchtext.len().try_into().unwrap(), lprc, format, core::mem::transmute(lpdtp.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DrawTextW(hdc: P0, lpchtext: &mut [u16], lprc: *mut super::super::Foundation::RECT, format: DRAW_TEXT_FORMAT) -> i32 @@ -723,7 +723,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn EnumDisplayMonitors(hdc : HDC, lprcclip : *const super::super::Foundation:: RECT, lpfnenum : MONITORENUMPROC, dwdata : super::super::Foundation:: LPARAM) -> super::super::Foundation:: BOOL); - EnumDisplayMonitors(hdc.param().abi(), core::mem::transmute(lprcclip.unwrap_or(std::ptr::null())), lpfnenum, dwdata.param().abi()) + EnumDisplayMonitors(hdc.param().abi(), core::mem::transmute(lprcclip.unwrap_or(core::ptr::null())), lpfnenum, dwdata.param().abi()) } #[inline] pub unsafe fn EnumDisplaySettingsA(lpszdevicename: P0, imodenum: ENUM_DISPLAY_SETTINGS_MODE, lpdevmode: *mut DEVMODEA) -> super::super::Foundation::BOOL @@ -764,7 +764,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn EnumEnhMetaFile(hdc : HDC, hmf : HENHMETAFILE, proc : ENHMFENUMPROC, param3 : *const core::ffi::c_void, lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - EnumEnhMetaFile(hdc.param().abi(), hmf.param().abi(), proc, core::mem::transmute(param3.unwrap_or(std::ptr::null())), core::mem::transmute(lprect.unwrap_or(std::ptr::null()))) + EnumEnhMetaFile(hdc.param().abi(), hmf.param().abi(), proc, core::mem::transmute(param3.unwrap_or(core::ptr::null())), core::mem::transmute(lprect.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EnumFontFamiliesA(hdc: P0, lplogfont: P1, lpproc: FONTENUMPROCA, lparam: P2) -> i32 @@ -882,7 +882,7 @@ pub unsafe fn ExtCreatePen(ipenstyle: PEN_STYLE, cwidth: u32, plbrush: *const LO #[inline] pub unsafe fn ExtCreateRegion(lpx: Option<*const XFORM>, ncount: u32, lpdata: *const RGNDATA) -> HRGN { windows_targets::link!("gdi32.dll" "system" fn ExtCreateRegion(lpx : *const XFORM, ncount : u32, lpdata : *const RGNDATA) -> HRGN); - ExtCreateRegion(core::mem::transmute(lpx.unwrap_or(std::ptr::null())), ncount, lpdata) + ExtCreateRegion(core::mem::transmute(lpx.unwrap_or(core::ptr::null())), ncount, lpdata) } #[inline] pub unsafe fn ExtFloodFill(hdc: P0, x: i32, y: i32, color: P1, r#type: EXT_FLOOD_FILL_TYPE) -> super::super::Foundation::BOOL @@ -909,7 +909,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn ExtTextOutA(hdc : HDC, x : i32, y : i32, options : ETO_OPTIONS, lprect : *const super::super::Foundation:: RECT, lpstring : windows_core::PCSTR, c : u32, lpdx : *const i32) -> super::super::Foundation:: BOOL); - ExtTextOutA(hdc.param().abi(), x, y, options, core::mem::transmute(lprect.unwrap_or(std::ptr::null())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(std::ptr::null()))) + ExtTextOutA(hdc.param().abi(), x, y, options, core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ExtTextOutW(hdc: P0, x: i32, y: i32, options: ETO_OPTIONS, lprect: Option<*const super::super::Foundation::RECT>, lpstring: P1, c: u32, lpdx: Option<*const i32>) -> super::super::Foundation::BOOL @@ -918,7 +918,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn ExtTextOutW(hdc : HDC, x : i32, y : i32, options : ETO_OPTIONS, lprect : *const super::super::Foundation:: RECT, lpstring : windows_core::PCWSTR, c : u32, lpdx : *const i32) -> super::super::Foundation:: BOOL); - ExtTextOutW(hdc.param().abi(), x, y, options, core::mem::transmute(lprect.unwrap_or(std::ptr::null())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(std::ptr::null()))) + ExtTextOutW(hdc.param().abi(), x, y, options, core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpstring.param().abi(), c, core::mem::transmute(lpdx.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FillPath(hdc: P0) -> super::super::Foundation::BOOL @@ -953,7 +953,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn FixBrushOrgEx(hdc : HDC, x : i32, y : i32, ptl : *const super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - FixBrushOrgEx(hdc.param().abi(), x, y, core::mem::transmute(ptl.unwrap_or(std::ptr::null()))) + FixBrushOrgEx(hdc.param().abi(), x, y, core::mem::transmute(ptl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FlattenPath(hdc: P0) -> super::super::Foundation::BOOL @@ -1134,7 +1134,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetCharABCWidthsI(hdc : HDC, gifirst : u32, cgi : u32, pgi : *const u16, pabc : *mut ABC) -> super::super::Foundation:: BOOL); - GetCharABCWidthsI(hdc.param().abi(), gifirst, cgi, core::mem::transmute(pgi.unwrap_or(std::ptr::null())), pabc) + GetCharABCWidthsI(hdc.param().abi(), gifirst, cgi, core::mem::transmute(pgi.unwrap_or(core::ptr::null())), pabc) } #[inline] pub unsafe fn GetCharABCWidthsW(hdc: P0, wfirst: u32, wlast: u32, lpabc: *mut ABC) -> super::super::Foundation::BOOL @@ -1190,7 +1190,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetCharWidthI(hdc : HDC, gifirst : u32, cgi : u32, pgi : *const u16, piwidths : *mut i32) -> super::super::Foundation:: BOOL); - GetCharWidthI(hdc.param().abi(), gifirst, cgi, core::mem::transmute(pgi.unwrap_or(std::ptr::null())), piwidths) + GetCharWidthI(hdc.param().abi(), gifirst, cgi, core::mem::transmute(pgi.unwrap_or(core::ptr::null())), piwidths) } #[inline] pub unsafe fn GetCharWidthW(hdc: P0, ifirst: u32, ilast: u32, lpbuffer: *mut i32) -> super::super::Foundation::BOOL @@ -1313,7 +1313,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetDIBits(hdc : HDC, hbm : HBITMAP, start : u32, clines : u32, lpvbits : *mut core::ffi::c_void, lpbmi : *mut BITMAPINFO, usage : DIB_USAGE) -> i32); - GetDIBits(hdc.param().abi(), hbm.param().abi(), start, clines, core::mem::transmute(lpvbits.unwrap_or(std::ptr::null_mut())), lpbmi, usage) + GetDIBits(hdc.param().abi(), hbm.param().abi(), start, clines, core::mem::transmute(lpvbits.unwrap_or(core::ptr::null_mut())), lpbmi, usage) } #[inline] pub unsafe fn GetDeviceCaps(hdc: P0, index: GET_DEVICE_CAPS_INDEX) -> i32 @@ -1361,7 +1361,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFileHeader(hemf : HENHMETAFILE, nsize : u32, lpenhmetaheader : *mut ENHMETAHEADER) -> u32); - GetEnhMetaFileHeader(hemf.param().abi(), nsize, core::mem::transmute(lpenhmetaheader.unwrap_or(std::ptr::null_mut()))) + GetEnhMetaFileHeader(hemf.param().abi(), nsize, core::mem::transmute(lpenhmetaheader.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetEnhMetaFilePaletteEntries(hemf: P0, lppaletteentries: Option<&mut [PALETTEENTRY]>) -> u32 @@ -1385,7 +1385,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetFontData(hdc : HDC, dwtable : u32, dwoffset : u32, pvbuffer : *mut core::ffi::c_void, cjbuffer : u32) -> u32); - GetFontData(hdc.param().abi(), dwtable, dwoffset, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null_mut())), cjbuffer) + GetFontData(hdc.param().abi(), dwtable, dwoffset, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), cjbuffer) } #[inline] pub unsafe fn GetFontLanguageInfo(hdc: P0) -> u32 @@ -1401,7 +1401,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetFontUnicodeRanges(hdc : HDC, lpgs : *mut GLYPHSET) -> u32); - GetFontUnicodeRanges(hdc.param().abi(), core::mem::transmute(lpgs.unwrap_or(std::ptr::null_mut()))) + GetFontUnicodeRanges(hdc.param().abi(), core::mem::transmute(lpgs.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetGlyphIndicesA(hdc: P0, lpstr: P1, c: i32, pgi: *mut u16, fl: u32) -> u32 @@ -1427,7 +1427,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetGlyphOutlineA(hdc : HDC, uchar : u32, fuformat : GET_GLYPH_OUTLINE_FORMAT, lpgm : *mut GLYPHMETRICS, cjbuffer : u32, pvbuffer : *mut core::ffi::c_void, lpmat2 : *const MAT2) -> u32); - GetGlyphOutlineA(hdc.param().abi(), uchar, fuformat, lpgm, cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null_mut())), lpmat2) + GetGlyphOutlineA(hdc.param().abi(), uchar, fuformat, lpgm, cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), lpmat2) } #[inline] pub unsafe fn GetGlyphOutlineW(hdc: P0, uchar: u32, fuformat: GET_GLYPH_OUTLINE_FORMAT, lpgm: *mut GLYPHMETRICS, cjbuffer: u32, pvbuffer: Option<*mut core::ffi::c_void>, lpmat2: *const MAT2) -> u32 @@ -1435,7 +1435,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetGlyphOutlineW(hdc : HDC, uchar : u32, fuformat : GET_GLYPH_OUTLINE_FORMAT, lpgm : *mut GLYPHMETRICS, cjbuffer : u32, pvbuffer : *mut core::ffi::c_void, lpmat2 : *const MAT2) -> u32); - GetGlyphOutlineW(hdc.param().abi(), uchar, fuformat, lpgm, cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null_mut())), lpmat2) + GetGlyphOutlineW(hdc.param().abi(), uchar, fuformat, lpgm, cjbuffer, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), lpmat2) } #[inline] pub unsafe fn GetGraphicsMode(hdc: P0) -> i32 @@ -1491,7 +1491,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetMetaFileBitsEx(hmf : HMETAFILE, cbbuffer : u32, lpdata : *mut core::ffi::c_void) -> u32); - GetMetaFileBitsEx(hmf.param().abi(), cbbuffer, core::mem::transmute(lpdata.unwrap_or(std::ptr::null_mut()))) + GetMetaFileBitsEx(hmf.param().abi(), cbbuffer, core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetMetaFileW(lpname: P0) -> HMETAFILE @@ -1558,7 +1558,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetObjectA(h : HGDIOBJ, c : i32, pv : *mut core::ffi::c_void) -> i32); - GetObjectA(h.param().abi(), c, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut()))) + GetObjectA(h.param().abi(), c, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetObjectType(h: P0) -> u32 @@ -1574,7 +1574,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetObjectW(h : HGDIOBJ, c : i32, pv : *mut core::ffi::c_void) -> i32); - GetObjectW(h.param().abi(), c, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut()))) + GetObjectW(h.param().abi(), c, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetOutlineTextMetricsA(hdc: P0, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICA>) -> u32 @@ -1582,7 +1582,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetOutlineTextMetricsA(hdc : HDC, cjcopy : u32, potm : *mut OUTLINETEXTMETRICA) -> u32); - GetOutlineTextMetricsA(hdc.param().abi(), cjcopy, core::mem::transmute(potm.unwrap_or(std::ptr::null_mut()))) + GetOutlineTextMetricsA(hdc.param().abi(), cjcopy, core::mem::transmute(potm.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetOutlineTextMetricsW(hdc: P0, cjcopy: u32, potm: Option<*mut OUTLINETEXTMETRICW>) -> u32 @@ -1590,7 +1590,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetOutlineTextMetricsW(hdc : HDC, cjcopy : u32, potm : *mut OUTLINETEXTMETRICW) -> u32); - GetOutlineTextMetricsW(hdc.param().abi(), cjcopy, core::mem::transmute(potm.unwrap_or(std::ptr::null_mut()))) + GetOutlineTextMetricsW(hdc.param().abi(), cjcopy, core::mem::transmute(potm.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetPaletteEntries(hpal: P0, istart: u32, ppalentries: Option<&mut [PALETTEENTRY]>) -> u32 @@ -1606,7 +1606,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetPath(hdc : HDC, apt : *mut super::super::Foundation:: POINT, aj : *mut u8, cpt : i32) -> i32); - GetPath(hdc.param().abi(), core::mem::transmute(apt.unwrap_or(std::ptr::null_mut())), core::mem::transmute(aj.unwrap_or(std::ptr::null_mut())), cpt) + GetPath(hdc.param().abi(), core::mem::transmute(apt.unwrap_or(core::ptr::null_mut())), core::mem::transmute(aj.unwrap_or(core::ptr::null_mut())), cpt) } #[inline] pub unsafe fn GetPixel(hdc: P0, x: i32, y: i32) -> super::super::Foundation::COLORREF @@ -1652,7 +1652,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetRegionData(hrgn : HRGN, ncount : u32, lprgndata : *mut RGNDATA) -> u32); - GetRegionData(hrgn.param().abi(), ncount, core::mem::transmute(lprgndata.unwrap_or(std::ptr::null_mut()))) + GetRegionData(hrgn.param().abi(), ncount, core::mem::transmute(lprgndata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetRgnBox(hrgn: P0, lprc: *mut super::super::Foundation::RECT) -> GDI_REGION_TYPE @@ -1748,7 +1748,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentExPointA(hdc : HDC, lpszstring : windows_core::PCSTR, cchstring : i32, nmaxextent : i32, lpnfit : *mut i32, lpndx : *mut i32, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentExPointA(hdc.param().abi(), lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(std::ptr::null_mut())), lpsize) + GetTextExtentExPointA(hdc.param().abi(), lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), lpsize) } #[inline] pub unsafe fn GetTextExtentExPointI(hdc: P0, lpwszstring: *const u16, cwchstring: i32, nmaxextent: i32, lpnfit: Option<*mut i32>, lpndx: Option<*mut i32>, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL @@ -1756,7 +1756,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentExPointI(hdc : HDC, lpwszstring : *const u16, cwchstring : i32, nmaxextent : i32, lpnfit : *mut i32, lpndx : *mut i32, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentExPointI(hdc.param().abi(), lpwszstring, cwchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(std::ptr::null_mut())), lpsize) + GetTextExtentExPointI(hdc.param().abi(), lpwszstring, cwchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), lpsize) } #[inline] pub unsafe fn GetTextExtentExPointW(hdc: P0, lpszstring: P1, cchstring: i32, nmaxextent: i32, lpnfit: Option<*mut i32>, lpndx: Option<*mut i32>, lpsize: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL @@ -1765,7 +1765,7 @@ where P1: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetTextExtentExPointW(hdc : HDC, lpszstring : windows_core::PCWSTR, cchstring : i32, nmaxextent : i32, lpnfit : *mut i32, lpndx : *mut i32, lpsize : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - GetTextExtentExPointW(hdc.param().abi(), lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(std::ptr::null_mut())), lpsize) + GetTextExtentExPointW(hdc.param().abi(), lpszstring.param().abi(), cchstring, nmaxextent, core::mem::transmute(lpnfit.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpndx.unwrap_or(core::ptr::null_mut())), lpsize) } #[inline] pub unsafe fn GetTextExtentPoint32A(hdc: P0, lpstring: &[u8], psizl: *mut super::super::Foundation::SIZE) -> super::super::Foundation::BOOL @@ -1846,7 +1846,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetUpdateRect(hwnd : super::super::Foundation:: HWND, lprect : *mut super::super::Foundation:: RECT, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetUpdateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(std::ptr::null_mut())), berase.param().abi()) + GetUpdateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(core::ptr::null_mut())), berase.param().abi()) } #[inline] pub unsafe fn GetUpdateRgn(hwnd: P0, hrgn: P1, berase: P2) -> GDI_REGION_TYPE @@ -1985,7 +1985,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn InvalidateRect(hwnd : super::super::Foundation:: HWND, lprect : *const super::super::Foundation:: RECT, berase : super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - InvalidateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(std::ptr::null())), berase.param().abi()) + InvalidateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(core::ptr::null())), berase.param().abi()) } #[inline] pub unsafe fn InvalidateRgn(hwnd: P0, hrgn: P1, berase: P2) -> super::super::Foundation::BOOL @@ -2099,7 +2099,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn ModifyWorldTransform(hdc : HDC, lpxf : *const XFORM, mode : MODIFY_WORLD_TRANSFORM_MODE) -> super::super::Foundation:: BOOL); - ModifyWorldTransform(hdc.param().abi(), core::mem::transmute(lpxf.unwrap_or(std::ptr::null())), mode) + ModifyWorldTransform(hdc.param().abi(), core::mem::transmute(lpxf.unwrap_or(core::ptr::null())), mode) } #[inline] pub unsafe fn MonitorFromPoint(pt: super::super::Foundation::POINT, dwflags: MONITOR_FROM_FLAGS) -> HMONITOR { @@ -2125,7 +2125,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn MoveToEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - MoveToEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + MoveToEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OffsetClipRgn(hdc: P0, x: i32, y: i32) -> GDI_REGION_TYPE @@ -2154,7 +2154,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn OffsetViewportOrgEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - OffsetViewportOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + OffsetViewportOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OffsetWindowOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL @@ -2162,7 +2162,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn OffsetWindowOrgEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - OffsetWindowOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + OffsetWindowOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PaintDesktop(hdc: P0) -> super::super::Foundation::BOOL @@ -2389,7 +2389,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn RedrawWindow(hwnd : super::super::Foundation:: HWND, lprcupdate : *const super::super::Foundation:: RECT, hrgnupdate : HRGN, flags : REDRAW_WINDOW_FLAGS) -> super::super::Foundation:: BOOL); - RedrawWindow(hwnd.param().abi(), core::mem::transmute(lprcupdate.unwrap_or(std::ptr::null())), hrgnupdate.param().abi(), flags) + RedrawWindow(hwnd.param().abi(), core::mem::transmute(lprcupdate.unwrap_or(core::ptr::null())), hrgnupdate.param().abi(), flags) } #[inline] pub unsafe fn ReleaseDC(hwnd: P0, hdc: P1) -> i32 @@ -2422,7 +2422,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn RemoveFontResourceExA(name : windows_core::PCSTR, fl : u32, pdv : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveFontResourceExA(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(std::ptr::null()))) + RemoveFontResourceExA(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RemoveFontResourceExW(name: P0, fl: u32, pdv: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -2430,7 +2430,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn RemoveFontResourceExW(name : windows_core::PCWSTR, fl : u32, pdv : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - RemoveFontResourceExW(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(std::ptr::null()))) + RemoveFontResourceExW(name.param().abi(), fl, core::mem::transmute(pdv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RemoveFontResourceW(lpfilename: P0) -> super::super::Foundation::BOOL @@ -2494,7 +2494,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn ScaleViewportExtEx(hdc : HDC, xn : i32, dx : i32, yn : i32, yd : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - ScaleViewportExtEx(hdc.param().abi(), xn, dx, yn, yd, core::mem::transmute(lpsz.unwrap_or(std::ptr::null_mut()))) + ScaleViewportExtEx(hdc.param().abi(), xn, dx, yn, yd, core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ScaleWindowExtEx(hdc: P0, xn: i32, xd: i32, yn: i32, yd: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL @@ -2502,7 +2502,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn ScaleWindowExtEx(hdc : HDC, xn : i32, xd : i32, yn : i32, yd : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - ScaleWindowExtEx(hdc.param().abi(), xn, xd, yn, yd, core::mem::transmute(lpsz.unwrap_or(std::ptr::null_mut()))) + ScaleWindowExtEx(hdc.param().abi(), xn, xd, yn, yd, core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ScreenToClient(hwnd: P0, lppoint: *mut super::super::Foundation::POINT) -> super::super::Foundation::BOOL @@ -2570,7 +2570,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetBitmapDimensionEx(hbm : HBITMAP, w : i32, h : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - SetBitmapDimensionEx(hbm.param().abi(), w, h, core::mem::transmute(lpsz.unwrap_or(std::ptr::null_mut()))) + SetBitmapDimensionEx(hbm.param().abi(), w, h, core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetBkColor(hdc: P0, color: P1) -> super::super::Foundation::COLORREF @@ -2595,7 +2595,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetBoundsRect(hdc : HDC, lprect : *const super::super::Foundation:: RECT, flags : SET_BOUNDS_RECT_FLAGS) -> u32); - SetBoundsRect(hdc.param().abi(), core::mem::transmute(lprect.unwrap_or(std::ptr::null())), flags) + SetBoundsRect(hdc.param().abi(), core::mem::transmute(lprect.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn SetBrushOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL @@ -2603,7 +2603,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetBrushOrgEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - SetBrushOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + SetBrushOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetColorAdjustment(hdc: P0, lpca: *const COLORADJUSTMENT) -> super::super::Foundation::BOOL @@ -2712,7 +2712,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetMiterLimit(hdc : HDC, limit : f32, old : *mut f32) -> super::super::Foundation:: BOOL); - SetMiterLimit(hdc.param().abi(), limit, core::mem::transmute(old.unwrap_or(std::ptr::null_mut()))) + SetMiterLimit(hdc.param().abi(), limit, core::mem::transmute(old.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetPaletteEntries(hpal: P0, istart: u32, ppalentries: &[PALETTEENTRY]) -> u32 @@ -2834,7 +2834,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetViewportExtEx(hdc : HDC, x : i32, y : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - SetViewportExtEx(hdc.param().abi(), x, y, core::mem::transmute(lpsz.unwrap_or(std::ptr::null_mut()))) + SetViewportExtEx(hdc.param().abi(), x, y, core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetViewportOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL @@ -2842,7 +2842,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetViewportOrgEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - SetViewportOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + SetViewportOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetWindowExtEx(hdc: P0, x: i32, y: i32, lpsz: Option<*mut super::super::Foundation::SIZE>) -> super::super::Foundation::BOOL @@ -2850,7 +2850,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetWindowExtEx(hdc : HDC, x : i32, y : i32, lpsz : *mut super::super::Foundation:: SIZE) -> super::super::Foundation:: BOOL); - SetWindowExtEx(hdc.param().abi(), x, y, core::mem::transmute(lpsz.unwrap_or(std::ptr::null_mut()))) + SetWindowExtEx(hdc.param().abi(), x, y, core::mem::transmute(lpsz.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetWindowOrgEx(hdc: P0, x: i32, y: i32, lppt: Option<*mut super::super::Foundation::POINT>) -> super::super::Foundation::BOOL @@ -2858,7 +2858,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetWindowOrgEx(hdc : HDC, x : i32, y : i32, lppt : *mut super::super::Foundation:: POINT) -> super::super::Foundation:: BOOL); - SetWindowOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(std::ptr::null_mut()))) + SetWindowOrgEx(hdc.param().abi(), x, y, core::mem::transmute(lppt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetWindowRgn(hwnd: P0, hrgn: P1, bredraw: P2) -> i32 @@ -2893,7 +2893,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn StretchDIBits(hdc : HDC, xdest : i32, ydest : i32, destwidth : i32, destheight : i32, xsrc : i32, ysrc : i32, srcwidth : i32, srcheight : i32, lpbits : *const core::ffi::c_void, lpbmi : *const BITMAPINFO, iusage : DIB_USAGE, rop : ROP_CODE) -> i32); - StretchDIBits(hdc.param().abi(), xdest, ydest, destwidth, destheight, xsrc, ysrc, srcwidth, srcheight, core::mem::transmute(lpbits.unwrap_or(std::ptr::null())), lpbmi, iusage, rop) + StretchDIBits(hdc.param().abi(), xdest, ydest, destwidth, destheight, xsrc, ysrc, srcwidth, srcheight, core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), lpbmi, iusage, rop) } #[inline] pub unsafe fn StrokeAndFillPath(hdc: P0) -> super::super::Foundation::BOOL @@ -2938,7 +2938,7 @@ where P0: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTEmbedFont(hdc : HDC, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const core::ffi::c_void, puscharcodeset : *const u16, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFont(hdc.param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(std::ptr::null()))) + TTEmbedFont(hdc.param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TTEmbedFontEx(hdc: P0, ulflags: TTEMBED_FLAGS, ulcharset: EMBED_FONT_CHARSET, pulprivstatus: *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus: *mut u32, lpfnwritetostream: WRITEEMBEDPROC, lpvwritestream: *const core::ffi::c_void, pulcharcodeset: &[u32], uslanguage: u16, pttembedinfo: Option<*const TTEMBEDINFO>) -> i32 @@ -2946,7 +2946,7 @@ where P0: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTEmbedFontEx(hdc : HDC, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const core::ffi::c_void, pulcharcodeset : *const u32, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFontEx(hdc.param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(std::ptr::null()))) + TTEmbedFontEx(hdc.param().abi(), ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(pulcharcodeset.as_ptr()), pulcharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TTEmbedFontFromFileA(hdc: P0, szfontfilename: P1, usttcindex: u16, ulflags: TTEMBED_FLAGS, ulcharset: EMBED_FONT_CHARSET, pulprivstatus: *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus: *mut u32, lpfnwritetostream: WRITEEMBEDPROC, lpvwritestream: *const core::ffi::c_void, puscharcodeset: &[u16], uslanguage: u16, pttembedinfo: Option<*const TTEMBEDINFO>) -> i32 @@ -2955,7 +2955,7 @@ where P1: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTEmbedFontFromFileA(hdc : HDC, szfontfilename : windows_core::PCSTR, usttcindex : u16, ulflags : TTEMBED_FLAGS, ulcharset : EMBED_FONT_CHARSET, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, pulstatus : *mut u32, lpfnwritetostream : WRITEEMBEDPROC, lpvwritestream : *const core::ffi::c_void, puscharcodeset : *const u16, uscharcodecount : u16, uslanguage : u16, pttembedinfo : *const TTEMBEDINFO) -> i32); - TTEmbedFontFromFileA(hdc.param().abi(), szfontfilename.param().abi(), usttcindex, ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(std::ptr::null()))) + TTEmbedFontFromFileA(hdc.param().abi(), szfontfilename.param().abi(), usttcindex, ulflags, ulcharset, pulprivstatus, pulstatus, lpfnwritetostream, lpvwritestream, core::mem::transmute(puscharcodeset.as_ptr()), puscharcodeset.len().try_into().unwrap(), uslanguage, core::mem::transmute(pttembedinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TTEnableEmbeddingForFacename(lpszfacename: P0, benable: P1) -> i32 @@ -2969,7 +2969,7 @@ where #[inline] pub unsafe fn TTGetEmbeddedFontInfo(ulflags: TTEMBED_FLAGS, pulprivstatus: *mut u32, ulprivs: FONT_LICENSE_PRIVS, pulstatus: *mut u32, lpfnreadfromstream: READEMBEDPROC, lpvreadstream: *const core::ffi::c_void, pttloadinfo: Option<*const TTLOADINFO>) -> i32 { windows_targets::link!("t2embed.dll" "system" fn TTGetEmbeddedFontInfo(ulflags : TTEMBED_FLAGS, pulprivstatus : *mut u32, ulprivs : FONT_LICENSE_PRIVS, pulstatus : *mut u32, lpfnreadfromstream : READEMBEDPROC, lpvreadstream : *const core::ffi::c_void, pttloadinfo : *const TTLOADINFO) -> i32); - TTGetEmbeddedFontInfo(ulflags, pulprivstatus, ulprivs, pulstatus, lpfnreadfromstream, lpvreadstream, core::mem::transmute(pttloadinfo.unwrap_or(std::ptr::null()))) + TTGetEmbeddedFontInfo(ulflags, pulprivstatus, ulprivs, pulstatus, lpfnreadfromstream, lpvreadstream, core::mem::transmute(pttloadinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TTGetEmbeddingType(hdc: P0, pulembedtype: *mut EMBEDDED_FONT_PRIV_STATUS) -> i32 @@ -3007,7 +3007,7 @@ where P1: windows_core::Param, { windows_targets::link!("t2embed.dll" "system" fn TTLoadEmbeddedFont(phfontreference : *mut super::super::Foundation:: HANDLE, ulflags : u32, pulprivstatus : *mut EMBEDDED_FONT_PRIV_STATUS, ulprivs : FONT_LICENSE_PRIVS, pulstatus : *mut TTLOAD_EMBEDDED_FONT_STATUS, lpfnreadfromstream : READEMBEDPROC, lpvreadstream : *const core::ffi::c_void, szwinfamilyname : windows_core::PCWSTR, szmacfamilyname : windows_core::PCSTR, pttloadinfo : *const TTLOADINFO) -> i32); - TTLoadEmbeddedFont(phfontreference, ulflags, pulprivstatus, ulprivs, pulstatus, lpfnreadfromstream, lpvreadstream, szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), core::mem::transmute(pttloadinfo.unwrap_or(std::ptr::null()))) + TTLoadEmbeddedFont(phfontreference, ulflags, pulprivstatus, ulprivs, pulstatus, lpfnreadfromstream, lpvreadstream, szwinfamilyname.param().abi(), szmacfamilyname.param().abi(), core::mem::transmute(pttloadinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TTRunValidationTests(hdc: P0, ptestparam: *const TTVALIDATIONTESTSPARAMS) -> i32 @@ -3101,7 +3101,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ValidateRect(hwnd : super::super::Foundation:: HWND, lprect : *const super::super::Foundation:: RECT) -> super::super::Foundation:: BOOL); - ValidateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(std::ptr::null()))) + ValidateRect(hwnd.param().abi(), core::mem::transmute(lprect.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ValidateRgn(hwnd: P0, hrgn: P1) -> super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/impl.rs b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/impl.rs index f8ccf17868..c831b751d7 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/impl.rs @@ -12,7 +12,7 @@ impl GdiplusAbort_Vtbl { } } #[doc(hidden)] -struct GdiplusAbort_ImplVtbl(std::marker::PhantomData); +struct GdiplusAbort_ImplVtbl(core::marker::PhantomData); impl GdiplusAbort_ImplVtbl { const VTABLE: GdiplusAbort_Vtbl = GdiplusAbort_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs index 0904e2cdb5..bdeb316024 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/GdiPlus/mod.rs @@ -455,7 +455,7 @@ where #[inline] pub unsafe fn GdipCreateBitmapFromScan0(width: i32, height: i32, stride: i32, format: i32, scan0: Option<*const u8>, bitmap: *mut *mut GpBitmap) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipCreateBitmapFromScan0(width : i32, height : i32, stride : i32, format : i32, scan0 : *const u8, bitmap : *mut *mut GpBitmap) -> Status); - GdipCreateBitmapFromScan0(width, height, stride, format, core::mem::transmute(scan0.unwrap_or(std::ptr::null())), bitmap) + GdipCreateBitmapFromScan0(width, height, stride, format, core::mem::transmute(scan0.unwrap_or(core::ptr::null())), bitmap) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2053,7 +2053,7 @@ pub unsafe fn GdipGetRegionBoundsI(region: *mut GpRegion, graphics: *mut GpGraph #[inline] pub unsafe fn GdipGetRegionData(region: *mut GpRegion, buffer: &mut [u8], sizefilled: Option<*mut u32>) -> Status { windows_targets::link!("gdiplus.dll" "system" fn GdipGetRegionData(region : *mut GpRegion, buffer : *mut u8, buffersize : u32, sizefilled : *mut u32) -> Status); - GdipGetRegionData(region, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(sizefilled.unwrap_or(std::ptr::null_mut()))) + GdipGetRegionData(region, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(sizefilled.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GdipGetRegionDataSize(region: *mut GpRegion, buffersize: *mut u32) -> Status { diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs index ff15774714..092e428a4a 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Imaging/mod.rs @@ -66,7 +66,7 @@ where { windows_targets::link!("windowscodecs.dll" "system" fn WICMatchMetadataContent(guidcontainerformat : *const windows_core::GUID, pguidvendor : *const windows_core::GUID, pistream : * mut core::ffi::c_void, pguidmetadataformat : *mut windows_core::GUID) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WICMatchMetadataContent(guidcontainerformat, core::mem::transmute(pguidvendor.unwrap_or(std::ptr::null())), pistream.param().abi(), &mut result__).map(|| result__) + WICMatchMetadataContent(guidcontainerformat, core::mem::transmute(pguidvendor.unwrap_or(core::ptr::null())), pistream.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -210,7 +210,7 @@ impl core::ops::Deref for IWICBitmapCodecProgressNotification { windows_core::imp::interface_hierarchy!(IWICBitmapCodecProgressNotification, windows_core::IUnknown); impl IWICBitmapCodecProgressNotification { pub unsafe fn RegisterProgressNotification(&self, pfnprogressnotification: PFNProgressNotification, pvdata: Option<*const core::ffi::c_void>, dwprogressflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).RegisterProgressNotification)(windows_core::Interface::as_raw(self), pfnprogressnotification, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), dwprogressflags).ok() + (windows_core::Interface::vtable(self).RegisterProgressNotification)(windows_core::Interface::as_raw(self), pfnprogressnotification, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), dwprogressflags).ok() } } #[repr(C)] @@ -311,7 +311,7 @@ impl core::ops::Deref for IWICBitmapDecoderInfo { windows_core::imp::interface_hierarchy!(IWICBitmapDecoderInfo, windows_core::IUnknown, IWICComponentInfo, IWICBitmapCodecInfo); impl IWICBitmapDecoderInfo { pub unsafe fn GetPatterns(&self, cbsizepatterns: u32, ppatterns: Option<*mut WICBitmapPattern>, pcpatterns: Option<*mut u32>, pcbpatternsactual: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), cbsizepatterns, core::mem::transmute(ppatterns.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcpatterns.unwrap_or(std::ptr::null_mut())), pcbpatternsactual).ok() + (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), cbsizepatterns, core::mem::transmute(ppatterns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcpatterns.unwrap_or(core::ptr::null_mut())), pcbpatternsactual).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, pistream: P0) -> windows_core::Result @@ -1064,7 +1064,7 @@ impl IWICDevelopRaw { (windows_core::Interface::vtable(self).SetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvesize, ptonecurve).ok() } pub unsafe fn GetToneCurve(&self, cbtonecurvebuffersize: u32, ptonecurve: Option<*mut WICRawToneCurve>, pcbactualtonecurvebuffersize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvebuffersize, core::mem::transmute(ptonecurve.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbactualtonecurvebuffersize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetToneCurve)(windows_core::Interface::as_raw(self), cbtonecurvebuffersize, core::mem::transmute(ptonecurve.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbactualtonecurvebuffersize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetRotation(&self, rotation: f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), rotation).ok() @@ -1266,7 +1266,7 @@ impl IWICImagingFactory { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateDecoderFromFilename)(windows_core::Interface::as_raw(self), wzfilename.param().abi(), core::mem::transmute(pguidvendor.unwrap_or(std::ptr::null())), dwdesiredaccess, metadataoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateDecoderFromFilename)(windows_core::Interface::as_raw(self), wzfilename.param().abi(), core::mem::transmute(pguidvendor.unwrap_or(core::ptr::null())), dwdesiredaccess, metadataoptions, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateDecoderFromStream(&self, pistream: P0, pguidvendor: *const windows_core::GUID, metadataoptions: WICDecodeOptions) -> windows_core::Result @@ -1811,7 +1811,7 @@ impl core::ops::Deref for IWICMetadataReaderInfo { windows_core::imp::interface_hierarchy!(IWICMetadataReaderInfo, windows_core::IUnknown, IWICComponentInfo, IWICMetadataHandlerInfo); impl IWICMetadataReaderInfo { pub unsafe fn GetPatterns(&self, guidcontainerformat: *const windows_core::GUID, cbsize: u32, ppattern: Option<*mut WICMetadataPattern>, pccount: Option<*mut u32>, pcbactual: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, core::mem::transmute(ppattern.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pccount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPatterns)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, core::mem::transmute(ppattern.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pccount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn MatchesPattern(&self, guidcontainerformat: *const windows_core::GUID, pistream: P0) -> windows_core::Result @@ -1888,7 +1888,7 @@ impl core::ops::Deref for IWICMetadataWriterInfo { windows_core::imp::interface_hierarchy!(IWICMetadataWriterInfo, windows_core::IUnknown, IWICComponentInfo, IWICMetadataHandlerInfo); impl IWICMetadataWriterInfo { pub unsafe fn GetHeader(&self, guidcontainerformat: *const windows_core::GUID, cbsize: u32, pheader: Option<*mut WICMetadataHeader>, pcbactual: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, core::mem::transmute(pheader.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHeader)(windows_core::Interface::as_raw(self), guidcontainerformat, cbsize, core::mem::transmute(pheader.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateInstance(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 c57a4012d5..81bbf7d67e 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/OpenGL/mod.rs @@ -14,7 +14,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn DescribePixelFormat(hdc : super::Gdi:: HDC, ipixelformat : i32, nbytes : u32, ppfd : *mut PIXELFORMATDESCRIPTOR) -> i32); - DescribePixelFormat(hdc.param().abi(), ipixelformat, nbytes, core::mem::transmute(ppfd.unwrap_or(std::ptr::null_mut()))) + DescribePixelFormat(hdc.param().abi(), ipixelformat, nbytes, core::mem::transmute(ppfd.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -23,7 +23,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn GetEnhMetaFilePixelFormat(hemf : super::Gdi:: HENHMETAFILE, cbbuffer : u32, ppfd : *mut PIXELFORMATDESCRIPTOR) -> u32); - GetEnhMetaFilePixelFormat(hemf.param().abi(), cbbuffer, core::mem::transmute(ppfd.unwrap_or(std::ptr::null_mut()))) + GetEnhMetaFilePixelFormat(hemf.param().abi(), cbbuffer, core::mem::transmute(ppfd.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs index 179d879358..14fdd7e3f5 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/PrintTicket/mod.rs @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTConvertPrintTicketToDevMode(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, basedevmodetype : EDefaultDevmodeType, scope : EPrintTicketScope, pcbdevmode : *mut u32, ppdevmode : *mut *mut super::super::Gdi:: DEVMODEA, pbstrerrormessage : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - PTConvertPrintTicketToDevMode(hprovider.param().abi(), pprintticket.param().abi(), basedevmodetype, scope, pcbdevmode, ppdevmode, core::mem::transmute(pbstrerrormessage.unwrap_or(std::ptr::null_mut()))).ok() + PTConvertPrintTicketToDevMode(hprovider.param().abi(), pprintticket.param().abi(), basedevmodetype, scope, pcbdevmode, ppdevmode, core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -35,7 +35,7 @@ where P2: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintCapabilities(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, pcapabilities : * mut core::ffi::c_void, pbstrerrormessage : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - PTGetPrintCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pcapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(std::ptr::null_mut()))).ok() + PTGetPrintCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pcapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -46,7 +46,7 @@ where P2: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintDeviceCapabilities(hprovider : HPTPROVIDER, pprintticket : * mut core::ffi::c_void, pdevicecapabilities : * mut core::ffi::c_void, pbstrerrormessage : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - PTGetPrintDeviceCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pdevicecapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(std::ptr::null_mut()))).ok() + PTGetPrintDeviceCapabilities(hprovider.param().abi(), pprintticket.param().abi(), pdevicecapabilities.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -58,7 +58,7 @@ where P3: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTGetPrintDeviceResources(hprovider : HPTPROVIDER, pszlocalename : windows_core::PCWSTR, pprintticket : * mut core::ffi::c_void, pdeviceresources : * mut core::ffi::c_void, pbstrerrormessage : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - PTGetPrintDeviceResources(hprovider.param().abi(), pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(std::ptr::null_mut()))).ok() + PTGetPrintDeviceResources(hprovider.param().abi(), pszlocalename.param().abi(), pprintticket.param().abi(), pdeviceresources.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -70,7 +70,7 @@ where P3: windows_core::Param, { windows_targets::link!("prntvpt.dll" "system" fn PTMergeAndValidatePrintTicket(hprovider : HPTPROVIDER, pbaseticket : * mut core::ffi::c_void, pdeltaticket : * mut core::ffi::c_void, scope : EPrintTicketScope, presultticket : * mut core::ffi::c_void, pbstrerrormessage : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - PTMergeAndValidatePrintTicket(hprovider.param().abi(), pbaseticket.param().abi(), pdeltaticket.param().abi(), scope, presultticket.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(std::ptr::null_mut()))).ok() + PTMergeAndValidatePrintTicket(hprovider.param().abi(), pbaseticket.param().abi(), pdeltaticket.param().abi(), scope, presultticket.param().abi(), core::mem::transmute(pbstrerrormessage.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PTOpenProvider(pszprintername: P0, dwversion: u32) -> windows_core::Result 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 a0846babbc..0ee5f5219c 100644 --- a/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Graphics/Printing/mod.rs @@ -46,7 +46,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddMonitorA(pname : windows_core::PCSTR, level : u32, pmonitors : *const u8) -> super::super::Foundation:: BOOL); - AddMonitorA(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(std::ptr::null()))).ok() + AddMonitorA(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AddMonitorW(pname: P0, level: u32, pmonitors: Option<*const u8>) -> windows_core::Result<()> @@ -54,7 +54,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AddMonitorW(pname : windows_core::PCWSTR, level : u32, pmonitors : *const u8) -> super::super::Foundation:: BOOL); - AddMonitorW(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(std::ptr::null()))).ok() + AddMonitorW(pname.param().abi(), level, core::mem::transmute(pmonitors.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AddPortA(pname: P0, hwnd: P1, pmonitorname: P2) -> windows_core::Result<()> @@ -216,7 +216,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AdvancedDocumentPropertiesA(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, pdevicename : windows_core::PCSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEA, pdevmodeinput : *const super::Gdi:: DEVMODEA) -> i32); - AdvancedDocumentPropertiesA(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(std::ptr::null()))) + AdvancedDocumentPropertiesA(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -227,12 +227,12 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn AdvancedDocumentPropertiesW(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, pdevicename : windows_core::PCWSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEW, pdevmodeinput : *const super::Gdi:: DEVMODEW) -> i32); - AdvancedDocumentPropertiesW(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(std::ptr::null()))) + AdvancedDocumentPropertiesW(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AppendPrinterNotifyInfoData(pinfodest: *const PRINTER_NOTIFY_INFO, pdatasrc: Option<*const PRINTER_NOTIFY_INFO_DATA>, fdwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn AppendPrinterNotifyInfoData(pinfodest : *const PRINTER_NOTIFY_INFO, pdatasrc : *const PRINTER_NOTIFY_INFO_DATA, fdwflags : u32) -> super::super::Foundation:: BOOL); - AppendPrinterNotifyInfoData(pinfodest, core::mem::transmute(pdatasrc.unwrap_or(std::ptr::null())), fdwflags) + AppendPrinterNotifyInfoData(pinfodest, core::mem::transmute(pdatasrc.unwrap_or(core::ptr::null())), fdwflags) } #[inline] pub unsafe fn CallRouterFindFirstPrinterChangeNotification(hprinterrpc: P0, fdwfilterflags: u32, fdwoptions: u32, hnotify: P1, pprinternotifyoptions: *const PRINTER_NOTIFY_OPTIONS) -> u32 @@ -276,7 +276,7 @@ where P1: windows_core::Param, { windows_targets::link!("compstui.dll" "system" fn CommonPropertySheetUIA(hwndowner : super::super::Foundation:: HWND, pfnpropsheetui : PFNPROPSHEETUI, lparam : super::super::Foundation:: LPARAM, presult : *mut u32) -> i32); - CommonPropertySheetUIA(hwndowner.param().abi(), pfnpropsheetui, lparam.param().abi(), core::mem::transmute(presult.unwrap_or(std::ptr::null_mut()))) + CommonPropertySheetUIA(hwndowner.param().abi(), pfnpropsheetui, lparam.param().abi(), core::mem::transmute(presult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CommonPropertySheetUIW(hwndowner: P0, pfnpropsheetui: PFNPROPSHEETUI, lparam: P1, presult: Option<*mut u32>) -> i32 @@ -285,7 +285,7 @@ where P1: windows_core::Param, { windows_targets::link!("compstui.dll" "system" fn CommonPropertySheetUIW(hwndowner : super::super::Foundation:: HWND, pfnpropsheetui : PFNPROPSHEETUI, lparam : super::super::Foundation:: LPARAM, presult : *mut u32) -> i32); - CommonPropertySheetUIW(hwndowner.param().abi(), pfnpropsheetui, lparam.param().abi(), core::mem::transmute(presult.unwrap_or(std::ptr::null_mut()))) + CommonPropertySheetUIW(hwndowner.param().abi(), pfnpropsheetui, lparam.param().abi(), core::mem::transmute(presult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ConfigurePortA(pname: P0, hwnd: P1, pportname: P2) -> super::super::Foundation::BOOL @@ -352,7 +352,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn CreatePrinterIC(hprinter : super::super::Foundation:: HANDLE, pdevmode : *const super::Gdi:: DEVMODEW) -> super::super::Foundation:: HANDLE); - CreatePrinterIC(hprinter.param().abi(), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null()))) + CreatePrinterIC(hprinter.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DeleteFormA(hprinter: P0, pformname: P1) -> super::super::Foundation::BOOL @@ -630,7 +630,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DocumentPropertiesA(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, pdevicename : windows_core::PCSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEA, pdevmodeinput : *const super::Gdi:: DEVMODEA, fmode : u32) -> i32); - DocumentPropertiesA(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(std::ptr::null())), fmode) + DocumentPropertiesA(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), fmode) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -641,7 +641,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DocumentPropertiesW(hwnd : super::super::Foundation:: HWND, hprinter : super::super::Foundation:: HANDLE, pdevicename : windows_core::PCWSTR, pdevmodeoutput : *mut super::Gdi:: DEVMODEW, pdevmodeinput : *const super::Gdi:: DEVMODEW, fmode : u32) -> i32); - DocumentPropertiesW(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(std::ptr::null())), fmode) + DocumentPropertiesW(hwnd.param().abi(), hprinter.param().abi(), pdevicename.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), fmode) } #[inline] pub unsafe fn EndDocPrinter(hprinter: P0) -> super::super::Foundation::BOOL @@ -773,7 +773,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataA(hprinter : super::super::Foundation:: HANDLE, dwindex : u32, pvaluename : windows_core::PSTR, cbvaluename : u32, pcbvaluename : *mut u32, ptype : *mut u32, pdata : *mut u8, cbdata : u32, pcbdata : *mut u32) -> u32); - EnumPrinterDataA(hprinter.param().abi(), dwindex, core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), pcbvaluename, core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(std::ptr::null_mut()))) + EnumPrinterDataA(hprinter.param().abi(), dwindex, core::mem::transmute(pvaluename.as_ptr()), pvaluename.len().try_into().unwrap(), pcbvaluename, core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn EnumPrinterDataExA(hprinter: P0, pkeyname: P1, penumvalues: Option<&mut [u8]>, pcbenumvalues: *mut u32, pnenumvalues: *mut u32) -> u32 @@ -799,7 +799,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn EnumPrinterDataW(hprinter : super::super::Foundation:: HANDLE, dwindex : u32, pvaluename : windows_core::PWSTR, cbvaluename : u32, pcbvaluename : *mut u32, ptype : *mut u32, pdata : *mut u8, cbdata : u32, pcbdata : *mut u32) -> u32); - EnumPrinterDataW(hprinter.param().abi(), dwindex, core::mem::transmute(pvaluename), cbvaluename, pcbvaluename, core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(std::ptr::null_mut()))) + EnumPrinterDataW(hprinter.param().abi(), dwindex, core::mem::transmute(pvaluename), cbvaluename, pcbvaluename, core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn EnumPrinterDriversA(pname: P0, penvironment: P1, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32, pcreturned: *mut u32) -> windows_core::Result<()> @@ -864,7 +864,7 @@ where P4: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn ExtDeviceMode(hwnd : super::super::Foundation:: HWND, hinst : super::super::Foundation:: HANDLE, pdevmodeoutput : *mut super::Gdi:: DEVMODEA, pdevicename : windows_core::PCSTR, pport : windows_core::PCSTR, pdevmodeinput : *const super::Gdi:: DEVMODEA, pprofile : windows_core::PCSTR, fmode : u32) -> i32); - ExtDeviceMode(hwnd.param().abi(), hinst.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(std::ptr::null_mut())), pdevicename.param().abi(), pport.param().abi(), core::mem::transmute(pdevmodeinput.unwrap_or(std::ptr::null())), pprofile.param().abi(), fmode) + ExtDeviceMode(hwnd.param().abi(), hinst.param().abi(), core::mem::transmute(pdevmodeoutput.unwrap_or(core::ptr::null_mut())), pdevicename.param().abi(), pport.param().abi(), core::mem::transmute(pdevmodeinput.unwrap_or(core::ptr::null())), pprofile.param().abi(), fmode) } #[inline] pub unsafe fn FindClosePrinterChangeNotification(hchange: P0) -> super::super::Foundation::BOOL @@ -880,7 +880,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn FindFirstPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, fdwfilter : u32, fdwoptions : u32, pprinternotifyoptions : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - FindFirstPrinterChangeNotification(hprinter.param().abi(), fdwfilter, fdwoptions, core::mem::transmute(pprinternotifyoptions.unwrap_or(std::ptr::null()))) + FindFirstPrinterChangeNotification(hprinter.param().abi(), fdwfilter, fdwoptions, core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FindNextPrinterChangeNotification(hchange: P0, pdwchange: Option<*mut u32>, pvreserved: Option<*const core::ffi::c_void>, ppprinternotifyinfo: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -888,7 +888,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn FindNextPrinterChangeNotification(hchange : super::super::Foundation:: HANDLE, pdwchange : *mut u32, pvreserved : *const core::ffi::c_void, ppprinternotifyinfo : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - FindNextPrinterChangeNotification(hchange.param().abi(), core::mem::transmute(pdwchange.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(std::ptr::null_mut()))) + FindNextPrinterChangeNotification(hchange.param().abi(), core::mem::transmute(pdwchange.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FlushPrinter(hprinter: P0, pbuf: Option<*const core::ffi::c_void>, cbbuf: u32, pcwritten: *mut u32, csleep: u32) -> super::super::Foundation::BOOL @@ -896,7 +896,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn FlushPrinter(hprinter : super::super::Foundation:: HANDLE, pbuf : *const core::ffi::c_void, cbbuf : u32, pcwritten : *mut u32, csleep : u32) -> super::super::Foundation:: BOOL); - FlushPrinter(hprinter.param().abi(), core::mem::transmute(pbuf.unwrap_or(std::ptr::null())), cbbuf, pcwritten, csleep) + FlushPrinter(hprinter.param().abi(), core::mem::transmute(pbuf.unwrap_or(core::ptr::null())), cbbuf, pcwritten, csleep) } #[inline] pub unsafe fn FreePrintNamedPropertyArray(ppproperties: Option<&mut [*mut PrintNamedProperty]>) { @@ -1171,7 +1171,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataA(hprinter : super::super::Foundation:: HANDLE, pvaluename : windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataA(hprinter.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) + GetPrinterDataA(hprinter.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[inline] pub unsafe fn GetPrinterDataExA(hprinter: P0, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1181,7 +1181,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExA(hprinter : super::super::Foundation:: HANDLE, pkeyname : windows_core::PCSTR, pvaluename : windows_core::PCSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExA(hprinter.param().abi(), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) + GetPrinterDataExA(hprinter.param().abi(), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[inline] pub unsafe fn GetPrinterDataExW(hprinter: P0, pkeyname: P1, pvaluename: P2, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1191,7 +1191,7 @@ where P2: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataExW(hprinter : super::super::Foundation:: HANDLE, pkeyname : windows_core::PCWSTR, pvaluename : windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataExW(hprinter.param().abi(), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) + GetPrinterDataExW(hprinter.param().abi(), pkeyname.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[inline] pub unsafe fn GetPrinterDataW(hprinter: P0, pvaluename: P1, ptype: Option<*mut u32>, pdata: Option<&mut [u8]>, pcbneeded: *mut u32) -> u32 @@ -1200,7 +1200,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn GetPrinterDataW(hprinter : super::super::Foundation:: HANDLE, pvaluename : windows_core::PCWSTR, ptype : *mut u32, pdata : *mut u8, nsize : u32, pcbneeded : *mut u32) -> u32); - GetPrinterDataW(hprinter.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) + GetPrinterDataW(hprinter.param().abi(), pvaluename.param().abi(), core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbneeded) } #[inline] pub unsafe fn GetPrinterDriver2A(hwnd: P0, hprinter: P1, penvironment: P2, level: u32, pdriverinfo: Option<&mut [u8]>, pcbneeded: *mut u32) -> super::super::Foundation::BOOL @@ -1331,13 +1331,13 @@ where #[inline] pub unsafe fn IsValidDevmodeA(pdevmode: Option<*const super::Gdi::DEVMODEA>, devmodesize: usize) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn IsValidDevmodeA(pdevmode : *const super::Gdi:: DEVMODEA, devmodesize : usize) -> super::super::Foundation:: BOOL); - IsValidDevmodeA(core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), devmodesize) + IsValidDevmodeA(core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), devmodesize) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn IsValidDevmodeW(pdevmode: Option<*const super::Gdi::DEVMODEW>, devmodesize: usize) -> super::super::Foundation::BOOL { windows_targets::link!("winspool.drv" "system" fn IsValidDevmodeW(pdevmode : *const super::Gdi:: DEVMODEW, devmodesize : usize) -> super::super::Foundation:: BOOL); - IsValidDevmodeW(core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), devmodesize) + IsValidDevmodeW(core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), devmodesize) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1346,7 +1346,7 @@ where P0: windows_core::Param, { 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.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(std::ptr::null())), core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + OpenPrinter2A(pprintername.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(core::ptr::null())), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1355,7 +1355,7 @@ where P0: windows_core::Param, { 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.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(std::ptr::null())), core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + OpenPrinter2W(pprintername.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(core::ptr::null())), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1364,7 +1364,7 @@ where P0: windows_core::Param, { 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.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(std::ptr::null()))).ok() + OpenPrinterA(pprintername.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1373,7 +1373,7 @@ where P0: windows_core::Param, { 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.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(std::ptr::null()))).ok() + OpenPrinterW(pprintername.param().abi(), phprinter, core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn PartialReplyPrinterChangeNotification(hprinter: P0, pdatasrc: Option<*const PRINTER_NOTIFY_INFO_DATA>) -> super::super::Foundation::BOOL @@ -1381,7 +1381,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn PartialReplyPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, pdatasrc : *const PRINTER_NOTIFY_INFO_DATA) -> super::super::Foundation:: BOOL); - PartialReplyPrinterChangeNotification(hprinter.param().abi(), core::mem::transmute(pdatasrc.unwrap_or(std::ptr::null()))) + PartialReplyPrinterChangeNotification(hprinter.param().abi(), core::mem::transmute(pdatasrc.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PlayGdiScriptOnPrinterIC(hprinteric: P0, pin: &[u8], pout: &mut [u8], ul: u32) -> super::super::Foundation::BOOL @@ -1437,7 +1437,7 @@ where P1: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn ProvidorFindFirstPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, fdwflags : u32, fdwoptions : u32, hnotify : super::super::Foundation:: HANDLE, pprinternotifyoptions : *const core::ffi::c_void, pvreserved1 : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - ProvidorFindFirstPrinterChangeNotification(hprinter.param().abi(), fdwflags, fdwoptions, hnotify.param().abi(), core::mem::transmute(pprinternotifyoptions.unwrap_or(std::ptr::null())), core::mem::transmute(pvreserved1.unwrap_or(std::ptr::null_mut()))) + ProvidorFindFirstPrinterChangeNotification(hprinter.param().abi(), fdwflags, fdwoptions, hnotify.param().abi(), core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved1.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ReadPrinter(hprinter: P0, pbuf: *mut core::ffi::c_void, cbbuf: u32, pnobytesread: *mut u32) -> super::super::Foundation::BOOL @@ -1471,7 +1471,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn ReplyPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, fdwchangeflags : u32, pdwresult : *mut u32, pprinternotifyinfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplyPrinterChangeNotification(hprinter.param().abi(), fdwchangeflags, core::mem::transmute(pdwresult.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pprinternotifyinfo.unwrap_or(std::ptr::null()))) + ReplyPrinterChangeNotification(hprinter.param().abi(), fdwchangeflags, core::mem::transmute(pdwresult.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprinternotifyinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ReplyPrinterChangeNotificationEx(hnotify: P0, dwcolor: u32, fdwflags: u32, pdwresult: *mut u32, pprinternotifyinfo: *const core::ffi::c_void) -> super::super::Foundation::BOOL @@ -1496,7 +1496,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn ResetPrinterA(hprinter : super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSA) -> super::super::Foundation:: BOOL); - ResetPrinterA(hprinter.param().abi(), core::mem::transmute(pdefault.unwrap_or(std::ptr::null()))) + ResetPrinterA(hprinter.param().abi(), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1505,7 +1505,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn ResetPrinterW(hprinter : super::super::Foundation:: HANDLE, pdefault : *const PRINTER_DEFAULTSW) -> super::super::Foundation:: BOOL); - ResetPrinterW(hprinter.param().abi(), core::mem::transmute(pdefault.unwrap_or(std::ptr::null()))) + ResetPrinterW(hprinter.param().abi(), core::mem::transmute(pdefault.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RevertToPrinterSelf() -> super::super::Foundation::HANDLE { @@ -1540,7 +1540,7 @@ pub unsafe fn RouterFreeBidiResponseContainer(pdata: *const BIDI_RESPONSE_CONTAI #[inline] pub unsafe fn RouterFreePrinterNotifyInfo(pinfo: Option<*const PRINTER_NOTIFY_INFO>) -> super::super::Foundation::BOOL { windows_targets::link!("spoolss.dll" "system" fn RouterFreePrinterNotifyInfo(pinfo : *const PRINTER_NOTIFY_INFO) -> super::super::Foundation:: BOOL); - RouterFreePrinterNotifyInfo(core::mem::transmute(pinfo.unwrap_or(std::ptr::null()))) + RouterFreePrinterNotifyInfo(core::mem::transmute(pinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ScheduleJob(hprinter: P0, jobid: u32) -> super::super::Foundation::BOOL @@ -1598,7 +1598,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn SetJobA(hprinter : super::super::Foundation:: HANDLE, jobid : u32, level : u32, pjob : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetJobA(hprinter.param().abi(), jobid, level, core::mem::transmute(pjob.unwrap_or(std::ptr::null())), command) + SetJobA(hprinter.param().abi(), jobid, level, core::mem::transmute(pjob.unwrap_or(core::ptr::null())), command) } #[inline] pub unsafe fn SetJobNamedProperty(hprinter: P0, jobid: u32, pproperty: *const PrintNamedProperty) -> u32 @@ -1614,7 +1614,7 @@ where P0: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn SetJobW(hprinter : super::super::Foundation:: HANDLE, jobid : u32, level : u32, pjob : *const u8, command : u32) -> super::super::Foundation:: BOOL); - SetJobW(hprinter.param().abi(), jobid, level, core::mem::transmute(pjob.unwrap_or(std::ptr::null())), command) + SetJobW(hprinter.param().abi(), jobid, level, core::mem::transmute(pjob.unwrap_or(core::ptr::null())), command) } #[inline] pub unsafe fn SetPortA(pname: P0, pportname: P1, dwlevel: u32, pportinfo: *const u8) -> windows_core::Result<()> @@ -1640,7 +1640,7 @@ where P0: windows_core::Param, { 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.param().abi(), level, core::mem::transmute(pprinter.unwrap_or(std::ptr::null())), command).ok() + SetPrinterA(hprinter.param().abi(), level, core::mem::transmute(pprinter.unwrap_or(core::ptr::null())), command).ok() } #[inline] pub unsafe fn SetPrinterDataA(hprinter: P0, pvaluename: P1, r#type: u32, pdata: &[u8]) -> u32 @@ -1686,7 +1686,7 @@ where P0: windows_core::Param, { 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.param().abi(), level, core::mem::transmute(pprinter.unwrap_or(std::ptr::null())), command).ok() + SetPrinterW(hprinter.param().abi(), level, core::mem::transmute(pprinter.unwrap_or(core::ptr::null())), command).ok() } #[inline] pub unsafe fn SplIsSessionZero(hprinter: P0, jobid: u32, pissessionzero: *mut super::super::Foundation::BOOL) -> u32 @@ -1727,7 +1727,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn SpoolerFindFirstPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, fdwfilterflags : u32, fdwoptions : u32, pprinternotifyoptions : *const core::ffi::c_void, pvreserved : *const core::ffi::c_void, pnotificationconfig : *const core::ffi::c_void, phnotify : *mut super::super::Foundation:: HANDLE, phevent : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SpoolerFindFirstPrinterChangeNotification(hprinter.param().abi(), fdwfilterflags, fdwoptions, pprinternotifyoptions, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), pnotificationconfig, core::mem::transmute(phnotify.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phevent.unwrap_or(std::ptr::null_mut()))) + SpoolerFindFirstPrinterChangeNotification(hprinter.param().abi(), fdwfilterflags, fdwoptions, pprinternotifyoptions, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), pnotificationconfig, core::mem::transmute(phnotify.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phevent.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SpoolerFindNextPrinterChangeNotification(hprinter: P0, pfdwchange: *mut u32, pprinternotifyoptions: Option<*const core::ffi::c_void>, ppprinternotifyinfo: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -1735,7 +1735,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn SpoolerFindNextPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, pfdwchange : *mut u32, pprinternotifyoptions : *const core::ffi::c_void, ppprinternotifyinfo : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - SpoolerFindNextPrinterChangeNotification(hprinter.param().abi(), pfdwchange, core::mem::transmute(pprinternotifyoptions.unwrap_or(std::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(std::ptr::null_mut()))) + SpoolerFindNextPrinterChangeNotification(hprinter.param().abi(), pfdwchange, core::mem::transmute(pprinternotifyoptions.unwrap_or(core::ptr::null())), core::mem::transmute(ppprinternotifyinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SpoolerFreePrinterNotifyInfo(pinfo: *const PRINTER_NOTIFY_INFO) { @@ -1748,7 +1748,7 @@ where P0: windows_core::Param, { windows_targets::link!("spoolss.dll" "system" fn SpoolerRefreshPrinterChangeNotification(hprinter : super::super::Foundation:: HANDLE, dwcolor : u32, poptions : *const PRINTER_NOTIFY_OPTIONS, ppinfo : *mut *mut PRINTER_NOTIFY_INFO) -> super::super::Foundation:: BOOL); - SpoolerRefreshPrinterChangeNotification(hprinter.param().abi(), dwcolor, poptions, core::mem::transmute(ppinfo.unwrap_or(std::ptr::null_mut()))) + SpoolerRefreshPrinterChangeNotification(hprinter.param().abi(), dwcolor, poptions, core::mem::transmute(ppinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn StartDocPrinterA(hprinter: P0, level: u32, pdocinfo: *const DOC_INFO_1A) -> u32 @@ -1836,7 +1836,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn XcvDataW(hxcv : super::super::Foundation:: HANDLE, pszdataname : windows_core::PCWSTR, pinputdata : *const u8, cbinputdata : u32, poutputdata : *mut u8, cboutputdata : u32, pcboutputneeded : *mut u32, pdwstatus : *mut u32) -> super::super::Foundation:: BOOL); - XcvDataW(hxcv.param().abi(), pszdataname.param().abi(), core::mem::transmute(pinputdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pinputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcboutputneeded, core::mem::transmute(pdwstatus.unwrap_or(std::ptr::null_mut()))) + XcvDataW(hxcv.param().abi(), pszdataname.param().abi(), core::mem::transmute(pinputdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pinputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(poutputdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), poutputdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcboutputneeded, core::mem::transmute(pdwstatus.unwrap_or(core::ptr::null_mut()))) } windows_core::imp::define_interface!(IAsyncGetSendNotificationCookie, IAsyncGetSendNotificationCookie_Vtbl, 0); impl core::ops::Deref for IAsyncGetSendNotificationCookie { @@ -2637,7 +2637,7 @@ impl core::ops::Deref for IPrintAsyncNotifyDataObject { windows_core::imp::interface_hierarchy!(IPrintAsyncNotifyDataObject, windows_core::IUnknown); impl IPrintAsyncNotifyDataObject { pub unsafe fn AcquireData(&self, ppnotificationdata: Option<*mut *mut u8>, psize: Option<*mut u32>, ppschema: Option<*mut *mut windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AcquireData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnotificationdata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppschema.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AcquireData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnotificationdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppschema.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReleaseData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseData)(windows_core::Interface::as_raw(self)).ok() @@ -2761,7 +2761,7 @@ impl IPrintCoreHelper { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetOption)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), cbsize, pszfeaturerequested.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetOption)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), cbsize, pszfeaturerequested.param().abi(), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetOptions(&self, pdevmode: *mut super::Gdi::DEVMODEA, cbsize: u32, bresolveconflicts: P0, pfopairs: *const PRINT_FEATURE_OPTION, cpairs: u32, pcpairswritten: *mut u32, pdwresult: *mut u32) -> windows_core::Result<()> @@ -2783,7 +2783,7 @@ impl IPrintCoreHelper { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), cbsize, pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), ppfoconstraints, pdwnumoptions).ok() + (windows_core::Interface::vtable(self).WhyConstrained)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), cbsize, pszfeaturekeyword.param().abi(), pszoptionkeyword.param().abi(), ppfoconstraints, pdwnumoptions).ok() } pub unsafe fn EnumFeatures(&self, pfeaturelist: *mut *mut *mut windows_core::PCSTR, pdwnumfeatures: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnumFeatures)(windows_core::Interface::as_raw(self), pfeaturelist, pdwnumfeatures).ok() @@ -2922,7 +2922,7 @@ impl IPrintCoreHelperUni2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), cbsize, pszcommandname.param().abi(), ppcommandbytes, pcbcommandsize).ok() + (windows_core::Interface::vtable(self).GetNamedCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), cbsize, pszcommandname.param().abi(), ppcommandbytes, pcbcommandsize).ok() } } #[repr(C)] @@ -3519,7 +3519,7 @@ impl core::ops::Deref for IPrintReadStream { windows_core::imp::interface_hierarchy!(IPrintReadStream, windows_core::IUnknown); impl IPrintReadStream { pub unsafe fn Seek(&self, dlibmove: i64, dworigin: u32, plibnewposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadBytes(&self, pvbuffer: *mut core::ffi::c_void, cbrequested: u32, pcbread: *mut u32, pbendoffile: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), pvbuffer, cbrequested, pcbread, pbendoffile).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs b/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs index c3e7ab6bb5..6b1c619642 100644 --- a/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Management/MobileDeviceManagementRegistration/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("mdmlocalmanagement.dll" "system" fn ApplyLocalManagementSyncML(syncmlrequest : windows_core::PCWSTR, syncmlresult : *mut windows_core::PWSTR) -> windows_core::HRESULT); - ApplyLocalManagementSyncML(syncmlrequest.param().abi(), core::mem::transmute(syncmlresult.unwrap_or(std::ptr::null_mut()))).ok() + ApplyLocalManagementSyncML(syncmlrequest.param().abi(), core::mem::transmute(syncmlresult.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DiscoverManagementService(pszupn: P0) -> windows_core::Result<*mut MANAGEMENT_SERVICE_INFO> @@ -63,7 +63,7 @@ pub unsafe fn IsMdmUxWithoutAadAllowed() -> windows_core::Result) -> windows_core::Result<()> { windows_targets::link!("mdmlocalmanagement.dll" "system" fn RegisterDeviceWithLocalManagement(alreadyregistered : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RegisterDeviceWithLocalManagement(core::mem::transmute(alreadyregistered.unwrap_or(std::ptr::null_mut()))).ok() + RegisterDeviceWithLocalManagement(core::mem::transmute(alreadyregistered.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RegisterDeviceWithManagement(pszupn: P0, ppszmdmserviceuri: P1, ppzsaccesstoken: P2) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs index 45fcd363c5..7fac0dad77 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/DirectSound/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsound.dll" "system" fn DirectSoundCaptureCreate(pcguiddevice : *const windows_core::GUID, ppdsc : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCaptureCreate(core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null())), core::mem::transmute(ppdsc), punkouter.param().abi()).ok() + DirectSoundCaptureCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null())), core::mem::transmute(ppdsc), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundCaptureCreate8(pcguiddevice: Option<*const windows_core::GUID>, ppdsc8: *mut Option, punkouter: P0) -> windows_core::Result<()> @@ -12,17 +12,17 @@ where P0: windows_core::Param, { windows_targets::link!("dsound.dll" "system" fn DirectSoundCaptureCreate8(pcguiddevice : *const windows_core::GUID, ppdsc8 : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCaptureCreate8(core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null())), core::mem::transmute(ppdsc8), punkouter.param().abi()).ok() + DirectSoundCaptureCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null())), core::mem::transmute(ppdsc8), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundCaptureEnumerateA(pdsenumcallback: LPDSENUMCALLBACKA, pcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("dsound.dll" "system" fn DirectSoundCaptureEnumerateA(pdsenumcallback : LPDSENUMCALLBACKA, pcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCaptureEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null()))).ok() + DirectSoundCaptureEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DirectSoundCaptureEnumerateW(pdsenumcallback: LPDSENUMCALLBACKW, pcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("dsound.dll" "system" fn DirectSoundCaptureEnumerateW(pdsenumcallback : LPDSENUMCALLBACKW, pcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCaptureEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null()))).ok() + DirectSoundCaptureEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DirectSoundCreate(pcguiddevice: Option<*const windows_core::GUID>, ppds: *mut Option, punkouter: P0) -> windows_core::Result<()> @@ -30,7 +30,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsound.dll" "system" fn DirectSoundCreate(pcguiddevice : *const windows_core::GUID, ppds : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCreate(core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null())), core::mem::transmute(ppds), punkouter.param().abi()).ok() + DirectSoundCreate(core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null())), core::mem::transmute(ppds), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundCreate8(pcguiddevice: Option<*const windows_core::GUID>, ppds8: *mut Option, punkouter: P0) -> windows_core::Result<()> @@ -38,17 +38,17 @@ where P0: windows_core::Param, { windows_targets::link!("dsound.dll" "system" fn DirectSoundCreate8(pcguiddevice : *const windows_core::GUID, ppds8 : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundCreate8(core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null())), core::mem::transmute(ppds8), punkouter.param().abi()).ok() + DirectSoundCreate8(core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null())), core::mem::transmute(ppds8), punkouter.param().abi()).ok() } #[inline] pub unsafe fn DirectSoundEnumerateA(pdsenumcallback: LPDSENUMCALLBACKA, pcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("dsound.dll" "system" fn DirectSoundEnumerateA(pdsenumcallback : LPDSENUMCALLBACKA, pcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null()))).ok() + DirectSoundEnumerateA(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DirectSoundEnumerateW(pdsenumcallback: LPDSENUMCALLBACKW, pcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("dsound.dll" "system" fn DirectSoundEnumerateW(pdsenumcallback : LPDSENUMCALLBACKW, pcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(std::ptr::null()))).ok() + DirectSoundEnumerateW(pdsenumcallback, core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DirectSoundFullDuplexCreate(pcguidcapturedevice: Option<*const windows_core::GUID>, pcguidrenderdevice: Option<*const windows_core::GUID>, pcdscbufferdesc: *const DSCBUFFERDESC, pcdsbufferdesc: *const DSBUFFERDESC, hwnd: P0, dwlevel: u32, ppdsfd: *mut Option, ppdscbuffer8: *mut Option, ppdsbuffer8: *mut Option, punkouter: P1) -> windows_core::Result<()> @@ -57,13 +57,13 @@ where P1: windows_core::Param, { windows_targets::link!("dsound.dll" "system" fn DirectSoundFullDuplexCreate(pcguidcapturedevice : *const windows_core::GUID, pcguidrenderdevice : *const windows_core::GUID, pcdscbufferdesc : *const DSCBUFFERDESC, pcdsbufferdesc : *const DSBUFFERDESC, hwnd : super::super::super::Foundation:: HWND, dwlevel : u32, ppdsfd : *mut * mut core::ffi::c_void, ppdscbuffer8 : *mut * mut core::ffi::c_void, ppdsbuffer8 : *mut * mut core::ffi::c_void, punkouter : * mut core::ffi::c_void) -> windows_core::HRESULT); - DirectSoundFullDuplexCreate(core::mem::transmute(pcguidcapturedevice.unwrap_or(std::ptr::null())), core::mem::transmute(pcguidrenderdevice.unwrap_or(std::ptr::null())), pcdscbufferdesc, pcdsbufferdesc, hwnd.param().abi(), dwlevel, core::mem::transmute(ppdsfd), core::mem::transmute(ppdscbuffer8), core::mem::transmute(ppdsbuffer8), punkouter.param().abi()).ok() + DirectSoundFullDuplexCreate(core::mem::transmute(pcguidcapturedevice.unwrap_or(core::ptr::null())), core::mem::transmute(pcguidrenderdevice.unwrap_or(core::ptr::null())), pcdscbufferdesc, pcdsbufferdesc, hwnd.param().abi(), dwlevel, core::mem::transmute(ppdsfd), core::mem::transmute(ppdscbuffer8), core::mem::transmute(ppdsbuffer8), punkouter.param().abi()).ok() } #[inline] pub unsafe fn GetDeviceID(pguidsrc: Option<*const windows_core::GUID>) -> windows_core::Result { windows_targets::link!("dsound.dll" "system" fn GetDeviceID(pguidsrc : *const windows_core::GUID, pguiddest : *mut windows_core::GUID) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetDeviceID(core::mem::transmute(pguidsrc.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + GetDeviceID(core::mem::transmute(pguidsrc.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } windows_core::imp::define_interface!(IDirectSound, IDirectSound_Vtbl, 0x279afa83_4981_11ce_a521_0020af0be560); impl core::ops::Deref for IDirectSound { @@ -107,7 +107,7 @@ impl IDirectSound { (windows_core::Interface::vtable(self).SetSpeakerConfig)(windows_core::Interface::as_raw(self), dwspeakerconfig).ok() } pub unsafe fn Initialize(&self, pcguiddevice: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -366,10 +366,10 @@ impl IDirectSoundBuffer { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), pdsbuffercaps).ok() } pub unsafe fn GetCurrentPosition(&self, pdwcurrentplaycursor: Option<*mut u32>, pdwcurrentwritecursor: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcurrentplaycursor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwcurrentwritecursor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcurrentplaycursor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwcurrentwritecursor.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFormat(&self, pwfxformat: Option<*mut super::WAVEFORMATEX>, dwsizeallocated: u32, pdwsizewritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(std::ptr::null_mut())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::ptr::null_mut())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetVolume(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -394,7 +394,7 @@ impl IDirectSoundBuffer { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsound.param().abi(), pcdsbufferdesc).ok() } pub unsafe fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: Option<*mut *mut core::ffi::c_void>, pdwaudiobytes2: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1, pdwaudiobytes1, core::mem::transmute(ppvaudioptr2.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(std::ptr::null_mut())), dwflags).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1, pdwaudiobytes1, core::mem::transmute(ppvaudioptr2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::ptr::null_mut())), dwflags).ok() } pub unsafe fn Play(&self, dwreserved1: u32, dwpriority: u32, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Play)(windows_core::Interface::as_raw(self), dwreserved1, dwpriority, dwflags).ok() @@ -418,7 +418,7 @@ impl IDirectSoundBuffer { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Unlock(&self, pvaudioptr1: *const core::ffi::c_void, dwaudiobytes1: u32, pvaudioptr2: Option<*const core::ffi::c_void>, dwaudiobytes2: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(std::ptr::null())), dwaudiobytes2).ok() + (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(core::ptr::null())), dwaudiobytes2).ok() } pub unsafe fn Restore(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Restore)(windows_core::Interface::as_raw(self)).ok() @@ -456,7 +456,7 @@ impl core::ops::Deref for IDirectSoundBuffer8 { windows_core::imp::interface_hierarchy!(IDirectSoundBuffer8, windows_core::IUnknown, IDirectSoundBuffer); impl IDirectSoundBuffer8 { pub unsafe fn SetFX(&self, dweffectscount: u32, pdsfxdesc: Option<*const DSEFFECTDESC>, pdwresultcodes: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetFX)(windows_core::Interface::as_raw(self), dweffectscount, core::mem::transmute(pdsfxdesc.unwrap_or(std::ptr::null())), core::mem::transmute(pdwresultcodes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetFX)(windows_core::Interface::as_raw(self), dweffectscount, core::mem::transmute(pdsfxdesc.unwrap_or(core::ptr::null())), core::mem::transmute(pdwresultcodes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AcquireResources(&self, dwflags: u32, pdwresultcodes: &mut [u32]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AcquireResources)(windows_core::Interface::as_raw(self), dwflags, pdwresultcodes.len().try_into().unwrap(), core::mem::transmute(pdwresultcodes.as_ptr())).ok() @@ -492,7 +492,7 @@ impl IDirectSoundCapture { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn Initialize(&self, pcguiddevice: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pcguiddevice.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -516,10 +516,10 @@ impl IDirectSoundCaptureBuffer { (windows_core::Interface::vtable(self).GetCaps)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetCurrentPosition(&self, pdwcaptureposition: Option<*mut u32>, pdwreadposition: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcaptureposition.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwreadposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwcaptureposition.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwreadposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFormat(&self, pwfxformat: Option<*mut super::WAVEFORMATEX>, dwsizeallocated: u32, pdwsizewritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(std::ptr::null_mut())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFormat)(windows_core::Interface::as_raw(self), core::mem::transmute(pwfxformat.unwrap_or(core::ptr::null_mut())), dwsizeallocated, core::mem::transmute(pdwsizewritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -532,7 +532,7 @@ impl IDirectSoundCaptureBuffer { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), pdirectsoundcapture.param().abi(), pcdscbufferdesc).ok() } pub unsafe fn Lock(&self, dwoffset: u32, dwbytes: u32, ppvaudioptr1: *mut *mut core::ffi::c_void, pdwaudiobytes1: *mut u32, ppvaudioptr2: Option<*mut *mut core::ffi::c_void>, pdwaudiobytes2: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1, pdwaudiobytes1, core::mem::transmute(ppvaudioptr2.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(std::ptr::null_mut())), dwflags).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), dwoffset, dwbytes, ppvaudioptr1, pdwaudiobytes1, core::mem::transmute(ppvaudioptr2.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwaudiobytes2.unwrap_or(core::ptr::null_mut())), dwflags).ok() } pub unsafe fn Start(&self, dwflags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self), dwflags).ok() @@ -541,7 +541,7 @@ impl IDirectSoundCaptureBuffer { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Unlock(&self, pvaudioptr1: *const core::ffi::c_void, dwaudiobytes1: u32, pvaudioptr2: Option<*const core::ffi::c_void>, dwaudiobytes2: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(std::ptr::null())), dwaudiobytes2).ok() + (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self), pvaudioptr1, dwaudiobytes1, core::mem::transmute(pvaudioptr2.unwrap_or(core::ptr::null())), dwaudiobytes2).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/impl.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/impl.rs index 6745562c60..b30cf87347 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/impl.rs @@ -238,7 +238,7 @@ impl IXAudio2EngineCallback_Vtbl { } } #[doc(hidden)] -struct IXAudio2EngineCallback_ImplVtbl(std::marker::PhantomData); +struct IXAudio2EngineCallback_ImplVtbl(core::marker::PhantomData); impl IXAudio2EngineCallback_ImplVtbl { const VTABLE: IXAudio2EngineCallback_Vtbl = IXAudio2EngineCallback_Vtbl::new::(); } @@ -294,7 +294,7 @@ impl IXAudio2MasteringVoice_Vtbl { } } #[doc(hidden)] -struct IXAudio2MasteringVoice_ImplVtbl(std::marker::PhantomData); +struct IXAudio2MasteringVoice_ImplVtbl(core::marker::PhantomData); impl IXAudio2MasteringVoice_ImplVtbl { const VTABLE: IXAudio2MasteringVoice_Vtbl = IXAudio2MasteringVoice_Vtbl::new::(); } @@ -385,7 +385,7 @@ impl IXAudio2SourceVoice_Vtbl { } } #[doc(hidden)] -struct IXAudio2SourceVoice_ImplVtbl(std::marker::PhantomData); +struct IXAudio2SourceVoice_ImplVtbl(core::marker::PhantomData); impl IXAudio2SourceVoice_ImplVtbl { const VTABLE: IXAudio2SourceVoice_Vtbl = IXAudio2SourceVoice_Vtbl::new::(); } @@ -403,7 +403,7 @@ impl IXAudio2SubmixVoice_Vtbl { } } #[doc(hidden)] -struct IXAudio2SubmixVoice_ImplVtbl(std::marker::PhantomData); +struct IXAudio2SubmixVoice_ImplVtbl(core::marker::PhantomData); impl IXAudio2SubmixVoice_ImplVtbl { const VTABLE: IXAudio2SubmixVoice_Vtbl = IXAudio2SubmixVoice_Vtbl::new::(); } @@ -556,7 +556,7 @@ impl IXAudio2Voice_Vtbl { } } #[doc(hidden)] -struct IXAudio2Voice_ImplVtbl(std::marker::PhantomData); +struct IXAudio2Voice_ImplVtbl(core::marker::PhantomData); impl IXAudio2Voice_ImplVtbl { const VTABLE: IXAudio2Voice_Vtbl = IXAudio2Voice_Vtbl::new::(); } @@ -625,7 +625,7 @@ impl IXAudio2VoiceCallback_Vtbl { } } #[doc(hidden)] -struct IXAudio2VoiceCallback_ImplVtbl(std::marker::PhantomData); +struct IXAudio2VoiceCallback_ImplVtbl(core::marker::PhantomData); impl IXAudio2VoiceCallback_ImplVtbl { const VTABLE: IXAudio2VoiceCallback_Vtbl = IXAudio2VoiceCallback_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs index be1c4fb567..4e0a58bf5d 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/XAudio2/mod.rs @@ -13,7 +13,7 @@ pub unsafe fn CreateAudioVolumeMeter() -> windows_core::Result, pinitdat: Option<*const core::ffi::c_void>, initdatabytesize: u32) -> windows_core::Result<()> { windows_targets::link!("xaudio2_8.dll" "cdecl" fn CreateFX(clsid : *const windows_core::GUID, peffect : *mut * mut core::ffi::c_void, pinitdat : *const core::ffi::c_void, initdatabytesize : u32) -> windows_core::HRESULT); - CreateFX(clsid, core::mem::transmute(peffect), core::mem::transmute(pinitdat.unwrap_or(std::ptr::null())), initdatabytesize).ok() + CreateFX(clsid, core::mem::transmute(peffect), core::mem::transmute(pinitdat.unwrap_or(core::ptr::null())), initdatabytesize).ok() } #[inline] pub unsafe fn CreateHrtfApo(init: *const HrtfApoInit) -> windows_core::Result { @@ -40,13 +40,13 @@ impl IXAPO { (windows_core::Interface::vtable(self).GetRegistrationProperties)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn IsInputFormatSupported(&self, poutputformat: *const super::WAVEFORMATEX, prequestedinputformat: *const super::WAVEFORMATEX, ppsupportedinputformat: Option<*mut *mut super::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).IsInputFormatSupported)(windows_core::Interface::as_raw(self), poutputformat, prequestedinputformat, core::mem::transmute(ppsupportedinputformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsInputFormatSupported)(windows_core::Interface::as_raw(self), poutputformat, prequestedinputformat, core::mem::transmute(ppsupportedinputformat.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsOutputFormatSupported(&self, pinputformat: *const super::WAVEFORMATEX, prequestedoutputformat: *const super::WAVEFORMATEX, ppsupportedoutputformat: Option<*mut *mut super::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).IsOutputFormatSupported)(windows_core::Interface::as_raw(self), pinputformat, prequestedoutputformat, core::mem::transmute(ppsupportedoutputformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsOutputFormatSupported)(windows_core::Interface::as_raw(self), pinputformat, prequestedoutputformat, core::mem::transmute(ppsupportedoutputformat.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Initialize(&self, pdata: Option<*const core::ffi::c_void>, databytesize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(std::ptr::null())), databytesize).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pdata.unwrap_or(core::ptr::null())), databytesize).ok() } pub unsafe fn Reset(&self) { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)) @@ -161,16 +161,16 @@ impl IXAudio2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), psourceformat, flags, maxfrequencyratio, pcallback.param().abi(), core::mem::transmute(psendlist.unwrap_or(std::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CreateSourceVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsourcevoice), psourceformat, flags, maxfrequencyratio, pcallback.param().abi(), core::mem::transmute(psendlist.unwrap_or(core::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn CreateSubmixVoice(&self, ppsubmixvoice: *mut Option, inputchannels: u32, inputsamplerate: u32, flags: u32, processingstage: u32, psendlist: Option<*const XAUDIO2_VOICE_SENDS>, peffectchain: Option<*const XAUDIO2_EFFECT_CHAIN>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSubmixVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsubmixvoice), inputchannels, inputsamplerate, flags, processingstage, core::mem::transmute(psendlist.unwrap_or(std::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CreateSubmixVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsubmixvoice), inputchannels, inputsamplerate, flags, processingstage, core::mem::transmute(psendlist.unwrap_or(core::ptr::null())), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn CreateMasteringVoice(&self, ppmasteringvoice: *mut Option, inputchannels: u32, inputsamplerate: u32, flags: u32, szdeviceid: P0, peffectchain: Option<*const XAUDIO2_EFFECT_CHAIN>, streamcategory: super::AUDIO_STREAM_CATEGORY) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), inputchannels, inputsamplerate, flags, szdeviceid.param().abi(), core::mem::transmute(peffectchain.unwrap_or(std::ptr::null())), streamcategory).ok() + (windows_core::Interface::vtable(self).CreateMasteringVoice)(windows_core::Interface::as_raw(self), core::mem::transmute(ppmasteringvoice), inputchannels, inputsamplerate, flags, szdeviceid.param().abi(), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null())), streamcategory).ok() } pub unsafe fn StartEngine(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StartEngine)(windows_core::Interface::as_raw(self)).ok() @@ -185,7 +185,7 @@ impl IXAudio2 { (windows_core::Interface::vtable(self).GetPerformanceData)(windows_core::Interface::as_raw(self), pperfdata) } pub unsafe fn SetDebugConfiguration(&self, pdebugconfiguration: Option<*const XAUDIO2_DEBUG_CONFIGURATION>, preserved: Option<*const core::ffi::c_void>) { - (windows_core::Interface::vtable(self).SetDebugConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdebugconfiguration.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).SetDebugConfiguration)(windows_core::Interface::as_raw(self), core::mem::transmute(pdebugconfiguration.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } } #[repr(C)] @@ -277,7 +277,7 @@ impl IXAudio2SourceVoice { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self), flags, operationset).ok() } pub unsafe fn SubmitSourceBuffer(&self, pbuffer: *const XAUDIO2_BUFFER, pbufferwma: Option<*const XAUDIO2_BUFFER_WMA>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SubmitSourceBuffer)(windows_core::Interface::as_raw(self), pbuffer, core::mem::transmute(pbufferwma.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SubmitSourceBuffer)(windows_core::Interface::as_raw(self), pbuffer, core::mem::transmute(pbufferwma.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn FlushSourceBuffers(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FlushSourceBuffers)(windows_core::Interface::as_raw(self)).ok() @@ -338,10 +338,10 @@ impl IXAudio2Voice { result__ } pub unsafe fn SetOutputVoices(&self, psendlist: Option<*const XAUDIO2_VOICE_SENDS>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetOutputVoices)(windows_core::Interface::as_raw(self), core::mem::transmute(psendlist.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetOutputVoices)(windows_core::Interface::as_raw(self), core::mem::transmute(psendlist.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetEffectChain(&self, peffectchain: Option<*const XAUDIO2_EFFECT_CHAIN>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetEffectChain)(windows_core::Interface::as_raw(self), core::mem::transmute(peffectchain.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetEffectChain)(windows_core::Interface::as_raw(self), core::mem::transmute(peffectchain.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn EnableEffect(&self, effectindex: u32, operationset: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EnableEffect)(windows_core::Interface::as_raw(self), effectindex, operationset).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs index f48a431cbd..4cff79eb78 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Audio/mod.rs @@ -17,7 +17,7 @@ where { windows_targets::link!("mmdevapi.dll" "system" fn ActivateAudioInterfaceAsync(deviceinterfacepath : windows_core::PCWSTR, riid : *const windows_core::GUID, activationparams : *const core::mem::MaybeUninit < super::super::System::Com::StructuredStorage:: PROPVARIANT >, completionhandler : * mut core::ffi::c_void, activationoperation : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - ActivateAudioInterfaceAsync(deviceinterfacepath.param().abi(), riid, core::mem::transmute(activationparams.unwrap_or(std::ptr::null())), completionhandler.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + ActivateAudioInterfaceAsync(deviceinterfacepath.param().abi(), riid, core::mem::transmute(activationparams.unwrap_or(core::ptr::null())), completionhandler.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoRegisterMessageFilter(lpmessagefilter: P0, lplpmessagefilter: Option<*mut Option>) -> windows_core::Result<()> @@ -25,7 +25,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoRegisterMessageFilter(lpmessagefilter : * mut core::ffi::c_void, lplpmessagefilter : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - CoRegisterMessageFilter(lpmessagefilter.param().abi(), core::mem::transmute(lplpmessagefilter.unwrap_or(std::ptr::null_mut()))).ok() + CoRegisterMessageFilter(lpmessagefilter.param().abi(), core::mem::transmute(lplpmessagefilter.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CreateCaptureAudioStateMonitor() -> windows_core::Result { @@ -462,7 +462,7 @@ where P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn midiConnect(hmi : HMIDI, hmo : HMIDIOUT, preserved : *const core::ffi::c_void) -> u32); - midiConnect(hmi.param().abi(), hmo.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + midiConnect(hmi.param().abi(), hmo.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn midiDisconnect(hmi: P0, hmo: P1, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -471,7 +471,7 @@ where P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn midiDisconnect(hmi : HMIDI, hmo : HMIDIOUT, preserved : *const core::ffi::c_void) -> u32); - midiDisconnect(hmi.param().abi(), hmo.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + midiDisconnect(hmi.param().abi(), hmo.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn midiInAddBuffer(hmi: P0, pmh: *mut MIDIHDR, cbmh: u32) -> u32 @@ -852,7 +852,7 @@ where #[inline] pub unsafe fn mixerOpen(phmx: Option<*mut HMIXER>, umxid: u32, dwcallback: usize, dwinstance: usize, fdwopen: u32) -> u32 { windows_targets::link!("winmm.dll" "system" fn mixerOpen(phmx : *mut HMIXER, umxid : u32, dwcallback : usize, dwinstance : usize, fdwopen : u32) -> u32); - mixerOpen(core::mem::transmute(phmx.unwrap_or(std::ptr::null_mut())), umxid, dwcallback, dwinstance, fdwopen) + mixerOpen(core::mem::transmute(phmx.unwrap_or(core::ptr::null_mut())), umxid, dwcallback, dwinstance, fdwopen) } #[inline] pub unsafe fn mixerSetControlDetails(hmxobj: P0, pmxcd: *const MIXERCONTROLDETAILS, fdwdetails: u32) -> u32 @@ -946,7 +946,7 @@ where #[inline] pub unsafe fn waveInOpen(phwi: Option<*mut HWAVEIN>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveInOpen(phwi : *mut HWAVEIN, udeviceid : u32, pwfx : *const WAVEFORMATEX, dwcallback : usize, dwinstance : usize, fdwopen : MIDI_WAVE_OPEN_TYPE) -> u32); - waveInOpen(core::mem::transmute(phwi.unwrap_or(std::ptr::null_mut())), udeviceid, pwfx, dwcallback, dwinstance, fdwopen) + waveInOpen(core::mem::transmute(phwi.unwrap_or(core::ptr::null_mut())), udeviceid, pwfx, dwcallback, dwinstance, fdwopen) } #[inline] pub unsafe fn waveInPrepareHeader(hwi: P0, pwh: *mut WAVEHDR, cbwh: u32) -> u32 @@ -1080,7 +1080,7 @@ where #[inline] pub unsafe fn waveOutOpen(phwo: Option<*mut HWAVEOUT>, udeviceid: u32, pwfx: *const WAVEFORMATEX, dwcallback: usize, dwinstance: usize, fdwopen: MIDI_WAVE_OPEN_TYPE) -> u32 { windows_targets::link!("winmm.dll" "system" fn waveOutOpen(phwo : *mut HWAVEOUT, udeviceid : u32, pwfx : *const WAVEFORMATEX, dwcallback : usize, dwinstance : usize, fdwopen : MIDI_WAVE_OPEN_TYPE) -> u32); - waveOutOpen(core::mem::transmute(phwo.unwrap_or(std::ptr::null_mut())), udeviceid, pwfx, dwcallback, dwinstance, fdwopen) + waveOutOpen(core::mem::transmute(phwo.unwrap_or(core::ptr::null_mut())), udeviceid, pwfx, dwcallback, dwinstance, fdwopen) } #[inline] pub unsafe fn waveOutPause(hwo: P0) -> u32 @@ -1265,7 +1265,7 @@ impl IAudioAutoGainControl { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1297,7 +1297,7 @@ impl core::ops::Deref for IAudioCaptureClient { windows_core::imp::interface_hierarchy!(IAudioCaptureClient, windows_core::IUnknown); impl IAudioCaptureClient { pub unsafe fn GetBuffer(&self, ppdata: *mut *mut u8, pnumframestoread: *mut u32, pdwflags: *mut u32, pu64deviceposition: Option<*mut u64>, pu64qpcposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), ppdata, pnumframestoread, pdwflags, core::mem::transmute(pu64deviceposition.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pu64qpcposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), ppdata, pnumframestoread, pdwflags, core::mem::transmute(pu64deviceposition.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pu64qpcposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReleaseBuffer(&self, numframesread: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseBuffer)(windows_core::Interface::as_raw(self), numframesread).ok() @@ -1324,7 +1324,7 @@ impl core::ops::Deref for IAudioChannelConfig { windows_core::imp::interface_hierarchy!(IAudioChannelConfig, windows_core::IUnknown); impl IAudioChannelConfig { pub unsafe fn SetChannelConfig(&self, dwconfig: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), dwconfig, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetChannelConfig)(windows_core::Interface::as_raw(self), dwconfig, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetChannelConfig(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1347,7 +1347,7 @@ impl core::ops::Deref for IAudioClient { windows_core::imp::interface_hierarchy!(IAudioClient, windows_core::IUnknown); impl IAudioClient { pub unsafe fn Initialize(&self, sharemode: AUDCLNT_SHAREMODE, streamflags: u32, hnsbufferduration: i64, hnsperiodicity: i64, pformat: *const WAVEFORMATEX, audiosessionguid: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), sharemode, streamflags, hnsbufferduration, hnsperiodicity, pformat, core::mem::transmute(audiosessionguid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), sharemode, streamflags, hnsbufferduration, hnsperiodicity, pformat, core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetBufferSize(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1362,14 +1362,14 @@ impl IAudioClient { (windows_core::Interface::vtable(self).GetCurrentPadding)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn IsFormatSupported(&self, sharemode: AUDCLNT_SHAREMODE, pformat: *const WAVEFORMATEX, ppclosestmatch: Option<*mut *mut WAVEFORMATEX>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), sharemode, pformat, core::mem::transmute(ppclosestmatch.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).IsFormatSupported)(windows_core::Interface::as_raw(self), sharemode, pformat, core::mem::transmute(ppclosestmatch.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn GetMixFormat(&self) -> windows_core::Result<*mut WAVEFORMATEX> { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetMixFormat)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDevicePeriod(&self, phnsdefaultdeviceperiod: Option<*mut i64>, phnsminimumdeviceperiod: Option<*mut i64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDevicePeriod)(windows_core::Interface::as_raw(self), core::mem::transmute(phnsdefaultdeviceperiod.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phnsminimumdeviceperiod.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDevicePeriod)(windows_core::Interface::as_raw(self), core::mem::transmute(phnsdefaultdeviceperiod.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phnsminimumdeviceperiod.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Start(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Start)(windows_core::Interface::as_raw(self)).ok() @@ -1456,7 +1456,7 @@ impl IAudioClient3 { (windows_core::Interface::vtable(self).GetCurrentSharedModeEnginePeriod)(windows_core::Interface::as_raw(self), ppformat, pcurrentperiodinframes).ok() } pub unsafe fn InitializeSharedAudioStream(&self, streamflags: u32, periodinframes: u32, pformat: *const WAVEFORMATEX, audiosessionguid: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InitializeSharedAudioStream)(windows_core::Interface::as_raw(self), streamflags, periodinframes, pformat, core::mem::transmute(audiosessionguid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).InitializeSharedAudioStream)(windows_core::Interface::as_raw(self), streamflags, periodinframes, pformat, core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1498,7 +1498,7 @@ impl IAudioClock { (windows_core::Interface::vtable(self).GetFrequency)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetPosition(&self, pu64position: *mut u64, pu64qpcposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), pu64position, core::mem::transmute(pu64qpcposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), pu64position, core::mem::transmute(pu64qpcposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCharacteristics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1522,7 +1522,7 @@ impl core::ops::Deref for IAudioClock2 { windows_core::imp::interface_hierarchy!(IAudioClock2, windows_core::IUnknown); impl IAudioClock2 { pub unsafe fn GetDevicePosition(&self, deviceposition: *mut u64, qpcposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDevicePosition)(windows_core::Interface::as_raw(self), deviceposition, core::mem::transmute(qpcposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDevicePosition)(windows_core::Interface::as_raw(self), deviceposition, core::mem::transmute(qpcposition.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1640,7 +1640,7 @@ impl IAudioInputSelector { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1666,7 +1666,7 @@ impl IAudioLoudness { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetEnabled)(windows_core::Interface::as_raw(self), benable.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1701,7 +1701,7 @@ impl IAudioMute { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), bmuted.param().abi(), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetMute(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1728,7 +1728,7 @@ impl IAudioOutputSelector { (windows_core::Interface::vtable(self).GetSelection)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn SetSelection(&self, nidselect: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSelection)(windows_core::Interface::as_raw(self), nidselect, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1976,11 +1976,11 @@ windows_core::imp::interface_hierarchy!(IAudioSessionManager, windows_core::IUnk impl IAudioSessionManager { pub unsafe fn GetAudioSessionControl(&self, audiosessionguid: Option<*const windows_core::GUID>, streamflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetAudioSessionControl)(windows_core::Interface::as_raw(self), core::mem::transmute(audiosessionguid.unwrap_or(std::ptr::null())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetAudioSessionControl)(windows_core::Interface::as_raw(self), core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetSimpleAudioVolume(&self, audiosessionguid: Option<*const windows_core::GUID>, streamflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSimpleAudioVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(audiosessionguid.unwrap_or(std::ptr::null())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSimpleAudioVolume)(windows_core::Interface::as_raw(self), core::mem::transmute(audiosessionguid.unwrap_or(core::ptr::null())), streamflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2069,7 +2069,7 @@ windows_core::imp::interface_hierarchy!(IAudioStateMonitor, windows_core::IUnkno impl IAudioStateMonitor { pub unsafe fn RegisterCallback(&self, callback: PAudioStateMonitorCallback, context: Option<*const core::ffi::c_void>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RegisterCallback)(windows_core::Interface::as_raw(self), callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RegisterCallback)(windows_core::Interface::as_raw(self), callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } pub unsafe fn UnregisterCallback(&self, registration: i64) { (windows_core::Interface::vtable(self).UnregisterCallback)(windows_core::Interface::as_raw(self), registration) @@ -2382,7 +2382,7 @@ impl core::ops::Deref for IControlChangeNotify { windows_core::imp::interface_hierarchy!(IControlChangeNotify, windows_core::IUnknown); impl IControlChangeNotify { pub unsafe fn OnNotify(&self, dwsenderprocessid: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), dwsenderprocessid, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).OnNotify)(windows_core::Interface::as_raw(self), dwsenderprocessid, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -2431,7 +2431,7 @@ impl IDeviceSpecificProperty { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), pvvalue, pcbvalue).ok() } pub unsafe fn SetValue(&self, pvvalue: *const core::ffi::c_void, cbvalue: u32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), pvvalue, cbvalue, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), pvvalue, cbvalue, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Get4BRange(&self, plmin: *mut i32, plmax: *mut i32, plstepping: *mut i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Get4BRange)(windows_core::Interface::as_raw(self), plmin, plmax, plstepping).ok() @@ -2514,7 +2514,7 @@ impl IMMDevice { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), &T::IID, dwclsctx, core::mem::transmute(pactivationparams.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), &T::IID, dwclsctx, core::mem::transmute(pactivationparams.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn OpenPropertyStore(&self, stgmaccess: super::super::System::Com::STGM) -> windows_core::Result { @@ -2558,7 +2558,7 @@ impl IMMDeviceActivator { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), iid, pdevice.param().abi(), core::mem::transmute(pactivationparams.unwrap_or(std::ptr::null())), ppinterface).ok() + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), iid, pdevice.param().abi(), core::mem::transmute(pactivationparams.unwrap_or(core::ptr::null())), ppinterface).ok() } } #[repr(C)] @@ -2725,7 +2725,7 @@ impl IMessageFilter { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), dwcalltype, htaskcaller.param().abi(), dwtickcount, core::mem::transmute(lpinterfaceinfo.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).HandleInComingCall)(windows_core::Interface::as_raw(self), dwcalltype, htaskcaller.param().abi(), dwtickcount, core::mem::transmute(lpinterfaceinfo.unwrap_or(core::ptr::null()))) } pub unsafe fn RetryRejectedCall(&self, htaskcallee: P0, dwtickcount: u32, dwrejecttype: u32) -> u32 where @@ -2800,7 +2800,7 @@ impl IPart { (windows_core::Interface::vtable(self).GetTopologyObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Activate(&self, dwclscontext: u32, refiid: *const windows_core::GUID, ppvobject: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), dwclscontext, refiid, core::mem::transmute(ppvobject.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Activate)(windows_core::Interface::as_raw(self), dwclscontext, refiid, core::mem::transmute(ppvobject.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RegisterControlChangeCallback(&self, riid: *const windows_core::GUID, pnotify: P0) -> windows_core::Result<()> where @@ -2877,13 +2877,13 @@ impl IPerChannelDbLevel { (windows_core::Interface::vtable(self).GetLevel)(windows_core::Interface::as_raw(self), nchannel, &mut result__).map(|| result__) } pub unsafe fn SetLevel(&self, nchannel: u32, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLevel)(windows_core::Interface::as_raw(self), nchannel, fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetLevelUniform(&self, fleveldb: f32, pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLevelUniform)(windows_core::Interface::as_raw(self), fleveldb, core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetLevelAllChannels(&self, alevelsdb: &[f32], pguideventcontext: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetLevelAllChannels)(windows_core::Interface::as_raw(self), core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), core::mem::transmute(pguideventcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLevelAllChannels)(windows_core::Interface::as_raw(self), core::mem::transmute(alevelsdb.as_ptr()), alevelsdb.len().try_into().unwrap(), core::mem::transmute(pguideventcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -2964,7 +2964,7 @@ impl ISpatialAudioClient { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn IsSpatialAudioStreamAvailable(&self, streamuuid: *const windows_core::GUID, auxiliaryinfo: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).IsSpatialAudioStreamAvailable)(windows_core::Interface::as_raw(self), streamuuid, core::mem::transmute(auxiliaryinfo.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).IsSpatialAudioStreamAvailable)(windows_core::Interface::as_raw(self), streamuuid, core::mem::transmute(auxiliaryinfo.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn ActivateSpatialAudioStream(&self, activationparams: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result @@ -3030,7 +3030,7 @@ impl core::ops::Deref for ISpatialAudioMetadataClient { windows_core::imp::interface_hierarchy!(ISpatialAudioMetadataClient, windows_core::IUnknown); impl ISpatialAudioMetadataClient { pub unsafe fn ActivateSpatialAudioMetadataItems(&self, maxitemcount: u16, framecount: u16, metadataitemsbuffer: Option<*mut Option>, metadataitems: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ActivateSpatialAudioMetadataItems)(windows_core::Interface::as_raw(self), maxitemcount, framecount, core::mem::transmute(metadataitemsbuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadataitems)).ok() + (windows_core::Interface::vtable(self).ActivateSpatialAudioMetadataItems)(windows_core::Interface::as_raw(self), maxitemcount, framecount, core::mem::transmute(metadataitemsbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadataitems)).ok() } pub unsafe fn GetSpatialAudioMetadataItemsBufferLength(&self, maxitemcount: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3208,7 +3208,7 @@ impl ISpatialAudioMetadataWriter { (windows_core::Interface::vtable(self).WriteNextItem)(windows_core::Interface::as_raw(self), frameoffset).ok() } pub unsafe fn WriteNextItemCommand(&self, commandid: u8, valuebuffer: Option<*const core::ffi::c_void>, valuebufferlength: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteNextItemCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(std::ptr::null())), valuebufferlength).ok() + (windows_core::Interface::vtable(self).WriteNextItemCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(core::ptr::null())), valuebufferlength).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -3324,7 +3324,7 @@ impl core::ops::Deref for ISpatialAudioObjectForMetadataCommands { windows_core::imp::interface_hierarchy!(ISpatialAudioObjectForMetadataCommands, windows_core::IUnknown, ISpatialAudioObjectBase); impl ISpatialAudioObjectForMetadataCommands { pub unsafe fn WriteNextMetadataCommand(&self, commandid: u8, valuebuffer: Option<*const core::ffi::c_void>, valuebufferlength: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteNextMetadataCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(std::ptr::null())), valuebufferlength).ok() + (windows_core::Interface::vtable(self).WriteNextMetadataCommand)(windows_core::Interface::as_raw(self), commandid, core::mem::transmute(valuebuffer.unwrap_or(core::ptr::null())), valuebufferlength).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs index b62990ca3c..473486f40a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DeviceManager/mod.rs @@ -484,7 +484,7 @@ windows_core::imp::interface_hierarchy!(IMDSPStorage, windows_core::IUnknown); impl IMDSPStorage { #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetAttributes(&self, dwattributes: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -492,7 +492,7 @@ impl IMDSPStorage { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetAttributes(&self, pdwattributes: *mut u32, pformat: Option<*mut super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() @@ -513,7 +513,7 @@ impl IMDSPStorage { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null())), pwszname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateStorage)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null())), pwszname.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EnumStorage(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -568,15 +568,15 @@ impl IMDSPStorage2 { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(std::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null())), pwszname.param().abi(), qwfilesize, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateStorage2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null())), pwszname.param().abi(), qwfilesize, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn SetAttributes2(&self, dwattributes: u32, dwattributesex: u32, paudioformat: Option<*const super::Audio::WAVEFORMATEX>, pvideoformat: Option<*const super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(std::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn GetAttributes2(&self, pdwattributes: *mut u32, pdwattributesex: *mut u32, paudioformat: Option<*mut super::Audio::WAVEFORMATEX>, pvideoformat: Option<*mut super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -986,7 +986,7 @@ impl ISCPSecureQuery2 { pszrevocationurl, pdwrevocationurllen, pdwrevocationbitflag, - core::mem::transmute(pqwfilesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pqwfilesize.unwrap_or(core::ptr::null_mut())), punknown.param().abi(), core::mem::transmute(ppexchange), core::mem::transmute(abmac.as_ptr()), @@ -1038,7 +1038,7 @@ impl ISCPSecureQuery3 { pszrevocationurl, pdwrevocationurllen, pdwrevocationbitflag, - core::mem::transmute(pqwfilesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pqwfilesize.unwrap_or(core::ptr::null_mut())), punknown.param().abi(), core::mem::transmute(ppexchange), ) @@ -1579,11 +1579,11 @@ impl IWMDMOperation { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetObjectAttributes(&self, pdwattributes: *mut u32, pformat: Option<*mut super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetObjectAttributes(&self, dwattributes: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetObjectAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetObjectAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetObjectTotalSize(&self, pdwsize: *mut u32, pdwsizehigh: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetObjectTotalSize)(windows_core::Interface::as_raw(self), pdwsize, pdwsizehigh).ok() @@ -1632,11 +1632,11 @@ windows_core::imp::interface_hierarchy!(IWMDMOperation2, windows_core::IUnknown, impl IWMDMOperation2 { #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn SetObjectAttributes2(&self, dwattributes: u32, dwattributesex: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>, pvideoformat: Option<*const super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetObjectAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(std::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetObjectAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn GetObjectAttributes2(&self, pdwattributes: *mut u32, pdwattributesex: *mut u32, paudioformat: Option<*mut super::Audio::WAVEFORMATEX>, pvideoformat: Option<*mut super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetObjectAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1723,13 +1723,13 @@ impl core::ops::Deref for IWMDMProgress3 { windows_core::imp::interface_hierarchy!(IWMDMProgress3, windows_core::IUnknown, IWMDMProgress, IWMDMProgress2); impl IWMDMProgress3 { pub unsafe fn Begin3(&self, eventid: windows_core::GUID, dwestimatedticks: u32, pcontext: Option<*mut OPAQUECOMMAND>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Begin3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwestimatedticks, core::mem::transmute(pcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwestimatedticks, core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Progress3(&self, eventid: windows_core::GUID, dwtranspiredticks: u32, pcontext: Option<*mut OPAQUECOMMAND>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Progress3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwtranspiredticks, core::mem::transmute(pcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Progress3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), dwtranspiredticks, core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn End3(&self, eventid: windows_core::GUID, hrcompletioncode: windows_core::HRESULT, pcontext: Option<*mut OPAQUECOMMAND>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).End3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), hrcompletioncode, core::mem::transmute(pcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).End3)(windows_core::Interface::as_raw(self), core::mem::transmute(eventid), hrcompletioncode, core::mem::transmute(pcontext.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1768,7 +1768,7 @@ windows_core::imp::interface_hierarchy!(IWMDMStorage, windows_core::IUnknown); impl IWMDMStorage { #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn SetAttributes(&self, dwattributes: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes)(windows_core::Interface::as_raw(self), dwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetStorageGlobals(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1776,7 +1776,7 @@ impl IWMDMStorage { } #[cfg(feature = "Win32_Media_Audio")] pub unsafe fn GetAttributes(&self, pdwattributes: *mut u32, pformat: Option<*mut super::Audio::WAVEFORMATEX>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes)(windows_core::Interface::as_raw(self), pdwattributes, core::mem::transmute(pformat.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetName(&self, pwszname: &mut [u16]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(pwszname.as_ptr()), pwszname.len().try_into().unwrap()).ok() @@ -1836,11 +1836,11 @@ impl IWMDMStorage2 { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn SetAttributes2(&self, dwattributes: u32, dwattributesex: u32, pformat: Option<*const super::Audio::WAVEFORMATEX>, pvideoformat: Option<*const super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(std::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetAttributes2)(windows_core::Interface::as_raw(self), dwattributes, dwattributesex, core::mem::transmute(pformat.unwrap_or(core::ptr::null())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Media_Audio", feature = "Win32_Media_MediaFoundation"))] pub unsafe fn GetAttributes2(&self, pdwattributes: *mut u32, pdwattributesex: *mut u32, paudioformat: Option<*mut super::Audio::WAVEFORMATEX>, pvideoformat: Option<*mut super::MediaFoundation::VIDEOINFOHEADER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAttributes2)(windows_core::Interface::as_raw(self), pdwattributes, pdwattributesex, core::mem::transmute(paudioformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideoformat.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2011,7 +2011,7 @@ impl IWMDMStorageControl2 { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), fumode, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert2)(windows_core::Interface::as_raw(self), fumode, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2037,7 +2037,7 @@ impl IWMDMStorageControl3 { P4: windows_core::Param, P5: windows_core::Param, { - (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), fumode, futype, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), pmetadata.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Insert3)(windows_core::Interface::as_raw(self), fumode, futype, pwszfilesource.param().abi(), pwszfiledest.param().abi(), poperation.param().abi(), pprogress.param().abi(), pmetadata.param().abi(), punknown.param().abi(), core::mem::transmute(ppnewobject.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs index dc47820441..abe720e9ac 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/Tv/mod.rs @@ -2388,7 +2388,7 @@ impl IDVB_BAT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2411,7 +2411,7 @@ impl IDVB_BAT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> where @@ -2552,7 +2552,7 @@ impl IDVB_EIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> where @@ -2659,7 +2659,7 @@ impl IDVB_NIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2682,7 +2682,7 @@ impl IDVB_NIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> where @@ -2841,7 +2841,7 @@ impl IDVB_SDT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> where @@ -2918,7 +2918,7 @@ impl IDVB_SIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2941,7 +2941,7 @@ impl IDVB_SIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn RegisterForNextTable(&self, hnexttableavailable: P0) -> windows_core::Result<()> where @@ -3067,7 +3067,7 @@ impl IDVB_TOT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } } #[repr(C)] @@ -4202,7 +4202,7 @@ impl IDvbSiParser { } pub unsafe fn GetPMT(&self, pid: u16, pwprogramnumber: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetPMT)(windows_core::Interface::as_raw(self), pid, core::mem::transmute(pwprogramnumber.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetPMT)(windows_core::Interface::as_raw(self), pid, core::mem::transmute(pwprogramnumber.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTSDT(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4210,19 +4210,19 @@ impl IDvbSiParser { } pub unsafe fn GetNIT(&self, tableid: u8, pwnetworkid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetNIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwnetworkid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetSDT(&self, tableid: u8, pwtransportstreamid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetEIT(&self, tableid: u8, pwserviceid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetEIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetEIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBAT(&self, pwbouquetid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetBAT)(windows_core::Interface::as_raw(self), core::mem::transmute(pwbouquetid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetBAT)(windows_core::Interface::as_raw(self), core::mem::transmute(pwbouquetid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRST(&self, dwtimeout: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4279,7 +4279,7 @@ windows_core::imp::interface_hierarchy!(IDvbSiParser2, windows_core::IUnknown, I impl IDvbSiParser2 { pub unsafe fn GetEIT2(&self, tableid: u8, pwserviceid: Option<*const u16>, pbsegment: Option<*const u8>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetEIT2)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(std::ptr::null())), core::mem::transmute(pbsegment.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetEIT2)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwserviceid.unwrap_or(core::ptr::null())), core::mem::transmute(pbsegment.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -5607,7 +5607,7 @@ impl IISDB_BIT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetCountOfRecords(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5626,7 +5626,7 @@ impl IISDB_BIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5695,7 +5695,7 @@ impl IISDB_CDT { (windows_core::Interface::vtable(self).GetTableDescriptorByIndex)(windows_core::Interface::as_raw(self), dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetTableDescriptorByTag(&self, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetTableDescriptorByTag)(windows_core::Interface::as_raw(self), btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetSizeOfDataModule(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5827,7 +5827,7 @@ impl IISDB_LDT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5914,7 +5914,7 @@ impl IISDB_NBIT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6044,7 +6044,7 @@ impl IISDB_SDTT { (windows_core::Interface::vtable(self).GetRecordDescriptorByIndex)(windows_core::Interface::as_raw(self), dwrecordindex, dwindex, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetRecordDescriptorByTag(&self, dwrecordindex: u32, btag: u8, pdwcookie: Option<*mut u32>, ppdescriptor: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() + (windows_core::Interface::vtable(self).GetRecordDescriptorByTag)(windows_core::Interface::as_raw(self), dwrecordindex, btag, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdescriptor)).ok() } pub unsafe fn GetVersionHash(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6878,27 +6878,27 @@ windows_core::imp::interface_hierarchy!(IIsdbSiParser2, windows_core::IUnknown, impl IIsdbSiParser2 { pub unsafe fn GetSDT(&self, tableid: u8, pwtransportstreamid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtransportstreamid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBIT(&self, tableid: u8, pworiginalnetworkid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetNBIT(&self, tableid: u8, pworiginalnetworkid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetNBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetNBIT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalnetworkid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetLDT(&self, tableid: u8, pworiginalserviceid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetLDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalserviceid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetLDT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pworiginalserviceid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetSDTT(&self, tableid: u8, pwtableidext: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetSDTT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtableidext.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetSDTT)(windows_core::Interface::as_raw(self), tableid, core::mem::transmute(pwtableidext.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetCDT(&self, tableid: u8, bsectionnumber: u8, pwdownloaddataid: Option<*const u16>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetCDT)(windows_core::Interface::as_raw(self), tableid, bsectionnumber, core::mem::transmute(pwdownloaddataid.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetCDT)(windows_core::Interface::as_raw(self), tableid, bsectionnumber, core::mem::transmute(pwdownloaddataid.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetEMM(&self, pid: u16, wtableidext: u16) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs index 3e6a59550a..9523f92b1a 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DirectShow/mod.rs @@ -2060,7 +2060,7 @@ impl IAMPluginControl { (windows_core::Interface::vtable(self).GetPreferredClsidByIndex)(windows_core::Interface::as_raw(self), index, subtype, clsid).ok() } pub unsafe fn SetPreferredClsid(&self, subtype: *const windows_core::GUID, clsid: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), subtype, core::mem::transmute(clsid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), subtype, core::mem::transmute(clsid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn IsDisabled(&self, clsid: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsDisabled)(windows_core::Interface::as_raw(self), clsid).ok() @@ -2162,7 +2162,7 @@ impl core::ops::Deref for IAMResourceControl { windows_core::imp::interface_hierarchy!(IAMResourceControl, windows_core::IUnknown); impl IAMResourceControl { pub unsafe fn Reserve(&self, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Reserve)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reserve)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -2274,13 +2274,13 @@ impl core::ops::Deref for IAMStreamControl { windows_core::imp::interface_hierarchy!(IAMStreamControl, windows_core::IUnknown); impl IAMStreamControl { pub unsafe fn StartAt(&self, ptstart: Option<*const i64>, dwcookie: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstart.unwrap_or(std::ptr::null())), dwcookie).ok() + (windows_core::Interface::vtable(self).StartAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstart.unwrap_or(core::ptr::null())), dwcookie).ok() } pub unsafe fn StopAt(&self, ptstop: Option<*const i64>, bsendextra: P0, dwcookie: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(std::ptr::null())), bsendextra.param().abi(), dwcookie).ok() + (windows_core::Interface::vtable(self).StopAt)(windows_core::Interface::as_raw(self), core::mem::transmute(ptstop.unwrap_or(core::ptr::null())), bsendextra.param().abi(), dwcookie).ok() } pub unsafe fn GetInfo(&self, pinfo: *mut AM_STREAM_INFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInfo)(windows_core::Interface::as_raw(self), pinfo).ok() @@ -2311,13 +2311,13 @@ impl IAMStreamSelect { (windows_core::Interface::vtable(self).Info)( windows_core::Interface::as_raw(self), lindex, - core::mem::transmute(ppmt.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(plcid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdwgroup.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppszname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppobject.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppunk.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppmt.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plcid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwgroup.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppszname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppobject.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppunk.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2752,11 +2752,11 @@ impl core::ops::Deref for IAMVideoAccelerator { windows_core::imp::interface_hierarchy!(IAMVideoAccelerator, windows_core::IUnknown); impl IAMVideoAccelerator { pub unsafe fn GetVideoAcceleratorGUIDs(&self, pdwnumguidssupported: *mut u32, pguidssupported: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVideoAcceleratorGUIDs)(windows_core::Interface::as_raw(self), pdwnumguidssupported, core::mem::transmute(pguidssupported.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoAcceleratorGUIDs)(windows_core::Interface::as_raw(self), pdwnumguidssupported, core::mem::transmute(pguidssupported.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetUncompFormatsSupported(&self, pguid: *const windows_core::GUID, pdwnumformatssupported: *mut u32, pformatssupported: Option<*mut super::super::Graphics::DirectDraw::DDPIXELFORMAT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetUncompFormatsSupported)(windows_core::Interface::as_raw(self), pguid, pdwnumformatssupported, core::mem::transmute(pformatssupported.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUncompFormatsSupported)(windows_core::Interface::as_raw(self), pguid, pdwnumformatssupported, core::mem::transmute(pformatssupported.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetInternalMemInfo(&self, pguid: *const windows_core::GUID, pamvauncompdatainfo: *const AMVAUncompDataInfo, pamvainternalmeminfo: *mut AMVAInternalMemInfo) -> windows_core::Result<()> { @@ -2764,11 +2764,11 @@ impl IAMVideoAccelerator { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetCompBufferInfo(&self, pguid: *const windows_core::GUID, pamvauncompdatainfo: *const AMVAUncompDataInfo, pdwnumtypescompbuffers: *mut u32, pamvacompbufferinfo: Option<*mut AMVACompBufferInfo>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCompBufferInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, pdwnumtypescompbuffers, core::mem::transmute(pamvacompbufferinfo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCompBufferInfo)(windows_core::Interface::as_raw(self), pguid, pamvauncompdatainfo, pdwnumtypescompbuffers, core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetInternalCompBufferInfo(&self, pdwnumtypescompbuffers: *mut u32, pamvacompbufferinfo: Option<*mut AMVACompBufferInfo>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInternalCompBufferInfo)(windows_core::Interface::as_raw(self), pdwnumtypescompbuffers, core::mem::transmute(pamvacompbufferinfo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInternalCompBufferInfo)(windows_core::Interface::as_raw(self), pdwnumtypescompbuffers, core::mem::transmute(pamvacompbufferinfo.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BeginFrame(&self, amvabeginframeinfo: *const AMVABeginFrameInfo) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), amvabeginframeinfo).ok() @@ -2897,13 +2897,13 @@ impl IAMVideoCompression { (windows_core::Interface::vtable(self).GetInfo)( windows_core::Interface::as_raw(self), core::mem::transmute(pszversion), - core::mem::transmute(pcbversion.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszdescription), - core::mem::transmute(pcbdescription.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdefaultkeyframerate.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdefaultpframesperkey.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdefaultquality.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcapabilities.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbdescription.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdefaultkeyframerate.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdefaultpframesperkey.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdefaultquality.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcapabilities.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3233,7 +3233,7 @@ impl IAsyncReader { (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), psample.param().abi(), dwuser).ok() } pub unsafe fn WaitForNext(&self, dwtimeout: u32, ppsample: Option<*mut Option>, pdwuser: *mut usize) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WaitForNext)(windows_core::Interface::as_raw(self), dwtimeout, core::mem::transmute(ppsample.unwrap_or(std::ptr::null_mut())), pdwuser).ok() + (windows_core::Interface::vtable(self).WaitForNext)(windows_core::Interface::as_raw(self), dwtimeout, core::mem::transmute(ppsample.unwrap_or(core::ptr::null_mut())), pdwuser).ok() } pub unsafe fn SyncReadAligned(&self, psample: P0) -> windows_core::Result<()> where @@ -5485,7 +5485,7 @@ impl ICaptureGraphBuilder { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), pf.param().abi(), riid, ppint).ok() + (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), pf.param().abi(), riid, ppint).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RenderStream(&self, pcategory: Option<*const windows_core::GUID>, psource: P0, pfcompressor: P1, pfrenderer: P2) -> windows_core::Result<()> @@ -5494,14 +5494,14 @@ impl ICaptureGraphBuilder { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()).ok() + (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ControlStream(&self, pcategory: Option<*const windows_core::GUID>, pfilter: P0, pstart: *const i64, pstop: *const i64, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), pfilter.param().abi(), pstart, pstop, wstartcookie, wstopcookie).ok() + (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), pfilter.param().abi(), pstart, pstop, wstartcookie, wstopcookie).ok() } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -5566,14 +5566,14 @@ impl ICaptureGraphBuilder2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), ptype, lpstrfile.param().abi(), core::mem::transmute(ppf), core::mem::transmute(ppsink.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetOutputFileName)(windows_core::Interface::as_raw(self), ptype, lpstrfile.param().abi(), core::mem::transmute(ppf), core::mem::transmute(ppsink.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn FindInterface(&self, pcategory: Option<*const windows_core::GUID>, ptype: Option<*const windows_core::GUID>, pf: P0, riid: *const windows_core::GUID, ppint: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), core::mem::transmute(ptype.unwrap_or(std::ptr::null())), pf.param().abi(), riid, ppint).ok() + (windows_core::Interface::vtable(self).FindInterface)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), core::mem::transmute(ptype.unwrap_or(core::ptr::null())), pf.param().abi(), riid, ppint).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn RenderStream(&self, pcategory: Option<*const windows_core::GUID>, ptype: *const windows_core::GUID, psource: P0, pfcompressor: P1, pfrenderer: P2) -> windows_core::Result<()> @@ -5582,14 +5582,14 @@ impl ICaptureGraphBuilder2 { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), ptype, psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()).ok() + (windows_core::Interface::vtable(self).RenderStream)(windows_core::Interface::as_raw(self), core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), ptype, psource.param().abi(), pfcompressor.param().abi(), pfrenderer.param().abi()).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn ControlStream(&self, pcategory: *const windows_core::GUID, ptype: *const windows_core::GUID, pfilter: P0, pstart: Option<*const i64>, pstop: Option<*const i64>, wstartcookie: u16, wstopcookie: u16) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), pcategory, ptype, pfilter.param().abi(), core::mem::transmute(pstart.unwrap_or(std::ptr::null())), core::mem::transmute(pstop.unwrap_or(std::ptr::null())), wstartcookie, wstopcookie).ok() + (windows_core::Interface::vtable(self).ControlStream)(windows_core::Interface::as_raw(self), pcategory, ptype, pfilter.param().abi(), core::mem::transmute(pstart.unwrap_or(core::ptr::null())), core::mem::transmute(pstop.unwrap_or(core::ptr::null())), wstartcookie, wstopcookie).ok() } pub unsafe fn AllocCapFile(&self, lpstr: P0, dwlsize: u64) -> windows_core::Result<()> where @@ -5611,7 +5611,7 @@ impl ICaptureGraphBuilder2 { P1: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), pindir, core::mem::transmute(pcategory.unwrap_or(std::ptr::null())), core::mem::transmute(ptype.unwrap_or(std::ptr::null())), funconnected.param().abi(), num, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).FindPin)(windows_core::Interface::as_raw(self), psource.param().abi(), pindir, core::mem::transmute(pcategory.unwrap_or(core::ptr::null())), core::mem::transmute(ptype.unwrap_or(core::ptr::null())), funconnected.param().abi(), num, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -7298,7 +7298,7 @@ windows_core::imp::interface_hierarchy!(IEnumFilters, windows_core::IUnknown); impl IEnumFilters { #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, ppfilter: &mut [Option], pcfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppfilter.len().try_into().unwrap(), core::mem::transmute(ppfilter.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppfilter.len().try_into().unwrap(), core::mem::transmute(ppfilter.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cfilters).ok() @@ -7333,7 +7333,7 @@ windows_core::imp::interface_hierarchy!(IEnumMediaTypes, windows_core::IUnknown) impl IEnumMediaTypes { #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn Next(&self, ppmediatypes: &mut [*mut super::MediaFoundation::AM_MEDIA_TYPE], pcfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppmediatypes.len().try_into().unwrap(), core::mem::transmute(ppmediatypes.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppmediatypes.len().try_into().unwrap(), core::mem::transmute(ppmediatypes.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, cmediatypes: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cmediatypes).ok() @@ -7398,7 +7398,7 @@ impl core::ops::Deref for IEnumPins { windows_core::imp::interface_hierarchy!(IEnumPins, windows_core::IUnknown); impl IEnumPins { pub unsafe fn Next(&self, pppins: &mut [Option], pcfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pppins.len().try_into().unwrap(), core::mem::transmute(pppins.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pppins.len().try_into().unwrap(), core::mem::transmute(pppins.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, cpins: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cpins).ok() @@ -7429,7 +7429,7 @@ impl core::ops::Deref for IEnumRegFilters { windows_core::imp::interface_hierarchy!(IEnumRegFilters, windows_core::IUnknown); impl IEnumRegFilters { pub unsafe fn Next(&self, apregfilter: &mut [*mut REGFILTER], pcfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), apregfilter.len().try_into().unwrap(), core::mem::transmute(apregfilter.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), apregfilter.len().try_into().unwrap(), core::mem::transmute(apregfilter.as_ptr()), core::mem::transmute(pcfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, cfilters: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), cfilters).ok() @@ -7460,7 +7460,7 @@ impl core::ops::Deref for IEnumStreamIdMap { windows_core::imp::interface_hierarchy!(IEnumStreamIdMap, windows_core::IUnknown); impl IEnumStreamIdMap { pub unsafe fn Next(&self, pstreamidmap: &mut [STREAM_ID_MAP], pcreceived: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreamidmap.len().try_into().unwrap(), core::mem::transmute(pstreamidmap.as_ptr()), core::mem::transmute(pcreceived.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), pstreamidmap.len().try_into().unwrap(), core::mem::transmute(pstreamidmap.as_ptr()), core::mem::transmute(pcreceived.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, crecords: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), crecords).ok() @@ -7495,7 +7495,7 @@ impl IFileSinkFilter { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetFileName)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(pmt.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetFileName)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(pmt.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn GetCurFile(&self, ppszfilename: *mut windows_core::PWSTR, pmt: *mut super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> { @@ -7551,11 +7551,11 @@ impl IFileSourceFilter { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(pmt.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Load)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), core::mem::transmute(pmt.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn GetCurFile(&self, ppszfilename: *mut windows_core::PWSTR, pmt: Option<*mut super::MediaFoundation::AM_MEDIA_TYPE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), ppszfilename, core::mem::transmute(pmt.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurFile)(windows_core::Interface::as_raw(self), ppszfilename, core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7674,7 +7674,7 @@ impl IFilterGraph { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).ConnectDirect)(windows_core::Interface::as_raw(self), ppinout.param().abi(), ppinin.param().abi(), core::mem::transmute(pmt.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ConnectDirect)(windows_core::Interface::as_raw(self), ppinout.param().abi(), ppinin.param().abi(), core::mem::transmute(pmt.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Reconnect(&self, ppin: P0) -> windows_core::Result<()> where @@ -7740,13 +7740,13 @@ impl IFilterGraph2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ReconnectEx)(windows_core::Interface::as_raw(self), ppin.param().abi(), core::mem::transmute(pmt.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ReconnectEx)(windows_core::Interface::as_raw(self), ppin.param().abi(), core::mem::transmute(pmt.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn RenderEx(&self, ppinout: P0, dwflags: u32, pvcontext: Option<*const u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderEx)(windows_core::Interface::as_raw(self), ppinout.param().abi(), dwflags, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RenderEx)(windows_core::Interface::as_raw(self), ppinout.param().abi(), dwflags, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -7960,7 +7960,7 @@ impl IFilterMapper2 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), clsidfilter, name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(std::ptr::null_mut())), pclsidcategory, szinstance.param().abi(), prf2).ok() + (windows_core::Interface::vtable(self).RegisterFilter)(windows_core::Interface::as_raw(self), clsidfilter, name.param().abi(), core::mem::transmute(ppmoniker.unwrap_or(core::ptr::null_mut())), pclsidcategory, szinstance.param().abi(), prf2).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn EnumMatchingFilters(&self, ppenum: *mut Option, dwflags: u32, bexactmatch: P0, dwmerit: u32, binputneeded: P1, cinputtypes: u32, pinputtypes: Option<*const windows_core::GUID>, pmedin: Option<*const REGPINMEDIUM>, ppincategoryin: Option<*const windows_core::GUID>, brender: P2, boutputneeded: P3, coutputtypes: u32, poutputtypes: Option<*const windows_core::GUID>, pmedout: Option<*const REGPINMEDIUM>, ppincategoryout: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -7978,15 +7978,15 @@ impl IFilterMapper2 { dwmerit, binputneeded.param().abi(), cinputtypes, - core::mem::transmute(pinputtypes.unwrap_or(std::ptr::null())), - core::mem::transmute(pmedin.unwrap_or(std::ptr::null())), - core::mem::transmute(ppincategoryin.unwrap_or(std::ptr::null())), + core::mem::transmute(pinputtypes.unwrap_or(core::ptr::null())), + core::mem::transmute(pmedin.unwrap_or(core::ptr::null())), + core::mem::transmute(ppincategoryin.unwrap_or(core::ptr::null())), brender.param().abi(), boutputneeded.param().abi(), coutputtypes, - core::mem::transmute(poutputtypes.unwrap_or(std::ptr::null())), - core::mem::transmute(pmedout.unwrap_or(std::ptr::null())), - core::mem::transmute(ppincategoryout.unwrap_or(std::ptr::null())), + core::mem::transmute(poutputtypes.unwrap_or(core::ptr::null())), + core::mem::transmute(pmedout.unwrap_or(core::ptr::null())), + core::mem::transmute(ppincategoryout.unwrap_or(core::ptr::null())), ) .ok() } @@ -8924,7 +8924,7 @@ impl IMediaSample { (windows_core::Interface::vtable(self).GetTime)(windows_core::Interface::as_raw(self), ptimestart, ptimeend).ok() } pub unsafe fn SetTime(&self, ptimestart: Option<*const i64>, ptimeend: Option<*const i64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(std::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(core::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn IsSyncPoint(&self) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).IsSyncPoint)(windows_core::Interface::as_raw(self)) @@ -8972,7 +8972,7 @@ impl IMediaSample { (windows_core::Interface::vtable(self).GetMediaTime)(windows_core::Interface::as_raw(self), ptimestart, ptimeend).ok() } pub unsafe fn SetMediaTime(&self, ptimestart: Option<*const i64>, ptimeend: Option<*const i64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(std::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetMediaTime)(windows_core::Interface::as_raw(self), core::mem::transmute(ptimestart.unwrap_or(core::ptr::null())), core::mem::transmute(ptimeend.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -9088,16 +9088,16 @@ impl IMediaSeeking { (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn ConvertTimeFormat(&self, ptarget: *mut i64, ptargetformat: Option<*const windows_core::GUID>, source: i64, psourceformat: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ConvertTimeFormat)(windows_core::Interface::as_raw(self), ptarget, core::mem::transmute(ptargetformat.unwrap_or(std::ptr::null())), source, core::mem::transmute(psourceformat.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ConvertTimeFormat)(windows_core::Interface::as_raw(self), ptarget, core::mem::transmute(ptargetformat.unwrap_or(core::ptr::null())), source, core::mem::transmute(psourceformat.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetPositions(&self, pcurrent: Option<*mut i64>, dwcurrentflags: u32, pstop: Option<*mut i64>, dwstopflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(std::ptr::null_mut())), dwcurrentflags, core::mem::transmute(pstop.unwrap_or(std::ptr::null_mut())), dwstopflags).ok() + (windows_core::Interface::vtable(self).SetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(core::ptr::null_mut())), dwcurrentflags, core::mem::transmute(pstop.unwrap_or(core::ptr::null_mut())), dwstopflags).ok() } pub unsafe fn GetPositions(&self, pcurrent: Option<*mut i64>, pstop: Option<*mut i64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pstop.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPositions)(windows_core::Interface::as_raw(self), core::mem::transmute(pcurrent.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pstop.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetAvailable(&self, pearliest: Option<*mut i64>, platest: Option<*mut i64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pearliest.unwrap_or(std::ptr::null_mut())), core::mem::transmute(platest.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAvailable)(windows_core::Interface::as_raw(self), core::mem::transmute(pearliest.unwrap_or(core::ptr::null_mut())), core::mem::transmute(platest.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetRate(&self, drate: f64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetRate)(windows_core::Interface::as_raw(self), drate).ok() @@ -9299,7 +9299,7 @@ impl IMemAllocator { (windows_core::Interface::vtable(self).Decommit)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetBuffer(&self, ppbuffer: *mut Option, pstarttime: Option<*const i64>, pendtime: Option<*const i64>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), core::mem::transmute(pstarttime.unwrap_or(std::ptr::null())), core::mem::transmute(pendtime.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer), core::mem::transmute(pstarttime.unwrap_or(core::ptr::null())), core::mem::transmute(pendtime.unwrap_or(core::ptr::null())), dwflags).ok() } pub unsafe fn ReleaseBuffer(&self, pbuffer: P0) -> windows_core::Result<()> where @@ -9986,7 +9986,7 @@ impl IPin { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), preceivepin.param().abi(), core::mem::transmute(pmt.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Connect)(windows_core::Interface::as_raw(self), preceivepin.param().abi(), core::mem::transmute(pmt.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Media_MediaFoundation")] pub unsafe fn ReceiveConnection(&self, pconnector: P0, pmt: *const super::MediaFoundation::AM_MEDIA_TYPE) -> windows_core::Result<()> @@ -10027,7 +10027,7 @@ impl IPin { (windows_core::Interface::vtable(self).EnumMediaTypes)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn QueryInternalConnections(&self, appin: Option<*mut Option>, npin: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).QueryInternalConnections)(windows_core::Interface::as_raw(self), core::mem::transmute(appin.unwrap_or(std::ptr::null_mut())), npin).ok() + (windows_core::Interface::vtable(self).QueryInternalConnections)(windows_core::Interface::as_raw(self), core::mem::transmute(appin.unwrap_or(core::ptr::null_mut())), npin).ok() } pub unsafe fn EndOfStream(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndOfStream)(windows_core::Interface::as_raw(self)).ok() @@ -11966,7 +11966,7 @@ windows_core::imp::interface_hierarchy!(IVPBaseConfig, windows_core::IUnknown); impl IVPBaseConfig { #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetConnectInfo(&self, pdwnumconnectinfo: *mut u32, pddvpconnectinfo: Option<*mut super::super::Graphics::DirectDraw::DDVIDEOPORTCONNECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConnectInfo)(windows_core::Interface::as_raw(self), pdwnumconnectinfo, core::mem::transmute(pddvpconnectinfo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConnectInfo)(windows_core::Interface::as_raw(self), pdwnumconnectinfo, core::mem::transmute(pddvpconnectinfo.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetConnectInfo(&self, dwchosenentry: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetConnectInfo)(windows_core::Interface::as_raw(self), dwchosenentry).ok() @@ -11983,7 +11983,7 @@ impl IVPBaseConfig { } #[cfg(feature = "Win32_Graphics_DirectDraw")] pub unsafe fn GetVideoFormats(&self, pdwnumformats: *mut u32, pddpixelformats: Option<*mut super::super::Graphics::DirectDraw::DDPIXELFORMAT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVideoFormats)(windows_core::Interface::as_raw(self), pdwnumformats, core::mem::transmute(pddpixelformats.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoFormats)(windows_core::Interface::as_raw(self), pdwnumformats, core::mem::transmute(pddpixelformats.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetVideoFormat(&self, dwchosenentry: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVideoFormat)(windows_core::Interface::as_raw(self), dwchosenentry).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs index 9f46fbb811..468525c1a1 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/DxMediaObjects/mod.rs @@ -165,7 +165,7 @@ impl IMediaBuffer { (windows_core::Interface::vtable(self).GetMaxLength)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetBufferAndLength(&self, ppbuffer: Option<*mut *mut u8>, pcblength: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcblength.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBufferAndLength)(windows_core::Interface::as_raw(self), core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcblength.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -196,16 +196,16 @@ impl IMediaObject { (windows_core::Interface::vtable(self).GetOutputStreamInfo)(windows_core::Interface::as_raw(self), dwoutputstreamindex, &mut result__).map(|| result__) } pub unsafe fn GetInputType(&self, dwinputstreamindex: u32, dwtypeindex: u32, pmt: Option<*mut DMO_MEDIA_TYPE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOutputType(&self, dwoutputstreamindex: u32, dwtypeindex: u32, pmt: Option<*mut DMO_MEDIA_TYPE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, dwtypeindex, core::mem::transmute(pmt.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetInputType(&self, dwinputstreamindex: u32, pmt: Option<*const DMO_MEDIA_TYPE>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, core::mem::transmute(pmt.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).SetInputType)(windows_core::Interface::as_raw(self), dwinputstreamindex, core::mem::transmute(pmt.unwrap_or(core::ptr::null())), dwflags).ok() } pub unsafe fn SetOutputType(&self, dwoutputstreamindex: u32, pmt: Option<*const DMO_MEDIA_TYPE>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, core::mem::transmute(pmt.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).SetOutputType)(windows_core::Interface::as_raw(self), dwoutputstreamindex, core::mem::transmute(pmt.unwrap_or(core::ptr::null())), dwflags).ok() } pub unsafe fn GetInputCurrentType(&self, dwinputstreamindex: u32, pmt: *mut DMO_MEDIA_TYPE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetInputCurrentType)(windows_core::Interface::as_raw(self), dwinputstreamindex, pmt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs index dab47a978b..fd1b8eb328 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/KernelStreaming/mod.rs @@ -101,7 +101,7 @@ pub unsafe fn KsOpenDefaultDevice(category: *const windows_core::GUID, access: u #[inline] pub unsafe fn KsResolveRequiredAttributes(datarange: *const KSDATAFORMAT, attributes: Option<*const KSMULTIPLE_ITEM>) -> windows_core::Result<()> { windows_targets::link!("ksproxy.ax" "system" fn KsResolveRequiredAttributes(datarange : *const KSDATAFORMAT, attributes : *const KSMULTIPLE_ITEM) -> windows_core::HRESULT); - KsResolveRequiredAttributes(datarange, core::mem::transmute(attributes.unwrap_or(std::ptr::null()))).ok() + KsResolveRequiredAttributes(datarange, core::mem::transmute(attributes.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn KsSynchronousDeviceControl(handle: P0, iocontrol: u32, inbuffer: Option<*const core::ffi::c_void>, inlength: u32, outbuffer: Option<*mut core::ffi::c_void>, outlength: u32, bytesreturned: Option<*mut u32>) -> windows_core::Result<()> @@ -109,7 +109,7 @@ where P0: windows_core::Param, { windows_targets::link!("ksproxy.ax" "system" fn KsSynchronousDeviceControl(handle : super::super::Foundation:: HANDLE, iocontrol : u32, inbuffer : *const core::ffi::c_void, inlength : u32, outbuffer : *mut core::ffi::c_void, outlength : u32, bytesreturned : *mut u32) -> windows_core::HRESULT); - KsSynchronousDeviceControl(handle.param().abi(), iocontrol, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inlength, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outlength, core::mem::transmute(bytesreturned.unwrap_or(std::ptr::null_mut()))).ok() + KsSynchronousDeviceControl(handle.param().abi(), iocontrol, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inlength, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outlength, core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut()))).ok() } windows_core::imp::define_interface!(IKsAggregateControl, IKsAggregateControl_Vtbl, 0x7f40eac0_3947_11d2_874e_00a0c9223196); impl core::ops::Deref for IKsAggregateControl { @@ -610,7 +610,7 @@ impl IKsPin { (windows_core::Interface::vtable(self).KsCreateSinkPinHandle)(windows_core::Interface::as_raw(self), interface, medium).ok() } pub unsafe fn KsGetCurrentCommunication(&self, communication: Option<*mut KSPIN_COMMUNICATION>, interface: Option<*mut KSIDENTIFIER>, medium: Option<*mut KSIDENTIFIER>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).KsGetCurrentCommunication)(windows_core::Interface::as_raw(self), core::mem::transmute(communication.unwrap_or(std::ptr::null_mut())), core::mem::transmute(interface.unwrap_or(std::ptr::null_mut())), core::mem::transmute(medium.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).KsGetCurrentCommunication)(windows_core::Interface::as_raw(self), core::mem::transmute(communication.unwrap_or(core::ptr::null_mut())), core::mem::transmute(interface.unwrap_or(core::ptr::null_mut())), core::mem::transmute(medium.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn KsPropagateAcquire(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).KsPropagateAcquire)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs index 0c8a693024..c857ac259b 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/MediaFoundation/mod.rs @@ -42,7 +42,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFAddPeriodicCallback(callback : MFPERIODICCALLBACK, pcontext : * mut core::ffi::c_void, pdwkey : *mut u32) -> windows_core::HRESULT); - MFAddPeriodicCallback(callback, pcontext.param().abi(), core::mem::transmute(pdwkey.unwrap_or(std::ptr::null_mut()))).ok() + MFAddPeriodicCallback(callback, pcontext.param().abi(), core::mem::transmute(pdwkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFAllocateSerialWorkQueue(dwworkqueue: u32) -> windows_core::Result { @@ -111,7 +111,7 @@ where #[inline] pub unsafe fn MFCalculateBitmapImageSize(pbmih: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, cbbufsize: u32, pcbimagesize: *mut u32, pbknown: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFCalculateBitmapImageSize(pbmih : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, cbbufsize : u32, pcbimagesize : *mut u32, pbknown : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - MFCalculateBitmapImageSize(pbmih, cbbufsize, pcbimagesize, core::mem::transmute(pbknown.unwrap_or(std::ptr::null_mut()))).ok() + MFCalculateBitmapImageSize(pbmih, cbbufsize, pcbimagesize, core::mem::transmute(pbknown.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFCalculateImageSize(guidsubtype: *const windows_core::GUID, unwidth: u32, unheight: u32) -> windows_core::Result { @@ -578,7 +578,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateMFVideoFormatFromMFMediaType(pmftype : * mut core::ffi::c_void, ppmfvf : *mut *mut MFVIDEOFORMAT, pcbsize : *mut u32) -> windows_core::HRESULT); - MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), ppmfvf, core::mem::transmute(pcbsize.unwrap_or(std::ptr::null_mut()))).ok() + MFCreateMFVideoFormatFromMFMediaType(pmftype.param().abi(), ppmfvf, core::mem::transmute(pcbsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFCreateMP3MediaSink(ptargetbytestream: P0) -> windows_core::Result @@ -623,7 +623,7 @@ where pub unsafe fn MFCreateMediaEvent(met: u32, guidextendedtype: *const windows_core::GUID, hrstatus: windows_core::HRESULT, pvvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result { windows_targets::link!("mfplat.dll" "system" fn MFCreateMediaEvent(met : u32, guidextendedtype : *const windows_core::GUID, hrstatus : windows_core::HRESULT, pvvalue : *const core::mem::MaybeUninit < super::super::System::Com::StructuredStorage:: PROPVARIANT >, ppevent : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MFCreateMediaEvent(met, guidextendedtype, hrstatus, core::mem::transmute(pvvalue.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + MFCreateMediaEvent(met, guidextendedtype, hrstatus, core::mem::transmute(pvvalue.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn MFCreateMediaExtensionActivate(szactivatableclassid: P0, pconfiguration: P1, riid: *const windows_core::GUID, ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -718,7 +718,7 @@ where P0: windows_core::Param, { windows_targets::link!("mf.dll" "system" fn MFCreatePMPMediaSession(dwcreationflags : u32, pconfiguration : * mut core::ffi::c_void, ppmediasession : *mut * mut core::ffi::c_void, ppenableractivate : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MFCreatePMPMediaSession(dwcreationflags, pconfiguration.param().abi(), core::mem::transmute(ppmediasession), core::mem::transmute(ppenableractivate.unwrap_or(std::ptr::null_mut()))).ok() + MFCreatePMPMediaSession(dwcreationflags, pconfiguration.param().abi(), core::mem::transmute(ppmediasession), core::mem::transmute(ppenableractivate.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFCreatePMPServer(dwcreationflags: u32) -> windows_core::Result { @@ -1180,7 +1180,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFCreateWaveFormatExFromMFMediaType(pmftype : * mut core::ffi::c_void, ppwf : *mut *mut super::Audio:: WAVEFORMATEX, pcbsize : *mut u32, flags : u32) -> windows_core::HRESULT); - MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), ppwf, core::mem::transmute(pcbsize.unwrap_or(std::ptr::null_mut())), flags).ok() + MFCreateWaveFormatExFromMFMediaType(pmftype.param().abi(), ppwf, core::mem::transmute(pcbsize.unwrap_or(core::ptr::null_mut())), flags).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1417,7 +1417,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG1VideoInfo(pmftype : * mut core::ffi::c_void, pmp1vi : *const MPEG1VIDEOINFO, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT); - MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), pmp1vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(std::ptr::null()))).ok() + MFInitMediaTypeFromMPEG1VideoInfo(pmftype.param().abi(), pmp1vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1426,7 +1426,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFInitMediaTypeFromMPEG2VideoInfo(pmftype : * mut core::ffi::c_void, pmp2vi : *const MPEG2VIDEOINFO, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT); - MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(std::ptr::null()))).ok() + MFInitMediaTypeFromMPEG2VideoInfo(pmftype.param().abi(), pmp2vi, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1435,7 +1435,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader(pmftype : * mut core::ffi::c_void, pvih : *const VIDEOINFOHEADER, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT); - MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), pvih, cbbufsize, core::mem::transmute(psubtype.unwrap_or(std::ptr::null()))).ok() + MFInitMediaTypeFromVideoInfoHeader(pmftype.param().abi(), pvih, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1444,7 +1444,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFInitMediaTypeFromVideoInfoHeader2(pmftype : * mut core::ffi::c_void, pvih2 : *const VIDEOINFOHEADER2, cbbufsize : u32, psubtype : *const windows_core::GUID) -> windows_core::HRESULT); - MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), pvih2, cbbufsize, core::mem::transmute(psubtype.unwrap_or(std::ptr::null()))).ok() + MFInitMediaTypeFromVideoInfoHeader2(pmftype.param().abi(), pvih2, cbbufsize, core::mem::transmute(psubtype.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Media_Audio")] #[inline] @@ -1502,7 +1502,7 @@ where #[inline] pub unsafe fn MFLockDXGIDeviceManager(presettoken: Option<*mut u32>, ppmanager: *mut Option) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFLockDXGIDeviceManager(presettoken : *mut u32, ppmanager : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MFLockDXGIDeviceManager(core::mem::transmute(presettoken.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppmanager)).ok() + MFLockDXGIDeviceManager(core::mem::transmute(presettoken.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppmanager)).ok() } #[inline] pub unsafe fn MFLockPlatform() -> windows_core::Result<()> { @@ -1543,7 +1543,7 @@ where P3: windows_core::Param, { windows_targets::link!("mfplay.dll" "system" fn MFPCreateMediaPlayer(pwszurl : windows_core::PCWSTR, fstartplayback : super::super::Foundation:: BOOL, creationoptions : MFP_CREATION_OPTIONS, pcallback : * mut core::ffi::c_void, hwnd : super::super::Foundation:: HWND, ppmediaplayer : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.param().abi(), creationoptions, pcallback.param().abi(), hwnd.param().abi(), core::mem::transmute(ppmediaplayer.unwrap_or(std::ptr::null_mut()))).ok() + MFPCreateMediaPlayer(pwszurl.param().abi(), fstartplayback.param().abi(), creationoptions, pcallback.param().abi(), hwnd.param().abi(), core::mem::transmute(ppmediaplayer.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFPutWaitingWorkItem(hevent: P0, priority: i32, presult: P1, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -1552,7 +1552,7 @@ where P1: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFPutWaitingWorkItem(hevent : super::super::Foundation:: HANDLE, priority : i32, presult : * mut core::ffi::c_void, pkey : *mut u64) -> windows_core::HRESULT); - MFPutWaitingWorkItem(hevent.param().abi(), priority, presult.param().abi(), core::mem::transmute(pkey.unwrap_or(std::ptr::null_mut()))).ok() + MFPutWaitingWorkItem(hevent.param().abi(), priority, presult.param().abi(), core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFPutWorkItem(dwqueue: u32, pcallback: P0, pstate: P1) -> windows_core::Result<()> @@ -1635,7 +1635,7 @@ where P1: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFScheduleWorkItem(pcallback : * mut core::ffi::c_void, pstate : * mut core::ffi::c_void, timeout : i64, pkey : *mut u64) -> windows_core::HRESULT); - MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(std::ptr::null_mut()))).ok() + MFScheduleWorkItem(pcallback.param().abi(), pstate.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFScheduleWorkItemEx(presult: P0, timeout: i64, pkey: Option<*mut u64>) -> windows_core::Result<()> @@ -1643,7 +1643,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFScheduleWorkItemEx(presult : * mut core::ffi::c_void, timeout : i64, pkey : *mut u64) -> windows_core::HRESULT); - MFScheduleWorkItemEx(presult.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(std::ptr::null_mut()))).ok() + MFScheduleWorkItemEx(presult.param().abi(), timeout, core::mem::transmute(pkey.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1695,7 +1695,7 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFTEnum(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut core::ffi::c_void, ppclsidmft : *mut *mut windows_core::GUID, pcmfts : *mut u32) -> windows_core::HRESULT); - MFTEnum(core::mem::transmute(guidcategory), flags, core::mem::transmute(pinputtype.unwrap_or(std::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(std::ptr::null())), pattributes.param().abi(), ppclsidmft, pcmfts).ok() + MFTEnum(core::mem::transmute(guidcategory), flags, core::mem::transmute(pinputtype.unwrap_or(core::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(core::ptr::null())), pattributes.param().abi(), ppclsidmft, pcmfts).ok() } #[inline] pub unsafe fn MFTEnum2(guidcategory: windows_core::GUID, flags: MFT_ENUM_FLAG, pinputtype: Option<*const MFT_REGISTER_TYPE_INFO>, poutputtype: Option<*const MFT_REGISTER_TYPE_INFO>, pattributes: P0, pppmftactivate: *mut *mut Option, pnummftactivate: *mut u32) -> windows_core::Result<()> @@ -1703,17 +1703,17 @@ where P0: windows_core::Param, { windows_targets::link!("mfplat.dll" "system" fn MFTEnum2(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pattributes : * mut core::ffi::c_void, pppmftactivate : *mut *mut Option < IMFActivate >, pnummftactivate : *mut u32) -> windows_core::HRESULT); - MFTEnum2(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(std::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(std::ptr::null())), pattributes.param().abi(), pppmftactivate, pnummftactivate).ok() + MFTEnum2(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(core::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(core::ptr::null())), pattributes.param().abi(), pppmftactivate, pnummftactivate).ok() } #[inline] pub unsafe fn MFTEnumEx(guidcategory: windows_core::GUID, flags: MFT_ENUM_FLAG, pinputtype: Option<*const MFT_REGISTER_TYPE_INFO>, poutputtype: Option<*const MFT_REGISTER_TYPE_INFO>, pppmftactivate: *mut *mut Option, pnummftactivate: *mut u32) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFTEnumEx(guidcategory : windows_core::GUID, flags : u32, pinputtype : *const MFT_REGISTER_TYPE_INFO, poutputtype : *const MFT_REGISTER_TYPE_INFO, pppmftactivate : *mut *mut Option < IMFActivate >, pnummftactivate : *mut u32) -> windows_core::HRESULT); - MFTEnumEx(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(std::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(std::ptr::null())), pppmftactivate, pnummftactivate).ok() + MFTEnumEx(core::mem::transmute(guidcategory), flags.0 as _, core::mem::transmute(pinputtype.unwrap_or(core::ptr::null())), core::mem::transmute(poutputtype.unwrap_or(core::ptr::null())), pppmftactivate, pnummftactivate).ok() } #[inline] pub unsafe fn MFTGetInfo(clsidmft: windows_core::GUID, pszname: Option<*mut windows_core::PWSTR>, ppinputtypes: Option<*mut *mut MFT_REGISTER_TYPE_INFO>, pcinputtypes: Option<*mut u32>, ppoutputtypes: Option<*mut *mut MFT_REGISTER_TYPE_INFO>, pcoutputtypes: Option<*mut u32>, ppattributes: Option<*mut Option>) -> windows_core::Result<()> { windows_targets::link!("mfplat.dll" "system" fn MFTGetInfo(clsidmft : windows_core::GUID, pszname : *mut windows_core::PWSTR, ppinputtypes : *mut *mut MFT_REGISTER_TYPE_INFO, pcinputtypes : *mut u32, ppoutputtypes : *mut *mut MFT_REGISTER_TYPE_INFO, pcoutputtypes : *mut u32, ppattributes : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - MFTGetInfo(core::mem::transmute(clsidmft), core::mem::transmute(pszname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppinputtypes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcinputtypes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoutputtypes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcoutputtypes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppattributes.unwrap_or(std::ptr::null_mut()))).ok() + MFTGetInfo(core::mem::transmute(clsidmft), core::mem::transmute(pszname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppinputtypes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcinputtypes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoutputtypes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcoutputtypes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppattributes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MFTRegister(clsidmft: windows_core::GUID, guidcategory: windows_core::GUID, pszname: P0, flags: u32, pinputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, poutputtypes: Option<&[MFT_REGISTER_TYPE_INFO]>, pattributes: P1) -> windows_core::Result<()> @@ -1926,7 +1926,7 @@ impl core::ops::Deref for IAudioSourceProvider { windows_core::imp::interface_hierarchy!(IAudioSourceProvider, windows_core::IUnknown); impl IAudioSourceProvider { pub unsafe fn ProvideInput(&self, dwsamplecount: u32, pdwchannelcount: *mut u32, pinterleavedaudiodata: Option<*mut f32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), dwsamplecount, pdwchannelcount, core::mem::transmute(pinterleavedaudiodata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ProvideInput)(windows_core::Interface::as_raw(self), dwsamplecount, pdwchannelcount, core::mem::transmute(pinterleavedaudiodata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2116,7 +2116,7 @@ impl ID3D12VideoDecodeCommandList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -2148,10 +2148,10 @@ impl ID3D12VideoDecodeCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -2165,7 +2165,7 @@ impl ID3D12VideoDecodeCommandList { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) { - (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -2705,7 +2705,7 @@ impl ID3D12VideoEncodeCommandList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -2737,10 +2737,10 @@ impl ID3D12VideoEncodeCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -2758,7 +2758,7 @@ impl ID3D12VideoEncodeCommandList { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) { - (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn SetProtectedResourceSession(&self, pprotectedresourcesession: P0) @@ -3202,7 +3202,7 @@ impl ID3D12VideoProcessCommandList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DiscardResource)(windows_core::Interface::as_raw(self), presource.param().abi(), core::mem::transmute(pregion.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn BeginQuery(&self, pqueryheap: P0, r#type: super::super::Graphics::Direct3D12::D3D12_QUERY_TYPE, index: u32) @@ -3234,10 +3234,10 @@ impl ID3D12VideoProcessCommandList { (windows_core::Interface::vtable(self).SetPredication)(windows_core::Interface::as_raw(self), pbuffer.param().abi(), alignedbufferoffset, operation) } pub unsafe fn SetMarker(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).SetMarker)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn BeginEvent(&self, metadata: u32, pdata: Option<*const core::ffi::c_void>, size: u32) { - (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(std::ptr::null())), size) + (windows_core::Interface::vtable(self).BeginEvent)(windows_core::Interface::as_raw(self), metadata, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), size) } pub unsafe fn EndEvent(&self) { (windows_core::Interface::vtable(self).EndEvent)(windows_core::Interface::as_raw(self)) @@ -3251,7 +3251,7 @@ impl ID3D12VideoProcessCommandList { } #[cfg(feature = "Win32_Graphics_Direct3D12")] pub unsafe fn WriteBufferImmediate(&self, count: u32, pparams: *const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_PARAMETER, pmodes: Option<*const super::super::Graphics::Direct3D12::D3D12_WRITEBUFFERIMMEDIATE_MODE>) { - (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).WriteBufferImmediate)(windows_core::Interface::as_raw(self), count, pparams, core::mem::transmute(pmodes.unwrap_or(core::ptr::null()))) } } #[cfg(feature = "Win32_Graphics_Direct3D12")] @@ -3515,7 +3515,7 @@ windows_core::imp::interface_hierarchy!(IDXVAHD_Device, windows_core::IUnknown); impl IDXVAHD_Device { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CreateVideoSurface(&self, width: u32, height: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, r#type: DXVAHD_SURFACE_TYPE, ppsurfaces: &mut [Option], psharedhandle: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), core::mem::transmute(psharedhandle.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateVideoSurface)(windows_core::Interface::as_raw(self), width, height, format, pool, usage, r#type, ppsurfaces.len().try_into().unwrap(), core::mem::transmute(ppsurfaces.as_ptr()), core::mem::transmute(psharedhandle.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorDeviceCaps(&self, pcaps: *mut DXVAHD_VPDEVCAPS) -> windows_core::Result<()> { @@ -3854,7 +3854,7 @@ windows_core::imp::interface_hierarchy!(IDirectXVideoAccelerationService, window impl IDirectXVideoAccelerationService { #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CreateSurface(&self, width: u32, height: u32, backbuffers: u32, format: super::super::Graphics::Direct3D9::D3DFORMAT, pool: super::super::Graphics::Direct3D9::D3DPOOL, usage: u32, dxvatype: DXVA2_VideoRenderTargetType, ppsurface: *mut Option, psharedhandle: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), width, height, backbuffers, format, pool, usage, dxvatype.0 as _, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateSurface)(windows_core::Interface::as_raw(self), width, height, backbuffers, format, pool, usage, dxvatype.0 as _, core::mem::transmute(ppsurface), core::mem::transmute(psharedhandle.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -3880,7 +3880,7 @@ impl IDirectXVideoDecoder { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetCreationParameters(&self, pdeviceguid: Option<*mut windows_core::GUID>, pvideodesc: Option<*mut DXVA2_VideoDesc>, pconfig: Option<*mut DXVA2_ConfigPictureDecode>, pdecoderrendertargets: *mut *mut Option, pnumsurfaces: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvideodesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pconfig.unwrap_or(std::ptr::null_mut())), pdecoderrendertargets, core::mem::transmute(pnumsurfaces.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideodesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pconfig.unwrap_or(core::ptr::null_mut())), pdecoderrendertargets, core::mem::transmute(pnumsurfaces.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetBuffer(&self, buffertype: DXVA2_BufferfType, ppbuffer: *mut *mut core::ffi::c_void, pbuffersize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), buffertype.0 as _, ppbuffer, pbuffersize).ok() @@ -3893,10 +3893,10 @@ impl IDirectXVideoDecoder { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), core::mem::transmute(pvpvpdata.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).BeginFrame)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), core::mem::transmute(pvpvpdata.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn EndFrame(&self, phandlecomplete: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(phandlecomplete.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EndFrame)(windows_core::Interface::as_raw(self), core::mem::transmute(phandlecomplete.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Execute(&self, pexecuteparams: *const DXVA2_DecodeExecuteParams) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), pexecuteparams).ok() @@ -3937,7 +3937,7 @@ impl IDirectXVideoDecoderService { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetDecoderConfigurations(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, preserved: Option<*const core::ffi::c_void>, pcount: *mut u32, ppconfigs: *mut *mut DXVA2_ConfigPictureDecode) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), guid, pvideodesc, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pcount, ppconfigs).ok() + (windows_core::Interface::vtable(self).GetDecoderConfigurations)(windows_core::Interface::as_raw(self), guid, pvideodesc, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pcount, ppconfigs).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn CreateVideoDecoder(&self, guid: *const windows_core::GUID, pvideodesc: *const DXVA2_VideoDesc, pconfig: *const DXVA2_ConfigPictureDecode, ppdecoderrendertargets: &[Option]) -> windows_core::Result { @@ -4000,7 +4000,7 @@ impl IDirectXVideoProcessor { } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetCreationParameters(&self, pdeviceguid: Option<*mut windows_core::GUID>, pvideodesc: Option<*mut DXVA2_VideoDesc>, prendertargetformat: Option<*mut super::super::Graphics::Direct3D9::D3DFORMAT>, pmaxnumsubstreams: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvideodesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prendertargetformat.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pmaxnumsubstreams.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCreationParameters)(windows_core::Interface::as_raw(self), core::mem::transmute(pdeviceguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvideodesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prendertargetformat.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pmaxnumsubstreams.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Direct3D9")] pub unsafe fn GetVideoProcessorCaps(&self, pcaps: *mut DXVA2_VideoProcessorCaps) -> windows_core::Result<()> { @@ -4019,7 +4019,7 @@ impl IDirectXVideoProcessor { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pbltparams, core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), core::mem::transmute(phandlecomplete.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).VideoProcessBlt)(windows_core::Interface::as_raw(self), prendertarget.param().abi(), pbltparams, core::mem::transmute(psamples.as_ptr()), psamples.len().try_into().unwrap(), core::mem::transmute(phandlecomplete.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -5111,7 +5111,7 @@ windows_core::imp::interface_hierarchy!(IMFAttributes, windows_core::IUnknown); impl IMFAttributes { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetItem(&self, guidkey: *const windows_core::GUID, pvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetItem)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetItemType(&self, guidkey: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5150,7 +5150,7 @@ impl IMFAttributes { (windows_core::Interface::vtable(self).GetStringLength)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__) } pub unsafe fn GetString(&self, guidkey: *const windows_core::GUID, pwszvalue: &mut [u16], pcchlength: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), core::mem::transmute(pcchlength.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pwszvalue.as_ptr()), pwszvalue.len().try_into().unwrap(), core::mem::transmute(pcchlength.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedString(&self, guidkey: *const windows_core::GUID, ppwszvalue: *mut windows_core::PWSTR, pcchlength: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAllocatedString)(windows_core::Interface::as_raw(self), guidkey, ppwszvalue, pcchlength).ok() @@ -5160,7 +5160,7 @@ impl IMFAttributes { (windows_core::Interface::vtable(self).GetBlobSize)(windows_core::Interface::as_raw(self), guidkey, &mut result__).map(|| result__) } pub unsafe fn GetBlob(&self, guidkey: *const windows_core::GUID, pbuf: &mut [u8], pcbblobsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), core::mem::transmute(pcbblobsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBlob)(windows_core::Interface::as_raw(self), guidkey, core::mem::transmute(pbuf.as_ptr()), pbuf.len().try_into().unwrap(), core::mem::transmute(pcbblobsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetAllocatedBlob(&self, guidkey: *const windows_core::GUID, ppbuf: *mut *mut u8, pcbsize: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetAllocatedBlob)(windows_core::Interface::as_raw(self), guidkey, ppbuf, pcbsize).ok() @@ -5221,7 +5221,7 @@ impl IMFAttributes { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetItemByIndex(&self, unindex: u32, pguidkey: *mut windows_core::GUID, pvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), unindex, pguidkey, core::mem::transmute(pvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetItemByIndex)(windows_core::Interface::as_raw(self), unindex, pguidkey, core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CopyAllItems(&self, pdest: P0) -> windows_core::Result<()> where @@ -5591,7 +5591,7 @@ impl IMFByteStreamHandler { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(std::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() + (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() } pub unsafe fn EndCreateObject(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()> where @@ -5722,7 +5722,7 @@ impl IMFCameraControlDefaults { (windows_core::Interface::vtable(self).GetRangeInfo)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn LockControlData(&self, control: *mut *mut core::ffi::c_void, controlsize: *mut u32, data: Option<*mut *mut core::ffi::c_void>, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).LockControlData)(windows_core::Interface::as_raw(self), control, controlsize, core::mem::transmute(data.unwrap_or(std::ptr::null_mut())), core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LockControlData)(windows_core::Interface::as_raw(self), control, controlsize, core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UnlockControlData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).UnlockControlData)(windows_core::Interface::as_raw(self)).ok() @@ -6151,7 +6151,7 @@ impl IMFCapturePreviewSink { (windows_core::Interface::vtable(self).SetRenderSurface)(windows_core::Interface::as_raw(self), psurface.param().abi()).ok() } pub unsafe fn UpdateVideo(&self, psrc: Option<*const MFVideoNormalizedRect>, pdst: Option<*const super::super::Foundation::RECT>, pborderclr: Option<*const super::super::Foundation::COLORREF>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(std::ptr::null())), core::mem::transmute(pdst.unwrap_or(std::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(core::ptr::null())), core::mem::transmute(pdst.unwrap_or(core::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetSampleCallback(&self, dwstreamsinkindex: u32, pcallback: P0) -> windows_core::Result<()> where @@ -6257,17 +6257,17 @@ impl core::ops::Deref for IMFCaptureSink { windows_core::imp::interface_hierarchy!(IMFCaptureSink, windows_core::IUnknown); impl IMFCaptureSink { pub unsafe fn GetOutputMediaType(&self, dwsinkstreamindex: u32, ppmediatype: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), dwsinkstreamindex, core::mem::transmute(ppmediatype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputMediaType)(windows_core::Interface::as_raw(self), dwsinkstreamindex, core::mem::transmute(ppmediatype.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetService(&self, dwsinkstreamindex: u32, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), dwsinkstreamindex, rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), dwsinkstreamindex, rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddStream(&self, dwsourcestreamindex: u32, pmediatype: P0, pattributes: P1, pdwsinkstreamindex: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi(), pattributes.param().abi(), core::mem::transmute(pdwsinkstreamindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddStream)(windows_core::Interface::as_raw(self), dwsourcestreamindex, pmediatype.param().abi(), pattributes.param().abi(), core::mem::transmute(pdwsinkstreamindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Prepare(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Prepare)(windows_core::Interface::as_raw(self)).ok() @@ -6317,13 +6317,13 @@ impl core::ops::Deref for IMFCaptureSource { windows_core::imp::interface_hierarchy!(IMFCaptureSource, windows_core::IUnknown); impl IMFCaptureSource { pub unsafe fn GetCaptureDeviceSource(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppmediasource: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppmediasource.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCaptureDeviceSource)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppmediasource.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCaptureDeviceActivate(&self, mfcaptureenginedevicetype: MF_CAPTURE_ENGINE_DEVICE_TYPE, ppactivate: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppactivate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCaptureDeviceActivate)(windows_core::Interface::as_raw(self), mfcaptureenginedevicetype, core::mem::transmute(ppactivate.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetService(&self, rguidservice: *const windows_core::GUID, riid: *const windows_core::GUID, ppunknown: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetService)(windows_core::Interface::as_raw(self), rguidservice, riid, core::mem::transmute(ppunknown.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddEffect(&self, dwsourcestreamindex: u32, punknown: P0) -> windows_core::Result<()> where @@ -6341,7 +6341,7 @@ impl IMFCaptureSource { (windows_core::Interface::vtable(self).RemoveAllEffects)(windows_core::Interface::as_raw(self), dwsourcestreamindex).ok() } pub unsafe fn GetAvailableDeviceMediaType(&self, dwsourcestreamindex: u32, dwmediatypeindex: u32, ppmediatype: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, dwmediatypeindex, core::mem::transmute(ppmediatype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAvailableDeviceMediaType)(windows_core::Interface::as_raw(self), dwsourcestreamindex, dwmediatypeindex, core::mem::transmute(ppmediatype.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCurrentDeviceMediaType(&self, dwsourcestreamindex: u32, pmediatype: P0) -> windows_core::Result<()> where @@ -7867,7 +7867,7 @@ impl core::ops::Deref for IMFMediaBuffer { windows_core::imp::interface_hierarchy!(IMFMediaBuffer, windows_core::IUnknown); impl IMFMediaBuffer { pub unsafe fn Lock(&self, ppbbuffer: *mut *mut u8, pcbmaxlength: Option<*mut u32>, pcbcurrentlength: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), ppbbuffer, core::mem::transmute(pcbmaxlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbcurrentlength.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Lock)(windows_core::Interface::as_raw(self), ppbbuffer, core::mem::transmute(pcbmaxlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcurrentlength.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Unlock(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unlock)(windows_core::Interface::as_raw(self)).ok() @@ -8038,10 +8038,10 @@ impl IMFMediaEngine { (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetNativeVideoSize(&self, cx: Option<*mut u32>, cy: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(std::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetVideoAspectRatio(&self, cx: Option<*mut u32>, cy: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVideoAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(std::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVideoAspectRatio)(windows_core::Interface::as_raw(self), core::mem::transmute(cx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Shutdown(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Shutdown)(windows_core::Interface::as_raw(self)).ok() @@ -8050,7 +8050,7 @@ impl IMFMediaEngine { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), core::mem::transmute(psrc.unwrap_or(std::ptr::null())), pdst, core::mem::transmute(pborderclr.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), core::mem::transmute(psrc.unwrap_or(core::ptr::null())), pdst, core::mem::transmute(pborderclr.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn OnVideoStreamTick(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8345,7 +8345,7 @@ impl IMFMediaEngineEx { (windows_core::Interface::vtable(self).GetStatistics)(windows_core::Interface::as_raw(self), statisticid, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn UpdateVideoStream(&self, psrc: Option<*const MFVideoNormalizedRect>, pdst: Option<*const super::super::Foundation::RECT>, pborderclr: Option<*const MFARGB>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).UpdateVideoStream)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(std::ptr::null())), core::mem::transmute(pdst.unwrap_or(std::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateVideoStream)(windows_core::Interface::as_raw(self), core::mem::transmute(psrc.unwrap_or(core::ptr::null())), core::mem::transmute(pdst.unwrap_or(core::ptr::null())), core::mem::transmute(pborderclr.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetBalance(&self) -> f64 { (windows_core::Interface::vtable(self).GetBalance)(windows_core::Interface::as_raw(self)) @@ -8673,7 +8673,7 @@ impl IMFMediaEngineProtectedContent { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), core::mem::transmute(psrc.unwrap_or(std::ptr::null())), pdst, core::mem::transmute(pborderclr.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).TransferVideoFrame)(windows_core::Interface::as_raw(self), pdstsurf.param().abi(), core::mem::transmute(psrc.unwrap_or(core::ptr::null())), pdst, core::mem::transmute(pborderclr.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } pub unsafe fn SetContentProtectionManager(&self, pcpm: P0) -> windows_core::Result<()> where @@ -9873,7 +9873,7 @@ impl IMFMediaTypeHandler { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).IsMediaTypeSupported)(windows_core::Interface::as_raw(self), pmediatype.param().abi(), core::mem::transmute(ppmediatype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsMediaTypeSupported)(windows_core::Interface::as_raw(self), pmediatype.param().abi(), core::mem::transmute(ppmediatype.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetMediaTypeCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10123,13 +10123,13 @@ impl IMFNetCredential { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(std::ptr::null_mut())), pcbdata, fencryptdata.param().abi()).ok() + (windows_core::Interface::vtable(self).GetUser)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pcbdata, fencryptdata.param().abi()).ok() } pub unsafe fn GetPassword(&self, pbdata: Option<*mut u8>, pcbdata: *mut u32, fencryptdata: P0) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(std::ptr::null_mut())), pcbdata, fencryptdata.param().abi()).ok() + (windows_core::Interface::vtable(self).GetPassword)(windows_core::Interface::as_raw(self), core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pcbdata, fencryptdata.param().abi()).ok() } pub unsafe fn LoggedOnUser(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10468,7 +10468,7 @@ impl IMFOutputTrustAuthority { (windows_core::Interface::vtable(self).GetAction)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn SetPolicy(&self, pppolicy: Option<&[Option]>, ppbticket: Option<*mut *mut u8>, pcbticket: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(pppolicy.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pppolicy.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppbticket.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbticket.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetPolicy)(windows_core::Interface::as_raw(self), core::mem::transmute(pppolicy.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pppolicy.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppbticket.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbticket.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -10650,17 +10650,17 @@ impl IMFPMediaItem { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetStartStopPosition(&self, pguidstartpositiontype: Option<*mut windows_core::GUID>, pvstartvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>, pguidstoppositiontype: Option<*mut windows_core::GUID>, pvstopvalue: Option<*mut super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvstartvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pguidstoppositiontype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvstopvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvstartvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pguidstoppositiontype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvstopvalue.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn SetStartStopPosition(&self, pguidstartpositiontype: Option<*const windows_core::GUID>, pvstartvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>, pguidstoppositiontype: Option<*const windows_core::GUID>, pvstopvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(std::ptr::null())), core::mem::transmute(pvstartvalue.unwrap_or(std::ptr::null())), core::mem::transmute(pguidstoppositiontype.unwrap_or(std::ptr::null())), core::mem::transmute(pvstopvalue.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetStartStopPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidstartpositiontype.unwrap_or(core::ptr::null())), core::mem::transmute(pvstartvalue.unwrap_or(core::ptr::null())), core::mem::transmute(pguidstoppositiontype.unwrap_or(core::ptr::null())), core::mem::transmute(pvstopvalue.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn HasVideo(&self, pfhasvideo: Option<*mut super::super::Foundation::BOOL>, pfselected: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasvideo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).HasVideo)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasvideo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn HasAudio(&self, pfhasaudio: Option<*mut super::super::Foundation::BOOL>, pfselected: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasaudio.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).HasAudio)(windows_core::Interface::as_raw(self), core::mem::transmute(pfhasaudio.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfselected.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsProtected(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10809,14 +10809,14 @@ impl IMFPMediaPlayer { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.param().abi(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), fsync.param().abi(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CreateMediaItemFromObject(&self, piunknownobj: P0, fsync: P1, dwuserdata: usize, ppmediaitem: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.param().abi(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateMediaItemFromObject)(windows_core::Interface::as_raw(self), piunknownobj.param().abi(), fsync.param().abi(), dwuserdata, core::mem::transmute(ppmediaitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetMediaItem(&self, pimfpmediaitem: P0) -> windows_core::Result<()> where @@ -10856,10 +10856,10 @@ impl IMFPMediaPlayer { (windows_core::Interface::vtable(self).SetMute)(windows_core::Interface::as_raw(self), fmute.param().abi()).ok() } pub unsafe fn GetNativeVideoSize(&self, pszvideo: Option<*mut super::super::Foundation::SIZE>, pszarvideo: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszvideo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszarvideo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNativeVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszvideo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszarvideo.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetIdealVideoSize(&self, pszmin: Option<*mut super::super::Foundation::SIZE>, pszmax: Option<*mut super::super::Foundation::SIZE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmin.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszmax.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdealVideoSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pszmin.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszmax.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetVideoSourceRect(&self, pnrcsource: *const MFVideoNormalizedRect) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetVideoSourceRect)(windows_core::Interface::as_raw(self), pnrcsource).ok() @@ -11006,7 +11006,7 @@ impl IMFPluginControl { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), core::mem::transmute(clsid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetPreferredClsid)(windows_core::Interface::as_raw(self), plugintype, selector.param().abi(), core::mem::transmute(clsid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn IsDisabled(&self, plugintype: u32, clsid: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsDisabled)(windows_core::Interface::as_raw(self), plugintype, clsid).ok() @@ -11970,7 +11970,7 @@ impl IMFSchemeHandler { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(std::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() + (windows_core::Interface::vtable(self).BeginCreateObject)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() } pub unsafe fn EndCreateObject(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()> where @@ -12487,7 +12487,7 @@ impl IMFSequencerSource { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetPresentationContext)(windows_core::Interface::as_raw(self), ppd.param().abi(), core::mem::transmute(pid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptopology.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPresentationContext)(windows_core::Interface::as_raw(self), ppd.param().abi(), core::mem::transmute(pid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptopology.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn UpdateTopology(&self, dwid: u32, ptopology: P0) -> windows_core::Result<()> where @@ -12761,7 +12761,7 @@ impl core::ops::Deref for IMFSinkWriterEx { windows_core::imp::interface_hierarchy!(IMFSinkWriterEx, windows_core::IUnknown, IMFSinkWriter); impl IMFSinkWriterEx { pub unsafe fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: Option<*mut windows_core::GUID>, pptransform: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptransform)).ok() + (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptransform)).ok() } } #[repr(C)] @@ -12810,7 +12810,7 @@ impl IMFSourceBuffer { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AppendByteStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(pmaxlen.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AppendByteStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(pmaxlen.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Abort(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self)).ok() @@ -12965,14 +12965,14 @@ impl IMFSourceReader { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pdwreserved.unwrap_or(std::ptr::null())), pmediatype.param().abi()).ok() + (windows_core::Interface::vtable(self).SetCurrentMediaType)(windows_core::Interface::as_raw(self), dwstreamindex, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), pmediatype.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn SetCurrentPosition(&self, guidtimeformat: *const windows_core::GUID, varposition: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetCurrentPosition)(windows_core::Interface::as_raw(self), guidtimeformat, core::mem::transmute(varposition)).ok() } pub unsafe fn ReadSample(&self, dwstreamindex: u32, dwcontrolflags: u32, pdwactualstreamindex: Option<*mut u32>, pdwstreamflags: Option<*mut u32>, plltimestamp: Option<*mut i64>, ppsample: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), dwstreamindex, dwcontrolflags, core::mem::transmute(pdwactualstreamindex.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwstreamflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plltimestamp.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppsample.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadSample)(windows_core::Interface::as_raw(self), dwstreamindex, dwcontrolflags, core::mem::transmute(pdwactualstreamindex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwstreamflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plltimestamp.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsample.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Flush(&self, dwstreamindex: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self), dwstreamindex).ok() @@ -13086,7 +13086,7 @@ impl IMFSourceReaderEx { (windows_core::Interface::vtable(self).RemoveAllTransformsForStream)(windows_core::Interface::as_raw(self), dwstreamindex).ok() } pub unsafe fn GetTransformForStream(&self, dwstreamindex: u32, dwtransformindex: u32, pguidcategory: Option<*mut windows_core::GUID>, pptransform: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptransform)).ok() + (windows_core::Interface::vtable(self).GetTransformForStream)(windows_core::Interface::as_raw(self), dwstreamindex, dwtransformindex, core::mem::transmute(pguidcategory.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptransform)).ok() } } #[repr(C)] @@ -13131,7 +13131,7 @@ impl IMFSourceResolver { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(std::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() + (windows_core::Interface::vtable(self).BeginCreateObjectFromURL)(windows_core::Interface::as_raw(self), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() } pub unsafe fn EndCreateObjectFromURL(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()> where @@ -13148,7 +13148,7 @@ impl IMFSourceResolver { P3: windows_core::Param, P4: windows_core::Param, { - (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(std::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() + (windows_core::Interface::vtable(self).BeginCreateObjectFromByteStream)(windows_core::Interface::as_raw(self), pbytestream.param().abi(), pwszurl.param().abi(), dwflags, pprops.param().abi(), core::mem::transmute(ppiunknowncancelcookie.unwrap_or(core::ptr::null_mut())), pcallback.param().abi(), punkstate.param().abi()).ok() } pub unsafe fn EndCreateObjectFromByteStream(&self, presult: P0, pobjecttype: *mut MF_OBJECT_TYPE, ppobject: *mut Option) -> windows_core::Result<()> where @@ -13682,10 +13682,10 @@ impl IMFTimedTextCueList { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), start, duration, text.param().abi(), core::mem::transmute(cue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddTextCue)(windows_core::Interface::as_raw(self), start, duration, text.param().abi(), core::mem::transmute(cue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddDataCue(&self, start: f64, duration: f64, data: &[u8], cue: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), start, duration, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), core::mem::transmute(cue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddDataCue)(windows_core::Interface::as_raw(self), start, duration, core::mem::transmute(data.as_ptr()), data.len().try_into().unwrap(), core::mem::transmute(cue.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveCue(&self, cue: P0) -> windows_core::Result<()> where @@ -15040,13 +15040,13 @@ impl core::ops::Deref for IMFVideoProcessorControl { windows_core::imp::interface_hierarchy!(IMFVideoProcessorControl, windows_core::IUnknown); impl IMFVideoProcessorControl { pub unsafe fn SetBorderColor(&self, pbordercolor: Option<*const MFARGB>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pbordercolor.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetBorderColor)(windows_core::Interface::as_raw(self), core::mem::transmute(pbordercolor.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetSourceRectangle(&self, psrcrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(psrcrect.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetSourceRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(psrcrect.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetDestinationRectangle(&self, pdstrect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstrect.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetDestinationRectangle)(windows_core::Interface::as_raw(self), core::mem::transmute(pdstrect.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetMirror(&self, emirror: MF_VIDEO_PROCESSOR_MIRROR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMirror)(windows_core::Interface::as_raw(self), emirror).ok() @@ -15055,7 +15055,7 @@ impl IMFVideoProcessorControl { (windows_core::Interface::vtable(self).SetRotation)(windows_core::Interface::as_raw(self), erotation).ok() } pub unsafe fn SetConstrictionSize(&self, pconstrictionsize: Option<*const super::super::Foundation::SIZE>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstrictionsize.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetConstrictionSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pconstrictionsize.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -15345,7 +15345,7 @@ impl IMFVirtualCamera { (windows_core::Interface::vtable(self).GetMediaSource)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn SendCameraProperty(&self, propertyset: *const windows_core::GUID, propertyid: u32, propertyflags: u32, propertypayload: Option<*mut core::ffi::c_void>, propertypayloadlength: u32, data: Option<*mut core::ffi::c_void>, datalength: u32, datawritten: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), propertyset, propertyid, propertyflags, core::mem::transmute(propertypayload.unwrap_or(std::ptr::null_mut())), propertypayloadlength, core::mem::transmute(data.unwrap_or(std::ptr::null_mut())), datalength, datawritten).ok() + (windows_core::Interface::vtable(self).SendCameraProperty)(windows_core::Interface::as_raw(self), propertyset, propertyid, propertyflags, core::mem::transmute(propertypayload.unwrap_or(core::ptr::null_mut())), propertypayloadlength, core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), datalength, datawritten).ok() } pub unsafe fn CreateSyncEvent(&self, kseventset: *const windows_core::GUID, kseventid: u32, kseventflags: u32, eventhandle: P0) -> windows_core::Result where diff --git a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs index 5c20608876..a5ef7d0190 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Multimedia/mod.rs @@ -91,7 +91,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIFileOpenA(ppfile : *mut * mut core::ffi::c_void, szfile : windows_core::PCSTR, umode : u32, lphandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIFileOpenA(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(std::ptr::null()))).ok() + AVIFileOpenA(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIFileOpenW(ppfile: *mut Option, szfile: P0, umode: u32, lphandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -99,7 +99,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIFileOpenW(ppfile : *mut * mut core::ffi::c_void, szfile : windows_core::PCWSTR, umode : u32, lphandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIFileOpenW(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(std::ptr::null()))).ok() + AVIFileOpenW(core::mem::transmute(ppfile), szfile.param().abi(), umode, core::mem::transmute(lphandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIFileReadData(pfile: P0, ckid: u32, lpdata: *mut core::ffi::c_void, lpcbdata: *mut i32) -> windows_core::Result<()> @@ -137,7 +137,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIMakeCompressedStream(ppscompressed : *mut * mut core::ffi::c_void, ppssource : * mut core::ffi::c_void, lpoptions : *const AVICOMPRESSOPTIONS, pclsidhandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIMakeCompressedStream(core::mem::transmute(ppscompressed), ppssource.param().abi(), lpoptions, core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null()))).ok() + AVIMakeCompressedStream(core::mem::transmute(ppscompressed), ppssource.param().abi(), lpoptions, core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIMakeFileFromStreams(ppfile: *mut Option, papstreams: &[Option]) -> windows_core::Result<()> { @@ -168,7 +168,7 @@ where P1: windows_core::Param, { windows_targets::link!("avifil32.dll" "cdecl" fn AVISaveA(szfile : windows_core::PCSTR, pclsidhandler : *const windows_core::GUID, lpfncallback : AVISAVECALLBACK, nstreams : i32, pfile : * mut core::ffi::c_void, lpoptions : *const AVICOMPRESSOPTIONS) -> windows_core::HRESULT); - AVISaveA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() + AVISaveA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } #[inline] pub unsafe fn AVISaveOptions(hwnd: P0, uiflags: u32, nstreams: i32, ppavi: *const Option, plpoptions: *mut *mut AVICOMPRESSOPTIONS) -> isize @@ -189,7 +189,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVISaveVA(szfile : windows_core::PCSTR, pclsidhandler : *const windows_core::GUID, lpfncallback : AVISAVECALLBACK, nstreams : i32, ppavi : *const * mut core::ffi::c_void, plpoptions : *const *const AVICOMPRESSOPTIONS) -> windows_core::HRESULT); - AVISaveVA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() + AVISaveVA(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } #[inline] pub unsafe fn AVISaveVW(szfile: P0, pclsidhandler: Option<*const windows_core::GUID>, lpfncallback: AVISAVECALLBACK, nstreams: i32, ppavi: *const Option, plpoptions: *const *const AVICOMPRESSOPTIONS) -> windows_core::Result<()> @@ -197,7 +197,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVISaveVW(szfile : windows_core::PCWSTR, pclsidhandler : *const windows_core::GUID, lpfncallback : AVISAVECALLBACK, nstreams : i32, ppavi : *const * mut core::ffi::c_void, plpoptions : *const *const AVICOMPRESSOPTIONS) -> windows_core::HRESULT); - AVISaveVW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() + AVISaveVW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null())), lpfncallback, nstreams, core::mem::transmute(ppavi), plpoptions).ok() } #[inline] pub unsafe fn AVISaveW(szfile: P0, pclsidhandler: Option<*const windows_core::GUID>, lpfncallback: AVISAVECALLBACK, nstreams: i32, pfile: P1, lpoptions: *const AVICOMPRESSOPTIONS) -> windows_core::Result<()> @@ -206,7 +206,7 @@ where P1: windows_core::Param, { windows_targets::link!("avifil32.dll" "cdecl" fn AVISaveW(szfile : windows_core::PCWSTR, pclsidhandler : *const windows_core::GUID, lpfncallback : AVISAVECALLBACK, nstreams : i32, pfile : * mut core::ffi::c_void, lpoptions : *const AVICOMPRESSOPTIONS) -> windows_core::HRESULT); - AVISaveW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() + AVISaveW(szfile.param().abi(), core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null())), lpfncallback, nstreams, pfile.param().abi(), lpoptions).ok() } #[inline] pub unsafe fn AVIStreamAddRef(pavi: P0) -> u32 @@ -227,7 +227,7 @@ where #[inline] pub unsafe fn AVIStreamCreate(ppavi: *mut Option, lparam1: i32, lparam2: i32, pclsidhandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> { windows_targets::link!("avifil32.dll" "system" fn AVIStreamCreate(ppavi : *mut * mut core::ffi::c_void, lparam1 : i32, lparam2 : i32, pclsidhandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIStreamCreate(core::mem::transmute(ppavi), lparam1, lparam2, core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null()))).ok() + AVIStreamCreate(core::mem::transmute(ppavi), lparam1, lparam2, core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIStreamEndStreaming(pavi: P0) -> windows_core::Result<()> @@ -268,7 +268,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamGetFrameOpen(pavi : * mut core::ffi::c_void, lpbiwanted : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER) -> Option < IGetFrame >); - AVIStreamGetFrameOpen(pavi.param().abi(), core::mem::transmute(lpbiwanted.unwrap_or(std::ptr::null()))) + AVIStreamGetFrameOpen(pavi.param().abi(), core::mem::transmute(lpbiwanted.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AVIStreamInfoA(pavi: P0, psi: *mut AVISTREAMINFOA, lsize: i32) -> windows_core::Result<()> @@ -300,7 +300,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamOpenFromFileA(ppavi : *mut * mut core::ffi::c_void, szfile : windows_core::PCSTR, fcctype : u32, lparam : i32, mode : u32, pclsidhandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIStreamOpenFromFileA(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null()))).ok() + AVIStreamOpenFromFileA(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIStreamOpenFromFileW(ppavi: *mut Option, szfile: P0, fcctype: u32, lparam: i32, mode: u32, pclsidhandler: Option<*const windows_core::GUID>) -> windows_core::Result<()> @@ -308,7 +308,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamOpenFromFileW(ppavi : *mut * mut core::ffi::c_void, szfile : windows_core::PCWSTR, fcctype : u32, lparam : i32, mode : u32, pclsidhandler : *const windows_core::GUID) -> windows_core::HRESULT); - AVIStreamOpenFromFileW(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(std::ptr::null()))).ok() + AVIStreamOpenFromFileW(core::mem::transmute(ppavi), szfile.param().abi(), fcctype, lparam, mode, core::mem::transmute(pclsidhandler.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AVIStreamRead(pavi: P0, lstart: i32, lsamples: i32, lpbuffer: Option<*mut core::ffi::c_void>, cbbuffer: i32, plbytes: Option<*mut i32>, plsamples: Option<*mut i32>) -> windows_core::Result<()> @@ -316,7 +316,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamRead(pavi : * mut core::ffi::c_void, lstart : i32, lsamples : i32, lpbuffer : *mut core::ffi::c_void, cbbuffer : i32, plbytes : *mut i32, plsamples : *mut i32) -> windows_core::HRESULT); - AVIStreamRead(pavi.param().abi(), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null_mut())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(std::ptr::null_mut()))).ok() + AVIStreamRead(pavi.param().abi(), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AVIStreamReadData(pavi: P0, fcc: u32, lp: Option<*mut core::ffi::c_void>, lpcb: *mut i32) -> windows_core::Result<()> @@ -324,7 +324,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamReadData(pavi : * mut core::ffi::c_void, fcc : u32, lp : *mut core::ffi::c_void, lpcb : *mut i32) -> windows_core::HRESULT); - AVIStreamReadData(pavi.param().abi(), fcc, core::mem::transmute(lp.unwrap_or(std::ptr::null_mut())), lpcb).ok() + AVIStreamReadData(pavi.param().abi(), fcc, core::mem::transmute(lp.unwrap_or(core::ptr::null_mut())), lpcb).ok() } #[inline] pub unsafe fn AVIStreamReadFormat(pavi: P0, lpos: i32, lpformat: Option<*mut core::ffi::c_void>, lpcbformat: *mut i32) -> windows_core::Result<()> @@ -332,7 +332,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamReadFormat(pavi : * mut core::ffi::c_void, lpos : i32, lpformat : *mut core::ffi::c_void, lpcbformat : *mut i32) -> windows_core::HRESULT); - AVIStreamReadFormat(pavi.param().abi(), lpos, core::mem::transmute(lpformat.unwrap_or(std::ptr::null_mut())), lpcbformat).ok() + AVIStreamReadFormat(pavi.param().abi(), lpos, core::mem::transmute(lpformat.unwrap_or(core::ptr::null_mut())), lpcbformat).ok() } #[inline] pub unsafe fn AVIStreamRelease(pavi: P0) -> u32 @@ -380,7 +380,7 @@ where P0: windows_core::Param, { windows_targets::link!("avifil32.dll" "system" fn AVIStreamWrite(pavi : * mut core::ffi::c_void, lstart : i32, lsamples : i32, lpbuffer : *const core::ffi::c_void, cbbuffer : i32, dwflags : u32, plsampwritten : *mut i32, plbyteswritten : *mut i32) -> windows_core::HRESULT); - AVIStreamWrite(pavi.param().abi(), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(std::ptr::null_mut()))).ok() + AVIStreamWrite(pavi.param().abi(), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AVIStreamWriteData(pavi: P0, fcc: u32, lp: *const core::ffi::c_void, cb: i32) -> windows_core::Result<()> @@ -445,7 +445,7 @@ where P0: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn DrawDibDraw(hdd : isize, hdc : super::super::Graphics::Gdi:: HDC, xdst : i32, ydst : i32, dxdst : i32, dydst : i32, lpbi : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbits : *const core::ffi::c_void, xsrc : i32, ysrc : i32, dxsrc : i32, dysrc : i32, wflags : u32) -> super::super::Foundation:: BOOL); - DrawDibDraw(hdd, hdc.param().abi(), xdst, ydst, dxdst, dydst, core::mem::transmute(lpbi.unwrap_or(std::ptr::null())), core::mem::transmute(lpbits.unwrap_or(std::ptr::null())), xsrc, ysrc, dxsrc, dysrc, wflags) + DrawDibDraw(hdd, hdc.param().abi(), xdst, ydst, dxdst, dydst, core::mem::transmute(lpbi.unwrap_or(core::ptr::null())), core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), xsrc, ysrc, dxsrc, dysrc, wflags) } #[inline] pub unsafe fn DrawDibEnd(hdd: isize) -> super::super::Foundation::BOOL { @@ -640,7 +640,7 @@ where P0: windows_core::Param, { windows_targets::link!("msvfw32.dll" "cdecl" fn ICCompress(hic : HIC, dwflags : u32, lpbioutput : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpdata : *mut core::ffi::c_void, lpbiinput : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbits : *const core::ffi::c_void, lpckid : *mut u32, lpdwflags : *mut u32, lframenum : i32, dwframesize : u32, dwquality : u32, lpbiprev : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpprev : *const core::ffi::c_void) -> u32); - ICCompress(hic.param().abi(), dwflags, lpbioutput, lpdata, lpbiinput, lpbits, core::mem::transmute(lpckid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwflags.unwrap_or(std::ptr::null_mut())), lframenum, dwframesize, dwquality, core::mem::transmute(lpbiprev.unwrap_or(std::ptr::null())), core::mem::transmute(lpprev.unwrap_or(std::ptr::null()))) + ICCompress(hic.param().abi(), dwflags, lpbioutput, lpdata, lpbiinput, lpbits, core::mem::transmute(lpckid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwflags.unwrap_or(core::ptr::null_mut())), lframenum, dwframesize, dwquality, core::mem::transmute(lpbiprev.unwrap_or(core::ptr::null())), core::mem::transmute(lpprev.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -650,7 +650,7 @@ where P1: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn ICCompressorChoose(hwnd : super::super::Foundation:: HWND, uiflags : u32, pvin : *const core::ffi::c_void, lpdata : *const core::ffi::c_void, pc : *mut COMPVARS, lpsztitle : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - ICCompressorChoose(hwnd.param().abi(), uiflags, core::mem::transmute(pvin.unwrap_or(std::ptr::null())), core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), pc, lpsztitle.param().abi()) + ICCompressorChoose(hwnd.param().abi(), uiflags, core::mem::transmute(pvin.unwrap_or(core::ptr::null())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), pc, lpsztitle.param().abi()) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -673,7 +673,7 @@ where P0: windows_core::Param, { windows_targets::link!("msvfw32.dll" "cdecl" fn ICDraw(hic : HIC, dwflags : u32, lpformat : *const core::ffi::c_void, lpdata : *const core::ffi::c_void, cbdata : u32, ltime : i32) -> u32); - ICDraw(hic.param().abi(), dwflags, lpformat, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cbdata, ltime) + ICDraw(hic.param().abi(), dwflags, lpformat, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cbdata, ltime) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -711,7 +711,7 @@ where P0: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn ICImageCompress(hic : HIC, uiflags : u32, lpbiin : *const super::super::Graphics::Gdi:: BITMAPINFO, lpbits : *const core::ffi::c_void, lpbiout : *const super::super::Graphics::Gdi:: BITMAPINFO, lquality : i32, plsize : *mut i32) -> super::super::Foundation:: HANDLE); - ICImageCompress(hic.param().abi(), uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(std::ptr::null())), lquality, core::mem::transmute(plsize.unwrap_or(std::ptr::null_mut()))) + ICImageCompress(hic.param().abi(), uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(core::ptr::null())), lquality, core::mem::transmute(plsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -720,7 +720,7 @@ where P0: windows_core::Param, { windows_targets::link!("msvfw32.dll" "system" fn ICImageDecompress(hic : HIC, uiflags : u32, lpbiin : *const super::super::Graphics::Gdi:: BITMAPINFO, lpbits : *const core::ffi::c_void, lpbiout : *const super::super::Graphics::Gdi:: BITMAPINFO) -> super::super::Foundation:: HANDLE); - ICImageDecompress(hic.param().abi(), uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(std::ptr::null()))) + ICImageDecompress(hic.param().abi(), uiflags, lpbiin, lpbits, core::mem::transmute(lpbiout.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ICInfo(fcctype: u32, fcchandler: u32, lpicinfo: *mut ICINFO) -> super::super::Foundation::BOOL { @@ -740,7 +740,7 @@ where #[inline] pub unsafe fn ICLocate(fcctype: u32, fcchandler: u32, lpbiin: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbiout: Option<*const super::super::Graphics::Gdi::BITMAPINFOHEADER>, wflags: u16) -> HIC { windows_targets::link!("msvfw32.dll" "system" fn ICLocate(fcctype : u32, fcchandler : u32, lpbiin : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, lpbiout : *const super::super::Graphics::Gdi:: BITMAPINFOHEADER, wflags : u16) -> HIC); - ICLocate(fcctype, fcchandler, lpbiin, core::mem::transmute(lpbiout.unwrap_or(std::ptr::null())), wflags) + ICLocate(fcctype, fcchandler, lpbiin, core::mem::transmute(lpbiout.unwrap_or(core::ptr::null())), wflags) } #[inline] pub unsafe fn ICOpen(fcctype: u32, fcchandler: u32, wmode: u32) -> HIC { @@ -769,7 +769,7 @@ where #[inline] pub unsafe fn ICSeqCompressFrame(pc: *const COMPVARS, uiflags: u32, lpbits: *const core::ffi::c_void, pfkey: *mut super::super::Foundation::BOOL, plsize: Option<*mut i32>) -> *mut core::ffi::c_void { windows_targets::link!("msvfw32.dll" "system" fn ICSeqCompressFrame(pc : *const COMPVARS, uiflags : u32, lpbits : *const core::ffi::c_void, pfkey : *mut super::super::Foundation:: BOOL, plsize : *mut i32) -> *mut core::ffi::c_void); - ICSeqCompressFrame(pc, uiflags, lpbits, pfkey, core::mem::transmute(plsize.unwrap_or(std::ptr::null_mut()))) + ICSeqCompressFrame(pc, uiflags, lpbits, pfkey, core::mem::transmute(plsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1072,7 +1072,7 @@ where P0: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmioAdvance(hmmio : HMMIO, pmmioinfo : *const MMIOINFO, fuadvance : u32) -> u32); - mmioAdvance(hmmio.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(std::ptr::null())), fuadvance) + mmioAdvance(hmmio.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::ptr::null())), fuadvance) } #[inline] pub unsafe fn mmioAscend(hmmio: P0, pmmcki: *const MMCKINFO, fuascend: u32) -> u32 @@ -1104,7 +1104,7 @@ where P0: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmioDescend(hmmio : HMMIO, pmmcki : *mut MMCKINFO, pmmckiparent : *const MMCKINFO, fudescend : u32) -> u32); - mmioDescend(hmmio.param().abi(), pmmcki, core::mem::transmute(pmmckiparent.unwrap_or(std::ptr::null())), fudescend) + mmioDescend(hmmio.param().abi(), pmmcki, core::mem::transmute(pmmckiparent.unwrap_or(core::ptr::null())), fudescend) } #[inline] pub unsafe fn mmioFlush(hmmio: P0, fuflush: u32) -> u32 @@ -1135,12 +1135,12 @@ pub unsafe fn mmioInstallIOProcW(fccioproc: u32, pioproc: LPMMIOPROC, dwflags: u #[inline] pub unsafe fn mmioOpenA(pszfilename: Option<&mut [u8; 128]>, pmmioinfo: Option<*mut MMIOINFO>, fdwopen: u32) -> HMMIO { windows_targets::link!("winmm.dll" "system" fn mmioOpenA(pszfilename : windows_core::PSTR, pmmioinfo : *mut MMIOINFO, fdwopen : u32) -> HMMIO); - mmioOpenA(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(std::ptr::null_mut())), fdwopen) + mmioOpenA(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(core::ptr::null_mut())), fdwopen) } #[inline] pub unsafe fn mmioOpenW(pszfilename: Option<&mut [u16; 128]>, pmmioinfo: Option<*mut MMIOINFO>, fdwopen: u32) -> HMMIO { windows_targets::link!("winmm.dll" "system" fn mmioOpenW(pszfilename : windows_core::PWSTR, pmmioinfo : *mut MMIOINFO, fdwopen : u32) -> HMMIO); - mmioOpenW(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(std::ptr::null_mut())), fdwopen) + mmioOpenW(core::mem::transmute(pszfilename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pmmioinfo.unwrap_or(core::ptr::null_mut())), fdwopen) } #[inline] pub unsafe fn mmioRead(hmmio: P0, pch: &mut [u8]) -> i32 @@ -1157,7 +1157,7 @@ where P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmioRenameA(pszfilename : windows_core::PCSTR, psznewfilename : windows_core::PCSTR, pmmioinfo : *const MMIOINFO, fdwrename : u32) -> u32); - mmioRenameA(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(std::ptr::null())), fdwrename) + mmioRenameA(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::ptr::null())), fdwrename) } #[inline] pub unsafe fn mmioRenameW(pszfilename: P0, psznewfilename: P1, pmmioinfo: Option<*const MMIOINFO>, fdwrename: u32) -> u32 @@ -1166,7 +1166,7 @@ where P1: windows_core::Param, { windows_targets::link!("winmm.dll" "system" fn mmioRenameW(pszfilename : windows_core::PCWSTR, psznewfilename : windows_core::PCWSTR, pmmioinfo : *const MMIOINFO, fdwrename : u32) -> u32); - mmioRenameW(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(std::ptr::null())), fdwrename) + mmioRenameW(pszfilename.param().abi(), psznewfilename.param().abi(), core::mem::transmute(pmmioinfo.unwrap_or(core::ptr::null())), fdwrename) } #[inline] pub unsafe fn mmioSeek(hmmio: P0, loffset: i32, iorigin: i32) -> i32 @@ -1361,22 +1361,22 @@ impl IAVIStream { (windows_core::Interface::vtable(self).FindSample)(windows_core::Interface::as_raw(self), lpos, lflags) } pub unsafe fn ReadFormat(&self, lpos: i32, lpformat: Option<*mut core::ffi::c_void>, lpcbformat: *mut i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadFormat)(windows_core::Interface::as_raw(self), lpos, core::mem::transmute(lpformat.unwrap_or(std::ptr::null_mut())), lpcbformat).ok() + (windows_core::Interface::vtable(self).ReadFormat)(windows_core::Interface::as_raw(self), lpos, core::mem::transmute(lpformat.unwrap_or(core::ptr::null_mut())), lpcbformat).ok() } pub unsafe fn SetFormat(&self, lpos: i32, lpformat: *const core::ffi::c_void, cbformat: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpos, lpformat, cbformat).ok() } pub unsafe fn Read(&self, lstart: i32, lsamples: i32, lpbuffer: Option<*mut core::ffi::c_void>, cbbuffer: i32, plbytes: Option<*mut i32>, plsamples: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null_mut())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), lstart, lsamples, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), cbbuffer, core::mem::transmute(plbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plsamples.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Write(&self, lstart: i32, lsamples: i32, lpbuffer: *const core::ffi::c_void, cbbuffer: i32, dwflags: u32, plsampwritten: Option<*mut i32>, plbyteswritten: Option<*mut i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), lstart, lsamples, lpbuffer, cbbuffer, dwflags, core::mem::transmute(plsampwritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Delete(&self, lstart: i32, lsamples: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), lstart, lsamples).ok() } pub unsafe fn ReadData(&self, fcc: u32, lp: Option<*mut core::ffi::c_void>, lpcb: *mut i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), fcc, core::mem::transmute(lp.unwrap_or(std::ptr::null_mut())), lpcb).ok() + (windows_core::Interface::vtable(self).ReadData)(windows_core::Interface::as_raw(self), fcc, core::mem::transmute(lp.unwrap_or(core::ptr::null_mut())), lpcb).ok() } pub unsafe fn WriteData(&self, fcc: u32, lp: *const core::ffi::c_void, cb: i32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).WriteData)(windows_core::Interface::as_raw(self), fcc, lp, cb).ok() @@ -1442,7 +1442,7 @@ impl IGetFrame { } #[cfg(feature = "Win32_Graphics_Gdi")] pub unsafe fn SetFormat(&self, lpbi: *const super::super::Graphics::Gdi::BITMAPINFOHEADER, lpbits: Option<*const core::ffi::c_void>, x: i32, y: i32, dx: i32, dy: i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpbi, core::mem::transmute(lpbits.unwrap_or(std::ptr::null())), x, y, dx, dy).ok() + (windows_core::Interface::vtable(self).SetFormat)(windows_core::Interface::as_raw(self), lpbi, core::mem::transmute(lpbits.unwrap_or(core::ptr::null())), x, y, dx, dy).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs index 7318aaee10..3f7a58e57f 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/PictureAcquisition/mod.rs @@ -65,7 +65,7 @@ impl IPhotoAcquireDeviceSelectionDialog { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), dwdeviceflags, core::mem::transmute(pbstrdeviceid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pndevicetype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), dwdeviceflags, core::mem::transmute(pbstrdeviceid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pndevicetype.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -177,7 +177,7 @@ impl IPhotoAcquireOptionsDialog { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ppnreturncode.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DoModal)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(ppnreturncode.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SaveData(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SaveData)(windows_core::Interface::as_raw(self)).ok() @@ -343,7 +343,7 @@ impl IPhotoAcquireProgressCB { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -471,14 +471,14 @@ impl IPhotoAcquireSource { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetDeviceIcons(&self, nsize: u32, phlargeicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>, phsmallicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phlargeicon.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phsmallicon.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDeviceIcons)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phlargeicon.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phsmallicon.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn InitializeItemList(&self, fforceenumeration: P0, pphotoacquireprogresscb: P1, pnitemcount: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.param().abi(), pphotoacquireprogresscb.param().abi(), core::mem::transmute(pnitemcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).InitializeItemList)(windows_core::Interface::as_raw(self), fforceenumeration.param().abi(), pphotoacquireprogresscb.param().abi(), core::mem::transmute(pnitemcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetItemCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -642,7 +642,7 @@ impl IPhotoProgressDialog { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetUserInput)(windows_core::Interface::as_raw(self), riidtype, punknown.param().abi(), core::mem::transmute(ppropvarresult), core::mem::transmute(ppropvardefault.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -720,7 +720,7 @@ impl IUserInputString { } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetImage(&self, nsize: u32, phbitmap: Option<*mut super::super::Graphics::Gdi::HBITMAP>, phicon: Option<*mut super::super::UI::WindowsAndMessaging::HICON>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phbitmap.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phicon.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImage)(windows_core::Interface::as_raw(self), nsize, core::mem::transmute(phbitmap.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phicon.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/Media/Speech/impl.rs b/crates/libs/windows/src/Windows/Win32/Media/Speech/impl.rs index f633e10fc0..98bfa18af5 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/impl.rs @@ -745,7 +745,7 @@ impl ISpNotifyCallback_Vtbl { } } #[doc(hidden)] -struct ISpNotifyCallback_ImplVtbl(std::marker::PhantomData); +struct ISpNotifyCallback_ImplVtbl(core::marker::PhantomData); impl ISpNotifyCallback_ImplVtbl { const VTABLE: ISpNotifyCallback_Vtbl = ISpNotifyCallback_Vtbl::new::(); } @@ -3079,7 +3079,7 @@ impl ISpTask_Vtbl { } } #[doc(hidden)] -struct ISpTask_ImplVtbl(std::marker::PhantomData); +struct ISpTask_ImplVtbl(core::marker::PhantomData); impl ISpTask_ImplVtbl { const VTABLE: ISpTask_Vtbl = ISpTask_Vtbl::new::(); } @@ -3262,7 +3262,7 @@ impl ISpThreadTask_Vtbl { } } #[doc(hidden)] -struct ISpThreadTask_ImplVtbl(std::marker::PhantomData); +struct ISpThreadTask_ImplVtbl(core::marker::PhantomData); impl ISpThreadTask_ImplVtbl { const VTABLE: ISpThreadTask_Vtbl = ISpThreadTask_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs index b576c232f8..0c815f5004 100644 --- a/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Media/Speech/mod.rs @@ -8,7 +8,7 @@ impl core::ops::Deref for IEnumSpObjectTokens { windows_core::imp::interface_hierarchy!(IEnumSpObjectTokens, windows_core::IUnknown); impl IEnumSpObjectTokens { pub unsafe fn Next(&self, celt: u32, pelt: *mut Option, pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pelt), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), celt, core::mem::transmute(pelt), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -646,13 +646,13 @@ impl ISpLexicon { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AddPronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn RemovePronunciation(&self, pszword: P0, langid: u16, epartofspeech: SPPARTOFSPEECH, pszpronunciation: Option<*const u16>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).RemovePronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RemovePronunciation)(windows_core::Interface::as_raw(self), pszword.param().abi(), langid, epartofspeech, core::mem::transmute(pszpronunciation.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetGeneration(&self, pdwgeneration: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGeneration)(windows_core::Interface::as_raw(self), pdwgeneration).ok() @@ -661,7 +661,7 @@ impl ISpLexicon { (windows_core::Interface::vtable(self).GetGenerationChange)(windows_core::Interface::as_raw(self), dwflags, pdwgeneration, pwordlist).ok() } pub unsafe fn GetWords(&self, dwflags: u32, pdwgeneration: *mut u32, pdwcookie: Option<*mut u32>, pwordlist: *mut SPWORDLIST) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), dwflags, pdwgeneration, core::mem::transmute(pdwcookie.unwrap_or(std::ptr::null_mut())), pwordlist).ok() + (windows_core::Interface::vtable(self).GetWords)(windows_core::Interface::as_raw(self), dwflags, pdwgeneration, core::mem::transmute(pdwcookie.unwrap_or(core::ptr::null_mut())), pwordlist).ok() } } #[repr(C)] @@ -907,7 +907,7 @@ impl ISpObjectToken { (windows_core::Interface::vtable(self).RemoveStorageFileName)(windows_core::Interface::as_raw(self), clsidcaller, pszkeyname.param().abi(), fdeletefile.param().abi()).ok() } pub unsafe fn Remove(&self, pclsidcaller: Option<*const windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidcaller.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self), core::mem::transmute(pclsidcaller.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn IsUISupported(&self, psztypeofui: P0, pvextradata: *mut core::ffi::c_void, cbextradata: u32, punkobject: P1, pfsupported: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> where @@ -1210,7 +1210,7 @@ impl ISpPhrase { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ulstart, ulcount, fusetextreplacements.param().abi(), ppszcomemtext, core::mem::transmute(pbdisplayattributes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ulstart, ulcount, fusetextreplacements.param().abi(), ppszcomemtext, core::mem::transmute(pbdisplayattributes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Discard(&self, dwvaluetypes: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Discard)(windows_core::Interface::as_raw(self), dwvaluetypes).ok() @@ -1624,7 +1624,7 @@ impl ISpRecoGrammar { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SaveCmd)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(ppszcomemerrortext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SaveCmd)(windows_core::Interface::as_raw(self), pstream.param().abi(), core::mem::transmute(ppszcomemerrortext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetGrammarState(&self, pegrammarstate: *mut SPGRAMMARSTATE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetGrammarState)(windows_core::Interface::as_raw(self), pegrammarstate).ok() @@ -2597,7 +2597,7 @@ impl ISpStream { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), emode, core::mem::transmute(pformatid.unwrap_or(std::ptr::null())), core::mem::transmute(pwaveformatex.unwrap_or(std::ptr::null())), ulleventinterest).ok() + (windows_core::Interface::vtable(self).BindToFile)(windows_core::Interface::as_raw(self), pszfilename.param().abi(), emode, core::mem::transmute(pformatid.unwrap_or(core::ptr::null())), core::mem::transmute(pwaveformatex.unwrap_or(core::ptr::null())), ulleventinterest).ok() } pub unsafe fn Close(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self)).ok() @@ -3042,14 +3042,14 @@ impl ISpVoice { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Speak)(windows_core::Interface::as_raw(self), pwcs.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SpeakStream(&self, pstream: P0, dwflags: u32, pulstreamnumber: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SpeakStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SpeakStream)(windows_core::Interface::as_raw(self), pstream.param().abi(), dwflags, core::mem::transmute(pulstreamnumber.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStatus(&self, pstatus: *mut SPVOICESTATUS, ppszlastbookmark: *mut windows_core::PWSTR) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), pstatus, ppszlastbookmark).ok() @@ -6277,13 +6277,13 @@ impl ISpeechResourceLoader { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), bstrresourceuri.param().abi(), falwaysreload.param().abi(), core::mem::transmute(pstream), core::mem::transmute(pbstrmimetype.unwrap_or(std::ptr::null_mut())), pfmodified, core::mem::transmute(pbstrredirecturl.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).LoadResource)(windows_core::Interface::as_raw(self), bstrresourceuri.param().abi(), falwaysreload.param().abi(), core::mem::transmute(pstream), core::mem::transmute(pbstrmimetype.unwrap_or(core::ptr::null_mut())), pfmodified, core::mem::transmute(pbstrredirecturl.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLocalCopy(&self, bstrresourceuri: P0, pbstrlocalpath: *mut windows_core::BSTR, pbstrmimetype: Option<*mut windows_core::BSTR>, pbstrredirecturl: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetLocalCopy)(windows_core::Interface::as_raw(self), bstrresourceuri.param().abi(), core::mem::transmute(pbstrlocalpath), core::mem::transmute(pbstrmimetype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrredirecturl.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLocalCopy)(windows_core::Interface::as_raw(self), bstrresourceuri.param().abi(), core::mem::transmute(pbstrlocalpath), core::mem::transmute(pbstrmimetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrredirecturl.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReleaseLocalCopy(&self, pbstrlocalpath: P0) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs index 25d881dd2e..b5e6c974c7 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dhcp/mod.rs @@ -814,7 +814,7 @@ where P0: windows_core::Param, { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpRegisterParamChange(flags : u32, reserved : *const core::ffi::c_void, adaptername : windows_core::PCWSTR, classid : *mut DHCPCAPI_CLASSID, params : DHCPCAPI_PARAMS_ARRAY, handle : *mut core::ffi::c_void) -> u32); - DhcpRegisterParamChange(flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), adaptername.param().abi(), classid, core::mem::transmute(params), handle) + DhcpRegisterParamChange(flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), adaptername.param().abi(), classid, core::mem::transmute(params), handle) } #[inline] pub unsafe fn DhcpRemoveDNSRegistrations() -> u32 { @@ -1256,7 +1256,7 @@ where P1: windows_core::Param, { windows_targets::link!("dhcpcsvc.dll" "system" fn DhcpUndoRequestParams(flags : u32, reserved : *const core::ffi::c_void, adaptername : windows_core::PCWSTR, requestidstr : windows_core::PCWSTR) -> u32); - DhcpUndoRequestParams(flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), adaptername.param().abi(), requestidstr.param().abi()) + DhcpUndoRequestParams(flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), adaptername.param().abi(), requestidstr.param().abi()) } #[inline] pub unsafe fn DhcpV4AddPolicyRange(serveripaddress: P0, subnetaddress: u32, policyname: P1, range: *const DHCP_IP_RANGE) -> u32 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 4541529d51..f9be9549d4 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Dns/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn DnsAcquireContextHandle_A(credentialflags: u32, credentials: Option<*const core::ffi::c_void>, pcontext: *mut super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsAcquireContextHandle_A(credentialflags : u32, credentials : *const core::ffi::c_void, pcontext : *mut super::super::Foundation:: HANDLE) -> i32); - DnsAcquireContextHandle_A(credentialflags, core::mem::transmute(credentials.unwrap_or(std::ptr::null())), pcontext) + DnsAcquireContextHandle_A(credentialflags, core::mem::transmute(credentials.unwrap_or(core::ptr::null())), pcontext) } #[inline] pub unsafe fn DnsAcquireContextHandle_W(credentialflags: u32, credentials: Option<*const core::ffi::c_void>, pcontext: *mut super::super::Foundation::HANDLE) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsAcquireContextHandle_W(credentialflags : u32, credentials : *const core::ffi::c_void, pcontext : *mut super::super::Foundation:: HANDLE) -> i32); - DnsAcquireContextHandle_W(credentialflags, core::mem::transmute(credentials.unwrap_or(std::ptr::null())), pcontext) + DnsAcquireContextHandle_W(credentialflags, core::mem::transmute(credentials.unwrap_or(core::ptr::null())), pcontext) } #[inline] pub unsafe fn DnsCancelQuery(pcancelhandle: *const DNS_QUERY_CANCEL) -> i32 { @@ -120,7 +120,7 @@ pub unsafe fn DnsExtractRecordsFromMessage_W(pdnsbuffer: *const DNS_MESSAGE_BUFF #[inline] pub unsafe fn DnsFree(pdata: Option<*const core::ffi::c_void>, freetype: DNS_FREE_TYPE) { windows_targets::link!("dnsapi.dll" "system" fn DnsFree(pdata : *const core::ffi::c_void, freetype : DNS_FREE_TYPE)); - DnsFree(core::mem::transmute(pdata.unwrap_or(std::ptr::null())), freetype) + DnsFree(core::mem::transmute(pdata.unwrap_or(core::ptr::null())), freetype) } #[inline] pub unsafe fn DnsFreeCustomServers(pcservers: *mut u32, ppservers: *mut *mut DNS_CUSTOM_SERVER) { @@ -138,7 +138,7 @@ where #[inline] pub unsafe fn DnsGetApplicationSettings(pcservers: *mut u32, ppdefaultservers: *mut *mut DNS_CUSTOM_SERVER, psettings: Option<*mut DNS_APPLICATION_SETTINGS>) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsGetApplicationSettings(pcservers : *mut u32, ppdefaultservers : *mut *mut DNS_CUSTOM_SERVER, psettings : *mut DNS_APPLICATION_SETTINGS) -> u32); - DnsGetApplicationSettings(pcservers, ppdefaultservers, core::mem::transmute(psettings.unwrap_or(std::ptr::null_mut()))) + DnsGetApplicationSettings(pcservers, ppdefaultservers, core::mem::transmute(psettings.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsGetProxyInformation(hostname: P0, proxyinformation: *mut DNS_PROXY_INFORMATION, defaultproxyinformation: Option<*mut DNS_PROXY_INFORMATION>, completionroutine: DNS_PROXY_COMPLETION_ROUTINE, completioncontext: Option<*const core::ffi::c_void>) -> u32 @@ -146,7 +146,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsGetProxyInformation(hostname : windows_core::PCWSTR, proxyinformation : *mut DNS_PROXY_INFORMATION, defaultproxyinformation : *mut DNS_PROXY_INFORMATION, completionroutine : DNS_PROXY_COMPLETION_ROUTINE, completioncontext : *const core::ffi::c_void) -> u32); - DnsGetProxyInformation(hostname.param().abi(), proxyinformation, core::mem::transmute(defaultproxyinformation.unwrap_or(std::ptr::null_mut())), completionroutine, core::mem::transmute(completioncontext.unwrap_or(std::ptr::null()))) + DnsGetProxyInformation(hostname.param().abi(), proxyinformation, core::mem::transmute(defaultproxyinformation.unwrap_or(core::ptr::null_mut())), completionroutine, core::mem::transmute(completioncontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DnsModifyRecordsInSet_A(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P0, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 @@ -154,7 +154,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsModifyRecordsInSet_A(paddrecords : *const DNS_RECORDA, pdeleterecords : *const DNS_RECORDA, options : u32, hcredentials : super::super::Foundation:: HANDLE, pextralist : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsModifyRecordsInSet_A(core::mem::transmute(paddrecords.unwrap_or(std::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(std::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsModifyRecordsInSet_A(core::mem::transmute(paddrecords.unwrap_or(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsModifyRecordsInSet_UTF8(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P0, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 @@ -162,7 +162,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsModifyRecordsInSet_UTF8(paddrecords : *const DNS_RECORDA, pdeleterecords : *const DNS_RECORDA, options : u32, hcredentials : super::super::Foundation:: HANDLE, pextralist : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsModifyRecordsInSet_UTF8(core::mem::transmute(paddrecords.unwrap_or(std::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(std::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsModifyRecordsInSet_UTF8(core::mem::transmute(paddrecords.unwrap_or(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsModifyRecordsInSet_W(paddrecords: Option<*const DNS_RECORDA>, pdeleterecords: Option<*const DNS_RECORDA>, options: u32, hcredentials: P0, pextralist: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 @@ -170,7 +170,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsModifyRecordsInSet_W(paddrecords : *const DNS_RECORDA, pdeleterecords : *const DNS_RECORDA, options : u32, hcredentials : super::super::Foundation:: HANDLE, pextralist : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsModifyRecordsInSet_W(core::mem::transmute(paddrecords.unwrap_or(std::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(std::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsModifyRecordsInSet_W(core::mem::transmute(paddrecords.unwrap_or(core::ptr::null())), core::mem::transmute(pdeleterecords.unwrap_or(core::ptr::null())), options, hcredentials.param().abi(), core::mem::transmute(pextralist.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsNameCompare_A(pname1: P0, pname2: P1) -> super::super::Foundation::BOOL @@ -196,12 +196,12 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsQueryConfig(config : DNS_CONFIG_TYPE, flag : u32, pwsadaptername : windows_core::PCWSTR, preserved : *const core::ffi::c_void, pbuffer : *mut core::ffi::c_void, pbuflen : *mut u32) -> i32); - DnsQueryConfig(config, flag, pwsadaptername.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pbuflen) + DnsQueryConfig(config, flag, pwsadaptername.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pbuflen) } #[inline] pub unsafe fn DnsQueryEx(pqueryrequest: *const DNS_QUERY_REQUEST, pqueryresults: *mut DNS_QUERY_RESULT, pcancelhandle: Option<*mut DNS_QUERY_CANCEL>) -> i32 { windows_targets::link!("dnsapi.dll" "system" fn DnsQueryEx(pqueryrequest : *const DNS_QUERY_REQUEST, pqueryresults : *mut DNS_QUERY_RESULT, pcancelhandle : *mut DNS_QUERY_CANCEL) -> i32); - DnsQueryEx(pqueryrequest, pqueryresults, core::mem::transmute(pcancelhandle.unwrap_or(std::ptr::null_mut()))) + DnsQueryEx(pqueryrequest, pqueryresults, core::mem::transmute(pcancelhandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsQueryRaw(queryrequest: *const DNS_QUERY_RAW_REQUEST, cancelhandle: *mut DNS_QUERY_RAW_CANCEL) -> i32 { @@ -211,7 +211,7 @@ pub unsafe fn DnsQueryRaw(queryrequest: *const DNS_QUERY_RAW_REQUEST, cancelhand #[inline] pub unsafe fn DnsQueryRawResultFree(queryresults: Option<*const DNS_QUERY_RAW_RESULT>) { windows_targets::link!("dnsapi.dll" "system" fn DnsQueryRawResultFree(queryresults : *const DNS_QUERY_RAW_RESULT)); - DnsQueryRawResultFree(core::mem::transmute(queryresults.unwrap_or(std::ptr::null()))) + DnsQueryRawResultFree(core::mem::transmute(queryresults.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DnsQuery_A(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: Option<*mut core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -219,7 +219,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), ppqueryresults, core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsQuery_UTF8(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: Option<*mut core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -227,7 +227,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), ppqueryresults, core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsQuery_W(pszname: P0, wtype: DNS_TYPE, options: DNS_QUERY_OPTIONS, pextra: Option<*mut core::ffi::c_void>, ppqueryresults: *mut *mut DNS_RECORDA, preserved: Option<*mut *mut core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -235,7 +235,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), wtype, options, core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut())), ppqueryresults, core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsRecordCompare(precord1: *const DNS_RECORDA, precord2: *const DNS_RECORDA) -> super::super::Foundation::BOOL { @@ -250,7 +250,7 @@ pub unsafe fn DnsRecordCopyEx(precord: *const DNS_RECORDA, charsetin: DNS_CHARSE #[inline] pub unsafe fn DnsRecordSetCompare(prr1: *mut DNS_RECORDA, prr2: *mut DNS_RECORDA, ppdiff1: Option<*mut *mut DNS_RECORDA>, ppdiff2: Option<*mut *mut DNS_RECORDA>) -> super::super::Foundation::BOOL { windows_targets::link!("dnsapi.dll" "system" fn DnsRecordSetCompare(prr1 : *mut DNS_RECORDA, prr2 : *mut DNS_RECORDA, ppdiff1 : *mut *mut DNS_RECORDA, ppdiff2 : *mut *mut DNS_RECORDA) -> super::super::Foundation:: BOOL); - DnsRecordSetCompare(prr1, prr2, core::mem::transmute(ppdiff1.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppdiff2.unwrap_or(std::ptr::null_mut()))) + DnsRecordSetCompare(prr1, prr2, core::mem::transmute(ppdiff1.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdiff2.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsRecordSetCopyEx(precordset: *const DNS_RECORDA, charsetin: DNS_CHARSET, charsetout: DNS_CHARSET) -> *mut DNS_RECORDA { @@ -276,7 +276,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsReplaceRecordSetA(preplaceset : *const DNS_RECORDA, options : u32, hcontext : super::super::Foundation:: HANDLE, pextrainfo : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsReplaceRecordSetA(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsReplaceRecordSetA(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsReplaceRecordSetUTF8(preplaceset: *const DNS_RECORDA, options: u32, hcontext: P0, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 @@ -284,7 +284,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsReplaceRecordSetUTF8(preplaceset : *const DNS_RECORDA, options : u32, hcontext : super::super::Foundation:: HANDLE, pextrainfo : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsReplaceRecordSetUTF8(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsReplaceRecordSetUTF8(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsReplaceRecordSetW(preplaceset: *const DNS_RECORDA, options: u32, hcontext: P0, pextrainfo: Option<*mut core::ffi::c_void>, preserved: Option<*mut core::ffi::c_void>) -> i32 @@ -292,7 +292,7 @@ where P0: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsReplaceRecordSetW(preplaceset : *const DNS_RECORDA, options : u32, hcontext : super::super::Foundation:: HANDLE, pextrainfo : *mut core::ffi::c_void, preserved : *mut core::ffi::c_void) -> i32); - DnsReplaceRecordSetW(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + DnsReplaceRecordSetW(preplaceset, options, hcontext.param().abi(), core::mem::transmute(pextrainfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsServiceBrowse(prequest: *const DNS_SERVICE_BROWSE_REQUEST, pcancel: *mut DNS_SERVICE_CANCEL) -> i32 { @@ -311,7 +311,7 @@ where P1: windows_core::Param, { windows_targets::link!("dnsapi.dll" "system" fn DnsServiceConstructInstance(pservicename : windows_core::PCWSTR, phostname : windows_core::PCWSTR, pip4 : *const u32, pip6 : *const IP6_ADDRESS, wport : u16, wpriority : u16, wweight : u16, dwpropertiescount : u32, keys : *const windows_core::PCWSTR, values : *const windows_core::PCWSTR) -> *mut DNS_SERVICE_INSTANCE); - DnsServiceConstructInstance(pservicename.param().abi(), phostname.param().abi(), core::mem::transmute(pip4.unwrap_or(std::ptr::null())), core::mem::transmute(pip6.unwrap_or(std::ptr::null())), wport, wpriority, wweight, dwpropertiescount, keys, values) + DnsServiceConstructInstance(pservicename.param().abi(), phostname.param().abi(), core::mem::transmute(pip4.unwrap_or(core::ptr::null())), core::mem::transmute(pip6.unwrap_or(core::ptr::null())), wport, wpriority, wweight, dwpropertiescount, keys, values) } #[inline] pub unsafe fn DnsServiceCopyInstance(porig: *const DNS_SERVICE_INSTANCE) -> *mut DNS_SERVICE_INSTANCE { @@ -321,7 +321,7 @@ pub unsafe fn DnsServiceCopyInstance(porig: *const DNS_SERVICE_INSTANCE) -> *mut #[inline] pub unsafe fn DnsServiceDeRegister(prequest: *const DNS_SERVICE_REGISTER_REQUEST, pcancel: Option<*mut DNS_SERVICE_CANCEL>) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsServiceDeRegister(prequest : *const DNS_SERVICE_REGISTER_REQUEST, pcancel : *mut DNS_SERVICE_CANCEL) -> u32); - DnsServiceDeRegister(prequest, core::mem::transmute(pcancel.unwrap_or(std::ptr::null_mut()))) + DnsServiceDeRegister(prequest, core::mem::transmute(pcancel.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsServiceFreeInstance(pinstance: *const DNS_SERVICE_INSTANCE) { @@ -331,7 +331,7 @@ pub unsafe fn DnsServiceFreeInstance(pinstance: *const DNS_SERVICE_INSTANCE) { #[inline] pub unsafe fn DnsServiceRegister(prequest: *const DNS_SERVICE_REGISTER_REQUEST, pcancel: Option<*mut DNS_SERVICE_CANCEL>) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsServiceRegister(prequest : *const DNS_SERVICE_REGISTER_REQUEST, pcancel : *mut DNS_SERVICE_CANCEL) -> u32); - DnsServiceRegister(prequest, core::mem::transmute(pcancel.unwrap_or(std::ptr::null_mut()))) + DnsServiceRegister(prequest, core::mem::transmute(pcancel.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DnsServiceRegisterCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) -> u32 { @@ -351,7 +351,7 @@ pub unsafe fn DnsServiceResolveCancel(pcancelhandle: *const DNS_SERVICE_CANCEL) #[inline] pub unsafe fn DnsSetApplicationSettings(pservers: &[DNS_CUSTOM_SERVER], psettings: Option<*const DNS_APPLICATION_SETTINGS>) -> u32 { windows_targets::link!("dnsapi.dll" "system" fn DnsSetApplicationSettings(cservers : u32, pservers : *const DNS_CUSTOM_SERVER, psettings : *const DNS_APPLICATION_SETTINGS) -> u32); - DnsSetApplicationSettings(pservers.len().try_into().unwrap(), core::mem::transmute(pservers.as_ptr()), core::mem::transmute(psettings.unwrap_or(std::ptr::null()))) + DnsSetApplicationSettings(pservers.len().try_into().unwrap(), core::mem::transmute(pservers.as_ptr()), core::mem::transmute(psettings.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DnsStartMulticastQuery(pqueryrequest: *const MDNS_QUERY_REQUEST, phandle: *mut MDNS_QUERY_HANDLE) -> i32 { 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 30b064893a..34ded689ce 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/IpHelper/mod.rs @@ -168,7 +168,7 @@ pub unsafe fn CreateProxyArpEntry(dwaddress: u32, dwmask: u32, dwifindex: u32) - #[inline] pub unsafe fn CreateSortedAddressPairs(sourceaddresslist: 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 { 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(core::ptr::null())), sourceaddresscount, destinationaddresslist, destinationaddresscount, addresssortoptions, sortedaddresspairlist, sortedaddresspaircount) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -292,12 +292,12 @@ pub unsafe fn GetAdapterOrderMap() -> *mut IP_ADAPTER_ORDER_MAP { #[inline] pub unsafe fn GetAdaptersAddresses(family: u32, flags: GET_ADAPTERS_ADDRESSES_FLAGS, reserved: Option<*const core::ffi::c_void>, adapteraddresses: Option<*mut IP_ADAPTER_ADDRESSES_LH>, sizepointer: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetAdaptersAddresses(family : u32, flags : GET_ADAPTERS_ADDRESSES_FLAGS, reserved : *const core::ffi::c_void, adapteraddresses : *mut IP_ADAPTER_ADDRESSES_LH, sizepointer : *mut u32) -> u32); - GetAdaptersAddresses(family, flags, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), core::mem::transmute(adapteraddresses.unwrap_or(std::ptr::null_mut())), sizepointer) + GetAdaptersAddresses(family, flags, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), core::mem::transmute(adapteraddresses.unwrap_or(core::ptr::null_mut())), sizepointer) } #[inline] pub unsafe fn GetAdaptersInfo(adapterinfo: Option<*mut IP_ADAPTER_INFO>, sizepointer: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetAdaptersInfo(adapterinfo : *mut IP_ADAPTER_INFO, sizepointer : *mut u32) -> u32); - GetAdaptersInfo(core::mem::transmute(adapterinfo.unwrap_or(std::ptr::null_mut())), sizepointer) + GetAdaptersInfo(core::mem::transmute(adapterinfo.unwrap_or(core::ptr::null_mut())), sizepointer) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -332,7 +332,7 @@ pub unsafe fn GetBestRoute(dwdestaddr: u32, dwsourceaddr: u32, pbestroute: *mut #[inline] pub unsafe fn GetBestRoute2(interfaceluid: Option<*const super::Ndis::NET_LUID_LH>, interfaceindex: u32, sourceaddress: 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 { 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(core::ptr::null())), interfaceindex, core::mem::transmute(sourceaddress.unwrap_or(core::ptr::null())), destinationaddress, addresssortoptions, bestroute, bestsourceaddress) } #[inline] pub unsafe fn GetCurrentThreadCompartmentId() -> super::super::Foundation::WIN32_ERROR { @@ -360,7 +360,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetExtendedTcpTable(ptcptable : *mut core::ffi::c_void, pdwsize : *mut u32, border : super::super::Foundation:: BOOL, ulaf : u32, tableclass : TCP_TABLE_CLASS, reserved : u32) -> u32); - GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(std::ptr::null_mut())), pdwsize, border.param().abi(), ulaf, tableclass, reserved) + GetExtendedTcpTable(core::mem::transmute(ptcptable.unwrap_or(core::ptr::null_mut())), pdwsize, border.param().abi(), ulaf, tableclass, reserved) } #[inline] pub unsafe fn GetExtendedUdpTable(pudptable: Option<*mut core::ffi::c_void>, pdwsize: *mut u32, border: P0, ulaf: u32, tableclass: UDP_TABLE_CLASS, reserved: u32) -> u32 @@ -368,7 +368,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetExtendedUdpTable(pudptable : *mut core::ffi::c_void, pdwsize : *mut u32, border : super::super::Foundation:: BOOL, ulaf : u32, tableclass : UDP_TABLE_CLASS, reserved : u32) -> u32); - GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(std::ptr::null_mut())), pdwsize, border.param().abi(), ulaf, tableclass, reserved) + GetExtendedUdpTable(core::mem::transmute(pudptable.unwrap_or(core::ptr::null_mut())), pdwsize, border.param().abi(), ulaf, tableclass, reserved) } #[inline] pub unsafe fn GetFriendlyIfIndex(ifindex: u32) -> u32 { @@ -413,7 +413,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetIfTable(piftable : *mut MIB_IFTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIfTable(core::mem::transmute(piftable.unwrap_or(std::ptr::null_mut())), pdwsize, border.param().abi()) + GetIfTable(core::mem::transmute(piftable.unwrap_or(core::ptr::null_mut())), pdwsize, border.param().abi()) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -453,7 +453,7 @@ pub unsafe fn GetInterfaceHardwareTimestampCapabilities(interfaceluid: *const su #[inline] pub unsafe fn GetInterfaceInfo(piftable: Option<*mut IP_INTERFACE_INFO>, dwoutbuflen: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetInterfaceInfo(piftable : *mut IP_INTERFACE_INFO, dwoutbuflen : *mut u32) -> u32); - GetInterfaceInfo(core::mem::transmute(piftable.unwrap_or(std::ptr::null_mut())), dwoutbuflen) + GetInterfaceInfo(core::mem::transmute(piftable.unwrap_or(core::ptr::null_mut())), dwoutbuflen) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -472,7 +472,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetIpAddrTable(pipaddrtable : *mut MIB_IPADDRTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(std::ptr::null_mut())), pdwsize, border.param().abi()) + GetIpAddrTable(core::mem::transmute(pipaddrtable.unwrap_or(core::ptr::null_mut())), pdwsize, border.param().abi()) } #[inline] pub unsafe fn GetIpErrorString(errorcode: u32, buffer: windows_core::PWSTR, size: *mut u32) -> u32 { @@ -492,7 +492,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetIpForwardTable(pipforwardtable : *mut MIB_IPFORWARDTABLE, pdwsize : *mut u32, border : super::super::Foundation:: BOOL) -> u32); - GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(std::ptr::null_mut())), pdwsize, border.param().abi()) + GetIpForwardTable(core::mem::transmute(pipforwardtable.unwrap_or(core::ptr::null_mut())), pdwsize, border.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -524,7 +524,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetIpNetTable(ipnettable : *mut MIB_IPNETTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(std::ptr::null_mut())), sizepointer, order.param().abi()) + GetIpNetTable(core::mem::transmute(ipnettable.unwrap_or(core::ptr::null_mut())), sizepointer, order.param().abi()) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -600,7 +600,7 @@ pub unsafe fn GetNetworkInformation(networkguid: *const windows_core::GUID, comp #[inline] pub unsafe fn GetNetworkParams(pfixedinfo: Option<*mut FIXED_INFO_W2KSP1>, poutbuflen: *mut u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), poutbuflen) } #[inline] pub unsafe fn GetNumberOfInterfaces(pdwnumif: *mut u32) -> u32 { @@ -635,7 +635,7 @@ pub unsafe fn GetOwnerModuleFromUdpEntry(pudpentry: *const MIB_UDPROW_OWNER_MODU #[inline] pub unsafe fn GetPerAdapterInfo(ifindex: u32, pperadapterinfo: Option<*mut IP_PER_ADAPTER_INFO_W2KSP1>, poutbuflen: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetPerAdapterInfo(ifindex : u32, pperadapterinfo : *mut IP_PER_ADAPTER_INFO_W2KSP1, poutbuflen : *mut u32) -> u32); - GetPerAdapterInfo(ifindex, core::mem::transmute(pperadapterinfo.unwrap_or(std::ptr::null_mut())), poutbuflen) + GetPerAdapterInfo(ifindex, core::mem::transmute(pperadapterinfo.unwrap_or(core::ptr::null_mut())), poutbuflen) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -721,7 +721,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable(tcptable : *mut MIB_TCPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcpTable(core::mem::transmute(tcptable.unwrap_or(std::ptr::null_mut())), sizepointer, order.param().abi()) + GetTcpTable(core::mem::transmute(tcptable.unwrap_or(core::ptr::null_mut())), sizepointer, order.param().abi()) } #[inline] pub unsafe fn GetTcpTable2(tcptable: Option<*mut MIB_TCPTABLE2>, sizepointer: *mut u32, order: P0) -> u32 @@ -729,7 +729,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetTcpTable2(tcptable : *mut MIB_TCPTABLE2, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(std::ptr::null_mut())), sizepointer, order.param().abi()) + GetTcpTable2(core::mem::transmute(tcptable.unwrap_or(core::ptr::null_mut())), sizepointer, order.param().abi()) } #[inline] pub unsafe fn GetTeredoPort(port: *mut u16) -> super::super::Foundation::WIN32_ERROR { @@ -743,7 +743,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetUdp6Table(udp6table : *mut MIB_UDP6TABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(std::ptr::null_mut())), sizepointer, order.param().abi()) + GetUdp6Table(core::mem::transmute(udp6table.unwrap_or(core::ptr::null_mut())), sizepointer, order.param().abi()) } #[inline] pub unsafe fn GetUdpStatistics(stats: *mut MIB_UDPSTATS) -> u32 { @@ -766,12 +766,12 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn GetUdpTable(udptable : *mut MIB_UDPTABLE, sizepointer : *mut u32, order : super::super::Foundation:: BOOL) -> u32); - GetUdpTable(core::mem::transmute(udptable.unwrap_or(std::ptr::null_mut())), sizepointer, order.param().abi()) + GetUdpTable(core::mem::transmute(udptable.unwrap_or(core::ptr::null_mut())), sizepointer, order.param().abi()) } #[inline] pub unsafe fn GetUniDirectionalAdapterInfo(pipifinfo: Option<*mut IP_UNIDIRECTIONAL_ADAPTER_ADDRESS>, dwoutbuflen: *mut u32) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn GetUniDirectionalAdapterInfo(pipifinfo : *mut IP_UNIDIRECTIONAL_ADAPTER_ADDRESS, dwoutbuflen : *mut u32) -> u32); - GetUniDirectionalAdapterInfo(core::mem::transmute(pipifinfo.unwrap_or(std::ptr::null_mut())), dwoutbuflen) + GetUniDirectionalAdapterInfo(core::mem::transmute(pipifinfo.unwrap_or(core::ptr::null_mut())), dwoutbuflen) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -804,7 +804,7 @@ where P1: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn Icmp6SendEcho2(icmphandle : super::super::Foundation:: HANDLE, event : super::super::Foundation:: HANDLE, apcroutine : super::super::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, sourceaddress : *const super::super::Networking::WinSock:: SOCKADDR_IN6, destinationaddress : *const super::super::Networking::WinSock:: SOCKADDR_IN6, requestdata : *const core::ffi::c_void, requestsize : u16, requestoptions : *const IP_OPTION_INFORMATION, replybuffer : *mut core::ffi::c_void, replysize : u32, timeout : u32) -> u32); - Icmp6SendEcho2(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(std::ptr::null())), replybuffer, replysize, timeout) + Icmp6SendEcho2(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), replybuffer, replysize, timeout) } #[inline] pub unsafe fn IcmpCloseHandle(icmphandle: P0) -> windows_core::Result<()> @@ -831,7 +831,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn IcmpSendEcho(icmphandle : super::super::Foundation:: HANDLE, destinationaddress : u32, requestdata : *const core::ffi::c_void, requestsize : u16, requestoptions : *const IP_OPTION_INFORMATION, replybuffer : *mut core::ffi::c_void, replysize : u32, timeout : u32) -> u32); - IcmpSendEcho(icmphandle.param().abi(), destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(std::ptr::null())), replybuffer, replysize, timeout) + IcmpSendEcho(icmphandle.param().abi(), destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), replybuffer, replysize, timeout) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -841,7 +841,7 @@ where P1: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn IcmpSendEcho2(icmphandle : super::super::Foundation:: HANDLE, event : super::super::Foundation:: HANDLE, apcroutine : super::super::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, destinationaddress : u32, requestdata : *const core::ffi::c_void, requestsize : u16, requestoptions : *const IP_OPTION_INFORMATION, replybuffer : *mut core::ffi::c_void, replysize : u32, timeout : u32) -> u32); - IcmpSendEcho2(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(std::ptr::null())), replybuffer, replysize, timeout) + IcmpSendEcho2(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), replybuffer, replysize, timeout) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -851,7 +851,7 @@ where P1: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn IcmpSendEcho2Ex(icmphandle : super::super::Foundation:: HANDLE, event : super::super::Foundation:: HANDLE, apcroutine : super::super::System::IO:: PIO_APC_ROUTINE, apccontext : *const core::ffi::c_void, sourceaddress : u32, destinationaddress : u32, requestdata : *const core::ffi::c_void, requestsize : u16, requestoptions : *const IP_OPTION_INFORMATION, replybuffer : *mut core::ffi::c_void, replysize : u32, timeout : u32) -> u32); - IcmpSendEcho2Ex(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(std::ptr::null())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(std::ptr::null())), replybuffer, replysize, timeout) + IcmpSendEcho2Ex(icmphandle.param().abi(), event.param().abi(), apcroutine, core::mem::transmute(apccontext.unwrap_or(core::ptr::null())), sourceaddress, destinationaddress, requestdata, requestsize, core::mem::transmute(requestoptions.unwrap_or(core::ptr::null())), replybuffer, replysize, timeout) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -909,7 +909,7 @@ pub unsafe fn NotifyAddrChange(handle: *mut super::super::Foundation::HANDLE, ov #[inline] pub unsafe fn NotifyIfTimestampConfigChange(callercontext: Option<*const core::ffi::c_void>, callback: PINTERFACE_TIMESTAMP_CONFIG_CHANGE_CALLBACK, notificationhandle: *mut HIFTIMESTAMPCHANGE) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn NotifyIfTimestampConfigChange(callercontext : *const core::ffi::c_void, callback : PINTERFACE_TIMESTAMP_CONFIG_CHANGE_CALLBACK, notificationhandle : *mut HIFTIMESTAMPCHANGE) -> u32); - NotifyIfTimestampConfigChange(core::mem::transmute(callercontext.unwrap_or(std::ptr::null())), callback, notificationhandle) + NotifyIfTimestampConfigChange(core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), callback, notificationhandle) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] @@ -918,7 +918,7 @@ where P0: windows_core::Param, { 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.param().abi(), notificationhandle) + NotifyIpInterfaceChange(family, callback, core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), notificationhandle) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -927,7 +927,7 @@ where P0: windows_core::Param, { 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.param().abi(), notificationhandle) + NotifyNetworkConnectivityHintChange(callback, core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), notificationhandle) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -965,7 +965,7 @@ where P0: windows_core::Param, { 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.param().abi(), notificationhandle) + NotifyUnicastIpAddressChange(family, callback, core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), initialnotification.param().abi(), notificationhandle) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -974,7 +974,7 @@ where P0: windows_core::Param, { windows_targets::link!("iphlpapi.dll" "system" fn ParseNetworkString(networkstring : windows_core::PCWSTR, types : u32, addressinfo : *mut NET_ADDRESS_INFO, portnumber : *mut u16, prefixlength : *mut u8) -> u32); - ParseNetworkString(networkstring.param().abi(), types, core::mem::transmute(addressinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(portnumber.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prefixlength.unwrap_or(std::ptr::null_mut()))) + ParseNetworkString(networkstring.param().abi(), types, core::mem::transmute(addressinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(portnumber.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prefixlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PfAddFiltersToInterface(ih: *mut core::ffi::c_void, cinfilters: u32, pfiltin: *mut PF_FILTER_DESCRIPTOR, coutfilters: u32, pfiltout: *mut PF_FILTER_DESCRIPTOR, pfhandle: *mut *mut core::ffi::c_void) -> u32 { @@ -1069,13 +1069,13 @@ pub unsafe fn PfUnBindInterface(pinterface: *mut core::ffi::c_void) -> u32 { #[inline] pub unsafe fn RegisterInterfaceTimestampConfigChange(callback: PINTERFACE_TIMESTAMP_CONFIG_CHANGE_CALLBACK, callercontext: Option<*const core::ffi::c_void>, notificationhandle: *mut HIFTIMESTAMPCHANGE) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn RegisterInterfaceTimestampConfigChange(callback : PINTERFACE_TIMESTAMP_CONFIG_CHANGE_CALLBACK, callercontext : *const core::ffi::c_void, notificationhandle : *mut HIFTIMESTAMPCHANGE) -> u32); - RegisterInterfaceTimestampConfigChange(callback, core::mem::transmute(callercontext.unwrap_or(std::ptr::null())), notificationhandle) + RegisterInterfaceTimestampConfigChange(callback, core::mem::transmute(callercontext.unwrap_or(core::ptr::null())), notificationhandle) } #[cfg(all(feature = "Win32_NetworkManagement_Ndis", feature = "Win32_Networking_WinSock"))] #[inline] pub unsafe fn ResolveIpNetEntry2(row: *mut MIB_IPNET_ROW2, sourceaddress: Option<*const super::super::Networking::WinSock::SOCKADDR_INET>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1087,7 +1087,7 @@ pub unsafe fn ResolveNeighbor(networkaddress: *const super::super::Networking::W #[inline] pub unsafe fn RestoreMediaSense(poverlapped: *const super::super::System::IO::OVERLAPPED, lpdwenablecount: Option<*mut u32>) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn RestoreMediaSense(poverlapped : *const super::super::System::IO:: OVERLAPPED, lpdwenablecount : *mut u32) -> u32); - RestoreMediaSense(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(std::ptr::null_mut()))) + RestoreMediaSense(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SendARP(destip: u32, srcip: u32, pmacaddr: *mut core::ffi::c_void, phyaddrlen: *mut u32) -> u32 { @@ -1210,7 +1210,7 @@ pub unsafe fn SetUnicastIpAddressEntry(row: *const MIB_UNICASTIPADDRESS_ROW) -> #[inline] pub unsafe fn UnenableRouter(poverlapped: *const super::super::System::IO::OVERLAPPED, lpdwenablecount: Option<*mut u32>) -> u32 { windows_targets::link!("iphlpapi.dll" "system" fn UnenableRouter(poverlapped : *const super::super::System::IO:: OVERLAPPED, lpdwenablecount : *mut u32) -> u32); - UnenableRouter(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(std::ptr::null_mut()))) + UnenableRouter(poverlapped, core::mem::transmute(lpdwenablecount.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn UnregisterInterfaceTimestampConfigChange(notificationhandle: P0) diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs index 272a7e2e00..826c6fd93a 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetManagement/mod.rs @@ -50,7 +50,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAccessAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetAccessAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetAccessAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetAccessDel(servername: P0, resource: P1) -> u32 @@ -68,7 +68,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAccessEnum(servername : windows_core::PCWSTR, basepath : windows_core::PCWSTR, recursive : u32, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetAccessEnum(servername.param().abi(), basepath.param().abi(), recursive, level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetAccessEnum(servername.param().abi(), basepath.param().abi(), recursive, level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetAccessGetInfo(servername: P0, resource: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -96,7 +96,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetAccessSetInfo(servername : windows_core::PCWSTR, resource : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetAccessSetInfo(servername.param().abi(), resource.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetAccessSetInfo(servername.param().abi(), resource.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetAddAlternateComputerName(server: P0, alternatename: P1, domainaccount: P2, domainaccountpassword: P3, reserved: u32) -> u32 @@ -144,12 +144,12 @@ pub unsafe fn NetApiBufferAllocate(bytecount: u32, buffer: *mut *mut core::ffi:: #[inline] pub unsafe fn NetApiBufferFree(buffer: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetApiBufferFree(buffer : *const core::ffi::c_void) -> u32); - NetApiBufferFree(core::mem::transmute(buffer.unwrap_or(std::ptr::null()))) + NetApiBufferFree(core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NetApiBufferReallocate(oldbuffer: Option<*const core::ffi::c_void>, newbytecount: u32, newbuffer: *mut *mut core::ffi::c_void) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetApiBufferReallocate(oldbuffer : *const core::ffi::c_void, newbytecount : u32, newbuffer : *mut *mut core::ffi::c_void) -> u32); - NetApiBufferReallocate(core::mem::transmute(oldbuffer.unwrap_or(std::ptr::null())), newbytecount, newbuffer) + NetApiBufferReallocate(core::mem::transmute(oldbuffer.unwrap_or(core::ptr::null())), newbytecount, newbuffer) } #[inline] pub unsafe fn NetApiBufferSize(buffer: *const core::ffi::c_void, bytecount: *mut u32) -> u32 { @@ -215,7 +215,7 @@ where #[inline] pub unsafe fn NetCreateProvisioningPackage(pprovisioningparams: *const NETSETUP_PROVISIONING_PARAMS, pppackagebindata: Option<*mut *mut u8>, pdwpackagebindatasize: Option<*mut u32>, pppackagetextdata: Option<*mut windows_core::PWSTR>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetCreateProvisioningPackage(pprovisioningparams : *const NETSETUP_PROVISIONING_PARAMS, pppackagebindata : *mut *mut u8, pdwpackagebindatasize : *mut u32, pppackagetextdata : *mut windows_core::PWSTR) -> u32); - NetCreateProvisioningPackage(pprovisioningparams, core::mem::transmute(pppackagebindata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwpackagebindatasize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pppackagetextdata.unwrap_or(std::ptr::null_mut()))) + NetCreateProvisioningPackage(pprovisioningparams, core::mem::transmute(pppackagebindata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwpackagebindatasize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pppackagetextdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetEnumerateComputerNames(server: P0, nametype: NET_COMPUTER_NAME_TYPE, reserved: u32, entrycount: *mut u32, computernames: *mut *mut windows_core::PWSTR) -> u32 @@ -240,7 +240,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetErrorLogClear(uncservername : windows_core::PCWSTR, backupfile : windows_core::PCWSTR, reserved : *const u8) -> u32); - NetErrorLogClear(uncservername.param().abi(), backupfile.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + NetErrorLogClear(uncservername.param().abi(), backupfile.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NetErrorLogRead(uncservername: P0, reserved1: P1, errorloghandle: *const HLOG, offset: u32, reserved2: Option<*const u32>, reserved3: u32, offsetflag: u32, bufptr: *mut *mut u8, prefmaxsize: u32, bytesread: *mut u32, totalavailable: *mut u32) -> u32 @@ -249,7 +249,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetErrorLogRead(uncservername : windows_core::PCWSTR, reserved1 : windows_core::PCWSTR, errorloghandle : *const HLOG, offset : u32, reserved2 : *const u32, reserved3 : u32, offsetflag : u32, bufptr : *mut *mut u8, prefmaxsize : u32, bytesread : *mut u32, totalavailable : *mut u32) -> u32); - NetErrorLogRead(uncservername.param().abi(), reserved1.param().abi(), errorloghandle, offset, core::mem::transmute(reserved2.unwrap_or(std::ptr::null())), reserved3, offsetflag, bufptr, prefmaxsize, bytesread, totalavailable) + NetErrorLogRead(uncservername.param().abi(), reserved1.param().abi(), errorloghandle, offset, core::mem::transmute(reserved2.unwrap_or(core::ptr::null())), reserved3, offsetflag, bufptr, prefmaxsize, bytesread, totalavailable) } #[inline] pub unsafe fn NetErrorLogWrite(reserved1: Option<*const u8>, code: u32, component: P0, buffer: *const u8, numbytes: u32, msgbuf: *const u8, strcount: u32, reserved2: Option<*const u8>) -> u32 @@ -257,13 +257,13 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetErrorLogWrite(reserved1 : *const u8, code : u32, component : windows_core::PCWSTR, buffer : *const u8, numbytes : u32, msgbuf : *const u8, strcount : u32, reserved2 : *const u8) -> u32); - NetErrorLogWrite(core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), code, component.param().abi(), buffer, numbytes, msgbuf, strcount, core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))) + NetErrorLogWrite(core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), code, component.param().abi(), buffer, numbytes, msgbuf, strcount, core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn NetFreeAadJoinInformation(pjoininfo: Option<*const DSREG_JOIN_INFO>) { windows_targets::link!("netapi32.dll" "system" fn NetFreeAadJoinInformation(pjoininfo : *const DSREG_JOIN_INFO)); - NetFreeAadJoinInformation(core::mem::transmute(pjoininfo.unwrap_or(std::ptr::null()))) + NetFreeAadJoinInformation(core::mem::transmute(pjoininfo.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -327,7 +327,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGroupAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetGroupAddUser(servername: P0, groupname: P1, username: P2) -> u32 @@ -364,7 +364,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGroupEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut usize) -> u32); - NetGroupEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetGroupEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetGroupGetInfo(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -382,7 +382,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGroupGetUsers(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut usize) -> u32); - NetGroupGetUsers(servername.param().abi(), groupname.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetGroupGetUsers(servername.param().abi(), groupname.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetGroupSetInfo(servername: P0, groupname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -391,7 +391,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetGroupSetInfo(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetGroupSetUsers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -429,7 +429,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetLocalGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetLocalGroupAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -486,7 +486,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut usize) -> u32); - NetLocalGroupEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetLocalGroupEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetLocalGroupGetInfo(servername: P0, groupname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -504,7 +504,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupGetMembers(servername : windows_core::PCWSTR, localgroupname : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut usize) -> u32); - NetLocalGroupGetMembers(servername.param().abi(), localgroupname.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetLocalGroupGetMembers(servername.param().abi(), localgroupname.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetLocalGroupSetInfo(servername: P0, groupname: P1, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -513,7 +513,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetLocalGroupSetInfo(servername : windows_core::PCWSTR, groupname : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetLocalGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetLocalGroupSetInfo(servername.param().abi(), groupname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetLocalGroupSetMembers(servername: P0, groupname: P1, level: u32, buf: *const u8, totalentries: u32) -> u32 @@ -578,7 +578,7 @@ where P3: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetProvisionComputerAccount(lpdomain : windows_core::PCWSTR, lpmachinename : windows_core::PCWSTR, lpmachineaccountou : windows_core::PCWSTR, lpdcname : windows_core::PCWSTR, dwoptions : NETSETUP_PROVISION, pprovisionbindata : *mut *mut u8, pdwprovisionbindatasize : *mut u32, pprovisiontextdata : *mut windows_core::PWSTR) -> u32); - NetProvisionComputerAccount(lpdomain.param().abi(), lpmachinename.param().abi(), lpmachineaccountou.param().abi(), lpdcname.param().abi(), dwoptions, core::mem::transmute(pprovisionbindata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwprovisionbindatasize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pprovisiontextdata.unwrap_or(std::ptr::null_mut()))) + NetProvisionComputerAccount(lpdomain.param().abi(), lpmachinename.param().abi(), lpmachineaccountou.param().abi(), lpdcname.param().abi(), dwoptions, core::mem::transmute(pprovisionbindata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwprovisionbindatasize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprovisiontextdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetQueryDisplayInformation(servername: P0, level: u32, index: u32, entriesrequested: u32, preferredmaximumlength: u32, returnedentrycount: *mut u32, sortedbuffer: *mut *mut core::ffi::c_void) -> u32 @@ -787,7 +787,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetRequestProvisioningPackageInstall(ppackagebindata : *const u8, dwpackagebindatasize : u32, dwprovisionoptions : NET_REQUEST_PROVISION_OPTIONS, lpwindowspath : windows_core::PCWSTR, pvreserved : *const core::ffi::c_void) -> u32); - NetRequestProvisioningPackageInstall(core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), dwprovisionoptions, lpwindowspath.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + NetRequestProvisioningPackageInstall(core::mem::transmute(ppackagebindata.as_ptr()), ppackagebindata.len().try_into().unwrap(), dwprovisionoptions, lpwindowspath.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn NetScheduleJobAdd(servername: P0, buffer: *mut u8, jobid: *mut u32) -> u32 @@ -846,7 +846,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerDiskEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetServerDiskEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetServerDiskEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetServerEnum(servername: P0, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, servertype: NET_SERVER_TYPE, domain: P1, resume_handle: Option<*mut u32>) -> u32 @@ -855,7 +855,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, servertype : NET_SERVER_TYPE, domain : windows_core::PCWSTR, resume_handle : *mut u32) -> u32); - NetServerEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, servertype, domain.param().abi(), core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetServerEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, servertype, domain.param().abi(), core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetServerGetInfo(servername: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -871,7 +871,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerSetInfo(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parmerror : *mut u32) -> u32); - NetServerSetInfo(servername.param().abi(), level, buf, core::mem::transmute(parmerror.unwrap_or(std::ptr::null_mut()))) + NetServerSetInfo(servername.param().abi(), level, buf, core::mem::transmute(parmerror.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetServerTransportAdd(servername: P0, level: u32, bufptr: *const u8) -> u32 @@ -903,7 +903,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerTransportEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetServerTransportEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetServerTransportEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetServiceControl(servername: P0, service: P1, opcode: u32, arg: u32, bufptr: *mut *mut u8) -> u32 @@ -920,7 +920,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServiceEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetServiceEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetServiceEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetServiceGetInfo(servername: P0, service: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -964,7 +964,7 @@ where #[inline] pub unsafe fn NetUseAdd(servername: Option<*const i8>, levelflags: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetUseAdd(servername : *const i8, levelflags : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetUseAdd(core::mem::transmute(servername.unwrap_or(std::ptr::null())), levelflags, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetUseAdd(core::mem::transmute(servername.unwrap_or(core::ptr::null())), levelflags, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUseDel(uncservername: P0, usename: P1, forcelevelflags: FORCE_LEVEL_FLAGS) -> u32 @@ -981,7 +981,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUseEnum(uncservername : windows_core::PCWSTR, levelflags : u32, bufptr : *mut *mut u8, preferedmaximumsize : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - NetUseEnum(uncservername.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(std::ptr::null_mut())), preferedmaximumsize, core::mem::transmute(entriesread.unwrap_or(std::ptr::null_mut())), totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetUseEnum(uncservername.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut())), preferedmaximumsize, core::mem::transmute(entriesread.unwrap_or(core::ptr::null_mut())), totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUseGetInfo(uncservername: P0, usename: P1, levelflags: u32, bufptr: Option<*mut *mut u8>) -> u32 @@ -990,7 +990,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUseGetInfo(uncservername : windows_core::PCWSTR, usename : windows_core::PCWSTR, levelflags : u32, bufptr : *mut *mut u8) -> u32); - NetUseGetInfo(uncservername.param().abi(), usename.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(std::ptr::null_mut()))) + NetUseGetInfo(uncservername.param().abi(), usename.param().abi(), levelflags, core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUserAdd(servername: P0, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -998,7 +998,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetUserAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetUserAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUserChangePassword(domainname: P0, username: P1, oldpassword: P2, newpassword: P3) -> u32 @@ -1026,7 +1026,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserEnum(servername : windows_core::PCWSTR, level : u32, filter : NET_USER_ENUM_FILTER_FLAGS, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetUserEnum(servername.param().abi(), level, filter, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetUserEnum(servername.param().abi(), level, filter, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUserGetGroups(servername: P0, username: P1, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32) -> u32 @@ -1069,7 +1069,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserModalsSet(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetUserModalsSet(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetUserModalsSet(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetUserSetGroups(servername: P0, username: P1, level: u32, buf: *const u8, num_entries: u32) -> u32 @@ -1087,7 +1087,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetUserSetInfo(servername : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetUserSetInfo(servername.param().abi(), username.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetUserSetInfo(servername.param().abi(), username.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetValidateName(lpserver: P0, lpname: P1, lpaccount: P2, lppassword: P3, nametype: NETSETUP_NAME_TYPE) -> u32 @@ -1119,7 +1119,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaGetInfo(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8) -> u32); - NetWkstaGetInfo(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(std::ptr::null_mut()))) + NetWkstaGetInfo(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetWkstaSetInfo(servername: P0, level: u32, buffer: *const u8, parm_err: Option<*mut u32>) -> u32 @@ -1127,12 +1127,12 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaSetInfo(servername : windows_core::PCWSTR, level : u32, buffer : *const u8, parm_err : *mut u32) -> u32); - NetWkstaSetInfo(servername.param().abi(), level, buffer, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetWkstaSetInfo(servername.param().abi(), level, buffer, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetWkstaTransportAdd(servername: Option<*const i8>, level: u32, buf: *const u8, parm_err: Option<*mut u32>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetWkstaTransportAdd(servername : *const i8, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetWkstaTransportAdd(core::mem::transmute(servername.unwrap_or(std::ptr::null())), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetWkstaTransportAdd(core::mem::transmute(servername.unwrap_or(core::ptr::null())), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetWkstaTransportDel(servername: P0, transportname: P1, ucond: FORCE_LEVEL_FLAGS) -> u32 @@ -1146,7 +1146,7 @@ where #[inline] pub unsafe fn NetWkstaTransportEnum(servername: Option<*const i8>, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 { windows_targets::link!("netapi32.dll" "system" fn NetWkstaTransportEnum(servername : *const i8, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetWkstaTransportEnum(core::mem::transmute(servername.unwrap_or(std::ptr::null())), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetWkstaTransportEnum(core::mem::transmute(servername.unwrap_or(core::ptr::null())), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetWkstaUserEnum(servername: P0, level: u32, bufptr: Option<*mut *mut u8>, prefmaxlen: u32, entriesread: Option<*mut u32>, totalentries: *mut u32, resumehandle: Option<*mut u32>) -> u32 @@ -1154,7 +1154,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaUserEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - NetWkstaUserEnum(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(std::ptr::null_mut())), prefmaxlen, core::mem::transmute(entriesread.unwrap_or(std::ptr::null_mut())), totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetWkstaUserEnum(servername.param().abi(), level, core::mem::transmute(bufptr.unwrap_or(core::ptr::null_mut())), prefmaxlen, core::mem::transmute(entriesread.unwrap_or(core::ptr::null_mut())), totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetWkstaUserGetInfo(reserved: P0, level: u32, bufptr: *mut *mut u8) -> u32 @@ -1170,7 +1170,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetWkstaUserSetInfo(reserved : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetWkstaUserSetInfo(reserved.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetWkstaUserSetInfo(reserved.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RouterAssert(pszfailedassertion: P0, pszfilename: P1, dwlinenumber: u32, pszmessage: P2) @@ -1456,7 +1456,7 @@ impl core::ops::Deref for IEnumNetCfgBindingInterface { windows_core::imp::interface_hierarchy!(IEnumNetCfgBindingInterface, windows_core::IUnknown); impl IEnumNetCfgBindingInterface { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -1465,7 +1465,7 @@ impl IEnumNetCfgBindingInterface { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1486,7 +1486,7 @@ impl core::ops::Deref for IEnumNetCfgBindingPath { windows_core::imp::interface_hierarchy!(IEnumNetCfgBindingPath, windows_core::IUnknown); impl IEnumNetCfgBindingPath { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -1495,7 +1495,7 @@ impl IEnumNetCfgBindingPath { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1516,7 +1516,7 @@ impl core::ops::Deref for IEnumNetCfgComponent { windows_core::imp::interface_hierarchy!(IEnumNetCfgComponent, windows_core::IUnknown); impl IEnumNetCfgComponent { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -1525,7 +1525,7 @@ impl IEnumNetCfgComponent { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Clone(&self, ppenum: Option<*const Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Clone)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenum.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -1546,7 +1546,7 @@ impl core::ops::Deref for INetCfg { windows_core::imp::interface_hierarchy!(INetCfg, windows_core::IUnknown); impl INetCfg { pub unsafe fn Initialize(&self, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Uninitialize(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Uninitialize)(windows_core::Interface::as_raw(self)).ok() @@ -1558,16 +1558,16 @@ impl INetCfg { (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn EnumComponents(&self, pguidclass: *const windows_core::GUID, ppenumcomponent: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), pguidclass, core::mem::transmute(ppenumcomponent.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), pguidclass, core::mem::transmute(ppenumcomponent.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindComponent(&self, pszwinfid: P0, pcomponent: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(pcomponent.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(pcomponent.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn QueryNetCfgClass(&self, pguidclass: *const windows_core::GUID, riid: *const windows_core::GUID, ppvobject: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).QueryNetCfgClass)(windows_core::Interface::as_raw(self), pguidclass, riid, core::mem::transmute(ppvobject.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryNetCfgClass)(windows_core::Interface::as_raw(self), pguidclass, riid, core::mem::transmute(ppvobject.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1591,13 +1591,13 @@ impl core::ops::Deref for INetCfgBindingInterface { windows_core::imp::interface_hierarchy!(INetCfgBindingInterface, windows_core::IUnknown); impl INetCfgBindingInterface { pub unsafe fn GetName(&self, ppszwinterfacename: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwinterfacename.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwinterfacename.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetUpperComponent(&self, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetUpperComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetUpperComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLowerComponent(&self, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLowerComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLowerComponent)(windows_core::Interface::as_raw(self), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1638,17 +1638,17 @@ impl INetCfgBindingPath { (windows_core::Interface::vtable(self).Enable)(windows_core::Interface::as_raw(self), fenable.param().abi()).ok() } pub unsafe fn GetPathToken(&self, ppszwpathtoken: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwpathtoken.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPathToken)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwpathtoken.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOwner(&self, ppcomponent: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOwner)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomponent.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOwner)(windows_core::Interface::as_raw(self), core::mem::transmute(ppcomponent.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetDepth(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetDepth)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn EnumBindingInterfaces(&self, ppenuminterface: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumBindingInterfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenuminterface.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumBindingInterfaces)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenuminterface.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1676,10 +1676,10 @@ impl INetCfgClass { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindComponent)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EnumComponents(&self, ppenumcomponent: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenumcomponent.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumComponents)(windows_core::Interface::as_raw(self), core::mem::transmute(ppenumcomponent.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1701,7 +1701,7 @@ impl INetCfgClassSetup { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SelectAndInstall)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(pobotoken.unwrap_or(std::ptr::null())), core::mem::transmute(ppnccitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SelectAndInstall)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(pobotoken.unwrap_or(core::ptr::null())), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Install(&self, pszwinfid: P0, pobotoken: Option<*const OBO_TOKEN>, dwsetupflags: u32, dwupgradefrombuildno: u32, pszwanswerfile: P1, pszwanswersections: P2, ppnccitem: Option<*mut Option>) -> windows_core::Result<()> where @@ -1709,13 +1709,13 @@ impl INetCfgClassSetup { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(pobotoken.unwrap_or(std::ptr::null())), dwsetupflags, dwupgradefrombuildno, pszwanswerfile.param().abi(), pszwanswersections.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Install)(windows_core::Interface::as_raw(self), pszwinfid.param().abi(), core::mem::transmute(pobotoken.unwrap_or(core::ptr::null())), dwsetupflags, dwupgradefrombuildno, pszwanswerfile.param().abi(), pszwanswersections.param().abi(), core::mem::transmute(ppnccitem.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DeInstall(&self, pcomponent: P0, pobotoken: Option<*const OBO_TOKEN>, pmszwrefs: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).DeInstall)(windows_core::Interface::as_raw(self), pcomponent.param().abi(), core::mem::transmute(pobotoken.unwrap_or(std::ptr::null())), core::mem::transmute(pmszwrefs.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeInstall)(windows_core::Interface::as_raw(self), pcomponent.param().abi(), core::mem::transmute(pobotoken.unwrap_or(core::ptr::null())), core::mem::transmute(pmszwrefs.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1756,7 +1756,7 @@ impl core::ops::Deref for INetCfgComponent { windows_core::imp::interface_hierarchy!(INetCfgComponent, windows_core::IUnknown); impl INetCfgComponent { pub unsafe fn GetDisplayName(&self, ppszwdisplayname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdisplayname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdisplayname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetDisplayName(&self, pszwdisplayname: P0) -> windows_core::Result<()> where @@ -1765,26 +1765,26 @@ impl INetCfgComponent { (windows_core::Interface::vtable(self).SetDisplayName)(windows_core::Interface::as_raw(self), pszwdisplayname.param().abi()).ok() } pub unsafe fn GetHelpText(&self, pszwhelptext: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetHelpText)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwhelptext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetHelpText)(windows_core::Interface::as_raw(self), core::mem::transmute(pszwhelptext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetId(&self, ppszwid: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCharacteristics(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetCharacteristics)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetInstanceGuid(&self, pguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInstanceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInstanceGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetPnpDevNodeId(&self, ppszwdevnodeid: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPnpDevNodeId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdevnodeid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPnpDevNodeId)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwdevnodeid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetClassGuid(&self, pguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetClassGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetClassGuid)(windows_core::Interface::as_raw(self), core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetBindName(&self, ppszwbindname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBindName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwbindname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetBindName)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwbindname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetDeviceStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1792,7 +1792,7 @@ impl INetCfgComponent { } #[cfg(feature = "Win32_System_Registry")] pub unsafe fn OpenParamKey(&self, phkey: Option<*mut super::super::System::Registry::HKEY>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OpenParamKey)(windows_core::Interface::as_raw(self), core::mem::transmute(phkey.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenParamKey)(windows_core::Interface::as_raw(self), core::mem::transmute(phkey.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RaisePropertyUi(&self, hwndparent: P0, dwflags: u32, punkcontext: P1) -> windows_core::Result<()> where @@ -1861,7 +1861,7 @@ impl INetCfgComponentBindings { (windows_core::Interface::vtable(self).IsBindableTo)(windows_core::Interface::as_raw(self), pnccitem.param().abi()).ok() } pub unsafe fn EnumBindingPaths(&self, dwflags: u32, ppienum: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).EnumBindingPaths)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(ppienum.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EnumBindingPaths)(windows_core::Interface::as_raw(self), dwflags, core::mem::transmute(ppienum.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn MoveBefore(&self, pncbitemsrc: P0, pncbitemdest: P1) -> windows_core::Result<()> where @@ -2021,7 +2021,7 @@ impl INetCfgComponentPropertyUi { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).MergePropPages)(windows_core::Interface::as_raw(self), pdwdefpages, pahpspprivate, pcpages, hwndparent.param().abi(), core::mem::transmute(pszstartpage.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).MergePropPages)(windows_core::Interface::as_raw(self), pdwdefpages, pahpspprivate, pcpages, hwndparent.param().abi(), core::mem::transmute(pszstartpage.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ValidateProperties(&self, hwndsheet: P0) -> windows_core::Result<()> where @@ -2123,7 +2123,7 @@ impl INetCfgComponentUpperEdge { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetInterfaceIdsForAdapter)(windows_core::Interface::as_raw(self), padapter.param().abi(), pdwnuminterfaces, core::mem::transmute(ppguidinterfaceids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInterfaceIdsForAdapter)(windows_core::Interface::as_raw(self), padapter.param().abi(), pdwnuminterfaces, core::mem::transmute(ppguidinterfaceids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddInterfacesToAdapter(&self, padapter: P0, dwnuminterfaces: u32) -> windows_core::Result<()> where @@ -2158,13 +2158,13 @@ impl INetCfgLock { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), cmstimeout, pszwclientdescription.param().abi(), core::mem::transmute(ppszwclientdescription.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AcquireWriteLock)(windows_core::Interface::as_raw(self), cmstimeout, pszwclientdescription.param().abi(), core::mem::transmute(ppszwclientdescription.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReleaseWriteLock(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReleaseWriteLock)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn IsWriteLocked(&self, ppszwclientdescription: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).IsWriteLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwclientdescription.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsWriteLocked)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszwclientdescription.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs index 8485742d15..9a3625d2a2 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetShell/mod.rs @@ -22,7 +22,7 @@ where P0: windows_core::Param, { windows_targets::link!("netsh.dll" "system" fn PreprocessCommand(hmodule : super::super::Foundation:: HANDLE, ppwcarguments : *mut windows_core::PWSTR, dwcurrentindex : u32, dwargcount : u32, ptttags : *mut TAG_TYPE, dwtagcount : u32, dwminargs : u32, dwmaxargs : u32, pdwtagtype : *mut u32) -> u32); - PreprocessCommand(hmodule.param().abi(), core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len().try_into().unwrap(), core::mem::transmute(ptttags.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwminargs, dwmaxargs, core::mem::transmute(pdwtagtype.unwrap_or(std::ptr::null_mut()))) + PreprocessCommand(hmodule.param().abi(), core::mem::transmute(ppwcarguments.as_ptr()), dwcurrentindex, ppwcarguments.len().try_into().unwrap(), core::mem::transmute(ptttags.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ptttags.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwminargs, dwmaxargs, core::mem::transmute(pdwtagtype.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PrintError(hmodule: P0, dwerrid: u32) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs index 7595ccc503..528d9796a4 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/NetworkDiagnosticsFramework/mod.rs @@ -32,7 +32,7 @@ where P4: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateGroupingIncident(cloudname : windows_core::PCWSTR, groupname : windows_core::PCWSTR, identity : windows_core::PCWSTR, invitation : windows_core::PCWSTR, addresses : *const super::super::Networking::WinSock:: SOCKET_ADDRESS_LIST, appid : windows_core::PCWSTR, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - NdfCreateGroupingIncident(cloudname.param().abi(), groupname.param().abi(), identity.param().abi(), invitation.param().abi(), core::mem::transmute(addresses.unwrap_or(std::ptr::null())), appid.param().abi(), handle).ok() + NdfCreateGroupingIncident(cloudname.param().abi(), groupname.param().abi(), identity.param().abi(), invitation.param().abi(), core::mem::transmute(addresses.unwrap_or(core::ptr::null())), appid.param().abi(), handle).ok() } #[inline] pub unsafe fn NdfCreateIncident(helperclassname: P0, attributes: &[HELPER_ATTRIBUTE], handle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -93,7 +93,7 @@ where P2: windows_core::Param, { windows_targets::link!("ndfapi.dll" "system" fn NdfCreateWinSockIncident(sock : super::super::Networking::WinSock:: SOCKET, host : windows_core::PCWSTR, port : u16, appid : windows_core::PCWSTR, userid : *const super::super::Security:: SID, handle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - NdfCreateWinSockIncident(sock.param().abi(), host.param().abi(), port, appid.param().abi(), core::mem::transmute(userid.unwrap_or(std::ptr::null())), handle).ok() + NdfCreateWinSockIncident(sock.param().abi(), host.param().abi(), port, appid.param().abi(), core::mem::transmute(userid.unwrap_or(core::ptr::null())), handle).ok() } #[inline] pub unsafe fn NdfDiagnoseIncident(handle: *const core::ffi::c_void, rootcausecount: *mut u32, rootcauses: *mut *mut RootCauseInfo, dwwait: u32, dwflags: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs index 3b86031bdb..9ee18e150d 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/P2P/mod.rs @@ -20,7 +20,7 @@ pub unsafe fn DrtCreateDerivedKey(plocalcert: *const super::super::Security::Cry pub unsafe fn DrtCreateDerivedKeySecurityProvider(prootcert: *const super::super::Security::Cryptography::CERT_CONTEXT, plocalcert: Option<*const super::super::Security::Cryptography::CERT_CONTEXT>) -> windows_core::Result<*mut DRT_SECURITY_PROVIDER> { windows_targets::link!("drtprov.dll" "system" fn DrtCreateDerivedKeySecurityProvider(prootcert : *const super::super::Security::Cryptography:: CERT_CONTEXT, plocalcert : *const super::super::Security::Cryptography:: CERT_CONTEXT, ppsecurityprovider : *mut *mut DRT_SECURITY_PROVIDER) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DrtCreateDerivedKeySecurityProvider(prootcert, core::mem::transmute(plocalcert.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + DrtCreateDerivedKeySecurityProvider(prootcert, core::mem::transmute(plocalcert.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn DrtCreateDnsBootstrapResolver(port: u16, pwszaddress: P0) -> windows_core::Result<*mut DRT_BOOTSTRAP_PROVIDER> @@ -136,12 +136,12 @@ where P0: windows_core::Param, { windows_targets::link!("drt.dll" "system" fn DrtOpen(psettings : *const DRT_SETTINGS, hevent : super::super::Foundation:: HANDLE, pvcontext : *const core::ffi::c_void, phdrt : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DrtOpen(psettings, hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), phdrt).ok() + DrtOpen(psettings, hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), phdrt).ok() } #[inline] pub unsafe fn DrtRegisterKey(hdrt: *const core::ffi::c_void, pregistration: *const DRT_REGISTRATION, pvkeycontext: Option<*const core::ffi::c_void>, phkeyregistration: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("drt.dll" "system" fn DrtRegisterKey(hdrt : *const core::ffi::c_void, pregistration : *const DRT_REGISTRATION, pvkeycontext : *const core::ffi::c_void, phkeyregistration : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DrtRegisterKey(hdrt, pregistration, core::mem::transmute(pvkeycontext.unwrap_or(std::ptr::null())), phkeyregistration).ok() + DrtRegisterKey(hdrt, pregistration, core::mem::transmute(pvkeycontext.unwrap_or(core::ptr::null())), phkeyregistration).ok() } #[inline] pub unsafe fn DrtStartSearch(hdrt: *const core::ffi::c_void, pkey: *const DRT_DATA, pinfo: Option<*const DRT_SEARCH_INFO>, timeout: u32, hevent: P0, pvcontext: Option<*const core::ffi::c_void>, hsearchcontext: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -149,7 +149,7 @@ where P0: windows_core::Param, { windows_targets::link!("drt.dll" "system" fn DrtStartSearch(hdrt : *const core::ffi::c_void, pkey : *const DRT_DATA, pinfo : *const DRT_SEARCH_INFO, timeout : u32, hevent : super::super::Foundation:: HANDLE, pvcontext : *const core::ffi::c_void, hsearchcontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DrtStartSearch(hdrt, pkey, core::mem::transmute(pinfo.unwrap_or(std::ptr::null())), timeout, hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), hsearchcontext).ok() + DrtStartSearch(hdrt, pkey, core::mem::transmute(pinfo.unwrap_or(core::ptr::null())), timeout, hevent.param().abi(), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), hsearchcontext).ok() } #[inline] pub unsafe fn DrtUnregisterKey(hkeyregistration: *const core::ffi::c_void) { @@ -167,7 +167,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerCollabAddContact(pwzcontactdata : windows_core::PCWSTR, ppcontact : *mut *mut PEER_CONTACT) -> windows_core::HRESULT); - PeerCollabAddContact(pwzcontactdata.param().abi(), core::mem::transmute(ppcontact.unwrap_or(std::ptr::null_mut()))).ok() + PeerCollabAddContact(pwzcontactdata.param().abi(), core::mem::transmute(ppcontact.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -176,7 +176,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerCollabAsyncInviteContact(pccontact : *const PEER_CONTACT, pcendpoint : *const PEER_ENDPOINT, pcinvitation : *const PEER_INVITATION, hevent : super::super::Foundation:: HANDLE, phinvitation : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - PeerCollabAsyncInviteContact(core::mem::transmute(pccontact.unwrap_or(std::ptr::null())), pcendpoint, pcinvitation, hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(std::ptr::null_mut()))).ok() + PeerCollabAsyncInviteContact(core::mem::transmute(pccontact.unwrap_or(core::ptr::null())), pcendpoint, pcinvitation, hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -185,7 +185,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerCollabAsyncInviteEndpoint(pcendpoint : *const PEER_ENDPOINT, pcinvitation : *const PEER_INVITATION, hevent : super::super::Foundation:: HANDLE, phinvitation : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - PeerCollabAsyncInviteEndpoint(pcendpoint, pcinvitation, hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(std::ptr::null_mut()))).ok() + PeerCollabAsyncInviteEndpoint(pcendpoint, pcinvitation, hevent.param().abi(), core::mem::transmute(phinvitation.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PeerCollabCancelInvitation(hinvitation: P0) -> windows_core::Result<()> @@ -231,7 +231,7 @@ pub unsafe fn PeerCollabEnumApplicationRegistrationInfo(registrationtype: PEER_A #[inline] pub unsafe fn PeerCollabEnumApplications(pcendpoint: Option<*const PEER_ENDPOINT>, papplicationid: Option<*const windows_core::GUID>, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumApplications(pcendpoint : *const PEER_ENDPOINT, papplicationid : *const windows_core::GUID, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerCollabEnumApplications(core::mem::transmute(pcendpoint.unwrap_or(std::ptr::null())), core::mem::transmute(papplicationid.unwrap_or(std::ptr::null())), phpeerenum).ok() + PeerCollabEnumApplications(core::mem::transmute(pcendpoint.unwrap_or(core::ptr::null())), core::mem::transmute(papplicationid.unwrap_or(core::ptr::null())), phpeerenum).ok() } #[inline] pub unsafe fn PeerCollabEnumContacts(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -241,13 +241,13 @@ pub unsafe fn PeerCollabEnumContacts(phpeerenum: *mut *mut core::ffi::c_void) -> #[inline] pub unsafe fn PeerCollabEnumEndpoints(pccontact: Option<*const PEER_CONTACT>, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumEndpoints(pccontact : *const PEER_CONTACT, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerCollabEnumEndpoints(core::mem::transmute(pccontact.unwrap_or(std::ptr::null())), phpeerenum).ok() + PeerCollabEnumEndpoints(core::mem::transmute(pccontact.unwrap_or(core::ptr::null())), phpeerenum).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] pub unsafe fn PeerCollabEnumObjects(pcendpoint: Option<*const PEER_ENDPOINT>, pobjectid: Option<*const windows_core::GUID>, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerCollabEnumObjects(pcendpoint : *const PEER_ENDPOINT, pobjectid : *const windows_core::GUID, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerCollabEnumObjects(core::mem::transmute(pcendpoint.unwrap_or(std::ptr::null())), core::mem::transmute(pobjectid.unwrap_or(std::ptr::null())), phpeerenum).ok() + PeerCollabEnumObjects(core::mem::transmute(pcendpoint.unwrap_or(core::ptr::null())), core::mem::transmute(pobjectid.unwrap_or(core::ptr::null())), phpeerenum).ok() } #[inline] pub unsafe fn PeerCollabEnumPeopleNearMe(phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -312,7 +312,7 @@ where pub unsafe fn PeerCollabGetPresenceInfo(pcendpoint: Option<*const PEER_ENDPOINT>) -> windows_core::Result<*mut PEER_PRESENCE_INFO> { windows_targets::link!("p2p.dll" "system" fn PeerCollabGetPresenceInfo(pcendpoint : *const PEER_ENDPOINT, pppresenceinfo : *mut *mut PEER_PRESENCE_INFO) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerCollabGetPresenceInfo(core::mem::transmute(pcendpoint.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + PeerCollabGetPresenceInfo(core::mem::transmute(pcendpoint.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn PeerCollabGetSigninOptions() -> windows_core::Result { @@ -325,7 +325,7 @@ pub unsafe fn PeerCollabGetSigninOptions() -> windows_core::Result { pub unsafe fn PeerCollabInviteContact(pccontact: Option<*const PEER_CONTACT>, pcendpoint: *const PEER_ENDPOINT, pcinvitation: *const PEER_INVITATION) -> windows_core::Result<*mut PEER_INVITATION_RESPONSE> { windows_targets::link!("p2p.dll" "system" fn PeerCollabInviteContact(pccontact : *const PEER_CONTACT, pcendpoint : *const PEER_ENDPOINT, pcinvitation : *const PEER_INVITATION, ppresponse : *mut *mut PEER_INVITATION_RESPONSE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerCollabInviteContact(core::mem::transmute(pccontact.unwrap_or(std::ptr::null())), pcendpoint, pcinvitation, &mut result__).map(|| result__) + PeerCollabInviteContact(core::mem::transmute(pccontact.unwrap_or(core::ptr::null())), pcendpoint, pcinvitation, &mut result__).map(|| result__) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -348,7 +348,7 @@ where pub unsafe fn PeerCollabQueryContactData(pcendpoint: Option<*const PEER_ENDPOINT>) -> windows_core::Result { windows_targets::link!("p2p.dll" "system" fn PeerCollabQueryContactData(pcendpoint : *const PEER_ENDPOINT, ppwzcontactdata : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerCollabQueryContactData(core::mem::transmute(pcendpoint.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + PeerCollabQueryContactData(core::mem::transmute(pcendpoint.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -469,7 +469,7 @@ pub unsafe fn PeerDistClientBlockRead(hpeerdist: isize, hcontenthandle: isize, p #[inline] pub unsafe fn PeerDistClientCancelAsyncOperation(hpeerdist: isize, hcontenthandle: isize, poverlapped: Option<*const super::super::System::IO::OVERLAPPED>) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistClientCancelAsyncOperation(hpeerdist : isize, hcontenthandle : isize, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - PeerDistClientCancelAsyncOperation(hpeerdist, hcontenthandle, core::mem::transmute(poverlapped.unwrap_or(std::ptr::null()))) + PeerDistClientCancelAsyncOperation(hpeerdist, hcontenthandle, core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PeerDistClientCloseContent(hpeerdist: isize, hcontenthandle: isize) -> u32 { @@ -597,7 +597,7 @@ where P0: windows_core::Param, { windows_targets::link!("peerdist.dll" "system" fn PeerDistServerPublishStream(hpeerdist : isize, cbcontentidentifier : u32, pcontentidentifier : *const u8, cbcontentlength : u64, ppublishoptions : *const PEERDIST_PUBLICATION_OPTIONS, hcompletionport : super::super::Foundation:: HANDLE, ulcompletionkey : usize, phstream : *mut isize) -> u32); - PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), cbcontentlength, core::mem::transmute(ppublishoptions.unwrap_or(std::ptr::null())), hcompletionport.param().abi(), ulcompletionkey, phstream) + PeerDistServerPublishStream(hpeerdist, pcontentidentifier.len().try_into().unwrap(), core::mem::transmute(pcontentidentifier.as_ptr()), cbcontentlength, core::mem::transmute(ppublishoptions.unwrap_or(core::ptr::null())), hcompletionport.param().abi(), ulcompletionkey, phstream) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -618,7 +618,7 @@ pub unsafe fn PeerDistShutdown(hpeerdist: isize) -> u32 { #[inline] pub unsafe fn PeerDistStartup(dwversionrequested: u32, phpeerdist: *mut isize, pdwsupportedversion: Option<*mut u32>) -> u32 { windows_targets::link!("peerdist.dll" "system" fn PeerDistStartup(dwversionrequested : u32, phpeerdist : *mut isize, pdwsupportedversion : *mut u32) -> u32); - PeerDistStartup(dwversionrequested, phpeerdist, core::mem::transmute(pdwsupportedversion.unwrap_or(std::ptr::null_mut()))) + PeerDistStartup(dwversionrequested, phpeerdist, core::mem::transmute(pdwsupportedversion.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PeerDistUnregisterForStatusChangeNotification(hpeerdist: isize) -> u32 { @@ -646,7 +646,7 @@ pub unsafe fn PeerEnumIdentities(phpeerenum: *mut *mut core::ffi::c_void) -> win #[inline] pub unsafe fn PeerFreeData(pvdata: Option<*const core::ffi::c_void>) { windows_targets::link!("p2p.dll" "system" fn PeerFreeData(pvdata : *const core::ffi::c_void)); - PeerFreeData(core::mem::transmute(pvdata.unwrap_or(std::ptr::null()))) + PeerFreeData(core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PeerGetItemCount(hpeerenum: *const core::ffi::c_void) -> windows_core::Result { @@ -691,7 +691,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphCreate(pgraphproperties : *const PEER_GRAPH_PROPERTIES, pwzdatabasename : windows_core::PCWSTR, psecurityinterface : *const PEER_SECURITY_INTERFACE, phgraph : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGraphCreate(pgraphproperties, pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(std::ptr::null())), phgraph).ok() + PeerGraphCreate(pgraphproperties, pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::ptr::null())), phgraph).ok() } #[inline] pub unsafe fn PeerGraphDelete(pwzgraphid: P0, pwzpeerid: P1, pwzdatabasename: P2) -> windows_core::Result<()> @@ -735,7 +735,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphEnumRecords(hgraph : *const core::ffi::c_void, precordtype : *const windows_core::GUID, pwzpeerid : windows_core::PCWSTR, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGraphEnumRecords(hgraph, core::mem::transmute(precordtype.unwrap_or(std::ptr::null())), pwzpeerid.param().abi(), phpeerenum).ok() + PeerGraphEnumRecords(hgraph, core::mem::transmute(precordtype.unwrap_or(core::ptr::null())), pwzpeerid.param().abi(), phpeerenum).ok() } #[inline] pub unsafe fn PeerGraphExportDatabase(hgraph: *const core::ffi::c_void, pwzfilepath: P0) -> windows_core::Result<()> @@ -813,7 +813,7 @@ where P2: windows_core::Param, { windows_targets::link!("p2pgraph.dll" "system" fn PeerGraphOpen(pwzgraphid : windows_core::PCWSTR, pwzpeerid : windows_core::PCWSTR, pwzdatabasename : windows_core::PCWSTR, psecurityinterface : *const PEER_SECURITY_INTERFACE, crecordtypesyncprecedence : u32, precordtypesyncprecedence : *const windows_core::GUID, phgraph : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGraphOpen(pwzgraphid.param().abi(), pwzpeerid.param().abi(), pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(std::ptr::null())), precordtypesyncprecedence.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(precordtypesyncprecedence.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), phgraph).ok() + PeerGraphOpen(pwzgraphid.param().abi(), pwzpeerid.param().abi(), pwzdatabasename.param().abi(), core::mem::transmute(psecurityinterface.unwrap_or(core::ptr::null())), precordtypesyncprecedence.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(precordtypesyncprecedence.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), phgraph).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -944,7 +944,7 @@ where { windows_targets::link!("p2p.dll" "system" fn PeerGroupCreateInvitation(hgroup : *const core::ffi::c_void, pwzidentityinfo : windows_core::PCWSTR, pftexpiration : *const super::super::Foundation:: FILETIME, croles : u32, proles : *const windows_core::GUID, ppwzinvitation : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PeerGroupCreateInvitation(hgroup, pwzidentityinfo.param().abi(), core::mem::transmute(pftexpiration.unwrap_or(std::ptr::null())), proles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(proles.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).map(|| result__) + PeerGroupCreateInvitation(hgroup, pwzidentityinfo.param().abi(), core::mem::transmute(pftexpiration.unwrap_or(core::ptr::null())), proles.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(proles.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).map(|| result__) } #[inline] pub unsafe fn PeerGroupCreatePasswordInvitation(hgroup: *const core::ffi::c_void) -> windows_core::Result { @@ -982,7 +982,7 @@ where #[inline] pub unsafe fn PeerGroupEnumRecords(hgroup: *const core::ffi::c_void, precordtype: Option<*const windows_core::GUID>, phpeerenum: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("p2p.dll" "system" fn PeerGroupEnumRecords(hgroup : *const core::ffi::c_void, precordtype : *const windows_core::GUID, phpeerenum : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerGroupEnumRecords(hgroup, core::mem::transmute(precordtype.unwrap_or(std::ptr::null())), phpeerenum).ok() + PeerGroupEnumRecords(hgroup, core::mem::transmute(precordtype.unwrap_or(core::ptr::null())), phpeerenum).ok() } #[inline] pub unsafe fn PeerGroupExportConfig(hgroup: *const core::ffi::c_void, pwzpassword: P0) -> windows_core::Result @@ -1050,7 +1050,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerGroupIssueCredentials(hgroup : *const core::ffi::c_void, pwzsubjectidentity : windows_core::PCWSTR, pcredentialinfo : *const PEER_CREDENTIAL_INFO, dwflags : u32, ppwzinvitation : *mut windows_core::PWSTR) -> windows_core::HRESULT); - PeerGroupIssueCredentials(hgroup, pwzsubjectidentity.param().abi(), core::mem::transmute(pcredentialinfo.unwrap_or(std::ptr::null())), dwflags, core::mem::transmute(ppwzinvitation.unwrap_or(std::ptr::null_mut()))).ok() + PeerGroupIssueCredentials(hgroup, pwzsubjectidentity.param().abi(), core::mem::transmute(pcredentialinfo.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(ppwzinvitation.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PeerGroupJoin(pwzidentity: P0, pwzinvitation: P1, pwzcloud: P2, phgroup: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1289,7 +1289,7 @@ where P0: windows_core::Param, { windows_targets::link!("p2p.dll" "system" fn PeerPnrpRegister(pcwzpeername : windows_core::PCWSTR, pregistrationinfo : *const PEER_PNRP_REGISTRATION_INFO, phregistration : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PeerPnrpRegister(pcwzpeername.param().abi(), core::mem::transmute(pregistrationinfo.unwrap_or(std::ptr::null())), phregistration).ok() + PeerPnrpRegister(pcwzpeername.param().abi(), core::mem::transmute(pregistrationinfo.unwrap_or(core::ptr::null())), phregistration).ok() } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs index 854511df32..04cd82df8e 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/QoS/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("qwave.dll" "system" fn QOSAddSocketToFlow(qoshandle : super::super::Foundation:: HANDLE, socket : super::super::Networking::WinSock:: SOCKET, destaddr : *const super::super::Networking::WinSock:: SOCKADDR, traffictype : QOS_TRAFFIC_TYPE, flags : u32, flowid : *mut u32) -> super::super::Foundation:: BOOL); - QOSAddSocketToFlow(qoshandle.param().abi(), socket.param().abi(), core::mem::transmute(destaddr.unwrap_or(std::ptr::null())), traffictype, flags, flowid) + QOSAddSocketToFlow(qoshandle.param().abi(), socket.param().abi(), core::mem::transmute(destaddr.unwrap_or(core::ptr::null())), traffictype, flags, flowid) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -45,7 +45,7 @@ where P0: windows_core::Param, { windows_targets::link!("qwave.dll" "system" fn QOSNotifyFlow(qoshandle : super::super::Foundation:: HANDLE, flowid : u32, operation : QOS_NOTIFY_FLOW, size : *mut u32, buffer : *mut core::ffi::c_void, flags : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - QOSNotifyFlow(qoshandle.param().abi(), flowid, operation, core::mem::transmute(size.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), flags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + QOSNotifyFlow(qoshandle.param().abi(), flowid, operation, core::mem::transmute(size.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), flags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -54,7 +54,7 @@ where P0: windows_core::Param, { windows_targets::link!("qwave.dll" "system" fn QOSQueryFlow(qoshandle : super::super::Foundation:: HANDLE, flowid : u32, operation : QOS_QUERY_FLOW, size : *mut u32, buffer : *mut core::ffi::c_void, flags : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - QOSQueryFlow(qoshandle.param().abi(), flowid, operation, size, buffer, flags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + QOSQueryFlow(qoshandle.param().abi(), flowid, operation, size, buffer, flags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -73,7 +73,7 @@ where P0: windows_core::Param, { windows_targets::link!("qwave.dll" "system" fn QOSSetFlow(qoshandle : super::super::Foundation:: HANDLE, flowid : u32, operation : QOS_SET_FLOW, size : u32, buffer : *const core::ffi::c_void, flags : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - QOSSetFlow(qoshandle.param().abi(), flowid, operation, size, buffer, flags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + QOSSetFlow(qoshandle.param().abi(), flowid, operation, size, buffer, flags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs index e3173ec983..cf4160e8d3 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Rras/mod.rs @@ -122,7 +122,7 @@ where #[inline] pub unsafe fn MprAdminConnectionEnum(hrasserver: isize, dwlevel: u32, lplpbbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*const u32>) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminConnectionEnum(hrasserver : isize, dwlevel : u32, lplpbbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *const u32) -> u32); - MprAdminConnectionEnum(hrasserver, dwlevel, lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null()))) + MprAdminConnectionEnum(hrasserver, dwlevel, lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MprAdminConnectionEnumEx(hrasserver: isize, pobjectheader: *const MPRAPI_OBJECT_HEADER, dwpreferedmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, pprasconn: *mut *mut RAS_CONNECTION_EX, lpdwresumehandle: *const u32) -> u32 { @@ -242,7 +242,7 @@ where #[inline] pub unsafe fn MprAdminInterfaceEnum(hmprserver: isize, dwlevel: u32, lplpbbuffer: *mut *mut u8, dwprefmaxlen: u32, lpdwentriesread: *mut u32, lpdwtotalentries: *mut u32, lpdwresumehandle: Option<*const u32>) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceEnum(hmprserver : isize, dwlevel : u32, lplpbbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *const u32) -> u32); - MprAdminInterfaceEnum(hmprserver, dwlevel, lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null()))) + MprAdminInterfaceEnum(hmprserver, dwlevel, lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MprAdminInterfaceGetCredentials(lpwsserver: P0, lpwsinterfacename: P1, lpwsusername: windows_core::PWSTR, lpwspassword: windows_core::PWSTR, lpwsdomainname: windows_core::PWSTR) -> u32 @@ -346,7 +346,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminInterfaceTransportGetInfo(hmprserver : isize, hinterface : super::super::Foundation:: HANDLE, dwtransportid : u32, ppinterfaceinfo : *mut *mut u8, lpdwinterfaceinfosize : *mut u32) -> u32); - MprAdminInterfaceTransportGetInfo(hmprserver, hinterface.param().abi(), dwtransportid, ppinterfaceinfo, core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(std::ptr::null_mut()))) + MprAdminInterfaceTransportGetInfo(hmprserver, hinterface.param().abi(), dwtransportid, ppinterfaceinfo, core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprAdminInterfaceTransportRemove(hmprserver: isize, hinterface: P0, dwtransportid: u32) -> u32 @@ -476,7 +476,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminPortEnum(hrasserver : isize, dwlevel : u32, hrasconnection : super::super::Foundation:: HANDLE, lplpbbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *const u32) -> u32); - MprAdminPortEnum(hrasserver, dwlevel, hrasconnection.param().abi(), lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null()))) + MprAdminPortEnum(hrasserver, dwlevel, hrasconnection.param().abi(), lplpbbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MprAdminPortGetInfo(hrasserver: isize, dwlevel: u32, hport: P0, lplpbbuffer: *mut *mut u8) -> u32 @@ -563,17 +563,17 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprAdminTransportCreate(hmprserver : isize, dwtransportid : u32, lpwstransportname : windows_core::PCWSTR, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32, lpwsdllpath : windows_core::PCWSTR) -> u32); - MprAdminTransportCreate(hmprserver, dwtransportid, lpwstransportname.param().abi(), pglobalinfo, dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(std::ptr::null())), dwclientinterfaceinfosize, lpwsdllpath.param().abi()) + MprAdminTransportCreate(hmprserver, dwtransportid, lpwstransportname.param().abi(), pglobalinfo, dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::ptr::null())), dwclientinterfaceinfosize, lpwsdllpath.param().abi()) } #[inline] pub unsafe fn MprAdminTransportGetInfo(hmprserver: isize, dwtransportid: u32, ppglobalinfo: Option<*mut *mut u8>, lpdwglobalinfosize: Option<*mut u32>, ppclientinterfaceinfo: Option<*mut *mut u8>, lpdwclientinterfaceinfosize: Option<*mut u32>) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminTransportGetInfo(hmprserver : isize, dwtransportid : u32, ppglobalinfo : *mut *mut u8, lpdwglobalinfosize : *mut u32, ppclientinterfaceinfo : *mut *mut u8, lpdwclientinterfaceinfosize : *mut u32) -> u32); - MprAdminTransportGetInfo(hmprserver, dwtransportid, core::mem::transmute(ppglobalinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(std::ptr::null_mut()))) + MprAdminTransportGetInfo(hmprserver, dwtransportid, core::mem::transmute(ppglobalinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprAdminTransportSetInfo(hmprserver: isize, dwtransportid: u32, pglobalinfo: Option<*const u8>, dwglobalinfosize: u32, pclientinterfaceinfo: Option<*const u8>, dwclientinterfaceinfosize: u32) -> u32 { windows_targets::link!("mprapi.dll" "system" fn MprAdminTransportSetInfo(hmprserver : isize, dwtransportid : u32, pglobalinfo : *const u8, dwglobalinfosize : u32, pclientinterfaceinfo : *const u8, dwclientinterfaceinfosize : u32) -> u32); - MprAdminTransportSetInfo(hmprserver, dwtransportid, core::mem::transmute(pglobalinfo.unwrap_or(std::ptr::null())), dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(std::ptr::null())), dwclientinterfaceinfosize) + MprAdminTransportSetInfo(hmprserver, dwtransportid, core::mem::transmute(pglobalinfo.unwrap_or(core::ptr::null())), dwglobalinfosize, core::mem::transmute(pclientinterfaceinfo.unwrap_or(core::ptr::null())), dwclientinterfaceinfosize) } #[inline] pub unsafe fn MprAdminUpdateConnection(hrasserver: isize, hrasconnection: P0, prasupdateconnection: *const RAS_UPDATE_CONNECTION) -> u32 @@ -663,7 +663,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceEnum(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *mut u32) -> u32); - MprConfigInterfaceEnum(hmprconfig.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null_mut()))) + MprConfigInterfaceEnum(hmprconfig.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_Security_Cryptography"))] #[inline] @@ -729,7 +729,7 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportEnum(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *mut u32) -> u32); - MprConfigInterfaceTransportEnum(hmprconfig.param().abi(), hrouterinterface.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null_mut()))) + MprConfigInterfaceTransportEnum(hmprconfig.param().abi(), hrouterinterface.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprConfigInterfaceTransportGetHandle(hmprconfig: P0, hrouterinterface: P1, dwtransportid: u32, phrouteriftransport: *mut super::super::Foundation::HANDLE) -> u32 @@ -748,7 +748,7 @@ where P2: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigInterfaceTransportGetInfo(hmprconfig : super::super::Foundation:: HANDLE, hrouterinterface : super::super::Foundation:: HANDLE, hrouteriftransport : super::super::Foundation:: HANDLE, ppinterfaceinfo : *mut *mut u8, lpdwinterfaceinfosize : *mut u32) -> u32); - MprConfigInterfaceTransportGetInfo(hmprconfig.param().abi(), hrouterinterface.param().abi(), hrouteriftransport.param().abi(), core::mem::transmute(ppinterfaceinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(std::ptr::null_mut()))) + MprConfigInterfaceTransportGetInfo(hmprconfig.param().abi(), hrouterinterface.param().abi(), hrouteriftransport.param().abi(), core::mem::transmute(ppinterfaceinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwinterfaceinfosize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprConfigInterfaceTransportRemove(hmprconfig: P0, hrouterinterface: P1, hrouteriftransport: P2) -> u32 @@ -873,7 +873,7 @@ where P0: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportEnum(hmprconfig : super::super::Foundation:: HANDLE, dwlevel : u32, lplpbuffer : *mut *mut u8, dwprefmaxlen : u32, lpdwentriesread : *mut u32, lpdwtotalentries : *mut u32, lpdwresumehandle : *mut u32) -> u32); - MprConfigTransportEnum(hmprconfig.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(std::ptr::null_mut()))) + MprConfigTransportEnum(hmprconfig.param().abi(), dwlevel, lplpbuffer, dwprefmaxlen, lpdwentriesread, lpdwtotalentries, core::mem::transmute(lpdwresumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprConfigTransportGetHandle(hmprconfig: P0, dwtransportid: u32, phroutertransport: *mut super::super::Foundation::HANDLE) -> u32 @@ -890,7 +890,7 @@ where P1: windows_core::Param, { windows_targets::link!("mprapi.dll" "system" fn MprConfigTransportGetInfo(hmprconfig : super::super::Foundation:: HANDLE, hroutertransport : super::super::Foundation:: HANDLE, ppglobalinfo : *mut *mut u8, lpdwglobalinfosize : *mut u32, ppclientinterfaceinfo : *mut *mut u8, lpdwclientinterfaceinfosize : *mut u32, lplpwsdllpath : *mut windows_core::PWSTR) -> u32); - MprConfigTransportGetInfo(hmprconfig.param().abi(), hroutertransport.param().abi(), core::mem::transmute(ppglobalinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpwsdllpath.unwrap_or(std::ptr::null_mut()))) + MprConfigTransportGetInfo(hmprconfig.param().abi(), hroutertransport.param().abi(), core::mem::transmute(ppglobalinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwglobalinfosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppclientinterfaceinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwclientinterfaceinfosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpwsdllpath.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MprConfigTransportSetInfo(hmprconfig: P0, hroutertransport: P1, pglobalinfo: Option<&[u8]>, pclientinterfaceinfo: Option<&[u8]>, lpwsdllpath: P2) -> u32 @@ -1041,7 +1041,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasDialA(param0 : *const RASDIALEXTENSIONS, param1 : windows_core::PCSTR, param2 : *const RASDIALPARAMSA, param3 : u32, param4 : *const core::ffi::c_void, param5 : *mut HRASCONN) -> u32); - RasDialA(core::mem::transmute(param0.unwrap_or(std::ptr::null())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(std::ptr::null())), param5) + RasDialA(core::mem::transmute(param0.unwrap_or(core::ptr::null())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::ptr::null())), param5) } #[inline] pub unsafe fn RasDialDlgA(lpszphonebook: P0, lpszentry: P1, lpszphonenumber: P2, lpinfo: *mut RASDIALDLG) -> super::super::Foundation::BOOL @@ -1069,7 +1069,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasDialW(param0 : *const RASDIALEXTENSIONS, param1 : windows_core::PCWSTR, param2 : *const RASDIALPARAMSW, param3 : u32, param4 : *const core::ffi::c_void, param5 : *mut HRASCONN) -> u32); - RasDialW(core::mem::transmute(param0.unwrap_or(std::ptr::null())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(std::ptr::null())), param5) + RasDialW(core::mem::transmute(param0.unwrap_or(core::ptr::null())), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::ptr::null())), param5) } #[inline] pub unsafe fn RasEditPhonebookEntryA(param0: P0, param1: P1, param2: P2) -> u32 @@ -1112,32 +1112,32 @@ where #[inline] pub unsafe fn RasEnumAutodialAddressesA(lpprasautodialaddresses: Option<*mut windows_core::PSTR>, lpdwcbrasautodialaddresses: *mut u32, lpdwcrasautodialaddresses: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumAutodialAddressesA(lpprasautodialaddresses : *mut windows_core::PSTR, lpdwcbrasautodialaddresses : *mut u32, lpdwcrasautodialaddresses : *mut u32) -> u32); - RasEnumAutodialAddressesA(core::mem::transmute(lpprasautodialaddresses.unwrap_or(std::ptr::null_mut())), lpdwcbrasautodialaddresses, lpdwcrasautodialaddresses) + RasEnumAutodialAddressesA(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::ptr::null_mut())), lpdwcbrasautodialaddresses, lpdwcrasautodialaddresses) } #[inline] pub unsafe fn RasEnumAutodialAddressesW(lpprasautodialaddresses: Option<*mut windows_core::PWSTR>, lpdwcbrasautodialaddresses: *mut u32, lpdwcrasautodialaddresses: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumAutodialAddressesW(lpprasautodialaddresses : *mut windows_core::PWSTR, lpdwcbrasautodialaddresses : *mut u32, lpdwcrasautodialaddresses : *mut u32) -> u32); - RasEnumAutodialAddressesW(core::mem::transmute(lpprasautodialaddresses.unwrap_or(std::ptr::null_mut())), lpdwcbrasautodialaddresses, lpdwcrasautodialaddresses) + RasEnumAutodialAddressesW(core::mem::transmute(lpprasautodialaddresses.unwrap_or(core::ptr::null_mut())), lpdwcbrasautodialaddresses, lpdwcrasautodialaddresses) } #[inline] pub unsafe fn RasEnumConnectionsA(param0: Option<*mut RASCONNA>, param1: *mut u32, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumConnectionsA(param0 : *mut RASCONNA, param1 : *mut u32, param2 : *mut u32) -> u32); - RasEnumConnectionsA(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1, param2) + RasEnumConnectionsA(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1, param2) } #[inline] pub unsafe fn RasEnumConnectionsW(param0: Option<*mut RASCONNW>, param1: *mut u32, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumConnectionsW(param0 : *mut RASCONNW, param1 : *mut u32, param2 : *mut u32) -> u32); - RasEnumConnectionsW(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1, param2) + RasEnumConnectionsW(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1, param2) } #[inline] pub unsafe fn RasEnumDevicesA(param0: Option<*mut RASDEVINFOA>, param1: *mut u32, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumDevicesA(param0 : *mut RASDEVINFOA, param1 : *mut u32, param2 : *mut u32) -> u32); - RasEnumDevicesA(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1, param2) + RasEnumDevicesA(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1, param2) } #[inline] pub unsafe fn RasEnumDevicesW(param0: Option<*mut RASDEVINFOW>, param1: *mut u32, param2: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasEnumDevicesW(param0 : *mut RASDEVINFOW, param1 : *mut u32, param2 : *mut u32) -> u32); - RasEnumDevicesW(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1, param2) + RasEnumDevicesW(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1, param2) } #[inline] pub unsafe fn RasEnumEntriesA(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEA>, param3: *mut u32, param4: *mut u32) -> u32 @@ -1146,7 +1146,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasEnumEntriesA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : *mut RASENTRYNAMEA, param3 : *mut u32, param4 : *mut u32) -> u32); - RasEnumEntriesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, param4) + RasEnumEntriesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, param4) } #[inline] pub unsafe fn RasEnumEntriesW(param0: P0, param1: P1, param2: Option<*mut RASENTRYNAMEW>, param3: *mut u32, param4: *mut u32) -> u32 @@ -1155,7 +1155,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasEnumEntriesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : *mut RASENTRYNAMEW, param3 : *mut u32, param4 : *mut u32) -> u32); - RasEnumEntriesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, param4) + RasEnumEntriesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, param4) } #[inline] pub unsafe fn RasFreeEapUserIdentityA(praseapuseridentity: *const RASEAPUSERIDENTITYA) { @@ -1173,7 +1173,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialAddressA(param0 : windows_core::PCSTR, param1 : *const u32, param2 : *mut RASAUTODIALENTRYA, param3 : *mut u32, param4 : *mut u32) -> u32); - RasGetAutodialAddressA(param0.param().abi(), core::mem::transmute(param1.unwrap_or(std::ptr::null())), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, param4) + RasGetAutodialAddressA(param0.param().abi(), core::mem::transmute(param1.unwrap_or(core::ptr::null())), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, param4) } #[inline] pub unsafe fn RasGetAutodialAddressW(param0: P0, param1: Option<*const u32>, param2: Option<*mut RASAUTODIALENTRYW>, param3: *mut u32, param4: *mut u32) -> u32 @@ -1181,7 +1181,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetAutodialAddressW(param0 : windows_core::PCWSTR, param1 : *const u32, param2 : *mut RASAUTODIALENTRYW, param3 : *mut u32, param4 : *mut u32) -> u32); - RasGetAutodialAddressW(param0.param().abi(), core::mem::transmute(param1.unwrap_or(std::ptr::null())), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, param4) + RasGetAutodialAddressW(param0.param().abi(), core::mem::transmute(param1.unwrap_or(core::ptr::null())), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, param4) } #[inline] pub unsafe fn RasGetAutodialEnableA(param0: u32, param1: *mut super::super::Foundation::BOOL) -> u32 { @@ -1232,12 +1232,12 @@ where #[inline] pub unsafe fn RasGetCountryInfoA(param0: Option<*mut RASCTRYINFO>, param1: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetCountryInfoA(param0 : *mut RASCTRYINFO, param1 : *mut u32) -> u32); - RasGetCountryInfoA(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1) + RasGetCountryInfoA(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1) } #[inline] pub unsafe fn RasGetCountryInfoW(param0: Option<*mut RASCTRYINFO>, param1: *mut u32) -> u32 { windows_targets::link!("rasapi32.dll" "system" fn RasGetCountryInfoW(param0 : *mut RASCTRYINFO, param1 : *mut u32) -> u32); - RasGetCountryInfoW(core::mem::transmute(param0.unwrap_or(std::ptr::null_mut())), param1) + RasGetCountryInfoW(core::mem::transmute(param0.unwrap_or(core::ptr::null_mut())), param1) } #[inline] pub unsafe fn RasGetCredentialsA(param0: P0, param1: P1, param2: *mut RASCREDENTIALSA) -> u32 @@ -1264,7 +1264,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetCustomAuthDataA(pszphonebook : windows_core::PCSTR, pszentry : windows_core::PCSTR, pbcustomauthdata : *mut u8, pdwsizeofcustomauthdata : *mut u32) -> u32); - RasGetCustomAuthDataA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(std::ptr::null_mut())), pdwsizeofcustomauthdata) + RasGetCustomAuthDataA(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::ptr::null_mut())), pdwsizeofcustomauthdata) } #[inline] pub unsafe fn RasGetCustomAuthDataW(pszphonebook: P0, pszentry: P1, pbcustomauthdata: Option<*mut u8>, pdwsizeofcustomauthdata: *mut u32) -> u32 @@ -1273,7 +1273,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetCustomAuthDataW(pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, pbcustomauthdata : *mut u8, pdwsizeofcustomauthdata : *mut u32) -> u32); - RasGetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(std::ptr::null_mut())), pdwsizeofcustomauthdata) + RasGetCustomAuthDataW(pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbcustomauthdata.unwrap_or(core::ptr::null_mut())), pdwsizeofcustomauthdata) } #[inline] pub unsafe fn RasGetEapUserDataA(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 @@ -1283,7 +1283,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserDataA(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCSTR, pszentry : windows_core::PCSTR, pbeapdata : *mut u8, pdwsizeofeapdata : *mut u32) -> u32); - RasGetEapUserDataA(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(std::ptr::null_mut())), pdwsizeofeapdata) + RasGetEapUserDataA(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(core::ptr::null_mut())), pdwsizeofeapdata) } #[inline] pub unsafe fn RasGetEapUserDataW(htoken: P0, pszphonebook: P1, pszentry: P2, pbeapdata: Option<*mut u8>, pdwsizeofeapdata: *mut u32) -> u32 @@ -1293,7 +1293,7 @@ where P2: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEapUserDataW(htoken : super::super::Foundation:: HANDLE, pszphonebook : windows_core::PCWSTR, pszentry : windows_core::PCWSTR, pbeapdata : *mut u8, pdwsizeofeapdata : *mut u32) -> u32); - RasGetEapUserDataW(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(std::ptr::null_mut())), pdwsizeofeapdata) + RasGetEapUserDataW(htoken.param().abi(), pszphonebook.param().abi(), pszentry.param().abi(), core::mem::transmute(pbeapdata.unwrap_or(core::ptr::null_mut())), pdwsizeofeapdata) } #[inline] pub unsafe fn RasGetEapUserIdentityA(pszphonebook: P0, pszentry: P1, dwflags: u32, hwnd: P2, ppraseapuseridentity: *mut *mut RASEAPUSERIDENTITYA) -> u32 @@ -1339,7 +1339,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEntryPropertiesA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : *mut RASENTRYA, param3 : *mut u32, param4 : *mut u8, param5 : *mut u32) -> u32); - RasGetEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, core::mem::transmute(param4.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(std::ptr::null_mut()))) + RasGetEntryPropertiesA(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1349,7 +1349,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : *mut RASENTRYW, param3 : *mut u32, param4 : *mut u8, param5 : *mut u32) -> u32); - RasGetEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(std::ptr::null_mut())), param3, core::mem::transmute(param4.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(std::ptr::null_mut()))) + RasGetEntryPropertiesW(param0.param().abi(), param1.param().abi(), core::mem::transmute(param2.unwrap_or(core::ptr::null_mut())), param3, core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RasGetErrorStringA(resourceid: u32, lpszstring: &mut [u8]) -> u32 { @@ -1389,7 +1389,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetProjectionInfoEx(hrasconn : HRASCONN, prasprojection : *mut RAS_PROJECTION_INFO, lpdwsize : *mut u32) -> u32); - RasGetProjectionInfoEx(hrasconn.param().abi(), core::mem::transmute(prasprojection.unwrap_or(std::ptr::null_mut())), lpdwsize) + RasGetProjectionInfoEx(hrasconn.param().abi(), core::mem::transmute(prasprojection.unwrap_or(core::ptr::null_mut())), lpdwsize) } #[inline] pub unsafe fn RasGetProjectionInfoW(param0: P0, param1: RASPROJECTION, param2: *mut core::ffi::c_void, param3: *mut u32) -> u32 @@ -1422,7 +1422,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetSubEntryPropertiesA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : u32, param3 : *mut RASSUBENTRYA, param4 : *mut u32, param5 : *mut u8, param6 : *mut u32) -> u32); - RasGetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, core::mem::transmute(param3.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param4.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param6.unwrap_or(std::ptr::null_mut()))) + RasGetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, core::mem::transmute(param3.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param6.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RasGetSubEntryPropertiesW(param0: P0, param1: P1, param2: u32, param3: Option<*mut RASSUBENTRYW>, param4: Option<*mut u32>, param5: Option<*mut u8>, param6: Option<*mut u32>) -> u32 @@ -1431,7 +1431,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasGetSubEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : u32, param3 : *mut RASSUBENTRYW, param4 : *mut u32, param5 : *mut u8, param6 : *mut u32) -> u32); - RasGetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, core::mem::transmute(param3.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param4.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(std::ptr::null_mut())), core::mem::transmute(param6.unwrap_or(std::ptr::null_mut()))) + RasGetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, core::mem::transmute(param3.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param4.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param5.unwrap_or(core::ptr::null_mut())), core::mem::transmute(param6.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RasHangUpA(param0: P0) -> u32 @@ -1502,7 +1502,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetAutodialAddressA(param0 : windows_core::PCSTR, param1 : u32, param2 : *const RASAUTODIALENTRYA, param3 : u32, param4 : u32) -> u32); - RasSetAutodialAddressA(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(std::ptr::null())), param3, param4) + RasSetAutodialAddressA(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(core::ptr::null())), param3, param4) } #[inline] pub unsafe fn RasSetAutodialAddressW(param0: P0, param1: u32, param2: Option<*const RASAUTODIALENTRYW>, param3: u32, param4: u32) -> u32 @@ -1510,7 +1510,7 @@ where P0: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetAutodialAddressW(param0 : windows_core::PCWSTR, param1 : u32, param2 : *const RASAUTODIALENTRYW, param3 : u32, param4 : u32) -> u32); - RasSetAutodialAddressW(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(std::ptr::null())), param3, param4) + RasSetAutodialAddressW(param0.param().abi(), param1, core::mem::transmute(param2.unwrap_or(core::ptr::null())), param3, param4) } #[inline] pub unsafe fn RasSetAutodialEnableA(param0: u32, param1: P0) -> u32 @@ -1622,7 +1622,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEntryPropertiesA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : *const RASENTRYA, param3 : u32, param4 : *const u8, param5 : u32) -> u32); - RasSetEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(std::ptr::null())), param5) + RasSetEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::ptr::null())), param5) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -1632,7 +1632,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : *const RASENTRYW, param3 : u32, param4 : *const u8, param5 : u32) -> u32); - RasSetEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(std::ptr::null())), param5) + RasSetEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, core::mem::transmute(param4.unwrap_or(core::ptr::null())), param5) } #[inline] pub unsafe fn RasSetSubEntryPropertiesA(param0: P0, param1: P1, param2: u32, param3: *const RASSUBENTRYA, param4: u32, param5: Option<*const u8>, param6: u32) -> u32 @@ -1641,7 +1641,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetSubEntryPropertiesA(param0 : windows_core::PCSTR, param1 : windows_core::PCSTR, param2 : u32, param3 : *const RASSUBENTRYA, param4 : u32, param5 : *const u8, param6 : u32) -> u32); - RasSetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(std::ptr::null())), param6) + RasSetSubEntryPropertiesA(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(core::ptr::null())), param6) } #[inline] pub unsafe fn RasSetSubEntryPropertiesW(param0: P0, param1: P1, param2: u32, param3: *const RASSUBENTRYW, param4: u32, param5: Option<*const u8>, param6: u32) -> u32 @@ -1650,7 +1650,7 @@ where P1: windows_core::Param, { windows_targets::link!("rasapi32.dll" "system" fn RasSetSubEntryPropertiesW(param0 : windows_core::PCWSTR, param1 : windows_core::PCWSTR, param2 : u32, param3 : *const RASSUBENTRYW, param4 : u32, param5 : *const u8, param6 : u32) -> u32); - RasSetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(std::ptr::null())), param6) + RasSetSubEntryPropertiesW(param0.param().abi(), param1.param().abi(), param2, param3, param4, core::mem::transmute(param5.unwrap_or(core::ptr::null())), param6) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] 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 bbed10ff93..5b3ed4b974 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/Snmp/mod.rs @@ -174,7 +174,7 @@ pub unsafe fn SnmpMgrGetTrapEx(enterprise: *mut AsnObjectIdentifier, agentaddres #[inline] pub unsafe fn SnmpMgrOidToStr(oid: *mut AsnObjectIdentifier, string: Option<*mut windows_core::PSTR>) -> super::super::Foundation::BOOL { windows_targets::link!("mgmtapi.dll" "system" fn SnmpMgrOidToStr(oid : *mut AsnObjectIdentifier, string : *mut windows_core::PSTR) -> super::super::Foundation:: BOOL); - SnmpMgrOidToStr(oid, core::mem::transmute(string.unwrap_or(std::ptr::null_mut()))) + SnmpMgrOidToStr(oid, core::mem::transmute(string.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SnmpMgrOpen(lpagentaddress: P0, lpagentcommunity: P1, ntimeout: i32, nretries: i32) -> *mut core::ffi::c_void diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs index 33184f6d98..971c0fec38 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WNet/mod.rs @@ -33,7 +33,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntlanman.dll" "system" fn NPAddConnection4(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, lpauthbuffer : *const core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32) -> u32); - NPAddConnection4(hwndowner.param().abi(), lpnetresource, core::mem::transmute(lpauthbuffer.unwrap_or(std::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + NPAddConnection4(hwndowner.param().abi(), lpnetresource, core::mem::transmute(lpauthbuffer.unwrap_or(core::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn NPCancelConnection(lpname: P0, fforce: P1) -> u32 @@ -143,7 +143,7 @@ where #[inline] pub unsafe fn NPOpenEnum(dwscope: u32, dwtype: u32, dwusage: u32, lpnetresource: Option<*const NETRESOURCEW>, lphenum: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("davclnt.dll" "system" fn NPOpenEnum(dwscope : u32, dwtype : u32, dwusage : u32, lpnetresource : *const NETRESOURCEW, lphenum : *mut super::super::Foundation:: HANDLE) -> u32); - NPOpenEnum(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(std::ptr::null())), lphenum) + NPOpenEnum(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), lphenum) } #[inline] pub unsafe fn WNetAddConnection2A(lpnetresource: *const NETRESOURCEA, lppassword: P0, lpusername: P1, dwflags: NET_CONNECT_FLAGS) -> super::super::Foundation::WIN32_ERROR @@ -422,12 +422,12 @@ where #[inline] pub unsafe fn WNetOpenEnumA(dwscope: NET_RESOURCE_SCOPE, dwtype: NET_RESOURCE_TYPE, dwusage: WNET_OPEN_ENUM_USAGE, lpnetresource: Option<*const NETRESOURCEA>, lphenum: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetOpenEnumA(dwscope : NET_RESOURCE_SCOPE, dwtype : NET_RESOURCE_TYPE, dwusage : WNET_OPEN_ENUM_USAGE, lpnetresource : *const NETRESOURCEA, lphenum : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - WNetOpenEnumA(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(std::ptr::null())), lphenum) + WNetOpenEnumA(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), lphenum) } #[inline] pub unsafe fn WNetOpenEnumW(dwscope: NET_RESOURCE_SCOPE, dwtype: NET_RESOURCE_TYPE, dwusage: WNET_OPEN_ENUM_USAGE, lpnetresource: Option<*const NETRESOURCEW>, lphenum: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("mpr.dll" "system" fn WNetOpenEnumW(dwscope : NET_RESOURCE_SCOPE, dwtype : NET_RESOURCE_TYPE, dwusage : WNET_OPEN_ENUM_USAGE, lpnetresource : *const NETRESOURCEW, lphenum : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: WIN32_ERROR); - WNetOpenEnumW(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(std::ptr::null())), lphenum) + WNetOpenEnumW(dwscope, dwtype, dwusage, core::mem::transmute(lpnetresource.unwrap_or(core::ptr::null())), lphenum) } #[inline] pub unsafe fn WNetSetLastErrorA(err: u32, lperror: P0, lpproviders: P1) @@ -453,7 +453,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetUseConnection4A(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEA, pauthbuffer : *const core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32, lpaccessname : windows_core::PSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnection4A(hwndowner.param().abi(), lpnetresource, core::mem::transmute(pauthbuffer.unwrap_or(std::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(std::ptr::null_mut()))) + WNetUseConnection4A(hwndowner.param().abi(), lpnetresource, core::mem::transmute(pauthbuffer.unwrap_or(core::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WNetUseConnection4W(hwndowner: P0, lpnetresource: *const NETRESOURCEW, pauthbuffer: Option<*const core::ffi::c_void>, cbauthbuffer: u32, dwflags: u32, lpuseoptions: Option<&[u8]>, lpaccessname: windows_core::PWSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -461,7 +461,7 @@ where P0: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetUseConnection4W(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, pauthbuffer : *const core::ffi::c_void, cbauthbuffer : u32, dwflags : u32, lpuseoptions : *const u8, cbuseoptions : u32, lpaccessname : windows_core::PWSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnection4W(hwndowner.param().abi(), lpnetresource, core::mem::transmute(pauthbuffer.unwrap_or(std::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(std::ptr::null_mut()))) + WNetUseConnection4W(hwndowner.param().abi(), lpnetresource, core::mem::transmute(pauthbuffer.unwrap_or(core::ptr::null())), cbauthbuffer, dwflags, core::mem::transmute(lpuseoptions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpuseoptions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WNetUseConnectionA(hwndowner: P0, lpnetresource: *const NETRESOURCEA, lppassword: P1, lpuserid: P2, dwflags: NET_CONNECT_FLAGS, lpaccessname: windows_core::PSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -471,7 +471,7 @@ where P2: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetUseConnectionA(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEA, lppassword : windows_core::PCSTR, lpuserid : windows_core::PCSTR, dwflags : NET_CONNECT_FLAGS, lpaccessname : windows_core::PSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnectionA(hwndowner.param().abi(), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(std::ptr::null_mut()))) + WNetUseConnectionA(hwndowner.param().abi(), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WNetUseConnectionW(hwndowner: P0, lpnetresource: *const NETRESOURCEW, lppassword: P1, lpuserid: P2, dwflags: NET_CONNECT_FLAGS, lpaccessname: windows_core::PWSTR, lpbuffersize: Option<*mut u32>, lpresult: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -481,7 +481,7 @@ where P2: windows_core::Param, { windows_targets::link!("mpr.dll" "system" fn WNetUseConnectionW(hwndowner : super::super::Foundation:: HWND, lpnetresource : *const NETRESOURCEW, lppassword : windows_core::PCWSTR, lpuserid : windows_core::PCWSTR, dwflags : NET_CONNECT_FLAGS, lpaccessname : windows_core::PWSTR, lpbuffersize : *mut u32, lpresult : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - WNetUseConnectionW(hwndowner.param().abi(), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(std::ptr::null_mut()))) + WNetUseConnectionW(hwndowner.param().abi(), lpnetresource, lppassword.param().abi(), lpuserid.param().abi(), dwflags, core::mem::transmute(lpaccessname), core::mem::transmute(lpbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpresult.unwrap_or(core::ptr::null_mut()))) } pub const CONNDLG_CONN_POINT: CONNECTDLGSTRUCT_FLAGS = CONNECTDLGSTRUCT_FLAGS(2u32); pub const CONNDLG_HIDE_BOX: CONNECTDLGSTRUCT_FLAGS = CONNECTDLGSTRUCT_FLAGS(8u32); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs index 0f8c2b7802..0686d56114 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WiFi/mod.rs @@ -41,7 +41,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WFDStartOpenSession(hclienthandle : super::super::Foundation:: HANDLE, pdeviceaddress : *const *const u8, pvcontext : *const core::ffi::c_void, pfncallback : WFD_OPEN_SESSION_COMPLETE_CALLBACK, phsessionhandle : *mut super::super::Foundation:: HANDLE) -> u32); - WFDStartOpenSession(hclienthandle.param().abi(), pdeviceaddress, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), pfncallback, phsessionhandle) + WFDStartOpenSession(hclienthandle.param().abi(), pdeviceaddress, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), pfncallback, phsessionhandle) } #[inline] pub unsafe fn WFDUpdateDeviceVisibility(pdeviceaddress: *const *const u8) -> u32 { @@ -59,7 +59,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanCloseHandle(hclienthandle : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void) -> u32); - WlanCloseHandle(hclienthandle.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanCloseHandle(hclienthandle.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -68,7 +68,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanConnect(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pconnectionparameters : *const WLAN_CONNECTION_PARAMETERS, preserved : *const core::ffi::c_void) -> u32); - WlanConnect(hclienthandle.param().abi(), pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanConnect(hclienthandle.param().abi(), pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_NetworkManagement_Ndis")] #[inline] @@ -77,7 +77,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanConnect2(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pconnectionparameters : *const WLAN_CONNECTION_PARAMETERS_V2, preserved : *const core::ffi::c_void) -> u32); - WlanConnect2(hclienthandle.param().abi(), pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanConnect2(hclienthandle.param().abi(), pinterfaceguid, pconnectionparameters, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanDeleteProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -86,7 +86,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanDeleteProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, preserved : *const core::ffi::c_void) -> u32); - WlanDeleteProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanDeleteProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanDeviceServiceCommand(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pdeviceserviceguid: *const windows_core::GUID, dwopcode: u32, dwinbuffersize: u32, pinbuffer: Option<*const core::ffi::c_void>, dwoutbuffersize: u32, poutbuffer: Option<*mut core::ffi::c_void>, pdwbytesreturned: *mut u32) -> u32 @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanDeviceServiceCommand(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pdeviceserviceguid : *const windows_core::GUID, dwopcode : u32, dwinbuffersize : u32, pinbuffer : *const core::ffi::c_void, dwoutbuffersize : u32, poutbuffer : *mut core::ffi::c_void, pdwbytesreturned : *mut u32) -> u32); - WlanDeviceServiceCommand(hclienthandle.param().abi(), pinterfaceguid, pdeviceserviceguid, dwopcode, dwinbuffersize, core::mem::transmute(pinbuffer.unwrap_or(std::ptr::null())), dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(std::ptr::null_mut())), pdwbytesreturned) + WlanDeviceServiceCommand(hclienthandle.param().abi(), pinterfaceguid, pdeviceserviceguid, dwopcode, dwinbuffersize, core::mem::transmute(pinbuffer.unwrap_or(core::ptr::null())), dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(core::ptr::null_mut())), pdwbytesreturned) } #[inline] pub unsafe fn WlanDisconnect(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -102,7 +102,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanDisconnect(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, preserved : *const core::ffi::c_void) -> u32); - WlanDisconnect(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanDisconnect(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanEnumInterfaces(hclienthandle: P0, preserved: Option<*const core::ffi::c_void>, ppinterfacelist: *mut *mut WLAN_INTERFACE_INFO_LIST) -> u32 @@ -110,7 +110,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanEnumInterfaces(hclienthandle : super::super::Foundation:: HANDLE, preserved : *const core::ffi::c_void, ppinterfacelist : *mut *mut WLAN_INTERFACE_INFO_LIST) -> u32); - WlanEnumInterfaces(hclienthandle.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppinterfacelist) + WlanEnumInterfaces(hclienthandle.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppinterfacelist) } #[inline] pub unsafe fn WlanExtractPsdIEDataList(hclienthandle: P0, prawiedata: &[u8], strformat: P1, preserved: Option<*const core::ffi::c_void>, pppsdiedatalist: *mut *mut WLAN_RAW_DATA_LIST) -> u32 @@ -119,7 +119,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanExtractPsdIEDataList(hclienthandle : super::super::Foundation:: HANDLE, dwiedatasize : u32, prawiedata : *const u8, strformat : windows_core::PCWSTR, preserved : *const core::ffi::c_void, pppsdiedatalist : *mut *mut WLAN_RAW_DATA_LIST) -> u32); - WlanExtractPsdIEDataList(hclienthandle.param().abi(), prawiedata.len().try_into().unwrap(), core::mem::transmute(prawiedata.as_ptr()), strformat.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pppsdiedatalist) + WlanExtractPsdIEDataList(hclienthandle.param().abi(), prawiedata.len().try_into().unwrap(), core::mem::transmute(prawiedata.as_ptr()), strformat.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pppsdiedatalist) } #[inline] pub unsafe fn WlanFreeMemory(pmemory: *const core::ffi::c_void) { @@ -132,7 +132,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetAvailableNetworkList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, dwflags : u32, preserved : *const core::ffi::c_void, ppavailablenetworklist : *mut *mut WLAN_AVAILABLE_NETWORK_LIST) -> u32); - WlanGetAvailableNetworkList(hclienthandle.param().abi(), pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppavailablenetworklist) + WlanGetAvailableNetworkList(hclienthandle.param().abi(), pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppavailablenetworklist) } #[inline] pub unsafe fn WlanGetAvailableNetworkList2(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, dwflags: u32, preserved: Option<*const core::ffi::c_void>, ppavailablenetworklist: *mut *mut WLAN_AVAILABLE_NETWORK_LIST_V2) -> u32 @@ -140,7 +140,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetAvailableNetworkList2(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, dwflags : u32, preserved : *const core::ffi::c_void, ppavailablenetworklist : *mut *mut WLAN_AVAILABLE_NETWORK_LIST_V2) -> u32); - WlanGetAvailableNetworkList2(hclienthandle.param().abi(), pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppavailablenetworklist) + WlanGetAvailableNetworkList2(hclienthandle.param().abi(), pinterfaceguid, dwflags, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppavailablenetworklist) } #[inline] pub unsafe fn WlanGetFilterList(hclienthandle: P0, wlanfilterlisttype: WLAN_FILTER_LIST_TYPE, preserved: Option<*const core::ffi::c_void>, ppnetworklist: *mut *mut DOT11_NETWORK_LIST) -> u32 @@ -148,7 +148,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetFilterList(hclienthandle : super::super::Foundation:: HANDLE, wlanfilterlisttype : WLAN_FILTER_LIST_TYPE, preserved : *const core::ffi::c_void, ppnetworklist : *mut *mut DOT11_NETWORK_LIST) -> u32); - WlanGetFilterList(hclienthandle.param().abi(), wlanfilterlisttype, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppnetworklist) + WlanGetFilterList(hclienthandle.param().abi(), wlanfilterlisttype, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppnetworklist) } #[inline] pub unsafe fn WlanGetInterfaceCapability(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>, ppcapability: *mut *mut WLAN_INTERFACE_CAPABILITY) -> u32 @@ -156,7 +156,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetInterfaceCapability(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, preserved : *const core::ffi::c_void, ppcapability : *mut *mut WLAN_INTERFACE_CAPABILITY) -> u32); - WlanGetInterfaceCapability(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppcapability) + WlanGetInterfaceCapability(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppcapability) } #[inline] pub unsafe fn WlanGetNetworkBssList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, dot11bsstype: DOT11_BSS_TYPE, bsecurityenabled: P1, preserved: Option<*const core::ffi::c_void>, ppwlanbsslist: *mut *mut WLAN_BSS_LIST) -> u32 @@ -165,7 +165,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetNetworkBssList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pdot11ssid : *const DOT11_SSID, dot11bsstype : DOT11_BSS_TYPE, bsecurityenabled : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void, ppwlanbsslist : *mut *mut WLAN_BSS_LIST) -> u32); - WlanGetNetworkBssList(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(pdot11ssid.unwrap_or(std::ptr::null())), dot11bsstype, bsecurityenabled.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppwlanbsslist) + WlanGetNetworkBssList(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(pdot11ssid.unwrap_or(core::ptr::null())), dot11bsstype, bsecurityenabled.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppwlanbsslist) } #[inline] pub unsafe fn WlanGetProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, preserved: Option<*const core::ffi::c_void>, pstrprofilexml: *mut windows_core::PWSTR, pdwflags: Option<*mut u32>, pdwgrantedaccess: Option<*mut u32>) -> u32 @@ -174,7 +174,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, preserved : *const core::ffi::c_void, pstrprofilexml : *mut windows_core::PWSTR, pdwflags : *mut u32, pdwgrantedaccess : *mut u32) -> u32); - WlanGetProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pstrprofilexml, core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + WlanGetProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pstrprofilexml, core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WlanGetProfileCustomUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut u8) -> u32 @@ -183,7 +183,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetProfileCustomUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, preserved : *const core::ffi::c_void, pdwdatasize : *mut u32, ppdata : *mut *mut u8) -> u32); - WlanGetProfileCustomUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwdatasize, ppdata) + WlanGetProfileCustomUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwdatasize, ppdata) } #[inline] pub unsafe fn WlanGetProfileList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, preserved: Option<*const core::ffi::c_void>, ppprofilelist: *mut *mut WLAN_PROFILE_INFO_LIST) -> u32 @@ -191,7 +191,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetProfileList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, preserved : *const core::ffi::c_void, ppprofilelist : *mut *mut WLAN_PROFILE_INFO_LIST) -> u32); - WlanGetProfileList(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppprofilelist) + WlanGetProfileList(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppprofilelist) } #[inline] pub unsafe fn WlanGetSecuritySettings(hclienthandle: P0, securableobject: WLAN_SECURABLE_OBJECT, pvaluetype: Option<*mut WLAN_OPCODE_VALUE_TYPE>, pstrcurrentsddl: *mut windows_core::PWSTR, pdwgrantedaccess: *mut u32) -> u32 @@ -199,7 +199,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanGetSecuritySettings(hclienthandle : super::super::Foundation:: HANDLE, securableobject : WLAN_SECURABLE_OBJECT, pvaluetype : *mut WLAN_OPCODE_VALUE_TYPE, pstrcurrentsddl : *mut windows_core::PWSTR, pdwgrantedaccess : *mut u32) -> u32); - WlanGetSecuritySettings(hclienthandle.param().abi(), securableobject, core::mem::transmute(pvaluetype.unwrap_or(std::ptr::null_mut())), pstrcurrentsddl, pdwgrantedaccess) + WlanGetSecuritySettings(hclienthandle.param().abi(), securableobject, core::mem::transmute(pvaluetype.unwrap_or(core::ptr::null_mut())), pstrcurrentsddl, pdwgrantedaccess) } #[inline] pub unsafe fn WlanGetSupportedDeviceServices(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, ppdevsvcguidlist: *mut *mut WLAN_DEVICE_SERVICE_GUID_LIST) -> u32 @@ -215,7 +215,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkForceStart(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkForceStart(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkForceStart(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkForceStop(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -223,7 +223,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkForceStop(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkForceStop(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkForceStop(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkInitSettings(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -231,7 +231,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkInitSettings(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkInitSettings(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkInitSettings(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkQueryProperty(hclienthandle: P0, opcode: WLAN_HOSTED_NETWORK_OPCODE, pdwdatasize: *mut u32, ppvdata: *mut *mut core::ffi::c_void, pwlanopcodevaluetype: *mut WLAN_OPCODE_VALUE_TYPE, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -239,7 +239,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkQueryProperty(hclienthandle : super::super::Foundation:: HANDLE, opcode : WLAN_HOSTED_NETWORK_OPCODE, pdwdatasize : *mut u32, ppvdata : *mut *mut core::ffi::c_void, pwlanopcodevaluetype : *mut WLAN_OPCODE_VALUE_TYPE, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkQueryProperty(hclienthandle.param().abi(), opcode, pdwdatasize, ppvdata, pwlanopcodevaluetype, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkQueryProperty(hclienthandle.param().abi(), opcode, pdwdatasize, ppvdata, pwlanopcodevaluetype, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkQuerySecondaryKey(hclienthandle: P0, pdwkeylength: *mut u32, ppuckeydata: *mut *mut u8, pbispassphrase: *mut super::super::Foundation::BOOL, pbpersistent: *mut super::super::Foundation::BOOL, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -247,7 +247,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkQuerySecondaryKey(hclienthandle : super::super::Foundation:: HANDLE, pdwkeylength : *mut u32, ppuckeydata : *mut *mut u8, pbispassphrase : *mut super::super::Foundation:: BOOL, pbpersistent : *mut super::super::Foundation:: BOOL, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkQuerySecondaryKey(hclienthandle.param().abi(), pdwkeylength, ppuckeydata, pbispassphrase, pbpersistent, core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkQuerySecondaryKey(hclienthandle.param().abi(), pdwkeylength, ppuckeydata, pbispassphrase, pbpersistent, core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkQueryStatus(hclienthandle: P0, ppwlanhostednetworkstatus: *mut *mut WLAN_HOSTED_NETWORK_STATUS, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -255,7 +255,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkQueryStatus(hclienthandle : super::super::Foundation:: HANDLE, ppwlanhostednetworkstatus : *mut *mut WLAN_HOSTED_NETWORK_STATUS, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkQueryStatus(hclienthandle.param().abi(), ppwlanhostednetworkstatus, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkQueryStatus(hclienthandle.param().abi(), ppwlanhostednetworkstatus, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkRefreshSecuritySettings(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -263,7 +263,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkRefreshSecuritySettings(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkRefreshSecuritySettings(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkRefreshSecuritySettings(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkSetProperty(hclienthandle: P0, opcode: WLAN_HOSTED_NETWORK_OPCODE, dwdatasize: u32, pvdata: *const core::ffi::c_void, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -271,7 +271,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkSetProperty(hclienthandle : super::super::Foundation:: HANDLE, opcode : WLAN_HOSTED_NETWORK_OPCODE, dwdatasize : u32, pvdata : *const core::ffi::c_void, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkSetProperty(hclienthandle.param().abi(), opcode, dwdatasize, pvdata, core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkSetProperty(hclienthandle.param().abi(), opcode, dwdatasize, pvdata, core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkSetSecondaryKey(hclienthandle: P0, puckeydata: &[u8], bispassphrase: P1, bpersistent: P2, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -281,7 +281,7 @@ where P2: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkSetSecondaryKey(hclienthandle : super::super::Foundation:: HANDLE, dwkeylength : u32, puckeydata : *const u8, bispassphrase : super::super::Foundation:: BOOL, bpersistent : super::super::Foundation:: BOOL, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkSetSecondaryKey(hclienthandle.param().abi(), puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.param().abi(), bpersistent.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkSetSecondaryKey(hclienthandle.param().abi(), puckeydata.len().try_into().unwrap(), core::mem::transmute(puckeydata.as_ptr()), bispassphrase.param().abi(), bpersistent.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkStartUsing(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -289,7 +289,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkStartUsing(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkStartUsing(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkStartUsing(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanHostedNetworkStopUsing(hclienthandle: P0, pfailreason: Option<*mut WLAN_HOSTED_NETWORK_REASON>, pvreserved: Option<*const core::ffi::c_void>) -> u32 @@ -297,7 +297,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanHostedNetworkStopUsing(hclienthandle : super::super::Foundation:: HANDLE, pfailreason : *mut WLAN_HOSTED_NETWORK_REASON, pvreserved : *const core::ffi::c_void) -> u32); - WlanHostedNetworkStopUsing(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + WlanHostedNetworkStopUsing(hclienthandle.param().abi(), core::mem::transmute(pfailreason.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanIhvControl(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, r#type: WLAN_IHV_CONTROL_TYPE, dwinbuffersize: u32, pinbuffer: *const core::ffi::c_void, dwoutbuffersize: u32, poutbuffer: Option<*mut core::ffi::c_void>, pdwbytesreturned: *mut u32) -> u32 @@ -305,12 +305,12 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanIhvControl(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, r#type : WLAN_IHV_CONTROL_TYPE, dwinbuffersize : u32, pinbuffer : *const core::ffi::c_void, dwoutbuffersize : u32, poutbuffer : *mut core::ffi::c_void, pdwbytesreturned : *mut u32) -> u32); - WlanIhvControl(hclienthandle.param().abi(), pinterfaceguid, r#type, dwinbuffersize, pinbuffer, dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(std::ptr::null_mut())), pdwbytesreturned) + WlanIhvControl(hclienthandle.param().abi(), pinterfaceguid, r#type, dwinbuffersize, pinbuffer, dwoutbuffersize, core::mem::transmute(poutbuffer.unwrap_or(core::ptr::null_mut())), pdwbytesreturned) } #[inline] pub unsafe fn WlanOpenHandle(dwclientversion: u32, preserved: Option<*const core::ffi::c_void>, pdwnegotiatedversion: *mut u32, phclienthandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanOpenHandle(dwclientversion : u32, preserved : *const core::ffi::c_void, pdwnegotiatedversion : *mut u32, phclienthandle : *mut super::super::Foundation:: HANDLE) -> u32); - WlanOpenHandle(dwclientversion, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwnegotiatedversion, phclienthandle) + WlanOpenHandle(dwclientversion, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwnegotiatedversion, phclienthandle) } #[inline] pub unsafe fn WlanQueryAutoConfigParameter(hclienthandle: P0, opcode: WLAN_AUTOCONF_OPCODE, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut core::ffi::c_void, pwlanopcodevaluetype: Option<*mut WLAN_OPCODE_VALUE_TYPE>) -> u32 @@ -318,7 +318,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanQueryAutoConfigParameter(hclienthandle : super::super::Foundation:: HANDLE, opcode : WLAN_AUTOCONF_OPCODE, preserved : *const core::ffi::c_void, pdwdatasize : *mut u32, ppdata : *mut *mut core::ffi::c_void, pwlanopcodevaluetype : *mut WLAN_OPCODE_VALUE_TYPE) -> u32); - WlanQueryAutoConfigParameter(hclienthandle.param().abi(), opcode, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwdatasize, ppdata, core::mem::transmute(pwlanopcodevaluetype.unwrap_or(std::ptr::null_mut()))) + WlanQueryAutoConfigParameter(hclienthandle.param().abi(), opcode, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwdatasize, ppdata, core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WlanQueryInterface(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, opcode: WLAN_INTF_OPCODE, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut core::ffi::c_void, pwlanopcodevaluetype: Option<*mut WLAN_OPCODE_VALUE_TYPE>) -> u32 @@ -326,12 +326,12 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanQueryInterface(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, opcode : WLAN_INTF_OPCODE, preserved : *const core::ffi::c_void, pdwdatasize : *mut u32, ppdata : *mut *mut core::ffi::c_void, pwlanopcodevaluetype : *mut WLAN_OPCODE_VALUE_TYPE) -> u32); - WlanQueryInterface(hclienthandle.param().abi(), pinterfaceguid, opcode, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwdatasize, ppdata, core::mem::transmute(pwlanopcodevaluetype.unwrap_or(std::ptr::null_mut()))) + WlanQueryInterface(hclienthandle.param().abi(), pinterfaceguid, opcode, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwdatasize, ppdata, core::mem::transmute(pwlanopcodevaluetype.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WlanReasonCodeToString(dwreasoncode: u32, pstringbuffer: &[u16], preserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("wlanapi.dll" "system" fn WlanReasonCodeToString(dwreasoncode : u32, dwbuffersize : u32, pstringbuffer : windows_core::PCWSTR, preserved : *const core::ffi::c_void) -> u32); - WlanReasonCodeToString(dwreasoncode, pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanReasonCodeToString(dwreasoncode, pstringbuffer.len().try_into().unwrap(), core::mem::transmute(pstringbuffer.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanRegisterDeviceServiceNotification(hclienthandle: P0, pdevsvcguidlist: Option<*const WLAN_DEVICE_SERVICE_GUID_LIST>) -> u32 @@ -339,7 +339,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanRegisterDeviceServiceNotification(hclienthandle : super::super::Foundation:: HANDLE, pdevsvcguidlist : *const WLAN_DEVICE_SERVICE_GUID_LIST) -> u32); - WlanRegisterDeviceServiceNotification(hclienthandle.param().abi(), core::mem::transmute(pdevsvcguidlist.unwrap_or(std::ptr::null()))) + WlanRegisterDeviceServiceNotification(hclienthandle.param().abi(), core::mem::transmute(pdevsvcguidlist.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanRegisterNotification(hclienthandle: P0, dwnotifsource: WLAN_NOTIFICATION_SOURCES, bignoreduplicate: P1, funccallback: WLAN_NOTIFICATION_CALLBACK, pcallbackcontext: Option<*const core::ffi::c_void>, preserved: Option<*const core::ffi::c_void>, pdwprevnotifsource: Option<*mut u32>) -> u32 @@ -348,7 +348,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanRegisterNotification(hclienthandle : super::super::Foundation:: HANDLE, dwnotifsource : WLAN_NOTIFICATION_SOURCES, bignoreduplicate : super::super::Foundation:: BOOL, funccallback : WLAN_NOTIFICATION_CALLBACK, pcallbackcontext : *const core::ffi::c_void, preserved : *const core::ffi::c_void, pdwprevnotifsource : *mut u32) -> u32); - WlanRegisterNotification(hclienthandle.param().abi(), dwnotifsource, bignoreduplicate.param().abi(), funccallback, core::mem::transmute(pcallbackcontext.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), core::mem::transmute(pdwprevnotifsource.unwrap_or(std::ptr::null_mut()))) + WlanRegisterNotification(hclienthandle.param().abi(), dwnotifsource, bignoreduplicate.param().abi(), funccallback, core::mem::transmute(pcallbackcontext.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwprevnotifsource.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WlanRegisterVirtualStationNotification(hclienthandle: P0, bregister: P1, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -357,7 +357,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanRegisterVirtualStationNotification(hclienthandle : super::super::Foundation:: HANDLE, bregister : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WlanRegisterVirtualStationNotification(hclienthandle.param().abi(), bregister.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanRegisterVirtualStationNotification(hclienthandle.param().abi(), bregister.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanRenameProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, stroldprofilename: P1, strnewprofilename: P2, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -367,7 +367,7 @@ where P2: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanRenameProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, stroldprofilename : windows_core::PCWSTR, strnewprofilename : windows_core::PCWSTR, preserved : *const core::ffi::c_void) -> u32); - WlanRenameProfile(hclienthandle.param().abi(), pinterfaceguid, stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanRenameProfile(hclienthandle.param().abi(), pinterfaceguid, stroldprofilename.param().abi(), strnewprofilename.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSaveTemporaryProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, stralluserprofilesecurity: P2, dwflags: u32, boverwrite: P3, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -378,7 +378,7 @@ where P3: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSaveTemporaryProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, stralluserprofilesecurity : windows_core::PCWSTR, dwflags : u32, boverwrite : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WlanSaveTemporaryProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), dwflags, boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSaveTemporaryProfile(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), stralluserprofilesecurity.param().abi(), dwflags, boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanScan(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, pdot11ssid: Option<*const DOT11_SSID>, piedata: Option<*const WLAN_RAW_DATA>, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -386,7 +386,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanScan(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, pdot11ssid : *const DOT11_SSID, piedata : *const WLAN_RAW_DATA, preserved : *const core::ffi::c_void) -> u32); - WlanScan(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(pdot11ssid.unwrap_or(std::ptr::null())), core::mem::transmute(piedata.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanScan(hclienthandle.param().abi(), pinterfaceguid, core::mem::transmute(pdot11ssid.unwrap_or(core::ptr::null())), core::mem::transmute(piedata.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetAutoConfigParameter(hclienthandle: P0, opcode: WLAN_AUTOCONF_OPCODE, dwdatasize: u32, pdata: *const core::ffi::c_void, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -394,7 +394,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetAutoConfigParameter(hclienthandle : super::super::Foundation:: HANDLE, opcode : WLAN_AUTOCONF_OPCODE, dwdatasize : u32, pdata : *const core::ffi::c_void, preserved : *const core::ffi::c_void) -> u32); - WlanSetAutoConfigParameter(hclienthandle.param().abi(), opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetAutoConfigParameter(hclienthandle.param().abi(), opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetFilterList(hclienthandle: P0, wlanfilterlisttype: WLAN_FILTER_LIST_TYPE, pnetworklist: Option<*const DOT11_NETWORK_LIST>, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -402,7 +402,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetFilterList(hclienthandle : super::super::Foundation:: HANDLE, wlanfilterlisttype : WLAN_FILTER_LIST_TYPE, pnetworklist : *const DOT11_NETWORK_LIST, preserved : *const core::ffi::c_void) -> u32); - WlanSetFilterList(hclienthandle.param().abi(), wlanfilterlisttype, core::mem::transmute(pnetworklist.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetFilterList(hclienthandle.param().abi(), wlanfilterlisttype, core::mem::transmute(pnetworklist.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetInterface(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, opcode: WLAN_INTF_OPCODE, dwdatasize: u32, pdata: *const core::ffi::c_void, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -410,7 +410,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetInterface(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, opcode : WLAN_INTF_OPCODE, dwdatasize : u32, pdata : *const core::ffi::c_void, preserved : *const core::ffi::c_void) -> u32); - WlanSetInterface(hclienthandle.param().abi(), pinterfaceguid, opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetInterface(hclienthandle.param().abi(), pinterfaceguid, opcode, dwdatasize, pdata, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetProfile(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, dwflags: u32, strprofilexml: P1, stralluserprofilesecurity: P2, boverwrite: P3, preserved: Option<*const core::ffi::c_void>, pdwreasoncode: *mut u32) -> u32 @@ -421,7 +421,7 @@ where P3: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfile(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, dwflags : u32, strprofilexml : windows_core::PCWSTR, stralluserprofilesecurity : windows_core::PCWSTR, boverwrite : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void, pdwreasoncode : *mut u32) -> u32); - WlanSetProfile(hclienthandle.param().abi(), pinterfaceguid, dwflags, strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwreasoncode) + WlanSetProfile(hclienthandle.param().abi(), pinterfaceguid, dwflags, strprofilexml.param().abi(), stralluserprofilesecurity.param().abi(), boverwrite.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwreasoncode) } #[inline] pub unsafe fn WlanSetProfileCustomUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, pdata: &[u8], preserved: Option<*const core::ffi::c_void>) -> u32 @@ -430,7 +430,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileCustomUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, dwdatasize : u32, pdata : *const u8, preserved : *const core::ffi::c_void) -> u32); - WlanSetProfileCustomUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetProfileCustomUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), pdata.len().try_into().unwrap(), core::mem::transmute(pdata.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security_ExtensibleAuthenticationProtocol")] #[inline] @@ -440,7 +440,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileEapUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, eaptype : super::super::Security::ExtensibleAuthenticationProtocol:: EAP_METHOD_TYPE, dwflags : WLAN_SET_EAPHOST_FLAGS, dweapuserdatasize : u32, pbeapuserdata : *const u8, preserved : *const core::ffi::c_void) -> u32); - WlanSetProfileEapUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbeapuserdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetProfileEapUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), core::mem::transmute(eaptype), dwflags, pbeapuserdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbeapuserdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetProfileEapXmlUserData(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, dwflags: WLAN_SET_EAPHOST_FLAGS, streapxmluserdata: P2, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -450,7 +450,7 @@ where P2: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileEapXmlUserData(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, dwflags : WLAN_SET_EAPHOST_FLAGS, streapxmluserdata : windows_core::PCWSTR, preserved : *const core::ffi::c_void) -> u32); - WlanSetProfileEapXmlUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), dwflags, streapxmluserdata.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetProfileEapXmlUserData(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), dwflags, streapxmluserdata.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetProfileList(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilenames: &[windows_core::PCWSTR], preserved: Option<*const core::ffi::c_void>) -> u32 @@ -458,7 +458,7 @@ where P0: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfileList(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, dwitems : u32, strprofilenames : *const windows_core::PCWSTR, preserved : *const core::ffi::c_void) -> u32); - WlanSetProfileList(hclienthandle.param().abi(), pinterfaceguid, strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetProfileList(hclienthandle.param().abi(), pinterfaceguid, strprofilenames.len().try_into().unwrap(), core::mem::transmute(strprofilenames.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetProfilePosition(hclienthandle: P0, pinterfaceguid: *const windows_core::GUID, strprofilename: P1, dwposition: u32, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -467,7 +467,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetProfilePosition(hclienthandle : super::super::Foundation:: HANDLE, pinterfaceguid : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, dwposition : u32, preserved : *const core::ffi::c_void) -> u32); - WlanSetProfilePosition(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), dwposition, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetProfilePosition(hclienthandle.param().abi(), pinterfaceguid, strprofilename.param().abi(), dwposition, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetPsdIEDataList(hclienthandle: P0, strformat: P1, ppsdiedatalist: Option<*const WLAN_RAW_DATA_LIST>, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -476,7 +476,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanapi.dll" "system" fn WlanSetPsdIEDataList(hclienthandle : super::super::Foundation:: HANDLE, strformat : windows_core::PCWSTR, ppsdiedatalist : *const WLAN_RAW_DATA_LIST, preserved : *const core::ffi::c_void) -> u32); - WlanSetPsdIEDataList(hclienthandle.param().abi(), strformat.param().abi(), core::mem::transmute(ppsdiedatalist.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WlanSetPsdIEDataList(hclienthandle.param().abi(), strformat.param().abi(), core::mem::transmute(ppsdiedatalist.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WlanSetSecuritySettings(hclienthandle: P0, securableobject: WLAN_SECURABLE_OBJECT, strmodifiedsddl: P1) -> u32 @@ -494,7 +494,7 @@ where P1: windows_core::Param, { windows_targets::link!("wlanui.dll" "system" fn WlanUIEditProfile(dwclientversion : u32, wstrprofilename : windows_core::PCWSTR, pinterfaceguid : *const windows_core::GUID, hwnd : super::super::Foundation:: HWND, wlstartpage : WL_DISPLAY_PAGES, preserved : *const core::ffi::c_void, pwlanreasoncode : *mut u32) -> u32); - WlanUIEditProfile(dwclientversion, wstrprofilename.param().abi(), pinterfaceguid, hwnd.param().abi(), wlstartpage, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), core::mem::transmute(pwlanreasoncode.unwrap_or(std::ptr::null_mut()))) + WlanUIEditProfile(dwclientversion, wstrprofilename.param().abi(), pinterfaceguid, hwnd.param().abi(), wlstartpage, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pwlanreasoncode.unwrap_or(core::ptr::null_mut()))) } windows_core::imp::define_interface!(IDot11AdHocInterface, IDot11AdHocInterface_Vtbl, 0x8f10cc2b_cf0d_42a0_acbe_e2de7007384d); impl core::ops::Deref for IDot11AdHocInterface { diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs index 565f74a2f9..05cd8307fe 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsConnectionManager/mod.rs @@ -26,7 +26,7 @@ where pub unsafe fn OnDemandRegisterNotification(callback: ONDEMAND_NOTIFICATION_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("ondemandconnroutehelper.dll" "system" fn OnDemandRegisterNotification(callback : ONDEMAND_NOTIFICATION_CALLBACK, callbackcontext : *const core::ffi::c_void, registrationhandle : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - OnDemandRegisterNotification(callback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + OnDemandRegisterNotification(callback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn OnDemandUnRegisterNotification(registrationhandle: P0) -> windows_core::Result<()> @@ -44,7 +44,7 @@ pub unsafe fn WcmFreeMemory(pmemory: *mut core::ffi::c_void) { #[inline] pub unsafe fn WcmGetProfileList(preserved: Option<*const core::ffi::c_void>, ppprofilelist: *mut *mut WCM_PROFILE_INFO_LIST) -> u32 { windows_targets::link!("wcmapi.dll" "system" fn WcmGetProfileList(preserved : *const core::ffi::c_void, ppprofilelist : *mut *mut WCM_PROFILE_INFO_LIST) -> u32); - WcmGetProfileList(core::mem::transmute(preserved.unwrap_or(std::ptr::null())), ppprofilelist) + WcmGetProfileList(core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ppprofilelist) } #[inline] pub unsafe fn WcmQueryProperty(pinterface: Option<*const windows_core::GUID>, strprofilename: P0, property: WCM_PROPERTY, preserved: Option<*const core::ffi::c_void>, pdwdatasize: *mut u32, ppdata: *mut *mut u8) -> u32 @@ -52,7 +52,7 @@ where P0: windows_core::Param, { windows_targets::link!("wcmapi.dll" "system" fn WcmQueryProperty(pinterface : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, property : WCM_PROPERTY, preserved : *const core::ffi::c_void, pdwdatasize : *mut u32, ppdata : *mut *mut u8) -> u32); - WcmQueryProperty(core::mem::transmute(pinterface.unwrap_or(std::ptr::null())), strprofilename.param().abi(), property, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pdwdatasize, ppdata) + WcmQueryProperty(core::mem::transmute(pinterface.unwrap_or(core::ptr::null())), strprofilename.param().abi(), property, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pdwdatasize, ppdata) } #[inline] pub unsafe fn WcmSetProfileList(pprofilelist: *const WCM_PROFILE_INFO_LIST, dwposition: u32, fignoreunknownprofiles: P0, preserved: Option<*const core::ffi::c_void>) -> u32 @@ -60,7 +60,7 @@ where P0: windows_core::Param, { windows_targets::link!("wcmapi.dll" "system" fn WcmSetProfileList(pprofilelist : *const WCM_PROFILE_INFO_LIST, dwposition : u32, fignoreunknownprofiles : super::super::Foundation:: BOOL, preserved : *const core::ffi::c_void) -> u32); - WcmSetProfileList(pprofilelist, dwposition, fignoreunknownprofiles.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))) + WcmSetProfileList(pprofilelist, dwposition, fignoreunknownprofiles.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WcmSetProperty(pinterface: Option<*const windows_core::GUID>, strprofilename: P0, property: WCM_PROPERTY, preserved: Option<*const core::ffi::c_void>, pbdata: Option<&[u8]>) -> u32 @@ -68,7 +68,7 @@ where P0: windows_core::Param, { windows_targets::link!("wcmapi.dll" "system" fn WcmSetProperty(pinterface : *const windows_core::GUID, strprofilename : windows_core::PCWSTR, property : WCM_PROPERTY, preserved : *const core::ffi::c_void, dwdatasize : u32, pbdata : *const u8) -> u32); - WcmSetProperty(core::mem::transmute(pinterface.unwrap_or(std::ptr::null())), strprofilename.param().abi(), property, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + WcmSetProperty(core::mem::transmute(pinterface.unwrap_or(core::ptr::null())), strprofilename.param().abi(), property, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } pub const NET_INTERFACE_FLAG_CONNECT_IF_NEEDED: u32 = 1u32; pub const NET_INTERFACE_FLAG_NONE: u32 = 0u32; diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs index fac0d11a37..acd76cffd8 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFilteringPlatform/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutAdd0(enginehandle : super::super::Foundation:: HANDLE, callout : *const FWPM_CALLOUT0, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u32) -> u32); - FwpmCalloutAdd0(enginehandle.param().abi(), callout, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmCalloutAdd0(enginehandle.param().abi(), callout, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FwpmCalloutCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_CALLOUT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -14,7 +14,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_CALLOUT_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmCalloutCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmCalloutCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmCalloutDeleteById0(enginehandle: P0, id: u32) -> u32 @@ -72,7 +72,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmCalloutGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmCalloutGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -81,7 +81,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmCalloutSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmCalloutSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmCalloutSubscribeChanges0(enginehandle: P0, subscription: *const FWPM_CALLOUT_SUBSCRIPTION0, callback: FWPM_CALLOUT_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -89,7 +89,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmCalloutSubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_CALLOUT_SUBSCRIPTION0, callback : FWPM_CALLOUT_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmCalloutSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmCalloutSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[inline] pub unsafe fn FwpmCalloutSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_CALLOUT_SUBSCRIPTION0, numentries: *mut u32) -> u32 @@ -113,7 +113,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_CONNECTION_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmConnectionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmConnectionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmConnectionDestroyEnumHandle0(enginehandle: P0, enumhandle: P1) -> u32 @@ -157,7 +157,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmConnectionSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmConnectionSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmConnectionSubscribe0(enginehandle: P0, subscription: *const FWPM_CONNECTION_SUBSCRIPTION0, callback: FWPM_CONNECTION_CALLBACK0, context: Option<*const core::ffi::c_void>, eventshandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -165,7 +165,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmConnectionSubscribe0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_CONNECTION_SUBSCRIPTION0, callback : FWPM_CONNECTION_CALLBACK0, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmConnectionSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmConnectionSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[inline] pub unsafe fn FwpmConnectionUnsubscribe0(enginehandle: P0, eventshandle: super::super::Foundation::HANDLE) -> u32 @@ -178,7 +178,7 @@ where #[inline] pub unsafe fn FwpmDynamicKeywordSubscribe0(flags: u32, callback: FWPM_DYNAMIC_KEYWORD_CALLBACK0, context: Option<*const core::ffi::c_void>, subscriptionhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmDynamicKeywordSubscribe0(flags : u32, callback : FWPM_DYNAMIC_KEYWORD_CALLBACK0, context : *const core::ffi::c_void, subscriptionhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmDynamicKeywordSubscribe0(flags, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), subscriptionhandle) + FwpmDynamicKeywordSubscribe0(flags, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), subscriptionhandle) } #[inline] pub unsafe fn FwpmDynamicKeywordUnsubscribe0(subscriptionhandle: P0) -> u32 @@ -218,7 +218,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineOpen0(servername : windows_core::PCWSTR, authnservice : u32, authidentity : *const super::super::System::Rpc:: SEC_WINNT_AUTH_IDENTITY_W, session : *const FWPM_SESSION0, enginehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), core::mem::transmute(session.unwrap_or(std::ptr::null())), enginehandle) + FwpmEngineOpen0(servername.param().abi(), authnservice, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), core::mem::transmute(session.unwrap_or(core::ptr::null())), enginehandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -236,7 +236,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmEngineSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmEngineSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmEngineSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -246,7 +246,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterAdd0(enginehandle : super::super::Foundation:: HANDLE, filter : *const FWPM_FILTER0, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> u32); - FwpmFilterAdd0(enginehandle.param().abi(), filter, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmFilterAdd0(enginehandle.param().abi(), filter, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -255,7 +255,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_FILTER_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmFilterCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmFilterCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmFilterDeleteById0(enginehandle: P0, id: u64) -> u32 @@ -316,7 +316,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmFilterGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmFilterGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -325,7 +325,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmFilterSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmFilterSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -334,7 +334,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmFilterSubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_FILTER_SUBSCRIPTION0, callback : FWPM_FILTER_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmFilterSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmFilterSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -374,7 +374,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd0(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT0, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT0, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd0(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) + FwpmIPsecTunnelAdd0(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), sd.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -384,7 +384,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd1(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT1, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT1, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd1(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd1(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -394,7 +394,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd2(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT2, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT2, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd2(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd2(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -404,7 +404,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmIPsecTunnelAdd3(enginehandle : super::super::Foundation:: HANDLE, flags : u32, mainmodepolicy : *const FWPM_PROVIDER_CONTEXT3, tunnelpolicy : *const FWPM_PROVIDER_CONTEXT3, numfilterconditions : u32, filterconditions : *const FWPM_FILTER_CONDITION0, keymodkey : *const windows_core::GUID, sd : super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmIPsecTunnelAdd3(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(std::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(std::ptr::null())), sd.param().abi()) + FwpmIPsecTunnelAdd3(enginehandle.param().abi(), flags, core::mem::transmute(mainmodepolicy.unwrap_or(core::ptr::null())), tunnelpolicy, filterconditions.len().try_into().unwrap(), core::mem::transmute(filterconditions.as_ptr()), core::mem::transmute(keymodkey.unwrap_or(core::ptr::null())), sd.param().abi()) } #[inline] pub unsafe fn FwpmIPsecTunnelDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 @@ -420,7 +420,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_LAYER_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmLayerDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 @@ -462,7 +462,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -471,7 +471,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmLayerSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -480,7 +480,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_NET_EVENT_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmNetEventCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmNetEventDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 @@ -557,7 +557,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscribe0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_NET_EVENT_SUBSCRIPTION0, callback : FWPM_NET_EVENT_CALLBACK0, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmNetEventSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -566,7 +566,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscribe1(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_NET_EVENT_SUBSCRIPTION0, callback : FWPM_NET_EVENT_CALLBACK1, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventSubscribe1(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmNetEventSubscribe1(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -575,7 +575,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscribe2(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_NET_EVENT_SUBSCRIPTION0, callback : FWPM_NET_EVENT_CALLBACK2, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventSubscribe2(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmNetEventSubscribe2(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -584,7 +584,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscribe3(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_NET_EVENT_SUBSCRIPTION0, callback : FWPM_NET_EVENT_CALLBACK3, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventSubscribe3(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmNetEventSubscribe3(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -593,7 +593,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventSubscribe4(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_NET_EVENT_SUBSCRIPTION0, callback : FWPM_NET_EVENT_CALLBACK4, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmNetEventSubscribe4(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + FwpmNetEventSubscribe4(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -628,7 +628,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmNetEventsSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmNetEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmNetEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -648,7 +648,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd0(enginehandle : super::super::Foundation:: HANDLE, providercontext : *const FWPM_PROVIDER_CONTEXT0, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> u32); - FwpmProviderContextAdd0(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd0(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -658,7 +658,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd1(enginehandle : super::super::Foundation:: HANDLE, providercontext : *const FWPM_PROVIDER_CONTEXT1, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> u32); - FwpmProviderContextAdd1(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd1(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -668,7 +668,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd2(enginehandle : super::super::Foundation:: HANDLE, providercontext : *const FWPM_PROVIDER_CONTEXT2, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> u32); - FwpmProviderContextAdd2(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd2(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -678,7 +678,7 @@ where P1: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextAdd3(enginehandle : super::super::Foundation:: HANDLE, providercontext : *const FWPM_PROVIDER_CONTEXT3, sd : super::super::Security:: PSECURITY_DESCRIPTOR, id : *mut u64) -> u32); - FwpmProviderContextAdd3(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))) + FwpmProviderContextAdd3(enginehandle.param().abi(), providercontext, sd.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FwpmProviderContextCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -686,7 +686,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_PROVIDER_CONTEXT_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmProviderContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmProviderContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmProviderContextDeleteById0(enginehandle: P0, id: u64) -> u32 @@ -831,7 +831,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmProviderContextGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmProviderContextGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -840,7 +840,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmProviderContextSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmProviderContextSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmProviderContextSubscribeChanges0(enginehandle: P0, subscription: *const FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, callback: FWPM_PROVIDER_CONTEXT_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -848,7 +848,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderContextSubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, callback : FWPM_PROVIDER_CONTEXT_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmProviderContextSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmProviderContextSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[inline] pub unsafe fn FwpmProviderContextSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_PROVIDER_CONTEXT_SUBSCRIPTION0, numentries: *mut u32) -> u32 @@ -872,7 +872,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_PROVIDER_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmProviderCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmProviderCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmProviderDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 @@ -914,7 +914,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmProviderGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmProviderGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -923,7 +923,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmProviderSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmProviderSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmProviderSubscribeChanges0(enginehandle: P0, subscription: *const FWPM_PROVIDER_SUBSCRIPTION0, callback: FWPM_PROVIDER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -931,7 +931,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmProviderSubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_PROVIDER_SUBSCRIPTION0, callback : FWPM_PROVIDER_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmProviderSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmProviderSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[inline] pub unsafe fn FwpmProviderSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_PROVIDER_SUBSCRIPTION0, numentries: *mut u32) -> u32 @@ -955,7 +955,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSessionCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_SESSION_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmSessionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmSessionCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmSessionDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 @@ -991,7 +991,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const FWPM_SUBLAYER_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmSubLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + FwpmSubLayerCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn FwpmSubLayerDeleteByKey0(enginehandle: P0, key: *const windows_core::GUID) -> u32 @@ -1033,7 +1033,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - FwpmSubLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + FwpmSubLayerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1042,7 +1042,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, key : *const windows_core::GUID, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmSubLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmSubLayerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FwpmSubLayerSubscribeChanges0(enginehandle: P0, subscription: *const FWPM_SUBLAYER_SUBSCRIPTION0, callback: FWPM_SUBLAYER_CHANGE_CALLBACK0, context: Option<*const core::ffi::c_void>, changehandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -1050,7 +1050,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSubLayerSubscribeChanges0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_SUBLAYER_SUBSCRIPTION0, callback : FWPM_SUBLAYER_CHANGE_CALLBACK0, context : *const core::ffi::c_void, changehandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmSubLayerSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), changehandle) + FwpmSubLayerSubscribeChanges0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), changehandle) } #[inline] pub unsafe fn FwpmSubLayerSubscriptionsGet0(enginehandle: P0, entries: *mut *mut *mut FWPM_SUBLAYER_SUBSCRIPTION0, numentries: *mut u32) -> u32 @@ -1082,7 +1082,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmSystemPortsSubscribe0(enginehandle : super::super::Foundation:: HANDLE, reserved : *const core::ffi::c_void, callback : FWPM_SYSTEM_PORTS_CALLBACK0, context : *const core::ffi::c_void, sysportshandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmSystemPortsSubscribe0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null())), callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), sysportshandle) + FwpmSystemPortsSubscribe0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), sysportshandle) } #[inline] pub unsafe fn FwpmSystemPortsUnsubscribe0(enginehandle: P0, sysportshandle: super::super::Foundation::HANDLE) -> u32 @@ -1122,7 +1122,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventSubscribe0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const FWPM_VSWITCH_EVENT_SUBSCRIPTION0, callback : FWPM_VSWITCH_EVENT_CALLBACK0, context : *const core::ffi::c_void, subscriptionhandle : *mut super::super::Foundation:: HANDLE) -> u32); - FwpmvSwitchEventSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), subscriptionhandle) + FwpmvSwitchEventSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), subscriptionhandle) } #[inline] pub unsafe fn FwpmvSwitchEventUnsubscribe0(enginehandle: P0, subscriptionhandle: super::super::Foundation::HANDLE) -> u32 @@ -1148,7 +1148,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn FwpmvSwitchEventsSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - FwpmvSwitchEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + FwpmvSwitchEventsSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1174,7 +1174,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - IPsecDospSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IPsecDospSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IPsecDospStateCreateEnumHandle0(enginehandle: P0, enumtemplate: Option<*const IPSEC_DOSP_STATE_ENUM_TEMPLATE0>, enumhandle: *mut super::super::Foundation::HANDLE) -> u32 @@ -1182,7 +1182,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecDospStateCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const IPSEC_DOSP_STATE_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - IPsecDospStateCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecDospStateCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn IPsecDospStateDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 @@ -1233,7 +1233,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecKeyManagerGetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, reserved : *const core::ffi::c_void, securityinfo : u32, sidowner : *mut super::super::Security:: PSID, sidgroup : *mut super::super::Security:: PSID, dacl : *mut *mut super::super::Security:: ACL, sacl : *mut *mut super::super::Security:: ACL, securitydescriptor : *mut super::super::Security:: PSECURITY_DESCRIPTOR) -> u32); - IPsecKeyManagerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) + IPsecKeyManagerGetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), securityinfo, sidowner, sidgroup, dacl, sacl, securitydescriptor) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1242,7 +1242,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecKeyManagerSetSecurityInfoByKey0(enginehandle : super::super::Foundation:: HANDLE, reserved : *const core::ffi::c_void, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - IPsecKeyManagerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IPsecKeyManagerSetSecurityInfoByKey0(enginehandle.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null())), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IPsecKeyManagerUnregisterAndDelete0(enginehandle: P0, keymgmthandle: P1) -> u32 @@ -1299,7 +1299,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreate0(enginehandle : super::super::Foundation:: HANDLE, outboundtraffic : *const IPSEC_TRAFFIC0, inboundfilterid : *mut u64, id : *mut u64) -> u32); - IPsecSaContextCreate0(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(std::ptr::null_mut())), id) + IPsecSaContextCreate0(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), id) } #[inline] pub unsafe fn IPsecSaContextCreate1(enginehandle: P0, outboundtraffic: *const IPSEC_TRAFFIC1, virtualiftunnelinfo: Option<*const IPSEC_VIRTUAL_IF_TUNNEL_INFO0>, inboundfilterid: Option<*mut u64>, id: *mut u64) -> u32 @@ -1307,7 +1307,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreate1(enginehandle : super::super::Foundation:: HANDLE, outboundtraffic : *const IPSEC_TRAFFIC1, virtualiftunnelinfo : *const IPSEC_VIRTUAL_IF_TUNNEL_INFO0, inboundfilterid : *mut u64, id : *mut u64) -> u32); - IPsecSaContextCreate1(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(std::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(std::ptr::null_mut())), id) + IPsecSaContextCreate1(enginehandle.param().abi(), outboundtraffic, core::mem::transmute(virtualiftunnelinfo.unwrap_or(core::ptr::null())), core::mem::transmute(inboundfilterid.unwrap_or(core::ptr::null_mut())), id) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1316,7 +1316,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const IPSEC_SA_CONTEXT_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - IPsecSaContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecSaContextCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[inline] pub unsafe fn IPsecSaContextDeleteById0(enginehandle: P0, id: u64) -> u32 @@ -1411,7 +1411,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaContextSubscribe0(enginehandle : super::super::Foundation:: HANDLE, subscription : *const IPSEC_SA_CONTEXT_SUBSCRIPTION0, callback : IPSEC_SA_CONTEXT_CALLBACK0, context : *const core::ffi::c_void, eventshandle : *mut super::super::Foundation:: HANDLE) -> u32); - IPsecSaContextSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), eventshandle) + IPsecSaContextSubscribe0(enginehandle.param().abi(), subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), eventshandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1445,7 +1445,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const IPSEC_SA_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - IPsecSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IPsecSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1463,7 +1463,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IPsecSaDbSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - IPsecSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IPsecSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IPsecSaDestroyEnumHandle0(enginehandle: P0, enumhandle: super::super::Foundation::HANDLE) -> u32 @@ -1516,7 +1516,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaCreateEnumHandle0(enginehandle : super::super::Foundation:: HANDLE, enumtemplate : *const IKEEXT_SA_ENUM_TEMPLATE0, enumhandle : *mut super::super::Foundation:: HANDLE) -> u32); - IkeextSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(std::ptr::null())), enumhandle) + IkeextSaCreateEnumHandle0(enginehandle.param().abi(), core::mem::transmute(enumtemplate.unwrap_or(core::ptr::null())), enumhandle) } #[cfg(feature = "Win32_Security")] #[inline] @@ -1534,7 +1534,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaDbSetSecurityInfo0(enginehandle : super::super::Foundation:: HANDLE, securityinfo : u32, sidowner : *const super::super::Security:: SID, sidgroup : *const super::super::Security:: SID, dacl : *const super::super::Security:: ACL, sacl : *const super::super::Security:: ACL) -> u32); - IkeextSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(std::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(std::ptr::null())), core::mem::transmute(dacl.unwrap_or(std::ptr::null())), core::mem::transmute(sacl.unwrap_or(std::ptr::null()))) + IkeextSaDbSetSecurityInfo0(enginehandle.param().abi(), securityinfo, core::mem::transmute(sidowner.unwrap_or(core::ptr::null())), core::mem::transmute(sidgroup.unwrap_or(core::ptr::null())), core::mem::transmute(dacl.unwrap_or(core::ptr::null())), core::mem::transmute(sacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IkeextSaDeleteById0(enginehandle: P0, id: u64) -> u32 @@ -1593,7 +1593,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById1(enginehandle : super::super::Foundation:: HANDLE, id : u64, salookupcontext : *const windows_core::GUID, sa : *mut *mut IKEEXT_SA_DETAILS1) -> u32); - IkeextSaGetById1(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(std::ptr::null())), sa) + IkeextSaGetById1(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), sa) } #[inline] pub unsafe fn IkeextSaGetById2(enginehandle: P0, id: u64, salookupcontext: Option<*const windows_core::GUID>, sa: *mut *mut IKEEXT_SA_DETAILS2) -> u32 @@ -1601,7 +1601,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn IkeextSaGetById2(enginehandle : super::super::Foundation:: HANDLE, id : u64, salookupcontext : *const windows_core::GUID, sa : *mut *mut IKEEXT_SA_DETAILS2) -> u32); - IkeextSaGetById2(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(std::ptr::null())), sa) + IkeextSaGetById2(enginehandle.param().abi(), id, core::mem::transmute(salookupcontext.unwrap_or(core::ptr::null())), sa) } pub const DlBroadcast: DL_ADDRESS_TYPE = DL_ADDRESS_TYPE(2i32); pub const DlMulticast: DL_ADDRESS_TYPE = DL_ADDRESS_TYPE(1i32); diff --git a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs index 0c9e18761b..b42a078efe 100644 --- a/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/NetworkManagement/WindowsFirewall/mod.rs @@ -50,7 +50,7 @@ where P0: windows_core::Param, { windows_targets::link!("firewallapi.dll" "system" fn NetworkIsolationGetEnterpriseIdAsync(wszservername : windows_core::PCWSTR, dwflags : u32, context : *const core::ffi::c_void, callback : PNETISO_EDP_ID_CALLBACK_FN, hoperation : *mut super::super::Foundation:: HANDLE) -> u32); - NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), dwflags, core::mem::transmute(context.unwrap_or(std::ptr::null())), callback, hoperation) + NetworkIsolationGetEnterpriseIdAsync(wszservername.param().abi(), dwflags, core::mem::transmute(context.unwrap_or(core::ptr::null())), callback, hoperation) } #[inline] pub unsafe fn NetworkIsolationGetEnterpriseIdClose(hoperation: P0, bwaitforoperation: P1) -> u32 @@ -65,7 +65,7 @@ where #[inline] pub unsafe fn NetworkIsolationRegisterForAppContainerChanges(flags: u32, callback: PAC_CHANGES_CALLBACK_FN, context: Option<*const core::ffi::c_void>, registrationobject: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("api-ms-win-net-isolation-l1-1-0.dll" "system" fn NetworkIsolationRegisterForAppContainerChanges(flags : u32, callback : PAC_CHANGES_CALLBACK_FN, context : *const core::ffi::c_void, registrationobject : *mut super::super::Foundation:: HANDLE) -> u32); - NetworkIsolationRegisterForAppContainerChanges(flags, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), registrationobject) + NetworkIsolationRegisterForAppContainerChanges(flags, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), registrationobject) } #[cfg(feature = "Win32_Security")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs index 086d720fd6..3ada5ad7b1 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/ActiveDirectory/mod.rs @@ -191,7 +191,7 @@ where P5: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsAddSidHistoryA(hds : super::super::Foundation:: HANDLE, flags : u32, srcdomain : windows_core::PCSTR, srcprincipal : windows_core::PCSTR, srcdomaincontroller : windows_core::PCSTR, srcdomaincreds : *const core::ffi::c_void, dstdomain : windows_core::PCSTR, dstprincipal : windows_core::PCSTR) -> u32); - DsAddSidHistoryA(hds.param().abi(), flags, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(std::ptr::null())), dstdomain.param().abi(), dstprincipal.param().abi()) + DsAddSidHistoryA(hds.param().abi(), flags, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(core::ptr::null())), dstdomain.param().abi(), dstprincipal.param().abi()) } #[inline] pub unsafe fn DsAddSidHistoryW(hds: P0, flags: u32, srcdomain: P1, srcprincipal: P2, srcdomaincontroller: P3, srcdomaincreds: Option<*const core::ffi::c_void>, dstdomain: P4, dstprincipal: P5) -> u32 @@ -204,7 +204,7 @@ where P5: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsAddSidHistoryW(hds : super::super::Foundation:: HANDLE, flags : u32, srcdomain : windows_core::PCWSTR, srcprincipal : windows_core::PCWSTR, srcdomaincontroller : windows_core::PCWSTR, srcdomaincreds : *const core::ffi::c_void, dstdomain : windows_core::PCWSTR, dstprincipal : windows_core::PCWSTR) -> u32); - DsAddSidHistoryW(hds.param().abi(), flags, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(std::ptr::null())), dstdomain.param().abi(), dstprincipal.param().abi()) + DsAddSidHistoryW(hds.param().abi(), flags, srcdomain.param().abi(), srcprincipal.param().abi(), srcdomaincontroller.param().abi(), core::mem::transmute(srcdomaincreds.unwrap_or(core::ptr::null())), dstdomain.param().abi(), dstprincipal.param().abi()) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -260,7 +260,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindByInstanceA(servername : windows_core::PCSTR, annotation : windows_core::PCSTR, instanceguid : *const windows_core::GUID, dnsdomainname : windows_core::PCSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCSTR, bindflags : u32, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindByInstanceA(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(std::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) + DsBindByInstanceA(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(core::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) } #[inline] pub unsafe fn DsBindByInstanceW(servername: P0, annotation: P1, instanceguid: Option<*const windows_core::GUID>, dnsdomainname: P2, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P3, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -271,7 +271,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindByInstanceW(servername : windows_core::PCWSTR, annotation : windows_core::PCWSTR, instanceguid : *const windows_core::GUID, dnsdomainname : windows_core::PCWSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCWSTR, bindflags : u32, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindByInstanceW(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(std::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) + DsBindByInstanceW(servername.param().abi(), annotation.param().abi(), core::mem::transmute(instanceguid.unwrap_or(core::ptr::null())), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) } #[inline] pub unsafe fn DsBindToISTGA(sitename: P0, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -305,7 +305,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithCredA(domaincontrollername : windows_core::PCSTR, dnsdomainname : windows_core::PCSTR, authidentity : *const core::ffi::c_void, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithCredA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), phds) + DsBindWithCredA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), phds) } #[inline] pub unsafe fn DsBindWithCredW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -314,7 +314,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithCredW(domaincontrollername : windows_core::PCWSTR, dnsdomainname : windows_core::PCWSTR, authidentity : *const core::ffi::c_void, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithCredW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), phds) + DsBindWithCredW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), phds) } #[inline] pub unsafe fn DsBindWithSpnA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P2, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -324,7 +324,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithSpnA(domaincontrollername : windows_core::PCSTR, dnsdomainname : windows_core::PCSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithSpnA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), phds) + DsBindWithSpnA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), phds) } #[inline] pub unsafe fn DsBindWithSpnExA(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P2, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -334,7 +334,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithSpnExA(domaincontrollername : windows_core::PCSTR, dnsdomainname : windows_core::PCSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCSTR, bindflags : u32, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithSpnExA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) + DsBindWithSpnExA(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) } #[inline] pub unsafe fn DsBindWithSpnExW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P2, bindflags: u32, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -344,7 +344,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithSpnExW(domaincontrollername : windows_core::PCWSTR, dnsdomainname : windows_core::PCWSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCWSTR, bindflags : u32, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithSpnExW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) + DsBindWithSpnExW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), bindflags, phds) } #[inline] pub unsafe fn DsBindWithSpnW(domaincontrollername: P0, dnsdomainname: P1, authidentity: Option<*const core::ffi::c_void>, serviceprincipalname: P2, phds: *mut super::super::Foundation::HANDLE) -> u32 @@ -354,7 +354,7 @@ where P2: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsBindWithSpnW(domaincontrollername : windows_core::PCWSTR, dnsdomainname : windows_core::PCWSTR, authidentity : *const core::ffi::c_void, serviceprincipalname : windows_core::PCWSTR, phds : *mut super::super::Foundation:: HANDLE) -> u32); - DsBindWithSpnW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), serviceprincipalname.param().abi(), phds) + DsBindWithSpnW(domaincontrollername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), serviceprincipalname.param().abi(), phds) } #[inline] pub unsafe fn DsBindingSetTimeout(hds: P0, ctimeoutsecs: u32) -> u32 @@ -413,12 +413,12 @@ where #[inline] pub unsafe fn DsCrackSpn2A(pszspn: &[u8], pcserviceclass: Option<*mut u32>, serviceclass: windows_core::PSTR, pcservicename: Option<*mut u32>, servicename: windows_core::PSTR, pcinstancename: Option<*mut u32>, instancename: windows_core::PSTR, pinstanceport: Option<*mut u16>) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn2A(pszspn : windows_core::PCSTR, cspn : u32, pcserviceclass : *mut u32, serviceclass : windows_core::PSTR, pcservicename : *mut u32, servicename : windows_core::PSTR, pcinstancename : *mut u32, instancename : windows_core::PSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpn2A(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), core::mem::transmute(pcserviceclass.unwrap_or(std::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(std::ptr::null_mut()))) + DsCrackSpn2A(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), core::mem::transmute(pcserviceclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackSpn2W(pszspn: &[u16], pcserviceclass: Option<*mut u32>, serviceclass: windows_core::PWSTR, pcservicename: Option<*mut u32>, servicename: windows_core::PWSTR, pcinstancename: Option<*mut u32>, instancename: windows_core::PWSTR, pinstanceport: Option<*mut u16>) -> u32 { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpn2W(pszspn : windows_core::PCWSTR, cspn : u32, pcserviceclass : *mut u32, serviceclass : windows_core::PWSTR, pcservicename : *mut u32, servicename : windows_core::PWSTR, pcinstancename : *mut u32, instancename : windows_core::PWSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpn2W(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), core::mem::transmute(pcserviceclass.unwrap_or(std::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(std::ptr::null_mut()))) + DsCrackSpn2W(core::mem::transmute(pszspn.as_ptr()), pszspn.len().try_into().unwrap(), core::mem::transmute(pcserviceclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackSpn3W(pszspn: P0, cspn: u32, pchostname: *mut u32, hostname: windows_core::PWSTR, pcinstancename: *mut u32, instancename: windows_core::PWSTR, pportnumber: *mut u16, pcdomainname: *mut u32, domainname: windows_core::PWSTR, pcrealmname: *mut u32, realmname: windows_core::PWSTR) -> u32 @@ -442,7 +442,7 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpnA(pszspn : windows_core::PCSTR, pcserviceclass : *mut u32, serviceclass : windows_core::PSTR, pcservicename : *mut u32, servicename : windows_core::PSTR, pcinstancename : *mut u32, instancename : windows_core::PSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpnA(pszspn.param().abi(), core::mem::transmute(pcserviceclass.unwrap_or(std::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(std::ptr::null_mut()))) + DsCrackSpnA(pszspn.param().abi(), core::mem::transmute(pcserviceclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackSpnW(pszspn: P0, pcserviceclass: Option<*mut u32>, serviceclass: windows_core::PWSTR, pcservicename: Option<*mut u32>, servicename: windows_core::PWSTR, pcinstancename: Option<*mut u32>, instancename: windows_core::PWSTR, pinstanceport: Option<*mut u16>) -> u32 @@ -450,17 +450,17 @@ where P0: windows_core::Param, { windows_targets::link!("dsparse.dll" "system" fn DsCrackSpnW(pszspn : windows_core::PCWSTR, pcserviceclass : *mut u32, serviceclass : windows_core::PWSTR, pcservicename : *mut u32, servicename : windows_core::PWSTR, pcinstancename : *mut u32, instancename : windows_core::PWSTR, pinstanceport : *mut u16) -> u32); - DsCrackSpnW(pszspn.param().abi(), core::mem::transmute(pcserviceclass.unwrap_or(std::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(std::ptr::null_mut()))) + DsCrackSpnW(pszspn.param().abi(), core::mem::transmute(pcserviceclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(serviceclass), core::mem::transmute(pcservicename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(servicename), core::mem::transmute(pcinstancename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(instancename), core::mem::transmute(pinstanceport.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackUnquotedMangledRdnA(pszrdn: &[u8], pguid: Option<*mut windows_core::GUID>, pedsmanglefor: Option<*mut DS_MANGLE_FOR>) -> super::super::Foundation::BOOL { windows_targets::link!("dsparse.dll" "system" fn DsCrackUnquotedMangledRdnA(pszrdn : windows_core::PCSTR, cchrdn : u32, pguid : *mut windows_core::GUID, pedsmanglefor : *mut DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsCrackUnquotedMangledRdnA(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(std::ptr::null_mut()))) + DsCrackUnquotedMangledRdnA(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsCrackUnquotedMangledRdnW(pszrdn: &[u16], pguid: Option<*mut windows_core::GUID>, pedsmanglefor: Option<*mut DS_MANGLE_FOR>) -> super::super::Foundation::BOOL { windows_targets::link!("dsparse.dll" "system" fn DsCrackUnquotedMangledRdnW(pszrdn : windows_core::PCWSTR, cchrdn : u32, pguid : *mut windows_core::GUID, pedsmanglefor : *mut DS_MANGLE_FOR) -> super::super::Foundation:: BOOL); - DsCrackUnquotedMangledRdnW(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(std::ptr::null_mut()))) + DsCrackUnquotedMangledRdnW(core::mem::transmute(pszrdn.as_ptr()), pszrdn.len().try_into().unwrap(), core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pedsmanglefor.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsDeregisterDnsHostRecordsA(servername: P0, dnsdomainname: P1, domainguid: Option<*const windows_core::GUID>, dsaguid: Option<*const windows_core::GUID>, dnshostname: P2) -> u32 @@ -470,7 +470,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsDeregisterDnsHostRecordsA(servername : windows_core::PCSTR, dnsdomainname : windows_core::PCSTR, domainguid : *const windows_core::GUID, dsaguid : *const windows_core::GUID, dnshostname : windows_core::PCSTR) -> u32); - DsDeregisterDnsHostRecordsA(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(std::ptr::null())), dnshostname.param().abi()) + DsDeregisterDnsHostRecordsA(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(core::ptr::null())), dnshostname.param().abi()) } #[inline] pub unsafe fn DsDeregisterDnsHostRecordsW(servername: P0, dnsdomainname: P1, domainguid: Option<*const windows_core::GUID>, dsaguid: Option<*const windows_core::GUID>, dnshostname: P2) -> u32 @@ -480,7 +480,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsDeregisterDnsHostRecordsW(servername : windows_core::PCWSTR, dnsdomainname : windows_core::PCWSTR, domainguid : *const windows_core::GUID, dsaguid : *const windows_core::GUID, dnshostname : windows_core::PCWSTR) -> u32); - DsDeregisterDnsHostRecordsW(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(std::ptr::null())), dnshostname.param().abi()) + DsDeregisterDnsHostRecordsW(servername.param().abi(), dnsdomainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), core::mem::transmute(dsaguid.unwrap_or(core::ptr::null())), dnshostname.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -561,7 +561,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcNameA(computername : windows_core::PCSTR, domainname : windows_core::PCSTR, domainguid : *const windows_core::GUID, sitename : windows_core::PCSTR, flags : u32, domaincontrollerinfo : *mut *mut DOMAIN_CONTROLLER_INFOA) -> u32); - DsGetDcNameA(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), sitename.param().abi(), flags, domaincontrollerinfo) + DsGetDcNameA(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), sitename.param().abi(), flags, domaincontrollerinfo) } #[inline] pub unsafe fn DsGetDcNameW(computername: P0, domainname: P1, domainguid: Option<*const windows_core::GUID>, sitename: P2, flags: u32, domaincontrollerinfo: *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32 @@ -571,7 +571,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcNameW(computername : windows_core::PCWSTR, domainname : windows_core::PCWSTR, domainguid : *const windows_core::GUID, sitename : windows_core::PCWSTR, flags : u32, domaincontrollerinfo : *mut *mut DOMAIN_CONTROLLER_INFOW) -> u32); - DsGetDcNameW(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), sitename.param().abi(), flags, domaincontrollerinfo) + DsGetDcNameW(computername.param().abi(), domainname.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), sitename.param().abi(), flags, domaincontrollerinfo) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -580,7 +580,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcNextA(getdccontexthandle : super::super::Foundation:: HANDLE, sockaddresscount : *mut u32, sockaddresses : *mut *mut super::WinSock:: SOCKET_ADDRESS, dnshostname : *mut windows_core::PSTR) -> u32); - DsGetDcNextA(getdccontexthandle.param().abi(), core::mem::transmute(sockaddresscount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(std::ptr::null_mut()))) + DsGetDcNextA(getdccontexthandle.param().abi(), core::mem::transmute(sockaddresscount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Networking_WinSock")] #[inline] @@ -589,7 +589,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcNextW(getdccontexthandle : super::super::Foundation:: HANDLE, sockaddresscount : *mut u32, sockaddresses : *mut *mut super::WinSock:: SOCKET_ADDRESS, dnshostname : *mut windows_core::PWSTR) -> u32); - DsGetDcNextW(getdccontexthandle.param().abi(), core::mem::transmute(sockaddresscount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(std::ptr::null_mut()))) + DsGetDcNextW(getdccontexthandle.param().abi(), core::mem::transmute(sockaddresscount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sockaddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dnshostname.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsGetDcOpenA(dnsname: P0, optionflags: u32, sitename: P1, domainguid: Option<*const windows_core::GUID>, dnsforestname: P2, dcflags: u32, retgetdccontext: *mut super::super::Foundation::HANDLE) -> u32 @@ -599,7 +599,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcOpenA(dnsname : windows_core::PCSTR, optionflags : u32, sitename : windows_core::PCSTR, domainguid : *const windows_core::GUID, dnsforestname : windows_core::PCSTR, dcflags : u32, retgetdccontext : *mut super::super::Foundation:: HANDLE) -> u32); - DsGetDcOpenA(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), dnsforestname.param().abi(), dcflags, retgetdccontext) + DsGetDcOpenA(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), dnsforestname.param().abi(), dcflags, retgetdccontext) } #[inline] pub unsafe fn DsGetDcOpenW(dnsname: P0, optionflags: u32, sitename: P1, domainguid: Option<*const windows_core::GUID>, dnsforestname: P2, dcflags: u32, retgetdccontext: *mut super::super::Foundation::HANDLE) -> u32 @@ -609,7 +609,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsGetDcOpenW(dnsname : windows_core::PCWSTR, optionflags : u32, sitename : windows_core::PCWSTR, domainguid : *const windows_core::GUID, dnsforestname : windows_core::PCWSTR, dcflags : u32, retgetdccontext : *mut super::super::Foundation:: HANDLE) -> u32); - DsGetDcOpenW(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(std::ptr::null())), dnsforestname.param().abi(), dcflags, retgetdccontext) + DsGetDcOpenW(dnsname.param().abi(), optionflags, sitename.param().abi(), core::mem::transmute(domainguid.unwrap_or(core::ptr::null())), dnsforestname.param().abi(), dcflags, retgetdccontext) } #[inline] pub unsafe fn DsGetDcSiteCoverageA(servername: P0, entrycount: *mut u32, sitenames: *mut *mut windows_core::PSTR) -> u32 @@ -700,7 +700,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsGetSpnA(servicetype : DS_SPN_NAME_TYPE, serviceclass : windows_core::PCSTR, servicename : windows_core::PCSTR, instanceport : u16, cinstancenames : u16, pinstancenames : *const windows_core::PCSTR, pinstanceports : *const u16, pcspn : *mut u32, prpszspn : *mut *mut windows_core::PSTR) -> u32); - DsGetSpnA(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, core::mem::transmute(pinstancenames.unwrap_or(std::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(std::ptr::null())), pcspn, prpszspn) + DsGetSpnA(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, core::mem::transmute(pinstancenames.unwrap_or(core::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(core::ptr::null())), pcspn, prpszspn) } #[inline] pub unsafe fn DsGetSpnW(servicetype: DS_SPN_NAME_TYPE, serviceclass: P0, servicename: P1, instanceport: u16, cinstancenames: u16, pinstancenames: Option<*const windows_core::PCWSTR>, pinstanceports: Option<*const u16>, pcspn: *mut u32, prpszspn: *mut *mut windows_core::PWSTR) -> u32 @@ -709,7 +709,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsGetSpnW(servicetype : DS_SPN_NAME_TYPE, serviceclass : windows_core::PCWSTR, servicename : windows_core::PCWSTR, instanceport : u16, cinstancenames : u16, pinstancenames : *const windows_core::PCWSTR, pinstanceports : *const u16, pcspn : *mut u32, prpszspn : *mut *mut windows_core::PWSTR) -> u32); - DsGetSpnW(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, core::mem::transmute(pinstancenames.unwrap_or(std::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(std::ptr::null())), pcspn, prpszspn) + DsGetSpnW(servicetype, serviceclass.param().abi(), servicename.param().abi(), instanceport, cinstancenames, core::mem::transmute(pinstancenames.unwrap_or(core::ptr::null())), core::mem::transmute(pinstanceports.unwrap_or(core::ptr::null())), pcspn, prpszspn) } #[inline] pub unsafe fn DsInheritSecurityIdentityA(hds: P0, flags: u32, srcprincipal: P1, dstprincipal: P2) -> u32 @@ -928,7 +928,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn DsMergeForestTrustInformationW(domainname : windows_core::PCWSTR, newforesttrustinfo : *const super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION, oldforesttrustinfo : *const super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION, mergedforesttrustinfo : *mut *mut super::super::Security::Authentication::Identity:: LSA_FOREST_TRUST_INFORMATION) -> u32); - DsMergeForestTrustInformationW(domainname.param().abi(), newforesttrustinfo, core::mem::transmute(oldforesttrustinfo.unwrap_or(std::ptr::null())), mergedforesttrustinfo) + DsMergeForestTrustInformationW(domainname.param().abi(), newforesttrustinfo, core::mem::transmute(oldforesttrustinfo.unwrap_or(core::ptr::null())), mergedforesttrustinfo) } #[inline] pub unsafe fn DsQuerySitesByCostA(hds: P0, pszfromsite: P1, rgsztosites: &[windows_core::PCSTR], dwflags: u32, prgsiteinfo: *mut *mut DS_SITE_COST_INFO) -> u32 @@ -990,7 +990,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsServerA(hds : super::super::Foundation:: HANDLE, serverdn : windows_core::PCSTR, domaindn : windows_core::PCSTR, flastdcindomain : *mut super::super::Foundation:: BOOL, fcommit : super::super::Foundation:: BOOL) -> u32); - DsRemoveDsServerA(hds.param().abi(), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(std::ptr::null_mut())), fcommit.param().abi()) + DsRemoveDsServerA(hds.param().abi(), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::ptr::null_mut())), fcommit.param().abi()) } #[inline] pub unsafe fn DsRemoveDsServerW(hds: P0, serverdn: P1, domaindn: P2, flastdcindomain: Option<*mut super::super::Foundation::BOOL>, fcommit: P3) -> u32 @@ -1001,7 +1001,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsRemoveDsServerW(hds : super::super::Foundation:: HANDLE, serverdn : windows_core::PCWSTR, domaindn : windows_core::PCWSTR, flastdcindomain : *mut super::super::Foundation:: BOOL, fcommit : super::super::Foundation:: BOOL) -> u32); - DsRemoveDsServerW(hds.param().abi(), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(std::ptr::null_mut())), fcommit.param().abi()) + DsRemoveDsServerW(hds.param().abi(), serverdn.param().abi(), domaindn.param().abi(), core::mem::transmute(flastdcindomain.unwrap_or(core::ptr::null_mut())), fcommit.param().abi()) } #[inline] pub unsafe fn DsReplicaAddA(hds: P0, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 @@ -1013,7 +1013,7 @@ where P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaAddA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, sourcedsadn : windows_core::PCSTR, transportdn : windows_core::PCSTR, sourcedsaaddress : windows_core::PCSTR, pschedule : *const SCHEDULE, options : u32) -> u32); - DsReplicaAddA(hds.param().abi(), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(std::ptr::null())), options) + DsReplicaAddA(hds.param().abi(), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), options) } #[inline] pub unsafe fn DsReplicaAddW(hds: P0, namecontext: P1, sourcedsadn: P2, transportdn: P3, sourcedsaaddress: P4, pschedule: Option<*const SCHEDULE>, options: u32) -> u32 @@ -1025,7 +1025,7 @@ where P4: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaAddW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, sourcedsadn : windows_core::PCWSTR, transportdn : windows_core::PCWSTR, sourcedsaaddress : windows_core::PCWSTR, pschedule : *const SCHEDULE, options : u32) -> u32); - DsReplicaAddW(hds.param().abi(), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(std::ptr::null())), options) + DsReplicaAddW(hds.param().abi(), namecontext.param().abi(), sourcedsadn.param().abi(), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), options) } #[inline] pub unsafe fn DsReplicaConsistencyCheck(hds: P0, taskid: DS_KCC_TASKID, dwflags: u32) -> u32 @@ -1069,7 +1069,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaGetInfo2W(hds : super::super::Foundation:: HANDLE, infotype : DS_REPL_INFO_TYPE, pszobject : windows_core::PCWSTR, puuidforsourcedsaobjguid : *const windows_core::GUID, pszattributename : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, dwflags : u32, dwenumerationcontext : u32, ppinfo : *mut *mut core::ffi::c_void) -> u32); - DsReplicaGetInfo2W(hds.param().abi(), infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(std::ptr::null())), pszattributename.param().abi(), pszvalue.param().abi(), dwflags, dwenumerationcontext, ppinfo) + DsReplicaGetInfo2W(hds.param().abi(), infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::ptr::null())), pszattributename.param().abi(), pszvalue.param().abi(), dwflags, dwenumerationcontext, ppinfo) } #[inline] pub unsafe fn DsReplicaGetInfoW(hds: P0, infotype: DS_REPL_INFO_TYPE, pszobject: P1, puuidforsourcedsaobjguid: Option<*const windows_core::GUID>, ppinfo: *mut *mut core::ffi::c_void) -> u32 @@ -1078,7 +1078,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaGetInfoW(hds : super::super::Foundation:: HANDLE, infotype : DS_REPL_INFO_TYPE, pszobject : windows_core::PCWSTR, puuidforsourcedsaobjguid : *const windows_core::GUID, ppinfo : *mut *mut core::ffi::c_void) -> u32); - DsReplicaGetInfoW(hds.param().abi(), infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(std::ptr::null())), ppinfo) + DsReplicaGetInfoW(hds.param().abi(), infotype, pszobject.param().abi(), core::mem::transmute(puuidforsourcedsaobjguid.unwrap_or(core::ptr::null())), ppinfo) } #[inline] pub unsafe fn DsReplicaModifyA(hds: P0, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P2, sourcedsaaddress: P3, pschedule: Option<*const SCHEDULE>, replicaflags: u32, modifyfields: u32, options: u32) -> u32 @@ -1089,7 +1089,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaModifyA(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCSTR, puuidsourcedsa : *const windows_core::GUID, transportdn : windows_core::PCSTR, sourcedsaaddress : windows_core::PCSTR, pschedule : *const SCHEDULE, replicaflags : u32, modifyfields : u32, options : u32) -> u32); - DsReplicaModifyA(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(std::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(std::ptr::null())), replicaflags, modifyfields, options) + DsReplicaModifyA(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(core::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), replicaflags, modifyfields, options) } #[inline] pub unsafe fn DsReplicaModifyW(hds: P0, namecontext: P1, puuidsourcedsa: Option<*const windows_core::GUID>, transportdn: P2, sourcedsaaddress: P3, pschedule: Option<*const SCHEDULE>, replicaflags: u32, modifyfields: u32, options: u32) -> u32 @@ -1100,7 +1100,7 @@ where P3: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaModifyW(hds : super::super::Foundation:: HANDLE, namecontext : windows_core::PCWSTR, puuidsourcedsa : *const windows_core::GUID, transportdn : windows_core::PCWSTR, sourcedsaaddress : windows_core::PCWSTR, pschedule : *const SCHEDULE, replicaflags : u32, modifyfields : u32, options : u32) -> u32); - DsReplicaModifyW(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(std::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(std::ptr::null())), replicaflags, modifyfields, options) + DsReplicaModifyW(hds.param().abi(), namecontext.param().abi(), core::mem::transmute(puuidsourcedsa.unwrap_or(core::ptr::null())), transportdn.param().abi(), sourcedsaaddress.param().abi(), core::mem::transmute(pschedule.unwrap_or(core::ptr::null())), replicaflags, modifyfields, options) } #[inline] pub unsafe fn DsReplicaSyncA(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 @@ -1118,7 +1118,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncAllA(hds : super::super::Foundation:: HANDLE, psznamecontext : windows_core::PCSTR, ulflags : u32, pfncallback : isize, pcallbackdata : *const core::ffi::c_void, perrors : *mut *mut *mut DS_REPSYNCALL_ERRINFOA) -> u32); - DsReplicaSyncAllA(hds.param().abi(), psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(std::ptr::null())), core::mem::transmute(perrors.unwrap_or(std::ptr::null_mut()))) + DsReplicaSyncAllA(hds.param().abi(), psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(core::ptr::null())), core::mem::transmute(perrors.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsReplicaSyncAllW(hds: P0, psznamecontext: P1, ulflags: u32, pfncallback: isize, pcallbackdata: Option<*const core::ffi::c_void>, perrors: Option<*mut *mut *mut DS_REPSYNCALL_ERRINFOW>) -> u32 @@ -1127,7 +1127,7 @@ where P1: windows_core::Param, { windows_targets::link!("ntdsapi.dll" "system" fn DsReplicaSyncAllW(hds : super::super::Foundation:: HANDLE, psznamecontext : windows_core::PCWSTR, ulflags : u32, pfncallback : isize, pcallbackdata : *const core::ffi::c_void, perrors : *mut *mut *mut DS_REPSYNCALL_ERRINFOW) -> u32); - DsReplicaSyncAllW(hds.param().abi(), psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(std::ptr::null())), core::mem::transmute(perrors.unwrap_or(std::ptr::null_mut()))) + DsReplicaSyncAllW(hds.param().abi(), psznamecontext.param().abi(), ulflags, pfncallback, core::mem::transmute(pcallbackdata.unwrap_or(core::ptr::null())), core::mem::transmute(perrors.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DsReplicaSyncW(hds: P0, namecontext: P1, puuiddsasrc: *const windows_core::GUID, options: u32) -> u32 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 a1ad7596e5..9c89fa2e2b 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Clustering/mod.rs @@ -62,7 +62,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterNode(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> HNODE); - AddClusterNode(hcluster.param().abi(), lpsznodename.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null()))) + AddClusterNode(hcluster.param().abi(), lpsznodename.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AddClusterNodeEx(hcluster: P0, lpsznodename: P1, dwflags: u32, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> HNODE @@ -71,7 +71,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterNodeEx(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, dwflags : u32, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> HNODE); - AddClusterNodeEx(hcluster.param().abi(), lpsznodename.param().abi(), dwflags, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null()))) + AddClusterNodeEx(hcluster.param().abi(), lpsznodename.param().abi(), dwflags, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AddClusterResourceDependency(hresource: P0, hdependson: P1) -> u32 @@ -120,7 +120,7 @@ where P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn AddClusterStorageNode(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void, lpszclusterstoragenodedescription : windows_core::PCWSTR, lpszclusterstoragenodelocation : windows_core::PCWSTR) -> u32); - AddClusterStorageNode(hcluster.param().abi(), lpsznodename.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null())), lpszclusterstoragenodedescription.param().abi(), lpszclusterstoragenodelocation.param().abi()) + AddClusterStorageNode(hcluster.param().abi(), lpsznodename.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null())), lpszclusterstoragenodedescription.param().abi(), lpszclusterstoragenodelocation.param().abi()) } #[inline] pub unsafe fn AddCrossClusterGroupSetDependency(hdependentgroupset: P0, lpremoteclustername: P1, lpremotegroupsetname: P2) -> u32 @@ -373,7 +373,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterAffinityRuleControl(hcluster : HCLUSTER, affinityrulename : windows_core::PCWSTR, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterAffinityRuleControl(hcluster.param().abi(), affinityrulename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut()))) + ClusterAffinityRuleControl(hcluster.param().abi(), affinityrulename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterClearBackupStateForSharedVolume(lpszvolumepathname: P0) -> u32 @@ -406,7 +406,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterControl(hcluster : HCLUSTER, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterControl(hcluster.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterControl(hcluster.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterControlEx(hcluster: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -416,7 +416,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterControlEx(hcluster : HCLUSTER, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterControlEx(hcluster.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterControlEx(hcluster.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterCreateAffinityRule(hcluster: P0, rulename: P1, ruletype: CLUS_AFFINITY_RULE_TYPE) -> u32 @@ -514,7 +514,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupControl(hgroup : HGROUP, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterGroupControl(hgroup.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterGroupControl(hgroup.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterGroupControlEx(hgroup: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -524,7 +524,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupControlEx(hgroup : HGROUP, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterGroupControlEx(hgroup.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterGroupControlEx(hgroup.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterGroupEnum(hgroupenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszresourcename: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -591,7 +591,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetControl(hgroupset : HGROUPSET, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterGroupSetControl(hgroupset.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut()))) + ClusterGroupSetControl(hgroupset.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterGroupSetControlEx(hgroupset: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, cbinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -601,7 +601,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterGroupSetControlEx(hgroupset : HGROUPSET, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterGroupSetControlEx(hgroupset.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut())), lpszreason.param().abi()) + ClusterGroupSetControlEx(hgroupset.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterGroupSetEnum(hgroupsetenum: P0, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -650,7 +650,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNetInterfaceControl(hnetinterface : HNETINTERFACE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterNetInterfaceControl(hnetinterface.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterNetInterfaceControl(hnetinterface.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterNetInterfaceControlEx(hnetinterface: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -660,7 +660,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNetInterfaceControlEx(hnetinterface : HNETINTERFACE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterNetInterfaceControlEx(hnetinterface.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterNetInterfaceControlEx(hnetinterface.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterNetInterfaceEnum(hnetinterfaceenum: P0, dwindex: u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -695,7 +695,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkControl(hnetwork : HNETWORK, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterNetworkControl(hnetwork.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterNetworkControl(hnetwork.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterNetworkControlEx(hnetwork: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -705,7 +705,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNetworkControlEx(hnetwork : HNETWORK, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterNetworkControlEx(hnetwork.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterNetworkControlEx(hnetwork.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterNetworkEnum(hnetworkenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -754,7 +754,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeControl(hnode : HNODE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterNodeControl(hnode.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterNodeControl(hnode.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterNodeControlEx(hnode: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -764,7 +764,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeControlEx(hnode : HNODE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterNodeControlEx(hnode.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterNodeControlEx(hnode.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterNodeEnum(hnodeenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -812,7 +812,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterNodeOpenEnumEx(hnode : HNODE, dwtype : u32, poptions : *const core::ffi::c_void) -> HNODEENUMEX); - ClusterNodeOpenEnumEx(hnode.param().abi(), dwtype, core::mem::transmute(poptions.unwrap_or(std::ptr::null()))) + ClusterNodeOpenEnumEx(hnode.param().abi(), dwtype, core::mem::transmute(poptions.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ClusterNodeReplacement(hcluster: P0, lpsznodenamecurrent: P1, lpsznodenamenew: P2) -> u32 @@ -838,7 +838,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterOpenEnumEx(hcluster : HCLUSTER, dwtype : u32, poptions : *const core::ffi::c_void) -> HCLUSENUMEX); - ClusterOpenEnumEx(hcluster.param().abi(), dwtype, core::mem::transmute(poptions.unwrap_or(std::ptr::null()))) + ClusterOpenEnumEx(hcluster.param().abi(), dwtype, core::mem::transmute(poptions.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ClusterPrepareSharedVolumeForBackup(lpszfilename: P0, lpszvolumepathname: windows_core::PWSTR, lpcchvolumepathname: *mut u32, lpszvolumename: windows_core::PWSTR, lpcchvolumename: *mut u32) -> u32 @@ -855,7 +855,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegBatchAddCommand(hregbatch : HREGBATCH, dwcommand : CLUSTER_REG_COMMAND, wzname : windows_core::PCWSTR, dwoptions : u32, lpdata : *const core::ffi::c_void, cbdata : u32) -> i32); - ClusterRegBatchAddCommand(hregbatch.param().abi(), dwcommand, wzname.param().abi(), dwoptions, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cbdata) + ClusterRegBatchAddCommand(hregbatch.param().abi(), dwcommand, wzname.param().abi(), dwoptions, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cbdata) } #[inline] pub unsafe fn ClusterRegBatchCloseNotification(hbatchnotification: P0) -> i32 @@ -880,7 +880,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatch(hregbatch : HREGBATCH, bcommit : super::super::Foundation:: BOOL, failedcommandnumber : *mut i32) -> i32); - ClusterRegCloseBatch(hregbatch.param().abi(), bcommit.param().abi(), core::mem::transmute(failedcommandnumber.unwrap_or(std::ptr::null_mut()))) + ClusterRegCloseBatch(hregbatch.param().abi(), bcommit.param().abi(), core::mem::transmute(failedcommandnumber.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterRegCloseBatchEx(hregbatch: P0, flags: u32, failedcommandnumber: Option<*mut i32>) -> i32 @@ -888,7 +888,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCloseBatchEx(hregbatch : HREGBATCH, flags : u32, failedcommandnumber : *mut i32) -> i32); - ClusterRegCloseBatchEx(hregbatch.param().abi(), flags, core::mem::transmute(failedcommandnumber.unwrap_or(std::ptr::null_mut()))) + ClusterRegCloseBatchEx(hregbatch.param().abi(), flags, core::mem::transmute(failedcommandnumber.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterRegCloseBatchNotifyPort(hbatchnotifyport: P0) -> i32 @@ -957,7 +957,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateKey(hkey : super::super::System::Registry:: HKEY, lpszsubkey : windows_core::PCWSTR, dwoptions : u32, samdesired : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut super::super::System::Registry:: HKEY, lpdwdisposition : *mut u32) -> i32); - ClusterRegCreateKey(hkey.param().abi(), lpszsubkey.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(std::ptr::null_mut()))) + ClusterRegCreateKey(hkey.param().abi(), lpszsubkey.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Security", feature = "Win32_System_Registry"))] #[inline] @@ -968,7 +968,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegCreateKeyEx(hkey : super::super::System::Registry:: HKEY, lpsubkey : windows_core::PCWSTR, dwoptions : u32, samdesired : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut super::super::System::Registry:: HKEY, lpdwdisposition : *mut u32, lpszreason : windows_core::PCWSTR) -> i32); - ClusterRegCreateKeyEx(hkey.param().abi(), lpsubkey.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(std::ptr::null_mut())), lpszreason.param().abi()) + ClusterRegCreateKeyEx(hkey.param().abi(), lpsubkey.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1028,7 +1028,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegEnumKey(hkey : super::super::System::Registry:: HKEY, dwindex : u32, lpszname : windows_core::PWSTR, lpcchname : *mut u32, lpftlastwritetime : *mut super::super::Foundation:: FILETIME) -> i32); - ClusterRegEnumKey(hkey.param().abi(), dwindex, core::mem::transmute(lpszname), lpcchname, core::mem::transmute(lpftlastwritetime.unwrap_or(std::ptr::null_mut()))) + ClusterRegEnumKey(hkey.param().abi(), dwindex, core::mem::transmute(lpszname), lpcchname, core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1037,7 +1037,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegEnumValue(hkey : super::super::System::Registry:: HKEY, dwindex : u32, lpszvaluename : windows_core::PWSTR, lpcchvaluename : *mut u32, lpdwtype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> u32); - ClusterRegEnumValue(hkey.param().abi(), dwindex, core::mem::transmute(lpszvaluename), lpcchvaluename, core::mem::transmute(lpdwtype.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()))) + ClusterRegEnumValue(hkey.param().abi(), dwindex, core::mem::transmute(lpszvaluename), lpcchvaluename, core::mem::transmute(lpdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterRegGetBatchNotification(hbatchnotify: P0, phbatchnotification: *mut HREGBATCHNOTIFICATION) -> i32 @@ -1083,7 +1083,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterRegQueryValue(hkey : super::super::System::Registry:: HKEY, lpszvaluename : windows_core::PCWSTR, lpdwvaluetype : *mut u32, lpdata : *mut u8, lpcbdata : *mut u32) -> i32); - ClusterRegQueryValue(hkey.param().abi(), lpszvaluename.param().abi(), core::mem::transmute(lpdwvaluetype.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()))) + ClusterRegQueryValue(hkey.param().abi(), lpszvaluename.param().abi(), core::mem::transmute(lpdwvaluetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterRegReadBatchAddCommand(hregreadbatch: P0, wzsubkeyname: P1, wzvaluename: P2) -> i32 @@ -1212,7 +1212,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceControl(hresource : HRESOURCE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterResourceControl(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut()))) + ClusterResourceControl(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterResourceControlAsUser(hresource: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, cbinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffersize: u32, lpbytesreturned: Option<*mut u32>) -> u32 @@ -1221,7 +1221,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceControlAsUser(hresource : HRESOURCE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterResourceControlAsUser(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut()))) + ClusterResourceControlAsUser(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterResourceControlAsUserEx(hresource: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, cbinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -1231,7 +1231,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceControlAsUserEx(hresource : HRESOURCE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterResourceControlAsUserEx(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceControlAsUserEx(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterResourceControlEx(hresource: P0, hhostnode: P1, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, cbinbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, cboutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P2) -> u32 @@ -1241,7 +1241,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceControlEx(hresource : HRESOURCE, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, cbinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, cboutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterResourceControlEx(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(std::ptr::null_mut())), lpszreason.param().abi()) + ClusterResourceControlEx(hresource.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterResourceEnum(hresenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -1309,7 +1309,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeControl(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterResourceTypeControl(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterResourceTypeControl(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterResourceTypeControlAsUser(hcluster: P0, lpszresourcetypename: P1, hhostnode: P2, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>) -> u32 @@ -1319,7 +1319,7 @@ where P2: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeControlAsUser(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32) -> u32); - ClusterResourceTypeControlAsUser(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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()))) + ClusterResourceTypeControlAsUser(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ClusterResourceTypeControlAsUserEx(hcluster: P0, lpszresourcetypename: P1, hhostnode: P2, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P3) -> u32 @@ -1330,7 +1330,7 @@ where P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeControlAsUserEx(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterResourceTypeControlAsUserEx(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterResourceTypeControlAsUserEx(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterResourceTypeControlEx(hcluster: P0, lpszresourcetypename: P1, hhostnode: P2, dwcontrolcode: u32, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesreturned: Option<*mut u32>, lpszreason: P3) -> u32 @@ -1341,7 +1341,7 @@ where P3: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterResourceTypeControlEx(hcluster : HCLUSTER, lpszresourcetypename : windows_core::PCWSTR, hhostnode : HNODE, dwcontrolcode : u32, lpinbuffer : *const core::ffi::c_void, ninbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, noutbuffersize : u32, lpbytesreturned : *mut u32, lpszreason : windows_core::PCWSTR) -> u32); - ClusterResourceTypeControlEx(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, 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())), lpszreason.param().abi()) + ClusterResourceTypeControlEx(hcluster.param().abi(), lpszresourcetypename.param().abi(), hhostnode.param().abi(), dwcontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), lpszreason.param().abi()) } #[inline] pub unsafe fn ClusterResourceTypeEnum(hrestypeenum: P0, dwindex: u32, lpdwtype: *mut u32, lpszname: windows_core::PWSTR, lpcchname: *mut u32) -> u32 @@ -1392,12 +1392,12 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn ClusterUpgradeFunctionalLevel(hcluster : HCLUSTER, perform : super::super::Foundation:: BOOL, pfnprogresscallback : PCLUSTER_UPGRADE_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> u32); - ClusterUpgradeFunctionalLevel(hcluster.param().abi(), perform.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null()))) + ClusterUpgradeFunctionalLevel(hcluster.param().abi(), perform.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateCluster(pconfig: *const CREATE_CLUSTER_CONFIG, pfnprogresscallback: PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg: Option<*const core::ffi::c_void>) -> HCLUSTER { windows_targets::link!("clusapi.dll" "system" fn CreateCluster(pconfig : *const CREATE_CLUSTER_CONFIG, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> HCLUSTER); - CreateCluster(pconfig, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null()))) + CreateCluster(pconfig, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateClusterAvailabilitySet(hcluster: P0, lpavailabilitysetname: P1, pavailabilitysetconfig: *const CLUSTER_AVAILABILITY_SET_CONFIG) -> HGROUPSET @@ -1424,7 +1424,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterGroupEx(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR, pgroupinfo : *const CLUSTER_CREATE_GROUP_INFO) -> HGROUP); - CreateClusterGroupEx(hcluster.param().abi(), lpszgroupname.param().abi(), core::mem::transmute(pgroupinfo.unwrap_or(std::ptr::null()))) + CreateClusterGroupEx(hcluster.param().abi(), lpszgroupname.param().abi(), core::mem::transmute(pgroupinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateClusterGroupSet(hcluster: P0, groupsetname: P1) -> HGROUPSET @@ -1441,7 +1441,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn CreateClusterNameAccount(hcluster : HCLUSTER, pconfig : *const CREATE_CLUSTER_NAME_ACCOUNT, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void) -> u32); - CreateClusterNameAccount(hcluster.param().abi(), pconfig, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null()))) + CreateClusterNameAccount(hcluster.param().abi(), pconfig, pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateClusterNotifyPort(hchange: P0, hcluster: P1, dwfilter: u32, dwnotifykey: usize) -> HCHANGE @@ -1582,7 +1582,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn DestroyCluster(hcluster : HCLUSTER, pfnprogresscallback : PCLUSTER_SETUP_PROGRESS_CALLBACK, pvcallbackarg : *const core::ffi::c_void, fdeletevirtualcomputerobjects : super::super::Foundation:: BOOL) -> u32); - DestroyCluster(hcluster.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(std::ptr::null())), fdeletevirtualcomputerobjects.param().abi()) + DestroyCluster(hcluster.param().abi(), pfnprogresscallback, core::mem::transmute(pvcallbackarg.unwrap_or(core::ptr::null())), fdeletevirtualcomputerobjects.param().abi()) } #[inline] pub unsafe fn DestroyClusterGroup(hgroup: P0) -> u32 @@ -1740,7 +1740,7 @@ where P0: windows_core::Param
, { windows_targets::link!("clusapi.dll" "system" fn GetClusterGroupState(hgroup : HGROUP, lpsznodename : windows_core::PWSTR, lpcchnodename : *mut u32) -> CLUSTER_GROUP_STATE); - GetClusterGroupState(hgroup.param().abi(), core::mem::transmute(lpsznodename), core::mem::transmute(lpcchnodename.unwrap_or(std::ptr::null_mut()))) + GetClusterGroupState(hgroup.param().abi(), core::mem::transmute(lpsznodename), core::mem::transmute(lpcchnodename.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetClusterInformation(hcluster: P0, lpszclustername: windows_core::PWSTR, lpcchclustername: *mut u32, lpclusterinfo: Option<*mut CLUSTERVERSIONINFO>) -> u32 @@ -1748,7 +1748,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetClusterInformation(hcluster : HCLUSTER, lpszclustername : windows_core::PWSTR, lpcchclustername : *mut u32, lpclusterinfo : *mut CLUSTERVERSIONINFO) -> u32); - GetClusterInformation(hcluster.param().abi(), core::mem::transmute(lpszclustername), lpcchclustername, core::mem::transmute(lpclusterinfo.unwrap_or(std::ptr::null_mut()))) + GetClusterInformation(hcluster.param().abi(), core::mem::transmute(lpszclustername), lpcchclustername, core::mem::transmute(lpclusterinfo.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -1857,17 +1857,17 @@ where GetClusterNotifyV2( hchange.param().abi(), lpdwnotifykey, - core::mem::transmute(pfilterandtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpbbuffersize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pfilterandtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpbbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpszobjectid), - core::mem::transmute(lpcchobjectid.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchobjectid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpszparentid), - core::mem::transmute(lpcchparentid.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchparentid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpszname), - core::mem::transmute(lpcchname.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsztype), - core::mem::transmute(lpcchtype.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchtype.unwrap_or(core::ptr::null_mut())), dwmilliseconds, ) } @@ -1911,7 +1911,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn GetClusterResourceState(hresource : HRESOURCE, lpsznodename : windows_core::PWSTR, lpcchnodename : *mut u32, lpszgroupname : windows_core::PWSTR, lpcchgroupname : *mut u32) -> CLUSTER_RESOURCE_STATE); - GetClusterResourceState(hresource.param().abi(), core::mem::transmute(lpsznodename), core::mem::transmute(lpcchnodename.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpszgroupname), core::mem::transmute(lpcchgroupname.unwrap_or(std::ptr::null_mut()))) + GetClusterResourceState(hresource.param().abi(), core::mem::transmute(lpsznodename), core::mem::transmute(lpcchnodename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpszgroupname), core::mem::transmute(lpcchgroupname.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2017,7 +2017,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OfflineClusterGroupEx2(hgroup : HGROUP, dwofflineflags : u32, lpinbuffer : *const u8, cbinbuffersize : u32, lpszreason : windows_core::PCWSTR) -> u32); - OfflineClusterGroupEx2(hgroup.param().abi(), dwofflineflags, core::mem::transmute(lpinbuffer.unwrap_or(std::ptr::null())), cbinbuffersize, lpszreason.param().abi()) + OfflineClusterGroupEx2(hgroup.param().abi(), dwofflineflags, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), cbinbuffersize, lpszreason.param().abi()) } #[inline] pub unsafe fn OfflineClusterResource(hresource: P0) -> u32 @@ -2128,7 +2128,7 @@ where P0: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterEx(lpszclustername : windows_core::PCWSTR, desiredaccess : u32, grantedaccess : *mut u32) -> HCLUSTER); - OpenClusterEx(lpszclustername.param().abi(), desiredaccess, core::mem::transmute(grantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterEx(lpszclustername.param().abi(), desiredaccess, core::mem::transmute(grantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OpenClusterGroup(hcluster: P0, lpszgroupname: P1) -> HGROUP @@ -2146,7 +2146,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterGroupEx(hcluster : HCLUSTER, lpszgroupname : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HGROUP); - OpenClusterGroupEx(hcluster.param().abi(), lpszgroupname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterGroupEx(hcluster.param().abi(), lpszgroupname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OpenClusterGroupSet(hcluster: P0, lpszgroupsetname: P1) -> HGROUPSET @@ -2173,7 +2173,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetInterfaceEx(hcluster : HCLUSTER, lpszinterfacename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNETINTERFACE); - OpenClusterNetInterfaceEx(hcluster.param().abi(), lpszinterfacename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterNetInterfaceEx(hcluster.param().abi(), lpszinterfacename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OpenClusterNetwork(hcluster: P0, lpsznetworkname: P1) -> HNETWORK @@ -2191,7 +2191,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNetworkEx(hcluster : HCLUSTER, lpsznetworkname : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNETWORK); - OpenClusterNetworkEx(hcluster.param().abi(), lpsznetworkname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterNetworkEx(hcluster.param().abi(), lpsznetworkname.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OpenClusterNode(hcluster: P0, lpsznodename: P1) -> HNODE @@ -2217,7 +2217,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterNodeEx(hcluster : HCLUSTER, lpsznodename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HNODE); - OpenClusterNodeEx(hcluster.param().abi(), lpsznodename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterNodeEx(hcluster.param().abi(), lpsznodename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OpenClusterResource(hcluster: P0, lpszresourcename: P1) -> HRESOURCE @@ -2235,7 +2235,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn OpenClusterResourceEx(hcluster : HCLUSTER, lpszresourcename : windows_core::PCWSTR, dwdesiredaccess : u32, lpdwgrantedaccess : *mut u32) -> HRESOURCE); - OpenClusterResourceEx(hcluster.param().abi(), lpszresourcename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(std::ptr::null_mut()))) + OpenClusterResourceEx(hcluster.param().abi(), lpszresourcename.param().abi(), dwdesiredaccess, core::mem::transmute(lpdwgrantedaccess.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PauseClusterNode(hnode: P0) -> u32 @@ -2565,7 +2565,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindBinaryProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pbpropertyvalue : *mut *mut u8, pcbpropertyvaluesize : *mut u32) -> u32); - ResUtilFindBinaryProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pbpropertyvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbpropertyvaluesize.unwrap_or(std::ptr::null_mut()))) + ResUtilFindBinaryProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pbpropertyvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbpropertyvaluesize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilFindDependentDiskResourceDriveLetter(hcluster: P0, hresource: P1, pszdriveletter: windows_core::PWSTR, pcchdriveletter: *mut u32) -> u32 @@ -2590,7 +2590,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindExpandSzProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pszpropertyvalue : *mut windows_core::PWSTR) -> u32); - ResUtilFindExpandSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(std::ptr::null_mut()))) + ResUtilFindExpandSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilFindExpandedSzProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P0, pszpropertyvalue: Option<*mut windows_core::PWSTR>) -> u32 @@ -2598,7 +2598,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindExpandedSzProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pszpropertyvalue : *mut windows_core::PWSTR) -> u32); - ResUtilFindExpandedSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(std::ptr::null_mut()))) + ResUtilFindExpandedSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilFindFileTimeProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P0, pftpropertyvalue: *mut super::super::Foundation::FILETIME) -> u32 @@ -2630,7 +2630,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilFindSzProperty(ppropertylist : *const core::ffi::c_void, cbpropertylistsize : u32, pszpropertyname : windows_core::PCWSTR, pszpropertyvalue : *mut windows_core::PWSTR) -> u32); - ResUtilFindSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(std::ptr::null_mut()))) + ResUtilFindSzProperty(ppropertylist, cbpropertylistsize, pszpropertyname.param().abi(), core::mem::transmute(pszpropertyvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilFindULargeIntegerProperty(ppropertylist: *const core::ffi::c_void, cbpropertylistsize: u32, pszpropertyname: P0, plpropertyvalue: *mut u64) -> u32 @@ -2712,7 +2712,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilGetCoreClusterResourcesEx(hclusterin : HCLUSTER, phclusternameresourceout : *mut HRESOURCE, phclusterquorumresourceout : *mut HRESOURCE, dwdesiredaccess : u32) -> u32); - ResUtilGetCoreClusterResourcesEx(hclusterin.param().abi(), core::mem::transmute(phclusternameresourceout.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phclusterquorumresourceout.unwrap_or(std::ptr::null_mut())), dwdesiredaccess) + ResUtilGetCoreClusterResourcesEx(hclusterin.param().abi(), core::mem::transmute(phclusternameresourceout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phclusterquorumresourceout.unwrap_or(core::ptr::null_mut())), dwdesiredaccess) } #[inline] pub unsafe fn ResUtilGetCoreGroup(hcluster: P0) -> HGROUP @@ -2982,7 +2982,7 @@ pub unsafe fn ResUtilPaxosComparer(left: *const PaxosTagCStruct, right: *const P #[inline] pub unsafe fn ResUtilPropertyListFromParameterBlock(ppropertytable: *const RESUTIL_PROPERTY_ITEM, poutpropertylist: Option<*mut core::ffi::c_void>, pcboutpropertylistsize: *mut u32, pinparams: *const u8, pcbbytesreturned: *mut u32, pcbrequired: *mut u32) -> u32 { windows_targets::link!("resutils.dll" "system" fn ResUtilPropertyListFromParameterBlock(ppropertytable : *const RESUTIL_PROPERTY_ITEM, poutpropertylist : *mut core::ffi::c_void, pcboutpropertylistsize : *mut u32, pinparams : *const u8, pcbbytesreturned : *mut u32, pcbrequired : *mut u32) -> u32); - ResUtilPropertyListFromParameterBlock(ppropertytable, core::mem::transmute(poutpropertylist.unwrap_or(std::ptr::null_mut())), pcboutpropertylistsize, pinparams, pcbbytesreturned, pcbrequired) + ResUtilPropertyListFromParameterBlock(ppropertytable, core::mem::transmute(poutpropertylist.unwrap_or(core::ptr::null_mut())), pcboutpropertylistsize, pinparams, pcbbytesreturned, pcbrequired) } #[inline] pub unsafe fn ResUtilRemoveResourceServiceEnvironment(pszservicename: P0, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -3026,7 +3026,7 @@ where P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetBinaryValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, pbnewvalue : *const u8, cbnewvaluesize : u32, ppboutvalue : *mut *mut u8, pcboutvaluesize : *mut u32) -> u32); - ResUtilSetBinaryValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len().try_into().unwrap(), core::mem::transmute(ppboutvalue.unwrap_or(std::ptr::null_mut())), pcboutvaluesize) + ResUtilSetBinaryValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), core::mem::transmute(pbnewvalue.as_ptr()), pbnewvalue.len().try_into().unwrap(), core::mem::transmute(ppboutvalue.unwrap_or(core::ptr::null_mut())), pcboutvaluesize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3047,7 +3047,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetExpandSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, ppszoutstring : *mut windows_core::PWSTR) -> u32); - ResUtilSetExpandSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(std::ptr::null_mut()))) + ResUtilSetExpandSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3058,7 +3058,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetMultiSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, cbnewvaluesize : u32, ppszoutvalue : *mut windows_core::PWSTR, pcboutvaluesize : *mut u32) -> u32); - ResUtilSetMultiSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), cbnewvaluesize, core::mem::transmute(ppszoutvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcboutvaluesize.unwrap_or(std::ptr::null_mut()))) + ResUtilSetMultiSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), cbnewvaluesize, core::mem::transmute(ppszoutvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcboutvaluesize.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3096,7 +3096,7 @@ where P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetPropertyTable(hkeyclusterkey : super::super::System::Registry:: HKEY, ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *const core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, poutparams : *mut u8) -> u32); - ResUtilSetPropertyTable(hkeyclusterkey.param().abi(), ppropertytable, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), ballowunknownproperties.param().abi(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(std::ptr::null_mut()))) + ResUtilSetPropertyTable(hkeyclusterkey.param().abi(), ppropertytable, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ballowunknownproperties.param().abi(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3117,7 +3117,7 @@ where P1: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetQwordValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, qwnewvalue : u64, pqwoutvalue : *mut u64) -> u32); - ResUtilSetQwordValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), qwnewvalue, core::mem::transmute(pqwoutvalue.unwrap_or(std::ptr::null_mut()))) + ResUtilSetQwordValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), qwnewvalue, core::mem::transmute(pqwoutvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilSetResourceServiceEnvironment(pszservicename: P0, hresource: P1, pfnlogevent: PLOG_EVENT_ROUTINE, hresourcehandle: isize) -> u32 @@ -3157,7 +3157,7 @@ where P2: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilSetSzValue(hkeyclusterkey : super::super::System::Registry:: HKEY, pszvaluename : windows_core::PCWSTR, psznewvalue : windows_core::PCWSTR, ppszoutstring : *mut windows_core::PWSTR) -> u32); - ResUtilSetSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(std::ptr::null_mut()))) + ResUtilSetSzValue(hkeyclusterkey.param().abi(), pszvaluename.param().abi(), psznewvalue.param().abi(), core::mem::transmute(ppszoutstring.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3223,7 +3223,7 @@ where P0: windows_core::Param, { windows_targets::link!("resutils.dll" "system" fn ResUtilVerifyPropertyTable(ppropertytable : *const RESUTIL_PROPERTY_ITEM, reserved : *const core::ffi::c_void, ballowunknownproperties : super::super::Foundation:: BOOL, pinpropertylist : *const core::ffi::c_void, cbinpropertylistsize : u32, poutparams : *mut u8) -> u32); - ResUtilVerifyPropertyTable(ppropertytable, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), ballowunknownproperties.param().abi(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(std::ptr::null_mut()))) + ResUtilVerifyPropertyTable(ppropertytable, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), ballowunknownproperties.param().abi(), pinpropertylist, cbinpropertylistsize, core::mem::transmute(poutparams.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ResUtilVerifyResourceService(pszservicename: P0) -> u32 @@ -3478,7 +3478,7 @@ where P1: windows_core::Param, { windows_targets::link!("clusapi.dll" "system" fn SetClusterServiceAccountPassword(lpszclustername : windows_core::PCWSTR, lpsznewpassword : windows_core::PCWSTR, dwflags : u32, lpreturnstatusbuffer : *mut CLUSTER_SET_PASSWORD_STATUS, lpcbreturnstatusbuffersize : *mut u32) -> u32); - SetClusterServiceAccountPassword(lpszclustername.param().abi(), lpsznewpassword.param().abi(), dwflags, core::mem::transmute(lpreturnstatusbuffer.unwrap_or(std::ptr::null_mut())), lpcbreturnstatusbuffersize) + SetClusterServiceAccountPassword(lpszclustername.param().abi(), lpsznewpassword.param().abi(), dwflags, core::mem::transmute(lpreturnstatusbuffer.unwrap_or(core::ptr::null_mut())), lpcbreturnstatusbuffersize) } #[inline] pub unsafe fn SetGroupDependencyExpression(hgroup: P0, lpszdependencyexpression: P1) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs index ba1b98217e..5ab893332a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/HttpServer/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddFragmentToCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, datachunk : *const HTTP_DATA_CHUNK, cachepolicy : *const HTTP_CACHE_POLICY, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpAddFragmentToCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), datachunk, cachepolicy, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpAddFragmentToCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), datachunk, cachepolicy, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpAddUrl(requestqueuehandle: P0, fullyqualifiedurl: P1, reserved: Option<*const core::ffi::c_void>) -> u32 @@ -15,7 +15,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpAddUrl(requestqueuehandle : super::super::Foundation:: HANDLE, fullyqualifiedurl : windows_core::PCWSTR, reserved : *const core::ffi::c_void) -> u32); - HttpAddUrl(requestqueuehandle.param().abi(), fullyqualifiedurl.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + HttpAddUrl(requestqueuehandle.param().abi(), fullyqualifiedurl.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpAddUrlToUrlGroup(urlgroupid: u64, pfullyqualifiedurl: P0, urlcontext: u64, reserved: u32) -> u32 @@ -32,7 +32,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpCancelHttpRequest(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpCancelHttpRequest(requestqueuehandle.param().abi(), requestid, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpCancelHttpRequest(requestqueuehandle.param().abi(), requestid, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpCloseRequestQueue(requestqueuehandle: P0) -> u32 @@ -64,7 +64,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpCreateRequestQueue(version : HTTPAPI_VERSION, name : windows_core::PCWSTR, securityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flags : u32, requestqueuehandle : *mut super::super::Foundation:: HANDLE) -> u32); - HttpCreateRequestQueue(core::mem::transmute(version), name.param().abi(), core::mem::transmute(securityattributes.unwrap_or(std::ptr::null())), flags, requestqueuehandle) + HttpCreateRequestQueue(core::mem::transmute(version), name.param().abi(), core::mem::transmute(securityattributes.unwrap_or(core::ptr::null())), flags, requestqueuehandle) } #[inline] pub unsafe fn HttpCreateServerSession(version: HTTPAPI_VERSION, serversessionid: *mut u64, reserved: u32) -> u32 { @@ -84,7 +84,7 @@ where P2: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpDeclarePush(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, verb : HTTP_VERB, path : windows_core::PCWSTR, query : windows_core::PCSTR, headers : *const HTTP_REQUEST_HEADERS) -> u32); - HttpDeclarePush(requestqueuehandle.param().abi(), requestid, verb, path.param().abi(), query.param().abi(), core::mem::transmute(headers.unwrap_or(std::ptr::null()))) + HttpDeclarePush(requestqueuehandle.param().abi(), requestid, verb, path.param().abi(), query.param().abi(), core::mem::transmute(headers.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpDelegateRequestEx(requestqueuehandle: P0, delegatequeuehandle: P1, requestid: u64, delegateurlgroupid: u64, propertyinfosetsize: u32, propertyinfoset: *const HTTP_DELEGATE_REQUEST_PROPERTY_INFO) -> u32 @@ -102,7 +102,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpDeleteServiceConfiguration(servicehandle : super::super::Foundation:: HANDLE, configid : HTTP_SERVICE_CONFIG_ID, pconfiginformation : *const core::ffi::c_void, configinformationlength : u32, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - HttpDeleteServiceConfiguration(servicehandle.param().abi(), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(std::ptr::null()))) + HttpDeleteServiceConfiguration(servicehandle.param().abi(), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpFindUrlGroupId(fullyqualifiedurl: P0, requestqueuehandle: P1, urlgroupid: *mut u64) -> u32 @@ -121,7 +121,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpFlushResponseCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, flags : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpFlushResponseCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), flags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpFlushResponseCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), flags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpGetExtension(version: HTTPAPI_VERSION, extension: u32, buffer: *mut core::ffi::c_void, buffersize: u32) -> u32 { @@ -131,7 +131,7 @@ pub unsafe fn HttpGetExtension(version: HTTPAPI_VERSION, extension: u32, buffer: #[inline] pub unsafe fn HttpInitialize(version: HTTPAPI_VERSION, flags: HTTP_INITIALIZE, preserved: Option<*mut core::ffi::c_void>) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpInitialize(version : HTTPAPI_VERSION, flags : HTTP_INITIALIZE, preserved : *mut core::ffi::c_void) -> u32); - HttpInitialize(core::mem::transmute(version), flags, core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + HttpInitialize(core::mem::transmute(version), flags, core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpIsFeatureSupported(featureid: HTTP_FEATURE_ID) -> super::super::Foundation::BOOL { @@ -144,7 +144,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpPrepareUrl(reserved : *const core::ffi::c_void, flags : u32, url : windows_core::PCWSTR, preparedurl : *mut windows_core::PWSTR) -> u32); - HttpPrepareUrl(core::mem::transmute(reserved.unwrap_or(std::ptr::null())), flags, url.param().abi(), preparedurl) + HttpPrepareUrl(core::mem::transmute(reserved.unwrap_or(core::ptr::null())), flags, url.param().abi(), preparedurl) } #[inline] pub unsafe fn HttpQueryRequestQueueProperty(requestqueuehandle: P0, property: HTTP_SERVER_PROPERTY, propertyinformation: Option<*mut core::ffi::c_void>, propertyinformationlength: u32, reserved1: u32, returnlength: Option<*mut u32>, reserved2: Option<*const core::ffi::c_void>) -> u32 @@ -152,12 +152,12 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpQueryRequestQueueProperty(requestqueuehandle : super::super::Foundation:: HANDLE, property : HTTP_SERVER_PROPERTY, propertyinformation : *mut core::ffi::c_void, propertyinformationlength : u32, reserved1 : u32, returnlength : *mut u32, reserved2 : *const core::ffi::c_void) -> u32); - HttpQueryRequestQueueProperty(requestqueuehandle.param().abi(), property, core::mem::transmute(propertyinformation.unwrap_or(std::ptr::null_mut())), propertyinformationlength, reserved1, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))) + HttpQueryRequestQueueProperty(requestqueuehandle.param().abi(), property, core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), propertyinformationlength, reserved1, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpQueryServerSessionProperty(serversessionid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: Option<*mut core::ffi::c_void>, propertyinformationlength: u32, returnlength: Option<*mut u32>) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpQueryServerSessionProperty(serversessionid : u64, property : HTTP_SERVER_PROPERTY, propertyinformation : *mut core::ffi::c_void, propertyinformationlength : u32, returnlength : *mut u32) -> u32); - HttpQueryServerSessionProperty(serversessionid, property, core::mem::transmute(propertyinformation.unwrap_or(std::ptr::null_mut())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + HttpQueryServerSessionProperty(serversessionid, property, core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -166,12 +166,12 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpQueryServiceConfiguration(servicehandle : super::super::Foundation:: HANDLE, configid : HTTP_SERVICE_CONFIG_ID, pinput : *const core::ffi::c_void, inputlength : u32, poutput : *mut core::ffi::c_void, outputlength : u32, preturnlength : *mut u32, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - HttpQueryServiceConfiguration(servicehandle.param().abi(), configid, core::mem::transmute(pinput.unwrap_or(std::ptr::null())), inputlength, core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), outputlength, core::mem::transmute(preturnlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poverlapped.unwrap_or(std::ptr::null()))) + HttpQueryServiceConfiguration(servicehandle.param().abi(), configid, core::mem::transmute(pinput.unwrap_or(core::ptr::null())), inputlength, core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), outputlength, core::mem::transmute(preturnlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpQueryUrlGroupProperty(urlgroupid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: Option<*mut core::ffi::c_void>, propertyinformationlength: u32, returnlength: Option<*mut u32>) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpQueryUrlGroupProperty(urlgroupid : u64, property : HTTP_SERVER_PROPERTY, propertyinformation : *mut core::ffi::c_void, propertyinformationlength : u32, returnlength : *mut u32) -> u32); - HttpQueryUrlGroupProperty(urlgroupid, property, core::mem::transmute(propertyinformation.unwrap_or(std::ptr::null_mut())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + HttpQueryUrlGroupProperty(urlgroupid, property, core::mem::transmute(propertyinformation.unwrap_or(core::ptr::null_mut())), propertyinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -181,7 +181,7 @@ where P1: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpReadFragmentFromCache(requestqueuehandle : super::super::Foundation:: HANDLE, urlprefix : windows_core::PCWSTR, byterange : *const HTTP_BYTE_RANGE, buffer : *mut core::ffi::c_void, bufferlength : u32, bytesread : *mut u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpReadFragmentFromCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), core::mem::transmute(byterange.unwrap_or(std::ptr::null())), buffer, bufferlength, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpReadFragmentFromCache(requestqueuehandle.param().abi(), urlprefix.param().abi(), core::mem::transmute(byterange.unwrap_or(core::ptr::null())), buffer, bufferlength, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -190,7 +190,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpReceiveClientCertificate(requestqueuehandle : super::super::Foundation:: HANDLE, connectionid : u64, flags : u32, sslclientcertinfo : *mut HTTP_SSL_CLIENT_CERT_INFO, sslclientcertinfosize : u32, bytesreceived : *mut u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpReceiveClientCertificate(requestqueuehandle.param().abi(), connectionid, flags, sslclientcertinfo, sslclientcertinfosize, core::mem::transmute(bytesreceived.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpReceiveClientCertificate(requestqueuehandle.param().abi(), connectionid, flags, sslclientcertinfo, sslclientcertinfosize, core::mem::transmute(bytesreceived.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Networking_WinSock", feature = "Win32_System_IO"))] #[inline] @@ -199,7 +199,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpReceiveHttpRequest(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, flags : HTTP_RECEIVE_HTTP_REQUEST_FLAGS, requestbuffer : *mut HTTP_REQUEST_V2, requestbufferlength : u32, bytesreturned : *mut u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpReceiveHttpRequest(requestqueuehandle.param().abi(), requestid, flags, requestbuffer, requestbufferlength, core::mem::transmute(bytesreturned.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpReceiveHttpRequest(requestqueuehandle.param().abi(), requestid, flags, requestbuffer, requestbufferlength, core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -208,7 +208,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpReceiveRequestEntityBody(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, flags : u32, entitybuffer : *mut core::ffi::c_void, entitybufferlength : u32, bytesreturned : *mut u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpReceiveRequestEntityBody(requestqueuehandle.param().abi(), requestid, flags, entitybuffer, entitybufferlength, core::mem::transmute(bytesreturned.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpReceiveRequestEntityBody(requestqueuehandle.param().abi(), requestid, flags, entitybuffer, entitybufferlength, core::mem::transmute(bytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpRemoveUrl(requestqueuehandle: P0, fullyqualifiedurl: P1) -> u32 @@ -234,7 +234,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpSendHttpResponse(requestqueuehandle : super::super::Foundation:: HANDLE, requestid : u64, flags : u32, httpresponse : *const HTTP_RESPONSE_V2, cachepolicy : *const HTTP_CACHE_POLICY, bytessent : *mut u32, reserved1 : *const core::ffi::c_void, reserved2 : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED, logdata : *const HTTP_LOG_DATA) -> u32); - HttpSendHttpResponse(requestqueuehandle.param().abi(), requestid, flags, httpresponse, core::mem::transmute(cachepolicy.unwrap_or(std::ptr::null())), core::mem::transmute(bytessent.unwrap_or(std::ptr::null_mut())), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), reserved2, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut())), core::mem::transmute(logdata.unwrap_or(std::ptr::null()))) + HttpSendHttpResponse(requestqueuehandle.param().abi(), requestid, flags, httpresponse, core::mem::transmute(cachepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(bytessent.unwrap_or(core::ptr::null_mut())), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(logdata.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -249,11 +249,11 @@ where flags, entitychunks.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entitychunks.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(bytessent.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), + core::mem::transmute(bytessent.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), reserved2, - core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(logdata.unwrap_or(std::ptr::null())), + core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(logdata.unwrap_or(core::ptr::null())), ) } #[cfg(feature = "Win32_System_IO")] @@ -263,7 +263,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpSetRequestProperty(requestqueuehandle : super::super::Foundation:: HANDLE, id : u64, propertyid : HTTP_REQUEST_PROPERTY, input : *const core::ffi::c_void, inputpropertysize : u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - HttpSetRequestProperty(requestqueuehandle.param().abi(), id, propertyid, core::mem::transmute(input.unwrap_or(std::ptr::null())), inputpropertysize, overlapped) + HttpSetRequestProperty(requestqueuehandle.param().abi(), id, propertyid, core::mem::transmute(input.unwrap_or(core::ptr::null())), inputpropertysize, overlapped) } #[inline] pub unsafe fn HttpSetRequestQueueProperty(requestqueuehandle: P0, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32, reserved1: u32, reserved2: Option<*const core::ffi::c_void>) -> u32 @@ -271,7 +271,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpSetRequestQueueProperty(requestqueuehandle : super::super::Foundation:: HANDLE, property : HTTP_SERVER_PROPERTY, propertyinformation : *const core::ffi::c_void, propertyinformationlength : u32, reserved1 : u32, reserved2 : *const core::ffi::c_void) -> u32); - HttpSetRequestQueueProperty(requestqueuehandle.param().abi(), property, propertyinformation, propertyinformationlength, reserved1, core::mem::transmute(reserved2.unwrap_or(std::ptr::null()))) + HttpSetRequestQueueProperty(requestqueuehandle.param().abi(), property, propertyinformation, propertyinformationlength, reserved1, core::mem::transmute(reserved2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpSetServerSessionProperty(serversessionid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -285,7 +285,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpSetServiceConfiguration(servicehandle : super::super::Foundation:: HANDLE, configid : HTTP_SERVICE_CONFIG_ID, pconfiginformation : *const core::ffi::c_void, configinformationlength : u32, poverlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - HttpSetServiceConfiguration(servicehandle.param().abi(), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(std::ptr::null()))) + HttpSetServiceConfiguration(servicehandle.param().abi(), configid, pconfiginformation, configinformationlength, core::mem::transmute(poverlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HttpSetUrlGroupProperty(urlgroupid: u64, property: HTTP_SERVER_PROPERTY, propertyinformation: *const core::ffi::c_void, propertyinformationlength: u32) -> u32 { @@ -303,7 +303,7 @@ where #[inline] pub unsafe fn HttpTerminate(flags: HTTP_INITIALIZE, preserved: Option<*mut core::ffi::c_void>) -> u32 { windows_targets::link!("httpapi.dll" "system" fn HttpTerminate(flags : HTTP_INITIALIZE, preserved : *mut core::ffi::c_void) -> u32); - HttpTerminate(flags, core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))) + HttpTerminate(flags, core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -312,7 +312,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpUpdateServiceConfiguration(handle : super::super::Foundation:: HANDLE, configid : HTTP_SERVICE_CONFIG_ID, configinfo : *const core::ffi::c_void, configinfolength : u32, overlapped : *const super::super::System::IO:: OVERLAPPED) -> u32); - HttpUpdateServiceConfiguration(handle.param().abi(), configid, configinfo, configinfolength, core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + HttpUpdateServiceConfiguration(handle.param().abi(), configid, configinfo, configinfolength, core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -321,7 +321,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpWaitForDemandStart(requestqueuehandle : super::super::Foundation:: HANDLE, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpWaitForDemandStart(requestqueuehandle.param().abi(), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpWaitForDemandStart(requestqueuehandle.param().abi(), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -330,7 +330,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpWaitForDisconnect(requestqueuehandle : super::super::Foundation:: HANDLE, connectionid : u64, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpWaitForDisconnect(requestqueuehandle.param().abi(), connectionid, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpWaitForDisconnect(requestqueuehandle.param().abi(), connectionid, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -339,7 +339,7 @@ where P0: windows_core::Param, { windows_targets::link!("httpapi.dll" "system" fn HttpWaitForDisconnectEx(requestqueuehandle : super::super::Foundation:: HANDLE, connectionid : u64, reserved : u32, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> u32); - HttpWaitForDisconnectEx(requestqueuehandle.param().abi(), connectionid, reserved, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))) + HttpWaitForDisconnectEx(requestqueuehandle.param().abi(), connectionid, reserved, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))) } pub const CacheRangeChunkSize: HTTP_SERVICE_CONFIG_CACHE_KEY = HTTP_SERVICE_CONFIG_CACHE_KEY(1i32); pub const CreateRequestQueueExternalIdProperty: HTTP_CREATE_REQUEST_QUEUE_PROPERTY_ID = HTTP_CREATE_REQUEST_QUEUE_PROPERTY_ID(1i32); 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 c0f14ca4bb..07ac072aae 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/Ldap/mod.rs @@ -348,7 +348,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_extA(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR, data : *const LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA, messagenumber : *mut u32) -> u32); - ldap_compare_extA(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(std::ptr::null())), servercontrols, clientcontrols, messagenumber) + ldap_compare_extA(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), servercontrols, clientcontrols, messagenumber) } #[inline] pub unsafe fn ldap_compare_extW(ld: *mut LDAP, dn: P0, attr: P1, value: P2, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW, messagenumber: *mut u32) -> u32 @@ -358,7 +358,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_extW(ld : *mut LDAP, dn : windows_core::PCWSTR, attr : windows_core::PCWSTR, value : windows_core::PCWSTR, data : *const LDAP_BERVAL, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW, messagenumber : *mut u32) -> u32); - ldap_compare_extW(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(std::ptr::null())), servercontrols, clientcontrols, messagenumber) + ldap_compare_extW(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), servercontrols, clientcontrols, messagenumber) } #[inline] pub unsafe fn ldap_compare_ext_s(ld: *mut LDAP, dn: P0, attr: P1, value: P2, data: *mut LDAP_BERVAL, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA) -> u32 @@ -378,7 +378,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_ext_sA(ld : *mut LDAP, dn : windows_core::PCSTR, attr : windows_core::PCSTR, value : windows_core::PCSTR, data : *const LDAP_BERVAL, servercontrols : *mut *mut LDAPControlA, clientcontrols : *mut *mut LDAPControlA) -> u32); - ldap_compare_ext_sA(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(std::ptr::null())), servercontrols, clientcontrols) + ldap_compare_ext_sA(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), servercontrols, clientcontrols) } #[inline] pub unsafe fn ldap_compare_ext_sW(ld: *mut LDAP, dn: P0, attr: P1, value: P2, data: Option<*const LDAP_BERVAL>, servercontrols: *mut *mut LDAPControlW, clientcontrols: *mut *mut LDAPControlW) -> u32 @@ -388,7 +388,7 @@ where P2: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_compare_ext_sW(ld : *mut LDAP, dn : windows_core::PCWSTR, attr : windows_core::PCWSTR, value : windows_core::PCWSTR, data : *const LDAP_BERVAL, servercontrols : *mut *mut LDAPControlW, clientcontrols : *mut *mut LDAPControlW) -> u32); - ldap_compare_ext_sW(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(std::ptr::null())), servercontrols, clientcontrols) + ldap_compare_ext_sW(ld, dn.param().abi(), attr.param().abi(), value.param().abi(), core::mem::transmute(data.unwrap_or(core::ptr::null())), servercontrols, clientcontrols) } #[inline] pub unsafe fn ldap_compare_s(ld: *mut LDAP, dn: P0, attr: P1, value: P2) -> u32 @@ -473,17 +473,17 @@ pub unsafe fn ldap_count_references(ld: *mut LDAP, res: *mut LDAPMessage) -> u32 #[inline] pub unsafe fn ldap_count_values(vals: Option<*const windows_core::PCSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_values(vals : *const windows_core::PCSTR) -> u32); - ldap_count_values(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_count_values(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_count_valuesA(vals: Option<*const windows_core::PCSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_valuesA(vals : *const windows_core::PCSTR) -> u32); - ldap_count_valuesA(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_count_valuesA(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_count_valuesW(vals: Option<*const windows_core::PCWSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_count_valuesW(vals : *const windows_core::PCWSTR) -> u32); - ldap_count_valuesW(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_count_valuesW(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_count_values_len(vals: *mut *mut LDAP_BERVAL) -> u32 { @@ -1209,7 +1209,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_extended_resultA(connection : *mut LDAP, resultmessage : *mut LDAPMessage, resultoid : *mut windows_core::PSTR, resultdata : *mut *mut LDAP_BERVAL, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_extended_resultA(connection, resultmessage, core::mem::transmute(resultoid.unwrap_or(std::ptr::null_mut())), resultdata, freeit.param().abi()) + ldap_parse_extended_resultA(connection, resultmessage, core::mem::transmute(resultoid.unwrap_or(core::ptr::null_mut())), resultdata, freeit.param().abi()) } #[inline] pub unsafe fn ldap_parse_extended_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, resultoid: Option<*mut windows_core::PWSTR>, resultdata: *mut *mut LDAP_BERVAL, freeit: P0) -> u32 @@ -1217,7 +1217,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_extended_resultW(connection : *mut LDAP, resultmessage : *mut LDAPMessage, resultoid : *mut windows_core::PWSTR, resultdata : *mut *mut LDAP_BERVAL, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_extended_resultW(connection, resultmessage, core::mem::transmute(resultoid.unwrap_or(std::ptr::null_mut())), resultdata, freeit.param().abi()) + ldap_parse_extended_resultW(connection, resultmessage, core::mem::transmute(resultoid.unwrap_or(core::ptr::null_mut())), resultdata, freeit.param().abi()) } #[inline] pub unsafe fn ldap_parse_page_control(externalhandle: *mut LDAP, servercontrols: *mut *mut LDAPControlA, totalcount: *mut u32, cookie: *mut *mut LDAP_BERVAL) -> u32 { @@ -1255,7 +1255,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_result(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PSTR, errormessage : *mut windows_core::PSTR, referrals : *mut *mut windows_core::PSTR, servercontrols : *mut *mut *mut LDAPControlA, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_result(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(std::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(std::ptr::null_mut())), servercontrols, freeit.param().abi()) + ldap_parse_result(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(core::ptr::null_mut())), servercontrols, freeit.param().abi()) } #[inline] pub unsafe fn ldap_parse_resultA(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PSTR>, errormessage: Option<*mut windows_core::PSTR>, referrals: Option<*mut *mut *mut i8>, servercontrols: *mut *mut *mut LDAPControlA, freeit: P0) -> u32 @@ -1263,7 +1263,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_resultA(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PSTR, errormessage : *mut windows_core::PSTR, referrals : *mut *mut *mut i8, servercontrols : *mut *mut *mut LDAPControlA, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_resultA(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(std::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(std::ptr::null_mut())), servercontrols, freeit.param().abi()) + ldap_parse_resultA(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(core::ptr::null_mut())), servercontrols, freeit.param().abi()) } #[inline] pub unsafe fn ldap_parse_resultW(connection: *mut LDAP, resultmessage: *mut LDAPMessage, returncode: *mut u32, matcheddns: Option<*mut windows_core::PWSTR>, errormessage: Option<*mut windows_core::PWSTR>, referrals: Option<*mut *mut *mut u16>, servercontrols: *mut *mut *mut LDAPControlW, freeit: P0) -> u32 @@ -1271,7 +1271,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_resultW(connection : *mut LDAP, resultmessage : *mut LDAPMessage, returncode : *mut u32, matcheddns : *mut windows_core::PWSTR, errormessage : *mut windows_core::PWSTR, referrals : *mut *mut *mut u16, servercontrols : *mut *mut *mut LDAPControlW, freeit : super::super::Foundation:: BOOLEAN) -> u32); - ldap_parse_resultW(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(std::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(std::ptr::null_mut())), servercontrols, freeit.param().abi()) + ldap_parse_resultW(connection, resultmessage, returncode, core::mem::transmute(matcheddns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(errormessage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(referrals.unwrap_or(core::ptr::null_mut())), servercontrols, freeit.param().abi()) } #[inline] pub unsafe fn ldap_parse_sort_control(externalhandle: *mut LDAP, control: *mut *mut LDAPControlA, result: *mut u32, attribute: *mut windows_core::PSTR) -> u32 { @@ -1281,12 +1281,12 @@ pub unsafe fn ldap_parse_sort_control(externalhandle: *mut LDAP, control: *mut * #[inline] pub unsafe fn ldap_parse_sort_controlA(externalhandle: *mut LDAP, control: *mut *mut LDAPControlA, result: *mut u32, attribute: Option<*mut windows_core::PSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_sort_controlA(externalhandle : *mut LDAP, control : *mut *mut LDAPControlA, result : *mut u32, attribute : *mut windows_core::PSTR) -> u32); - ldap_parse_sort_controlA(externalhandle, control, result, core::mem::transmute(attribute.unwrap_or(std::ptr::null_mut()))) + ldap_parse_sort_controlA(externalhandle, control, result, core::mem::transmute(attribute.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ldap_parse_sort_controlW(externalhandle: *mut LDAP, control: *mut *mut LDAPControlW, result: *mut u32, attribute: Option<*mut windows_core::PWSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_parse_sort_controlW(externalhandle : *mut LDAP, control : *mut *mut LDAPControlW, result : *mut u32, attribute : *mut windows_core::PWSTR) -> u32); - ldap_parse_sort_controlW(externalhandle, control, result, core::mem::transmute(attribute.unwrap_or(std::ptr::null_mut()))) + ldap_parse_sort_controlW(externalhandle, control, result, core::mem::transmute(attribute.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ldap_parse_vlv_controlA(externalhandle: *mut LDAP, control: *mut *mut LDAPControlA, targetpos: *mut u32, listcount: *mut u32, context: *mut *mut LDAP_BERVAL, errcode: *mut i32) -> i32 { @@ -1369,7 +1369,7 @@ where #[inline] pub unsafe fn ldap_result(ld: *mut LDAP, msgid: u32, all: u32, timeout: Option<*const LDAP_TIMEVAL>, res: *mut *mut LDAPMessage) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_result(ld : *mut LDAP, msgid : u32, all : u32, timeout : *const LDAP_TIMEVAL, res : *mut *mut LDAPMessage) -> u32); - ldap_result(ld, msgid, all, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), res) + ldap_result(ld, msgid, all, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), res) } #[inline] pub unsafe fn ldap_result2error(ld: *mut LDAP, res: *mut LDAPMessage, freeit: u32) -> u32 { @@ -1454,7 +1454,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_ext(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, servercontrols : *const *const LDAPControlA, clientcontrols : *const *const LDAPControlA, timelimit : u32, sizelimit : u32, messagenumber : *mut u32) -> u32); - ldap_search_ext(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timelimit, sizelimit, messagenumber) + ldap_search_ext(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timelimit, sizelimit, messagenumber) } #[inline] pub unsafe fn ldap_search_extA(ld: *mut LDAP, base: P0, scope: u32, filter: P1, attrs: *const *const i8, attrsonly: u32, servercontrols: Option<*const *const LDAPControlA>, clientcontrols: Option<*const *const LDAPControlA>, timelimit: u32, sizelimit: u32, messagenumber: *mut u32) -> u32 @@ -1463,7 +1463,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_extA(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, servercontrols : *const *const LDAPControlA, clientcontrols : *const *const LDAPControlA, timelimit : u32, sizelimit : u32, messagenumber : *mut u32) -> u32); - ldap_search_extA(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timelimit, sizelimit, messagenumber) + ldap_search_extA(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timelimit, sizelimit, messagenumber) } #[inline] pub unsafe fn ldap_search_extW(ld: *mut LDAP, base: P0, scope: u32, filter: P1, attrs: *const *const u16, attrsonly: u32, servercontrols: Option<*const *const LDAPControlW>, clientcontrols: Option<*const *const LDAPControlW>, timelimit: u32, sizelimit: u32, messagenumber: *mut u32) -> u32 @@ -1472,7 +1472,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_extW(ld : *mut LDAP, base : windows_core::PCWSTR, scope : u32, filter : windows_core::PCWSTR, attrs : *const *const u16, attrsonly : u32, servercontrols : *const *const LDAPControlW, clientcontrols : *const *const LDAPControlW, timelimit : u32, sizelimit : u32, messagenumber : *mut u32) -> u32); - ldap_search_extW(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timelimit, sizelimit, messagenumber) + ldap_search_extW(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timelimit, sizelimit, messagenumber) } #[inline] pub unsafe fn ldap_search_ext_s(ld: *mut LDAP, base: P0, scope: u32, filter: P1, attrs: *const *const i8, attrsonly: u32, servercontrols: Option<*const *const LDAPControlA>, clientcontrols: Option<*const *const LDAPControlA>, timeout: *mut LDAP_TIMEVAL, sizelimit: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1481,7 +1481,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_ext_s(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, servercontrols : *const *const LDAPControlA, clientcontrols : *const *const LDAPControlA, timeout : *mut LDAP_TIMEVAL, sizelimit : u32, res : *mut *mut LDAPMessage) -> u32); - ldap_search_ext_s(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timeout, sizelimit, res) + ldap_search_ext_s(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timeout, sizelimit, res) } #[inline] pub unsafe fn ldap_search_ext_sA(ld: *mut LDAP, base: P0, scope: u32, filter: P1, attrs: *const *const i8, attrsonly: u32, servercontrols: Option<*const *const LDAPControlA>, clientcontrols: Option<*const *const LDAPControlA>, timeout: *mut LDAP_TIMEVAL, sizelimit: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1490,7 +1490,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_ext_sA(ld : *mut LDAP, base : windows_core::PCSTR, scope : u32, filter : windows_core::PCSTR, attrs : *const *const i8, attrsonly : u32, servercontrols : *const *const LDAPControlA, clientcontrols : *const *const LDAPControlA, timeout : *mut LDAP_TIMEVAL, sizelimit : u32, res : *mut *mut LDAPMessage) -> u32); - ldap_search_ext_sA(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timeout, sizelimit, res) + ldap_search_ext_sA(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timeout, sizelimit, res) } #[inline] pub unsafe fn ldap_search_ext_sW(ld: *mut LDAP, base: P0, scope: u32, filter: P1, attrs: *const *const u16, attrsonly: u32, servercontrols: Option<*const *const LDAPControlW>, clientcontrols: Option<*const *const LDAPControlW>, timeout: *mut LDAP_TIMEVAL, sizelimit: u32, res: *mut *mut LDAPMessage) -> u32 @@ -1499,7 +1499,7 @@ where P1: windows_core::Param, { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_search_ext_sW(ld : *mut LDAP, base : windows_core::PCWSTR, scope : u32, filter : windows_core::PCWSTR, attrs : *const *const u16, attrsonly : u32, servercontrols : *const *const LDAPControlW, clientcontrols : *const *const LDAPControlW, timeout : *mut LDAP_TIMEVAL, sizelimit : u32, res : *mut *mut LDAPMessage) -> u32); - ldap_search_ext_sW(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(std::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(std::ptr::null())), timeout, sizelimit, res) + ldap_search_ext_sW(ld, base.param().abi(), scope, filter.param().abi(), attrs, attrsonly, core::mem::transmute(servercontrols.unwrap_or(core::ptr::null())), core::mem::transmute(clientcontrols.unwrap_or(core::ptr::null())), timeout, sizelimit, res) } #[inline] pub unsafe fn ldap_search_init_page(externalhandle: *mut LDAP, distinguishedname: P0, scopeofsearch: u32, searchfilter: P1, attributelist: *mut *mut i8, attributesonly: u32, servercontrols: *mut *mut LDAPControlA, clientcontrols: *mut *mut LDAPControlA, pagetimelimit: u32, totalsizelimit: u32, sortkeys: *mut *mut LDAPSortKeyA) -> PLDAPSearch @@ -1737,17 +1737,17 @@ pub unsafe fn ldap_unbind_s(ld: *mut LDAP) -> u32 { #[inline] pub unsafe fn ldap_value_free(vals: Option<*const windows_core::PCSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_value_free(vals : *const windows_core::PCSTR) -> u32); - ldap_value_free(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_value_free(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_value_freeA(vals: Option<*const windows_core::PCSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_value_freeA(vals : *const windows_core::PCSTR) -> u32); - ldap_value_freeA(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_value_freeA(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_value_freeW(vals: Option<*const windows_core::PCWSTR>) -> u32 { windows_targets::link!("wldap32.dll" "cdecl" fn ldap_value_freeW(vals : *const windows_core::PCWSTR) -> u32); - ldap_value_freeW(core::mem::transmute(vals.unwrap_or(std::ptr::null()))) + ldap_value_freeW(core::mem::transmute(vals.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ldap_value_free_len(vals: *mut *mut LDAP_BERVAL) -> u32 { diff --git a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs index ab5b5e575b..720c611355 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/NetworkListManager/mod.rs @@ -18,7 +18,7 @@ impl IEnumNetworkConnections { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -71,7 +71,7 @@ impl IEnumNetworks { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs index 5067d69df1..78f5921fe3 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WebSocket/mod.rs @@ -68,7 +68,7 @@ where P0: windows_core::Param, { windows_targets::link!("websocket.dll" "system" fn WebSocketEndClientHandshake(hwebsocket : WEB_SOCKET_HANDLE, presponseheaders : *const WEB_SOCKET_HTTP_HEADER, ulreponseheadercount : u32, pulselectedextensions : *mut u32, pulselectedextensioncount : *mut u32, pulselectedsubprotocol : *mut u32) -> windows_core::HRESULT); - WebSocketEndClientHandshake(hwebsocket.param().abi(), core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len().try_into().unwrap(), core::mem::transmute(pulselectedextensions.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pulselectedextensioncount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pulselectedsubprotocol.unwrap_or(std::ptr::null_mut()))).ok() + WebSocketEndClientHandshake(hwebsocket.param().abi(), core::mem::transmute(presponseheaders.as_ptr()), presponseheaders.len().try_into().unwrap(), core::mem::transmute(pulselectedextensions.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pulselectedextensioncount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pulselectedsubprotocol.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WebSocketEndServerHandshake(hwebsocket: P0) -> windows_core::Result<()> @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("websocket.dll" "system" fn WebSocketGetAction(hwebsocket : WEB_SOCKET_HANDLE, eactionqueue : WEB_SOCKET_ACTION_QUEUE, pdatabuffers : *mut WEB_SOCKET_BUFFER, puldatabuffercount : *mut u32, paction : *mut WEB_SOCKET_ACTION, pbuffertype : *mut WEB_SOCKET_BUFFER_TYPE, pvapplicationcontext : *mut *mut core::ffi::c_void, pvactioncontext : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - WebSocketGetAction(hwebsocket.param().abi(), eactionqueue, pdatabuffers, puldatabuffercount, paction, pbuffertype, core::mem::transmute(pvapplicationcontext.unwrap_or(std::ptr::null_mut())), pvactioncontext).ok() + WebSocketGetAction(hwebsocket.param().abi(), eactionqueue, pdatabuffers, puldatabuffercount, paction, pbuffertype, core::mem::transmute(pvapplicationcontext.unwrap_or(core::ptr::null_mut())), pvactioncontext).ok() } #[inline] pub unsafe fn WebSocketGetGlobalProperty(etype: WEB_SOCKET_PROPERTY_TYPE, pvvalue: *mut core::ffi::c_void, ulsize: *mut u32) -> windows_core::Result<()> { @@ -97,7 +97,7 @@ where P0: windows_core::Param, { windows_targets::link!("websocket.dll" "system" fn WebSocketReceive(hwebsocket : WEB_SOCKET_HANDLE, pbuffer : *const WEB_SOCKET_BUFFER, pvcontext : *const core::ffi::c_void) -> windows_core::HRESULT); - WebSocketReceive(hwebsocket.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null())), core::mem::transmute(pvcontext.unwrap_or(std::ptr::null()))).ok() + WebSocketReceive(hwebsocket.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WebSocketSend(hwebsocket: P0, buffertype: WEB_SOCKET_BUFFER_TYPE, pbuffer: Option<*const WEB_SOCKET_BUFFER>, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -105,7 +105,7 @@ where P0: windows_core::Param, { windows_targets::link!("websocket.dll" "system" fn WebSocketSend(hwebsocket : WEB_SOCKET_HANDLE, buffertype : WEB_SOCKET_BUFFER_TYPE, pbuffer : *const WEB_SOCKET_BUFFER, context : *const core::ffi::c_void) -> windows_core::HRESULT); - WebSocketSend(hwebsocket.param().abi(), buffertype, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null())), core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + WebSocketSend(hwebsocket.param().abi(), buffertype, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } pub const WEB_SOCKET_ABORTED_CLOSE_STATUS: WEB_SOCKET_CLOSE_STATUS = WEB_SOCKET_CLOSE_STATUS(1006i32); pub const WEB_SOCKET_ALLOCATED_BUFFER_PROPERTY_TYPE: WEB_SOCKET_PROPERTY_TYPE = WEB_SOCKET_PROPERTY_TYPE(3i32); 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 922e800e0f..b41657aaa2 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinHttp/mod.rs @@ -118,7 +118,7 @@ pub unsafe fn WinHttpGetProxyResultEx(hresolver: *const core::ffi::c_void, pprox #[inline] pub unsafe fn WinHttpGetProxySettingsEx(hresolver: *const core::ffi::c_void, proxysettingstype: WINHTTP_PROXY_SETTINGS_TYPE, pproxysettingsparam: Option<*const WINHTTP_PROXY_SETTINGS_PARAM>, pcontext: usize) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpGetProxySettingsEx(hresolver : *const core::ffi::c_void, proxysettingstype : WINHTTP_PROXY_SETTINGS_TYPE, pproxysettingsparam : *const WINHTTP_PROXY_SETTINGS_PARAM, pcontext : usize) -> u32); - WinHttpGetProxySettingsEx(hresolver, proxysettingstype, core::mem::transmute(pproxysettingsparam.unwrap_or(std::ptr::null())), pcontext) + WinHttpGetProxySettingsEx(hresolver, proxysettingstype, core::mem::transmute(pproxysettingsparam.unwrap_or(core::ptr::null())), pcontext) } #[inline] pub unsafe fn WinHttpGetProxySettingsResultEx(hresolver: *const core::ffi::c_void, pproxysettingsex: *mut core::ffi::c_void) -> u32 { @@ -159,7 +159,7 @@ pub unsafe fn WinHttpQueryAuthSchemes(hrequest: *mut core::ffi::c_void, lpdwsupp #[inline] pub unsafe fn WinHttpQueryConnectionGroup(hinternet: *const core::ffi::c_void, pguidconnection: Option<*const windows_core::GUID>, ullflags: u64, ppresult: *mut *mut WINHTTP_QUERY_CONNECTION_GROUP_RESULT) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryConnectionGroup(hinternet : *const core::ffi::c_void, pguidconnection : *const windows_core::GUID, ullflags : u64, ppresult : *mut *mut WINHTTP_QUERY_CONNECTION_GROUP_RESULT) -> u32); - WinHttpQueryConnectionGroup(hinternet, core::mem::transmute(pguidconnection.unwrap_or(std::ptr::null())), ullflags, ppresult) + WinHttpQueryConnectionGroup(hinternet, core::mem::transmute(pguidconnection.unwrap_or(core::ptr::null())), ullflags, ppresult) } #[inline] pub unsafe fn WinHttpQueryDataAvailable(hrequest: *mut core::ffi::c_void, lpdwnumberofbytesavailable: *mut u32) -> windows_core::Result<()> { @@ -172,17 +172,17 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null_mut())), lpdwbufferlength, lpdwindex).ok() + WinHttpQueryHeaders(hrequest, dwinfolevel, pwszname.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength, lpdwindex).ok() } #[inline] pub unsafe fn WinHttpQueryHeadersEx(hrequest: *const core::ffi::c_void, dwinfolevel: u32, ullflags: u64, uicodepage: u32, pdwindex: Option<*mut u32>, pheadername: Option<*const WINHTTP_HEADER_NAME>, pbuffer: Option<*mut core::ffi::c_void>, pdwbufferlength: *mut u32, ppheaders: Option<*mut *mut WINHTTP_EXTENDED_HEADER>, pdwheaderscount: *mut u32) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpQueryHeadersEx(hrequest : *const core::ffi::c_void, dwinfolevel : u32, ullflags : u64, uicodepage : u32, pdwindex : *mut u32, pheadername : *const WINHTTP_HEADER_NAME, pbuffer : *mut core::ffi::c_void, pdwbufferlength : *mut u32, ppheaders : *mut *mut WINHTTP_EXTENDED_HEADER, pdwheaderscount : *mut u32) -> u32); - WinHttpQueryHeadersEx(hrequest, dwinfolevel, ullflags, uicodepage, core::mem::transmute(pdwindex.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pheadername.unwrap_or(std::ptr::null())), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pdwbufferlength, core::mem::transmute(ppheaders.unwrap_or(std::ptr::null_mut())), pdwheaderscount) + WinHttpQueryHeadersEx(hrequest, dwinfolevel, ullflags, uicodepage, core::mem::transmute(pdwindex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pheadername.unwrap_or(core::ptr::null())), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pdwbufferlength, core::mem::transmute(ppheaders.unwrap_or(core::ptr::null_mut())), pdwheaderscount) } #[inline] pub unsafe fn WinHttpQueryOption(hinternet: *mut core::ffi::c_void, dwoption: u32, lpbuffer: 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).ok() + WinHttpQueryOption(hinternet, dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength).ok() } #[inline] pub unsafe fn WinHttpReadData(hrequest: *mut core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> windows_core::Result<()> { @@ -192,7 +192,7 @@ pub unsafe fn WinHttpReadData(hrequest: *mut core::ffi::c_void, lpbuffer: *mut c #[inline] pub unsafe fn WinHttpReadDataEx(hrequest: *mut core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32, ullflags: u64, cbproperty: u32, pvproperty: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpReadDataEx(hrequest : *mut core::ffi::c_void, lpbuffer : *mut core::ffi::c_void, dwnumberofbytestoread : u32, lpdwnumberofbytesread : *mut u32, ullflags : u64, cbproperty : u32, pvproperty : *const core::ffi::c_void) -> u32); - WinHttpReadDataEx(hrequest, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread, ullflags, cbproperty, core::mem::transmute(pvproperty.unwrap_or(std::ptr::null()))) + WinHttpReadDataEx(hrequest, lpbuffer, dwnumberofbytestoread, lpdwnumberofbytesread, ullflags, cbproperty, core::mem::transmute(pvproperty.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WinHttpReadProxySettings(hsession: *const core::ffi::c_void, pcwszconnectionname: P0, ffallbacktodefaultsettings: P1, fsetautodiscoverfordefaultsettings: P2, pdwsettingsversion: *mut u32, pfdefaultsettingsarereturned: *mut super::super::Foundation::BOOL, pwinhttpproxysettings: *mut WINHTTP_PROXY_SETTINGS) -> u32 @@ -222,7 +222,7 @@ pub unsafe fn WinHttpResetAutoProxy(hsession: *const core::ffi::c_void, dwflags: #[inline] pub unsafe fn WinHttpSendRequest(hrequest: *mut core::ffi::c_void, lpszheaders: Option<&[u16]>, lpoptional: 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(std::ptr::null())), dwoptionallength, dwtotallength, dwcontext).ok() + 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(core::ptr::null())), dwoptionallength, dwtotallength, dwcontext).ok() } #[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) -> windows_core::Result<()> @@ -241,7 +241,7 @@ pub unsafe fn WinHttpSetDefaultProxyConfiguration(pproxyinfo: *mut WINHTTP_PROXY #[inline] pub unsafe fn WinHttpSetOption(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: 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().try_into().unwrap())).ok() + WinHttpSetOption(core::mem::transmute(hinternet.unwrap_or(core::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().try_into().unwrap())).ok() } #[inline] pub unsafe fn WinHttpSetProxySettingsPerUser(fproxysettingsperuser: P0) -> u32 @@ -282,7 +282,7 @@ pub unsafe fn WinHttpUnregisterProxyChangeNotification(hregistration: *const cor #[inline] pub unsafe fn WinHttpWebSocketClose(hwebsocket: *const core::ffi::c_void, usstatus: u16, pvreason: Option<*const core::ffi::c_void>, dwreasonlength: u32) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpWebSocketClose(hwebsocket : *const core::ffi::c_void, usstatus : u16, pvreason : *const core::ffi::c_void, dwreasonlength : u32) -> u32); - WinHttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null())), dwreasonlength) + WinHttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), dwreasonlength) } #[inline] pub unsafe fn WinHttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, pcontext: usize) -> *mut core::ffi::c_void { @@ -292,7 +292,7 @@ pub unsafe fn WinHttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void #[inline] pub unsafe fn WinHttpWebSocketQueryCloseStatus(hwebsocket: *const core::ffi::c_void, pusstatus: *mut u16, pvreason: Option<*mut core::ffi::c_void>, dwreasonlength: u32, pdwreasonlengthconsumed: *mut u32) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpWebSocketQueryCloseStatus(hwebsocket : *const core::ffi::c_void, pusstatus : *mut u16, pvreason : *mut core::ffi::c_void, dwreasonlength : u32, pdwreasonlengthconsumed : *mut u32) -> u32); - WinHttpWebSocketQueryCloseStatus(hwebsocket, pusstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null_mut())), dwreasonlength, pdwreasonlengthconsumed) + WinHttpWebSocketQueryCloseStatus(hwebsocket, pusstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null_mut())), dwreasonlength, pdwreasonlengthconsumed) } #[inline] pub unsafe fn WinHttpWebSocketReceive(hwebsocket: *const core::ffi::c_void, pvbuffer: *mut core::ffi::c_void, dwbufferlength: u32, pdwbytesread: *mut u32, pebuffertype: *mut WINHTTP_WEB_SOCKET_BUFFER_TYPE) -> u32 { @@ -307,12 +307,12 @@ pub unsafe fn WinHttpWebSocketSend(hwebsocket: *const core::ffi::c_void, ebuffer #[inline] pub unsafe fn WinHttpWebSocketShutdown(hwebsocket: *const core::ffi::c_void, usstatus: u16, pvreason: Option<*const core::ffi::c_void>, dwreasonlength: u32) -> u32 { windows_targets::link!("winhttp.dll" "system" fn WinHttpWebSocketShutdown(hwebsocket : *const core::ffi::c_void, usstatus : u16, pvreason : *const core::ffi::c_void, dwreasonlength : u32) -> u32); - WinHttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null())), dwreasonlength) + WinHttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), dwreasonlength) } #[inline] pub unsafe fn WinHttpWriteData(hrequest: *mut core::ffi::c_void, lpbuffer: 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).ok() + WinHttpWriteData(hrequest, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), dwnumberofbytestowrite, lpdwnumberofbyteswritten).ok() } #[inline] pub unsafe fn WinHttpWriteProxySettings(hsession: *const core::ffi::c_void, fforceupdate: P0, pwinhttpproxysettings: *const WINHTTP_PROXY_SETTINGS) -> u32 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 324b24e8c1..c17c46703b 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinInet/mod.rs @@ -156,7 +156,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(std::ptr::null()))).ok() + CreateUrlCacheContainerA(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CreateUrlCacheContainerW(name: P0, lpcacheprefix: P1, lpszcachepath: P2, kbcachelimit: u32, dwcontainertype: u32, dwoptions: u32, pvbuffer: Option<*const core::ffi::c_void>, cbbuffer: Option<*const u32>) -> windows_core::Result<()> @@ -166,7 +166,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(std::ptr::null()))).ok() + CreateUrlCacheContainerW(name.param().abi(), lpcacheprefix.param().abi(), lpszcachepath.param().abi(), kbcachelimit, dwcontainertype, dwoptions, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), core::mem::transmute(cbbuffer.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CreateUrlCacheEntryA(lpszurlname: P0, dwexpectedfilesize: u32, lpszfileextension: P1, lpszfilename: &mut [u8; 260], dwreserved: u32) -> windows_core::Result<()> @@ -199,7 +199,7 @@ where #[inline] pub unsafe fn CreateUrlCacheGroup(dwflags: u32, lpreserved: Option<*const core::ffi::c_void>) -> i64 { windows_targets::link!("wininet.dll" "system" fn CreateUrlCacheGroup(dwflags : u32, lpreserved : *const core::ffi::c_void) -> i64); - CreateUrlCacheGroup(dwflags, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + CreateUrlCacheGroup(dwflags, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DeleteIE3Cache(hwnd: P0, hinst: P1, lpszcmd: P2, ncmdshow: i32) -> u32 @@ -254,7 +254,7 @@ where #[inline] pub unsafe fn DeleteUrlCacheGroup(groupid: i64, dwflags: u32, lpreserved: 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()))).ok() + DeleteUrlCacheGroup(groupid, dwflags, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DeleteWpadCacheForNetworks(param0: WPAD_CACHE_DELETE) -> super::super::Foundation::BOOL { @@ -313,7 +313,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheEntryA(lpszurlsearchpattern : windows_core::PCSTR, lpfirstcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstUrlCacheEntryA(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo); + let result__ = FindFirstUrlCacheEntryA(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -322,7 +322,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheEntryExA(lpszurlsearchpattern : windows_core::PCSTR, dwflags : u32, dwfilter : u32, groupid : i64, lpfirstcacheentryinfo : *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:: HANDLE); - let result__ = FindFirstUrlCacheEntryExA(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(lpfirstcacheentryinfo.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()))); + let result__ = FindFirstUrlCacheEntryExA(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, core::mem::transmute(lpgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -331,7 +331,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheEntryExW(lpszurlsearchpattern : windows_core::PCWSTR, dwflags : u32, dwfilter : u32, groupid : i64, lpfirstcacheentryinfo : *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:: HANDLE); - let result__ = FindFirstUrlCacheEntryExW(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(lpfirstcacheentryinfo.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()))); + let result__ = FindFirstUrlCacheEntryExW(lpszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, core::mem::transmute(lpgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -340,13 +340,13 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheEntryW(lpszurlsearchpattern : windows_core::PCWSTR, lpfirstcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstUrlCacheEntryW(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo); + let result__ = FindFirstUrlCacheEntryW(lpszurlsearchpattern.param().abi(), core::mem::transmute(lpfirstcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn FindFirstUrlCacheGroup(dwflags: u32, dwfilter: u32, lpsearchcondition: Option<*const core::ffi::c_void>, dwsearchcondition: u32, lpgroupid: *mut i64, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("wininet.dll" "system" fn FindFirstUrlCacheGroup(dwflags : u32, dwfilter : u32, lpsearchcondition : *const core::ffi::c_void, dwsearchcondition : u32, lpgroupid : *mut i64, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstUrlCacheGroup(dwflags, dwfilter, core::mem::transmute(lpsearchcondition.unwrap_or(std::ptr::null())), dwsearchcondition, lpgroupid, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))); + let result__ = FindFirstUrlCacheGroup(dwflags, dwfilter, core::mem::transmute(lpsearchcondition.unwrap_or(core::ptr::null())), dwsearchcondition, lpgroupid, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -371,7 +371,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo).ok() + FindNextUrlCacheEntryA(henumhandle.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo).ok() } #[inline] pub unsafe fn FindNextUrlCacheEntryExA(henumhandle: P0, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: Option<*const core::ffi::c_void>, lpcbgroupattributes: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -379,7 +379,7 @@ where P0: windows_core::Param, { 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.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() + FindNextUrlCacheEntryExA(henumhandle.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, core::mem::transmute(lpgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn FindNextUrlCacheEntryExW(henumhandle: P0, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, lpgroupattributes: Option<*const core::ffi::c_void>, lpcbgroupattributes: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -387,7 +387,7 @@ where P0: windows_core::Param, { 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.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() + FindNextUrlCacheEntryExW(henumhandle.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, core::mem::transmute(lpgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpcbgroupattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn FindNextUrlCacheEntryW(henumhandle: P0, lpnextcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32) -> windows_core::Result<()> @@ -395,7 +395,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo).ok() + FindNextUrlCacheEntryW(henumhandle.param().abi(), core::mem::transmute(lpnextcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo).ok() } #[inline] pub unsafe fn FindNextUrlCacheGroup(hfind: P0, lpgroupid: *mut i64, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -403,7 +403,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpgroupid, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + FindNextUrlCacheGroup(hfind.param().abi(), lpgroupid, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn FindP3PPolicySymbol(pszsymbol: P0) -> i32 @@ -436,7 +436,7 @@ where P1: windows_core::Param, { 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.param().abi(), dwflags, lpszcommand.param().abi(), dwcontext, core::mem::transmute(phftpcommand.unwrap_or(std::ptr::null_mut()))).ok() + FtpCommandA(hconnect, fexpectresponse.param().abi(), dwflags, lpszcommand.param().abi(), dwcontext, core::mem::transmute(phftpcommand.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn FtpCommandW(hconnect: *const core::ffi::c_void, fexpectresponse: P0, dwflags: FTP_FLAGS, lpszcommand: P1, dwcontext: usize, phftpcommand: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -445,7 +445,7 @@ where P1: windows_core::Param, { 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.param().abi(), dwflags, lpszcommand.param().abi(), dwcontext, core::mem::transmute(phftpcommand.unwrap_or(std::ptr::null_mut()))).ok() + FtpCommandW(hconnect, fexpectresponse.param().abi(), dwflags, lpszcommand.param().abi(), dwcontext, core::mem::transmute(phftpcommand.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn FtpCreateDirectoryA(hconnect: *const core::ffi::c_void, lpszdirectory: P0) -> windows_core::Result<()> @@ -486,7 +486,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpFindFirstFileA(hconnect : *const core::ffi::c_void, lpszsearchfile : windows_core::PCSTR, lpfindfiledata : *mut super::super::Storage::FileSystem:: WIN32_FIND_DATAA, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - FtpFindFirstFileA(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(std::ptr::null_mut())), dwflags, dwcontext) + FtpFindFirstFileA(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext) } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -495,7 +495,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn FtpFindFirstFileW(hconnect : *const core::ffi::c_void, lpszsearchfile : windows_core::PCWSTR, lpfindfiledata : *mut super::super::Storage::FileSystem:: WIN32_FIND_DATAW, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - FtpFindFirstFileW(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(std::ptr::null_mut())), dwflags, dwcontext) + FtpFindFirstFileW(hconnect, lpszsearchfile.param().abi(), core::mem::transmute(lpfindfiledata.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext) } #[inline] pub unsafe fn FtpGetCurrentDirectoryA(hconnect: *const core::ffi::c_void, lpszcurrentdirectory: windows_core::PSTR, lpdwcurrentdirectory: *mut u32) -> windows_core::Result<()> { @@ -530,7 +530,7 @@ where #[inline] pub unsafe fn FtpGetFileSize(hfile: *const core::ffi::c_void, lpdwfilesizehigh: Option<*mut u32>) -> u32 { windows_targets::link!("wininet.dll" "system" fn FtpGetFileSize(hfile : *const core::ffi::c_void, lpdwfilesizehigh : *mut u32) -> u32); - FtpGetFileSize(hfile, core::mem::transmute(lpdwfilesizehigh.unwrap_or(std::ptr::null_mut()))) + FtpGetFileSize(hfile, core::mem::transmute(lpdwfilesizehigh.unwrap_or(core::ptr::null_mut()))) } #[inline] 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<()> @@ -641,17 +641,17 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GetDiskInfoA(pszpath : windows_core::PCSTR, pdwclustersize : *mut u32, pdlavail : *mut u64, pdltotal : *mut u64) -> super::super::Foundation:: BOOL); - GetDiskInfoA(pszpath.param().abi(), core::mem::transmute(pdwclustersize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdlavail.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdltotal.unwrap_or(std::ptr::null_mut()))) + GetDiskInfoA(pszpath.param().abi(), core::mem::transmute(pdwclustersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdlavail.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdltotal.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetUrlCacheConfigInfoA(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOA, lpcbcacheconfiginfo: 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).ok() + GetUrlCacheConfigInfoA(lpcacheconfiginfo, core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::ptr::null())), dwfieldcontrol).ok() } #[inline] pub unsafe fn GetUrlCacheConfigInfoW(lpcacheconfiginfo: *mut INTERNET_CACHE_CONFIG_INFOW, lpcbcacheconfiginfo: 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).ok() + GetUrlCacheConfigInfoW(lpcacheconfiginfo, core::mem::transmute(lpcbcacheconfiginfo.unwrap_or(core::ptr::null())), dwfieldcontrol).ok() } #[inline] pub unsafe fn GetUrlCacheEntryBinaryBlob(pwszurlname: P0, dwtype: *mut u32, pftexpiretime: *mut super::super::Foundation::FILETIME, pftaccesstime: *mut super::super::Foundation::FILETIME, pftmodifiedtime: *mut super::super::Foundation::FILETIME, ppbblob: *mut *mut u8, pcbblob: *mut u32) -> u32 @@ -667,7 +667,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(std::ptr::null_mut()))).ok() + GetUrlCacheEntryInfoA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetUrlCacheEntryInfoExA(lpszurl: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> @@ -676,7 +676,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), dwflags).ok() + GetUrlCacheEntryInfoExA(lpszurl.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn GetUrlCacheEntryInfoExW(lpszurl: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: Option<*mut u32>, lpszredirecturl: P1, lpcbredirecturl: Option<*const u32>, lpreserved: Option<*const core::ffi::c_void>, dwflags: u32) -> windows_core::Result<()> @@ -685,7 +685,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), dwflags).ok() + GetUrlCacheEntryInfoExW(lpszurl.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpszredirecturl.param().abi(), core::mem::transmute(lpcbredirecturl.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn GetUrlCacheEntryInfoW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: Option<*mut u32>) -> windows_core::Result<()> @@ -693,17 +693,17 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(std::ptr::null_mut()))).ok() + GetUrlCacheEntryInfoW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbcacheentryinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOA, lpcbgroupinfo: *mut u32, lpreserved: 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()))).ok() + GetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn GetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *mut INTERNET_CACHE_GROUP_INFOW, lpcbgroupinfo: *mut u32, lpreserved: 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()))).ok() + GetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, lpcbgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn GetUrlCacheHeaderData(nidx: u32, lpdwdata: *mut u32) -> super::super::Foundation::BOOL { @@ -737,7 +737,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherFindFirstFileA(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCSTR, lpszsearchstring : windows_core::PCSTR, lpfinddata : *mut GOPHER_FIND_DATAA, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - GopherFindFirstFileA(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(std::ptr::null_mut())), dwflags, dwcontext) + GopherFindFirstFileA(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext) } #[inline] pub unsafe fn GopherFindFirstFileW(hconnect: *const core::ffi::c_void, lpszlocator: P0, lpszsearchstring: P1, lpfinddata: Option<*mut GOPHER_FIND_DATAW>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void @@ -746,7 +746,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn GopherFindFirstFileW(hconnect : *const core::ffi::c_void, lpszlocator : windows_core::PCWSTR, lpszsearchstring : windows_core::PCWSTR, lpfinddata : *mut GOPHER_FIND_DATAW, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - GopherFindFirstFileW(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(std::ptr::null_mut())), dwflags, dwcontext) + GopherFindFirstFileW(hconnect, lpszlocator.param().abi(), lpszsearchstring.param().abi(), core::mem::transmute(lpfinddata.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext) } #[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) -> windows_core::Result<()> @@ -843,12 +843,12 @@ pub unsafe fn HttpDuplicateDependencyHandle(hdependencyhandle: *const core::ffi: #[inline] pub unsafe fn HttpEndRequestA(hrequest: *const core::ffi::c_void, lpbuffersout: 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).ok() + HttpEndRequestA(hrequest, core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext).ok() } #[inline] pub unsafe fn HttpEndRequestW(hrequest: *const core::ffi::c_void, lpbuffersout: 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).ok() + HttpEndRequestW(hrequest, core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext).ok() } #[inline] pub unsafe fn HttpGetServerCredentials(pwszurl: P0, ppwszusername: *mut windows_core::PWSTR, ppwszpassword: *mut windows_core::PWSTR) -> u32 @@ -888,7 +888,7 @@ where P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpOpenRequestA(hconnect : *const core::ffi::c_void, lpszverb : windows_core::PCSTR, lpszobjectname : windows_core::PCSTR, lpszversion : windows_core::PCSTR, lpszreferrer : windows_core::PCSTR, lplpszaccepttypes : *const windows_core::PCSTR, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - HttpOpenRequestA(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(std::ptr::null())), dwflags, dwcontext) + HttpOpenRequestA(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::ptr::null())), dwflags, dwcontext) } #[inline] pub unsafe fn HttpOpenRequestW(hconnect: *const core::ffi::c_void, lpszverb: P0, lpszobjectname: P1, lpszversion: P2, lpszreferrer: P3, lplpszaccepttypes: Option<*const windows_core::PCWSTR>, dwflags: u32, dwcontext: usize) -> *mut core::ffi::c_void @@ -899,7 +899,7 @@ where P3: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpOpenRequestW(hconnect : *const core::ffi::c_void, lpszverb : windows_core::PCWSTR, lpszobjectname : windows_core::PCWSTR, lpszversion : windows_core::PCWSTR, lpszreferrer : windows_core::PCWSTR, lplpszaccepttypes : *const windows_core::PCWSTR, dwflags : u32, dwcontext : usize) -> *mut core::ffi::c_void); - HttpOpenRequestW(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(std::ptr::null())), dwflags, dwcontext) + HttpOpenRequestW(hconnect, lpszverb.param().abi(), lpszobjectname.param().abi(), lpszversion.param().abi(), lpszreferrer.param().abi(), core::mem::transmute(lplpszaccepttypes.unwrap_or(core::ptr::null())), dwflags, dwcontext) } #[inline] pub unsafe fn HttpPushClose(hwait: P0) @@ -920,42 +920,42 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn HttpPushWait(hwait : HTTP_PUSH_WAIT_HANDLE, etype : HTTP_PUSH_WAIT_TYPE, pnotificationstatus : *mut HTTP_PUSH_NOTIFICATION_STATUS) -> u32); - HttpPushWait(hwait.param().abi(), etype, core::mem::transmute(pnotificationstatus.unwrap_or(std::ptr::null_mut()))) + HttpPushWait(hwait.param().abi(), etype, core::mem::transmute(pnotificationstatus.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HttpQueryInfoA(hrequest: *const core::ffi::c_void, dwinfolevel: u32, lpbuffer: Option<*mut core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: 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()))).ok() + HttpQueryInfoA(hrequest, dwinfolevel, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength, core::mem::transmute(lpdwindex.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HttpQueryInfoW(hrequest: *const core::ffi::c_void, dwinfolevel: u32, lpbuffer: Option<*mut core::ffi::c_void>, lpdwbufferlength: *mut u32, lpdwindex: 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()))).ok() + HttpQueryInfoW(hrequest, dwinfolevel, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength, core::mem::transmute(lpdwindex.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HttpSendRequestA(hrequest: *const core::ffi::c_void, lpszheaders: Option<&[u8]>, lpoptional: 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(std::ptr::null())), dwoptionallength).ok() + 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(core::ptr::null())), dwoptionallength).ok() } #[inline] pub unsafe fn HttpSendRequestExA(hrequest: *const core::ffi::c_void, lpbuffersin: Option<*const INTERNET_BUFFERSA>, lpbuffersout: 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).ok() + HttpSendRequestExA(hrequest, core::mem::transmute(lpbuffersin.unwrap_or(core::ptr::null())), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext).ok() } #[inline] pub unsafe fn HttpSendRequestExW(hrequest: *const core::ffi::c_void, lpbuffersin: Option<*const INTERNET_BUFFERSW>, lpbuffersout: 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).ok() + HttpSendRequestExW(hrequest, core::mem::transmute(lpbuffersin.unwrap_or(core::ptr::null())), core::mem::transmute(lpbuffersout.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext).ok() } #[inline] pub unsafe fn HttpSendRequestW(hrequest: *const core::ffi::c_void, lpszheaders: Option<&[u16]>, lpoptional: 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(std::ptr::null())), dwoptionallength).ok() + 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().try_into().unwrap()), core::mem::transmute(lpoptional.unwrap_or(core::ptr::null())), dwoptionallength).ok() } #[inline] pub unsafe fn HttpWebSocketClose(hwebsocket: *const core::ffi::c_void, usstatus: u16, pvreason: Option<*const core::ffi::c_void>, dwreasonlength: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn HttpWebSocketClose(hwebsocket : *const core::ffi::c_void, usstatus : u16, pvreason : *const core::ffi::c_void, dwreasonlength : u32) -> super::super::Foundation:: BOOL); - HttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null())), dwreasonlength) + HttpWebSocketClose(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), dwreasonlength) } #[inline] pub unsafe fn HttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, dwcontext: usize) -> *mut core::ffi::c_void { @@ -965,7 +965,7 @@ pub unsafe fn HttpWebSocketCompleteUpgrade(hrequest: *const core::ffi::c_void, d #[inline] pub unsafe fn HttpWebSocketQueryCloseStatus(hwebsocket: *const core::ffi::c_void, pusstatus: *mut u16, pvreason: Option<*mut core::ffi::c_void>, dwreasonlength: u32, pdwreasonlengthconsumed: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn HttpWebSocketQueryCloseStatus(hwebsocket : *const core::ffi::c_void, pusstatus : *mut u16, pvreason : *mut core::ffi::c_void, dwreasonlength : u32, pdwreasonlengthconsumed : *mut u32) -> super::super::Foundation:: BOOL); - HttpWebSocketQueryCloseStatus(hwebsocket, pusstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null_mut())), dwreasonlength, pdwreasonlengthconsumed) + HttpWebSocketQueryCloseStatus(hwebsocket, pusstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null_mut())), dwreasonlength, pdwreasonlengthconsumed) } #[inline] pub unsafe fn HttpWebSocketReceive(hwebsocket: *const core::ffi::c_void, pvbuffer: *mut core::ffi::c_void, dwbufferlength: u32, pdwbytesread: *mut u32, pbuffertype: *mut HTTP_WEB_SOCKET_BUFFER_TYPE) -> super::super::Foundation::BOOL { @@ -975,12 +975,12 @@ pub unsafe fn HttpWebSocketReceive(hwebsocket: *const core::ffi::c_void, pvbuffe #[inline] pub unsafe fn HttpWebSocketSend(hwebsocket: *const core::ffi::c_void, buffertype: HTTP_WEB_SOCKET_BUFFER_TYPE, pvbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn HttpWebSocketSend(hwebsocket : *const core::ffi::c_void, buffertype : HTTP_WEB_SOCKET_BUFFER_TYPE, pvbuffer : *const core::ffi::c_void, dwbufferlength : u32) -> super::super::Foundation:: BOOL); - HttpWebSocketSend(hwebsocket, buffertype, core::mem::transmute(pvbuffer.unwrap_or(std::ptr::null())), dwbufferlength) + HttpWebSocketSend(hwebsocket, buffertype, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null())), dwbufferlength) } #[inline] pub unsafe fn HttpWebSocketShutdown(hwebsocket: *const core::ffi::c_void, usstatus: u16, pvreason: Option<*const core::ffi::c_void>, dwreasonlength: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn HttpWebSocketShutdown(hwebsocket : *const core::ffi::c_void, usstatus : u16, pvreason : *const core::ffi::c_void, dwreasonlength : u32) -> super::super::Foundation:: BOOL); - HttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(std::ptr::null())), dwreasonlength) + HttpWebSocketShutdown(hwebsocket, usstatus, core::mem::transmute(pvreason.unwrap_or(core::ptr::null())), dwreasonlength) } #[inline] pub unsafe fn ImportCookieFileA(szfilename: P0) -> super::super::Foundation::BOOL @@ -1228,7 +1228,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn InternetErrorDlg(hwnd : super::super::Foundation:: HWND, hrequest : *mut core::ffi::c_void, dwerror : u32, dwflags : u32, lppvdata : *mut *mut core::ffi::c_void) -> u32); - InternetErrorDlg(hwnd.param().abi(), core::mem::transmute(hrequest.unwrap_or(std::ptr::null_mut())), dwerror, dwflags, core::mem::transmute(lppvdata.unwrap_or(std::ptr::null_mut()))) + InternetErrorDlg(hwnd.param().abi(), core::mem::transmute(hrequest.unwrap_or(core::ptr::null_mut())), dwerror, dwflags, core::mem::transmute(lppvdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn InternetFindNextFileA(hfind: *const core::ffi::c_void, lpvfinddata: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1251,7 +1251,7 @@ where #[inline] pub unsafe fn InternetFreeCookies(pcookies: Option<*mut INTERNET_COOKIE2>, dwcookiecount: u32) { windows_targets::link!("wininet.dll" "system" fn InternetFreeCookies(pcookies : *mut INTERNET_COOKIE2, dwcookiecount : u32)); - InternetFreeCookies(core::mem::transmute(pcookies.unwrap_or(std::ptr::null_mut())), dwcookiecount) + InternetFreeCookies(core::mem::transmute(pcookies.unwrap_or(core::ptr::null_mut())), dwcookiecount) } #[inline] pub unsafe fn InternetFreeProxyInfoList(pproxyinfolist: *mut WININET_PROXY_INFO_LIST) { @@ -1271,12 +1271,12 @@ pub unsafe fn InternetGetConnectedStateEx(lpdwflags: *mut INTERNET_CONNECTION, l #[inline] pub unsafe fn InternetGetConnectedStateExA(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: 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().try_into().unwrap()), dwreserved).ok() + InternetGetConnectedStateExA(core::mem::transmute(lpdwflags.unwrap_or(core::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().try_into().unwrap()), dwreserved).ok() } #[inline] pub unsafe fn InternetGetConnectedStateExW(lpdwflags: Option<*mut INTERNET_CONNECTION>, lpszconnectionname: 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().try_into().unwrap()), dwreserved).ok() + InternetGetConnectedStateExW(core::mem::transmute(lpdwflags.unwrap_or(core::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().try_into().unwrap()), dwreserved).ok() } #[inline] pub unsafe fn InternetGetCookieA(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: windows_core::PSTR, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -1304,7 +1304,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize, dwflags, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + InternetGetCookieExA(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize, dwflags, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn InternetGetCookieExW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: P2, lpdwsize: *mut u32, dwflags: INTERNET_COOKIE_FLAGS, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1314,7 +1314,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize, dwflags, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + InternetGetCookieExW(lpszurl.param().abi(), lpszcookiename.param().abi(), lpszcookiedata.param().abi(), lpdwsize, dwflags, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn InternetGetCookieW(lpszurl: P0, lpszcookiename: P1, lpszcookiedata: windows_core::PWSTR, lpdwsize: *mut u32) -> windows_core::Result<()> @@ -1467,7 +1467,7 @@ where #[inline] pub unsafe fn InternetQueryDataAvailable(hfile: *const core::ffi::c_void, lpdwnumberofbytesavailable: 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).ok() + InternetQueryDataAvailable(hfile, core::mem::transmute(lpdwnumberofbytesavailable.unwrap_or(core::ptr::null_mut())), dwflags, dwcontext).ok() } #[inline] pub unsafe fn InternetQueryFortezzaStatus(pdwstatus: *mut u32, dwreserved: usize) -> super::super::Foundation::BOOL { @@ -1477,12 +1477,12 @@ pub unsafe fn InternetQueryFortezzaStatus(pdwstatus: *mut u32, dwreserved: usize #[inline] pub unsafe fn InternetQueryOptionA(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: 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).ok() + InternetQueryOptionA(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength).ok() } #[inline] pub unsafe fn InternetQueryOptionW(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: 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).ok() + InternetQueryOptionW(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength).ok() } #[inline] pub unsafe fn InternetReadFile(hfile: *const core::ffi::c_void, lpbuffer: *mut core::ffi::c_void, dwnumberofbytestoread: u32, lpdwnumberofbytesread: *mut u32) -> windows_core::Result<()> { @@ -1585,27 +1585,27 @@ where #[inline] pub unsafe fn InternetSetFilePointer(hfile: *const core::ffi::c_void, ldistancetomove: i32, lpdistancetomovehigh: Option<*mut i32>, dwmovemethod: u32, dwcontext: usize) -> u32 { windows_targets::link!("wininet.dll" "system" fn InternetSetFilePointer(hfile : *const core::ffi::c_void, ldistancetomove : i32, lpdistancetomovehigh : *mut i32, dwmovemethod : u32, dwcontext : usize) -> u32); - InternetSetFilePointer(hfile, ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(std::ptr::null_mut())), dwmovemethod, dwcontext) + InternetSetFilePointer(hfile, ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::ptr::null_mut())), dwmovemethod, dwcontext) } #[inline] pub unsafe fn InternetSetOptionA(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: 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).ok() + InternetSetOptionA(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), dwbufferlength).ok() } #[inline] pub unsafe fn InternetSetOptionExA(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetSetOptionExA(hinternet : *const core::ffi::c_void, dwoption : u32, lpbuffer : *const core::ffi::c_void, dwbufferlength : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetSetOptionExA(core::mem::transmute(hinternet.unwrap_or(std::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null())), dwbufferlength, dwflags) + InternetSetOptionExA(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), dwbufferlength, dwflags) } #[inline] pub unsafe fn InternetSetOptionExW(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn InternetSetOptionExW(hinternet : *const core::ffi::c_void, dwoption : u32, lpbuffer : *const core::ffi::c_void, dwbufferlength : u32, dwflags : u32) -> super::super::Foundation:: BOOL); - InternetSetOptionExW(core::mem::transmute(hinternet.unwrap_or(std::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null())), dwbufferlength, dwflags) + InternetSetOptionExW(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), dwbufferlength, dwflags) } #[inline] pub unsafe fn InternetSetOptionW(hinternet: Option<*const core::ffi::c_void>, dwoption: u32, lpbuffer: 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).ok() + InternetSetOptionW(core::mem::transmute(hinternet.unwrap_or(core::ptr::null())), dwoption, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null())), dwbufferlength).ok() } #[inline] pub unsafe fn InternetSetPerSiteCookieDecisionA(pchhostname: P0, dwdecision: u32) -> super::super::Foundation::BOOL @@ -1784,12 +1784,12 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn PerformOperationOverUrlCacheA(pszurlsearchpattern : windows_core::PCSTR, dwflags : u32, dwfilter : u32, groupid : i64, preserved1 : *const core::ffi::c_void, pdwreserved2 : *const u32, preserved3 : *const core::ffi::c_void, op : CACHE_OPERATOR, poperatordata : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - PerformOperationOverUrlCacheA(pszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(preserved1.unwrap_or(std::ptr::null())), core::mem::transmute(pdwreserved2.unwrap_or(std::ptr::null())), core::mem::transmute(preserved3.unwrap_or(std::ptr::null())), op, poperatordata) + PerformOperationOverUrlCacheA(pszurlsearchpattern.param().abi(), dwflags, dwfilter, groupid, core::mem::transmute(preserved1.unwrap_or(core::ptr::null())), core::mem::transmute(pdwreserved2.unwrap_or(core::ptr::null())), core::mem::transmute(preserved3.unwrap_or(core::ptr::null())), op, poperatordata) } #[inline] pub unsafe fn PrivacyGetZonePreferenceW(dwzone: u32, dwtype: u32, pdwtemplate: Option<*mut u32>, pszbuffer: windows_core::PWSTR, pdwbufferlength: Option<*mut u32>) -> u32 { windows_targets::link!("wininet.dll" "system" fn PrivacyGetZonePreferenceW(dwzone : u32, dwtype : u32, pdwtemplate : *mut u32, pszbuffer : windows_core::PWSTR, pdwbufferlength : *mut u32) -> u32); - PrivacyGetZonePreferenceW(dwzone, dwtype, core::mem::transmute(pdwtemplate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszbuffer), core::mem::transmute(pdwbufferlength.unwrap_or(std::ptr::null_mut()))) + PrivacyGetZonePreferenceW(dwzone, dwtype, core::mem::transmute(pdwtemplate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszbuffer), core::mem::transmute(pdwbufferlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PrivacySetZonePreferenceW(dwzone: u32, dwtype: u32, dwtemplate: u32, pszpreference: P0) -> u32 @@ -1802,7 +1802,7 @@ where #[inline] pub unsafe fn ReadGuidsForConnectedNetworks(pcnetworks: Option<*mut u32>, pppwsznetworkguids: Option<*mut *mut windows_core::PWSTR>, pppbstrnetworknames: Option<*mut *mut windows_core::BSTR>, pppwszgwmacs: Option<*mut *mut windows_core::PWSTR>, pcgatewaymacs: Option<*mut u32>, pdwflags: Option<*mut u32>) -> super::super::Foundation::BOOL { windows_targets::link!("wininet.dll" "system" fn ReadGuidsForConnectedNetworks(pcnetworks : *mut u32, pppwsznetworkguids : *mut *mut windows_core::PWSTR, pppbstrnetworknames : *mut *mut windows_core::BSTR, pppwszgwmacs : *mut *mut windows_core::PWSTR, pcgatewaymacs : *mut u32, pdwflags : *mut u32) -> super::super::Foundation:: BOOL); - ReadGuidsForConnectedNetworks(core::mem::transmute(pcnetworks.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pppwsznetworkguids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pppbstrnetworknames.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pppwszgwmacs.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcgatewaymacs.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut()))) + ReadGuidsForConnectedNetworks(core::mem::transmute(pcnetworks.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pppwsznetworkguids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pppbstrnetworknames.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pppwszgwmacs.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcgatewaymacs.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ReadUrlCacheEntryStream(hurlcachestream: P0, dwlocation: u32, lpbuffer: *mut core::ffi::c_void, lpdwlen: *mut u32, reserved: u32) -> windows_core::Result<()> @@ -1839,7 +1839,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() + RetrieveUrlCacheEntryFileA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() } #[inline] pub unsafe fn RetrieveUrlCacheEntryFileW(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOW>, lpcbcacheentryinfo: *mut u32, dwreserved: u32) -> windows_core::Result<()> @@ -1847,7 +1847,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() + RetrieveUrlCacheEntryFileW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, dwreserved).ok() } #[inline] pub unsafe fn RetrieveUrlCacheEntryStreamA(lpszurlname: P0, lpcacheentryinfo: Option<*mut INTERNET_CACHE_ENTRY_INFOA>, lpcbcacheentryinfo: *mut u32, frandomread: P1, dwreserved: u32) -> windows_core::Result @@ -1856,7 +1856,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryStreamA(lpszurlname : windows_core::PCSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOA, lpcbcacheentryinfo : *mut u32, frandomread : super::super::Foundation:: BOOL, dwreserved : u32) -> super::super::Foundation:: HANDLE); - let result__ = RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo, frandomread.param().abi(), dwreserved); + let result__ = RetrieveUrlCacheEntryStreamA(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, frandomread.param().abi(), dwreserved); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1866,7 +1866,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn RetrieveUrlCacheEntryStreamW(lpszurlname : windows_core::PCWSTR, lpcacheentryinfo : *mut INTERNET_CACHE_ENTRY_INFOW, lpcbcacheentryinfo : *mut u32, frandomread : super::super::Foundation:: BOOL, dwreserved : u32) -> super::super::Foundation:: HANDLE); - let result__ = RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(std::ptr::null_mut())), lpcbcacheentryinfo, frandomread.param().abi(), dwreserved); + let result__ = RetrieveUrlCacheEntryStreamW(lpszurlname.param().abi(), core::mem::transmute(lpcacheentryinfo.unwrap_or(core::ptr::null_mut())), lpcbcacheentryinfo, frandomread.param().abi(), dwreserved); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1895,7 +1895,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroup(lpszurlname : windows_core::PCSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetUrlCacheEntryGroup(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(std::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + SetUrlCacheEntryGroup(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetUrlCacheEntryGroupA(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: u32, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -1903,7 +1903,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroupA(lpszurlname : windows_core::PCSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetUrlCacheEntryGroupA(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(std::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + SetUrlCacheEntryGroupA(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetUrlCacheEntryGroupW(lpszurlname: P0, dwflags: u32, groupid: i64, pbgroupattributes: Option<*const u8>, cbgroupattributes: u32, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -1911,7 +1911,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn SetUrlCacheEntryGroupW(lpszurlname : windows_core::PCWSTR, dwflags : u32, groupid : i64, pbgroupattributes : *const u8, cbgroupattributes : u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetUrlCacheEntryGroupW(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(std::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + SetUrlCacheEntryGroupW(lpszurlname.param().abi(), dwflags, groupid, core::mem::transmute(pbgroupattributes.unwrap_or(core::ptr::null())), cbgroupattributes, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetUrlCacheEntryInfoA(lpszurlname: P0, lpcacheentryinfo: *const INTERNET_CACHE_ENTRY_INFOA, dwfieldcontrol: u32) -> windows_core::Result<()> @@ -1932,12 +1932,12 @@ where #[inline] pub unsafe fn SetUrlCacheGroupAttributeA(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOA, lpreserved: 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()))).ok() + SetUrlCacheGroupAttributeA(gid, dwflags, dwattributes, lpgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetUrlCacheGroupAttributeW(gid: i64, dwflags: u32, dwattributes: u32, lpgroupinfo: *const INTERNET_CACHE_GROUP_INFOW, lpreserved: 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()))).ok() + SetUrlCacheGroupAttributeW(gid, dwflags, dwattributes, lpgroupinfo, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetUrlCacheHeaderData(nidx: u32, dwdata: u32) -> super::super::Foundation::BOOL { @@ -2074,7 +2074,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheGetEntryInfo(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO) -> u32); - UrlCacheGetEntryInfo(core::mem::transmute(happcache.unwrap_or(std::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo.unwrap_or(std::ptr::null_mut()))) + UrlCacheGetEntryInfo(core::mem::transmute(happcache.unwrap_or(core::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pcacheentryinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn UrlCacheGetGlobalCacheSize(dwfilter: u32, pullsize: *mut u64, pulllimit: *mut u64) -> u32 { @@ -2102,7 +2102,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheRetrieveEntryFile(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO, phentryfile : *mut *mut core::ffi::c_void) -> u32); - UrlCacheRetrieveEntryFile(core::mem::transmute(happcache.unwrap_or(std::ptr::null())), pcwszurl.param().abi(), pcacheentryinfo, phentryfile) + UrlCacheRetrieveEntryFile(core::mem::transmute(happcache.unwrap_or(core::ptr::null())), pcwszurl.param().abi(), pcacheentryinfo, phentryfile) } #[inline] pub unsafe fn UrlCacheRetrieveEntryStream(happcache: Option<*const core::ffi::c_void>, pcwszurl: P0, frandomread: P1, pcacheentryinfo: *mut URLCACHE_ENTRY_INFO, phentrystream: *mut *mut core::ffi::c_void) -> u32 @@ -2111,7 +2111,7 @@ where P1: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheRetrieveEntryStream(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, frandomread : super::super::Foundation:: BOOL, pcacheentryinfo : *mut URLCACHE_ENTRY_INFO, phentrystream : *mut *mut core::ffi::c_void) -> u32); - UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(std::ptr::null())), pcwszurl.param().abi(), frandomread.param().abi(), pcacheentryinfo, phentrystream) + UrlCacheRetrieveEntryStream(core::mem::transmute(happcache.unwrap_or(core::ptr::null())), pcwszurl.param().abi(), frandomread.param().abi(), pcacheentryinfo, phentrystream) } #[inline] pub unsafe fn UrlCacheServer() -> u32 { @@ -2129,7 +2129,7 @@ where P0: windows_core::Param, { windows_targets::link!("wininet.dll" "system" fn UrlCacheUpdateEntryExtraData(happcache : *const core::ffi::c_void, pcwszurl : windows_core::PCWSTR, pbextradata : *const u8, cbextradata : u32) -> u32); - UrlCacheUpdateEntryExtraData(core::mem::transmute(happcache.unwrap_or(std::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) + UrlCacheUpdateEntryExtraData(core::mem::transmute(happcache.unwrap_or(core::ptr::null())), pcwszurl.param().abi(), core::mem::transmute(pbextradata.as_ptr()), pbextradata.len().try_into().unwrap()) } windows_core::imp::define_interface!(IDialBranding, IDialBranding_Vtbl, 0x8aecafa9_4306_43cc_8c5a_765f2979cc16); impl core::ops::Deref for IDialBranding { diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs index 978b86b402..8e00728d1a 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WinSock/mod.rs @@ -11,27 +11,27 @@ where #[inline] pub unsafe fn EnumProtocolsA(lpiprotocols: Option<*const i32>, lpprotocolbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("mswsock.dll" "system" fn EnumProtocolsA(lpiprotocols : *const i32, lpprotocolbuffer : *mut core::ffi::c_void, lpdwbufferlength : *mut u32) -> i32); - EnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), lpprotocolbuffer, lpdwbufferlength) + EnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), lpprotocolbuffer, lpdwbufferlength) } #[inline] pub unsafe fn EnumProtocolsW(lpiprotocols: Option<*const i32>, lpprotocolbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("mswsock.dll" "system" fn EnumProtocolsW(lpiprotocols : *const i32, lpprotocolbuffer : *mut core::ffi::c_void, lpdwbufferlength : *mut u32) -> i32); - EnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), lpprotocolbuffer, lpdwbufferlength) + EnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), lpprotocolbuffer, lpdwbufferlength) } #[inline] pub unsafe fn FreeAddrInfoEx(paddrinfoex: Option<*const ADDRINFOEXA>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoEx(paddrinfoex : *const ADDRINFOEXA)); - FreeAddrInfoEx(core::mem::transmute(paddrinfoex.unwrap_or(std::ptr::null()))) + FreeAddrInfoEx(core::mem::transmute(paddrinfoex.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FreeAddrInfoExW(paddrinfoex: Option<*const ADDRINFOEXW>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoExW(paddrinfoex : *const ADDRINFOEXW)); - FreeAddrInfoExW(core::mem::transmute(paddrinfoex.unwrap_or(std::ptr::null()))) + FreeAddrInfoExW(core::mem::transmute(paddrinfoex.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FreeAddrInfoW(paddrinfo: Option<*const ADDRINFOW>) { windows_targets::link!("ws2_32.dll" "system" fn FreeAddrInfoW(paddrinfo : *const ADDRINFOW)); - FreeAddrInfoW(core::mem::transmute(paddrinfo.unwrap_or(std::ptr::null()))) + FreeAddrInfoW(core::mem::transmute(paddrinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetAcceptExSockaddrs(lpoutputbuffer: *const core::ffi::c_void, dwreceivedatalength: u32, dwlocaladdresslength: u32, dwremoteaddresslength: u32, localsockaddr: *mut *mut SOCKADDR, localsockaddrlength: *mut i32, remotesockaddr: *mut *mut SOCKADDR, remotesockaddrlength: *mut i32) { @@ -46,7 +46,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoExA(pname : windows_core::PCSTR, pservicename : windows_core::PCSTR, dwnamespace : u32, lpnspid : *const windows_core::GUID, hints : *const ADDRINFOEXA, ppresult : *mut *mut ADDRINFOEXA, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - GetAddrInfoExA(pname.param().abi(), pservicename.param().abi(), dwnamespace, core::mem::transmute(lpnspid.unwrap_or(std::ptr::null())), core::mem::transmute(hints.unwrap_or(std::ptr::null())), ppresult, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null())), lpcompletionroutine, core::mem::transmute(lpnamehandle.unwrap_or(std::ptr::null_mut()))) + GetAddrInfoExA(pname.param().abi(), pservicename.param().abi(), dwnamespace, core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), core::mem::transmute(hints.unwrap_or(core::ptr::null())), ppresult, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), lpcompletionroutine, core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetAddrInfoExCancel(lphandle: *const super::super::Foundation::HANDLE) -> i32 { @@ -67,7 +67,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoExW(pname : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, dwnamespace : u32, lpnspid : *const windows_core::GUID, hints : *const ADDRINFOEXW, ppresult : *mut *mut ADDRINFOEXW, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lphandle : *mut super::super::Foundation:: HANDLE) -> i32); - GetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), dwnamespace, core::mem::transmute(lpnspid.unwrap_or(std::ptr::null())), core::mem::transmute(hints.unwrap_or(std::ptr::null())), ppresult, core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null())), lpcompletionroutine, core::mem::transmute(lphandle.unwrap_or(std::ptr::null_mut()))) + GetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), dwnamespace, core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), core::mem::transmute(hints.unwrap_or(core::ptr::null())), ppresult, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), lpcompletionroutine, core::mem::transmute(lphandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetAddrInfoW(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOW>, ppresult: *mut *mut ADDRINFOW) -> i32 @@ -76,7 +76,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn GetAddrInfoW(pnodename : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, phints : *const ADDRINFOW, ppresult : *mut *mut ADDRINFOW) -> i32); - GetAddrInfoW(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(std::ptr::null())), ppresult) + GetAddrInfoW(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::ptr::null())), ppresult) } #[inline] pub unsafe fn GetAddressByNameA(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P0, lpiprotocols: Option<*const i32>, dwresolution: u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpcsaddrbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32, lpaliasbuffer: windows_core::PSTR, lpdwaliasbufferlength: *mut u32) -> i32 @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetAddressByNameA(dwnamespace : u32, lpservicetype : *const windows_core::GUID, lpservicename : windows_core::PCSTR, lpiprotocols : *const i32, dwresolution : u32, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO, lpcsaddrbuffer : *mut core::ffi::c_void, lpdwbufferlength : *mut u32, lpaliasbuffer : windows_core::PSTR, lpdwaliasbufferlength : *mut u32) -> i32); - GetAddressByNameA(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), dwresolution, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null())), lpcsaddrbuffer, lpdwbufferlength, core::mem::transmute(lpaliasbuffer), lpdwaliasbufferlength) + GetAddressByNameA(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), dwresolution, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), lpcsaddrbuffer, lpdwbufferlength, core::mem::transmute(lpaliasbuffer), lpdwaliasbufferlength) } #[inline] pub unsafe fn GetAddressByNameW(dwnamespace: u32, lpservicetype: *const windows_core::GUID, lpservicename: P0, lpiprotocols: Option<*const i32>, dwresolution: u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpcsaddrbuffer: *mut core::ffi::c_void, lpdwbufferlength: *mut u32, lpaliasbuffer: windows_core::PWSTR, lpdwaliasbufferlength: *mut u32) -> i32 @@ -92,7 +92,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetAddressByNameW(dwnamespace : u32, lpservicetype : *const windows_core::GUID, lpservicename : windows_core::PCWSTR, lpiprotocols : *const i32, dwresolution : u32, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO, lpcsaddrbuffer : *mut core::ffi::c_void, lpdwbufferlength : *mut u32, lpaliasbuffer : windows_core::PWSTR, lpdwaliasbufferlength : *mut u32) -> i32); - GetAddressByNameW(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), dwresolution, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null())), lpcsaddrbuffer, lpdwbufferlength, core::mem::transmute(lpaliasbuffer), lpdwaliasbufferlength) + GetAddressByNameW(dwnamespace, lpservicetype, lpservicename.param().abi(), core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), dwresolution, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), lpcsaddrbuffer, lpdwbufferlength, core::mem::transmute(lpaliasbuffer), lpdwaliasbufferlength) } #[inline] pub unsafe fn GetHostNameW(name: &mut [u16]) -> i32 { @@ -123,7 +123,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetServiceA(dwnamespace : u32, lpguid : *const windows_core::GUID, lpservicename : windows_core::PCSTR, dwproperties : u32, lpbuffer : *mut core::ffi::c_void, lpdwbuffersize : *mut u32, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO) -> i32); - GetServiceA(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer, lpdwbuffersize, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null()))) + GetServiceA(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer, lpdwbuffersize, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetServiceW(dwnamespace: u32, lpguid: *const windows_core::GUID, lpservicename: P0, dwproperties: u32, lpbuffer: *mut core::ffi::c_void, lpdwbuffersize: *mut u32, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>) -> i32 @@ -131,7 +131,7 @@ where P0: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn GetServiceW(dwnamespace : u32, lpguid : *const windows_core::GUID, lpservicename : windows_core::PCWSTR, dwproperties : u32, lpbuffer : *mut core::ffi::c_void, lpdwbuffersize : *mut u32, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO) -> i32); - GetServiceW(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer, lpdwbuffersize, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null()))) + GetServiceW(dwnamespace, lpguid, lpservicename.param().abi(), dwproperties, lpbuffer, lpdwbuffersize, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetTypeByNameA(lpservicename: P0, lpservicetype: *mut windows_core::GUID) -> i32 @@ -176,7 +176,7 @@ where timeoutms, completionportentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(completionportentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(receivedentrycount.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(receivedentrycount.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -321,7 +321,20 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn SetAddrInfoExA(pname : windows_core::PCSTR, pservicename : windows_core::PCSTR, paddresses : *const SOCKET_ADDRESS, dwaddresscount : u32, lpblob : *const super::super::System::Com:: BLOB, dwflags : u32, dwnamespace : u32, lpnspid : *const windows_core::GUID, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - SetAddrInfoExA(pname.param().abi(), pservicename.param().abi(), core::mem::transmute(paddresses.unwrap_or(std::ptr::null())), dwaddresscount, core::mem::transmute(lpblob.unwrap_or(std::ptr::null())), dwflags, dwnamespace, core::mem::transmute(lpnspid.unwrap_or(std::ptr::null())), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null())), lpcompletionroutine, core::mem::transmute(lpnamehandle.unwrap_or(std::ptr::null_mut()))) + SetAddrInfoExA( + pname.param().abi(), + pservicename.param().abi(), + core::mem::transmute(paddresses.unwrap_or(core::ptr::null())), + dwaddresscount, + core::mem::transmute(lpblob.unwrap_or(core::ptr::null())), + dwflags, + dwnamespace, + core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), + core::mem::transmute(timeout.unwrap_or(core::ptr::null())), + core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), + lpcompletionroutine, + core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut())), + ) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_IO"))] #[inline] @@ -331,19 +344,32 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn SetAddrInfoExW(pname : windows_core::PCWSTR, pservicename : windows_core::PCWSTR, paddresses : *const SOCKET_ADDRESS, dwaddresscount : u32, lpblob : *const super::super::System::Com:: BLOB, dwflags : u32, dwnamespace : u32, lpnspid : *const windows_core::GUID, timeout : *const TIMEVAL, lpoverlapped : *const super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPLOOKUPSERVICE_COMPLETION_ROUTINE, lpnamehandle : *mut super::super::Foundation:: HANDLE) -> i32); - SetAddrInfoExW(pname.param().abi(), pservicename.param().abi(), core::mem::transmute(paddresses.unwrap_or(std::ptr::null())), dwaddresscount, core::mem::transmute(lpblob.unwrap_or(std::ptr::null())), dwflags, dwnamespace, core::mem::transmute(lpnspid.unwrap_or(std::ptr::null())), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null())), lpcompletionroutine, core::mem::transmute(lpnamehandle.unwrap_or(std::ptr::null_mut()))) + SetAddrInfoExW( + pname.param().abi(), + pservicename.param().abi(), + core::mem::transmute(paddresses.unwrap_or(core::ptr::null())), + dwaddresscount, + core::mem::transmute(lpblob.unwrap_or(core::ptr::null())), + dwflags, + dwnamespace, + core::mem::transmute(lpnspid.unwrap_or(core::ptr::null())), + core::mem::transmute(timeout.unwrap_or(core::ptr::null())), + core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null())), + lpcompletionroutine, + core::mem::transmute(lpnamehandle.unwrap_or(core::ptr::null_mut())), + ) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn SetServiceA(dwnamespace: u32, dwoperation: SET_SERVICE_OPERATION, dwflags: u32, lpserviceinfo: *const SERVICE_INFOA, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpdwstatusflags: *mut u32) -> i32 { windows_targets::link!("mswsock.dll" "system" fn SetServiceA(dwnamespace : u32, dwoperation : SET_SERVICE_OPERATION, dwflags : u32, lpserviceinfo : *const SERVICE_INFOA, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO, lpdwstatusflags : *mut u32) -> i32); - SetServiceA(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null())), lpdwstatusflags) + SetServiceA(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), lpdwstatusflags) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn SetServiceW(dwnamespace: u32, dwoperation: SET_SERVICE_OPERATION, dwflags: u32, lpserviceinfo: *const SERVICE_INFOW, lpserviceasyncinfo: Option<*const SERVICE_ASYNC_INFO>, lpdwstatusflags: *mut u32) -> i32 { windows_targets::link!("mswsock.dll" "system" fn SetServiceW(dwnamespace : u32, dwoperation : SET_SERVICE_OPERATION, dwflags : u32, lpserviceinfo : *const SERVICE_INFOW, lpserviceasyncinfo : *const SERVICE_ASYNC_INFO, lpdwstatusflags : *mut u32) -> i32); - SetServiceW(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(std::ptr::null())), lpdwstatusflags) + SetServiceW(dwnamespace, dwoperation, dwflags, lpserviceinfo, core::mem::transmute(lpserviceasyncinfo.unwrap_or(core::ptr::null())), lpdwstatusflags) } #[inline] pub unsafe fn SetSocketMediaStreamingMode(value: P0) -> windows_core::Result<()> @@ -361,7 +387,7 @@ where P1: windows_core::Param, { windows_targets::link!("mswsock.dll" "system" fn TransmitFile(hsocket : SOCKET, hfile : super::super::Foundation:: HANDLE, nnumberofbytestowrite : u32, nnumberofbytespersend : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lptransmitbuffers : *const TRANSMIT_FILE_BUFFERS, dwreserved : u32) -> super::super::Foundation:: BOOL); - TransmitFile(hsocket.param().abi(), hfile.param().abi(), nnumberofbytestowrite, nnumberofbytespersend, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lptransmitbuffers.unwrap_or(std::ptr::null())), dwreserved) + TransmitFile(hsocket.param().abi(), hfile.param().abi(), nnumberofbytestowrite, nnumberofbytespersend, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptransmitbuffers.unwrap_or(core::ptr::null())), dwreserved) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -378,18 +404,18 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAAccept(s : SOCKET, addr : *mut SOCKADDR, addrlen : *mut i32, lpfncondition : LPCONDITIONPROC, dwcallbackdata : usize) -> SOCKET); - let result__ = WSAAccept(s.param().abi(), core::mem::transmute(addr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(std::ptr::null_mut())), lpfncondition, dwcallbackdata); + let result__ = WSAAccept(s.param().abi(), core::mem::transmute(addr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(core::ptr::null_mut())), lpfncondition, dwcallbackdata); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn WSAAddressToStringA(lpsaaddress: *const SOCKADDR, dwaddresslength: u32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOA>, lpszaddressstring: windows_core::PSTR, lpdwaddressstringlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAAddressToStringA(lpsaaddress : *const SOCKADDR, dwaddresslength : u32, lpprotocolinfo : *const WSAPROTOCOL_INFOA, lpszaddressstring : windows_core::PSTR, lpdwaddressstringlength : *mut u32) -> i32); - WSAAddressToStringA(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), core::mem::transmute(lpszaddressstring), lpdwaddressstringlength) + WSAAddressToStringA(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpszaddressstring), lpdwaddressstringlength) } #[inline] pub unsafe fn WSAAddressToStringW(lpsaaddress: *const SOCKADDR, dwaddresslength: u32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, lpszaddressstring: windows_core::PWSTR, lpdwaddressstringlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAAddressToStringW(lpsaaddress : *const SOCKADDR, dwaddresslength : u32, lpprotocolinfo : *const WSAPROTOCOL_INFOW, lpszaddressstring : windows_core::PWSTR, lpdwaddressstringlength : *mut u32) -> i32); - WSAAddressToStringW(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), core::mem::transmute(lpszaddressstring), lpdwaddressstringlength) + WSAAddressToStringW(lpsaaddress, dwaddresslength, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), core::mem::transmute(lpszaddressstring), lpdwaddressstringlength) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -497,7 +523,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnect(s : SOCKET, name : *const SOCKADDR, namelen : i32, lpcallerdata : *const WSABUF, lpcalleedata : *mut WSABUF, lpsqos : *const QOS, lpgqos : *const QOS) -> i32); - WSAConnect(s.param().abi(), name, namelen, core::mem::transmute(lpcallerdata.unwrap_or(std::ptr::null())), core::mem::transmute(lpcalleedata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpsqos.unwrap_or(std::ptr::null())), core::mem::transmute(lpgqos.unwrap_or(std::ptr::null()))) + WSAConnect(s.param().abi(), name, namelen, core::mem::transmute(lpcallerdata.unwrap_or(core::ptr::null())), core::mem::transmute(lpcalleedata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsqos.unwrap_or(core::ptr::null())), core::mem::transmute(lpgqos.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -506,7 +532,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnectByList(s : SOCKET, socketaddress : *const SOCKET_ADDRESS_LIST, localaddresslength : *mut u32, localaddress : *mut SOCKADDR, remoteaddresslength : *mut u32, remoteaddress : *mut SOCKADDR, timeout : *const TIMEVAL, reserved : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WSAConnectByList(s.param().abi(), socketaddress, core::mem::transmute(localaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + WSAConnectByList(s.param().abi(), socketaddress, core::mem::transmute(localaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -517,7 +543,7 @@ where P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnectByNameA(s : SOCKET, nodename : windows_core::PCSTR, servicename : windows_core::PCSTR, localaddresslength : *mut u32, localaddress : *mut SOCKADDR, remoteaddresslength : *mut u32, remoteaddress : *mut SOCKADDR, timeout : *const TIMEVAL, reserved : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WSAConnectByNameA(s.param().abi(), nodename.param().abi(), servicename.param().abi(), core::mem::transmute(localaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + WSAConnectByNameA(s.param().abi(), nodename.param().abi(), servicename.param().abi(), core::mem::transmute(localaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -528,7 +554,7 @@ where P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAConnectByNameW(s : SOCKET, nodename : windows_core::PCWSTR, servicename : windows_core::PCWSTR, localaddresslength : *mut u32, localaddress : *mut SOCKADDR, remoteaddresslength : *mut u32, remoteaddress : *mut SOCKADDR, timeout : *const TIMEVAL, reserved : *const super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - WSAConnectByNameW(s.param().abi(), nodename.param().abi(), servicename.param().abi(), core::mem::transmute(localaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(std::ptr::null())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + WSAConnectByNameW(s.param().abi(), nodename.param().abi(), servicename.param().abi(), core::mem::transmute(localaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(localaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddresslength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(remoteaddress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(core::ptr::null())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WSACreateEvent() -> windows_core::Result { @@ -543,7 +569,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn WSADeleteSocketPeerTargetName(socket : SOCKET, peeraddr : *const SOCKADDR, peeraddrlen : u32, overlapped : *const super::super::System::IO:: OVERLAPPED, completionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSADeleteSocketPeerTargetName(socket.param().abi(), peeraddr, peeraddrlen, core::mem::transmute(overlapped.unwrap_or(std::ptr::null())), completionroutine) + WSADeleteSocketPeerTargetName(socket.param().abi(), peeraddr, peeraddrlen, core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), completionroutine) } #[inline] pub unsafe fn WSADuplicateSocketA(s: P0, dwprocessid: u32, lpprotocolinfo: *mut WSAPROTOCOL_INFOA) -> i32 @@ -595,12 +621,12 @@ where #[inline] pub unsafe fn WSAEnumProtocolsA(lpiprotocols: Option<*const i32>, lpprotocolbuffer: Option<*mut WSAPROTOCOL_INFOA>, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumProtocolsA(lpiprotocols : *const i32, lpprotocolbuffer : *mut WSAPROTOCOL_INFOA, lpdwbufferlength : *mut u32) -> i32); - WSAEnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(std::ptr::null_mut())), lpdwbufferlength) + WSAEnumProtocolsA(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength) } #[inline] pub unsafe fn WSAEnumProtocolsW(lpiprotocols: Option<*const i32>, lpprotocolbuffer: Option<*mut WSAPROTOCOL_INFOW>, lpdwbufferlength: *mut u32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAEnumProtocolsW(lpiprotocols : *const i32, lpprotocolbuffer : *mut WSAPROTOCOL_INFOW, lpdwbufferlength : *mut u32) -> i32); - WSAEnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(std::ptr::null_mut())), lpdwbufferlength) + WSAEnumProtocolsW(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength) } #[inline] pub unsafe fn WSAEventSelect(s: P0, heventobject: P1, lnetworkevents: i32) -> i32 @@ -676,7 +702,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn WSAImpersonateSocketPeer(socket : SOCKET, peeraddr : *const SOCKADDR, peeraddrlen : u32) -> i32); - WSAImpersonateSocketPeer(socket.param().abi(), core::mem::transmute(peeraddr.unwrap_or(std::ptr::null())), peeraddrlen) + WSAImpersonateSocketPeer(socket.param().abi(), core::mem::transmute(peeraddr.unwrap_or(core::ptr::null())), peeraddrlen) } #[inline] pub unsafe fn WSAInstallServiceClassA(lpserviceclassinfo: *const WSASERVICECLASSINFOA) -> i32 { @@ -695,7 +721,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAIoctl(s : SOCKET, dwiocontrolcode : u32, lpvinbuffer : *const core::ffi::c_void, cbinbuffer : u32, lpvoutbuffer : *mut core::ffi::c_void, cboutbuffer : u32, lpcbbytesreturned : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSAIoctl(s.param().abi(), dwiocontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(std::ptr::null())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffer, lpcbbytesreturned, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSAIoctl(s.param().abi(), dwiocontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(core::ptr::null())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffer, lpcbbytesreturned, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSAIsBlocking() -> windows_core::Result<()> { @@ -708,7 +734,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAJoinLeaf(s : SOCKET, name : *const SOCKADDR, namelen : i32, lpcallerdata : *const WSABUF, lpcalleedata : *mut WSABUF, lpsqos : *const QOS, lpgqos : *const QOS, dwflags : u32) -> SOCKET); - let result__ = WSAJoinLeaf(s.param().abi(), name, namelen, core::mem::transmute(lpcallerdata.unwrap_or(std::ptr::null())), core::mem::transmute(lpcalleedata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpsqos.unwrap_or(std::ptr::null())), core::mem::transmute(lpgqos.unwrap_or(std::ptr::null())), dwflags); + let result__ = WSAJoinLeaf(s.param().abi(), name, namelen, core::mem::transmute(lpcallerdata.unwrap_or(core::ptr::null())), core::mem::transmute(lpcalleedata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpsqos.unwrap_or(core::ptr::null())), core::mem::transmute(lpgqos.unwrap_or(core::ptr::null())), dwflags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_System_Com")] @@ -747,7 +773,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSALookupServiceNextW(hlookup : super::super::Foundation:: HANDLE, dwcontrolflags : u32, lpdwbufferlength : *mut u32, lpqsresults : *mut WSAQUERYSETW) -> i32); - WSALookupServiceNextW(hlookup.param().abi(), dwcontrolflags, lpdwbufferlength, core::mem::transmute(lpqsresults.unwrap_or(std::ptr::null_mut()))) + WSALookupServiceNextW(hlookup.param().abi(), dwcontrolflags, lpdwbufferlength, core::mem::transmute(lpqsresults.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -756,7 +782,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSANSPIoctl(hlookup : super::super::Foundation:: HANDLE, dwcontrolcode : u32, lpvinbuffer : *const core::ffi::c_void, cbinbuffer : u32, lpvoutbuffer : *mut core::ffi::c_void, cboutbuffer : u32, lpcbbytesreturned : *mut u32, lpcompletion : *const WSACOMPLETION) -> i32); - WSANSPIoctl(hlookup.param().abi(), dwcontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(std::ptr::null())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(std::ptr::null_mut())), cboutbuffer, lpcbbytesreturned, core::mem::transmute(lpcompletion.unwrap_or(std::ptr::null()))) + WSANSPIoctl(hlookup.param().abi(), dwcontrolcode, core::mem::transmute(lpvinbuffer.unwrap_or(core::ptr::null())), cbinbuffer, core::mem::transmute(lpvoutbuffer.unwrap_or(core::ptr::null_mut())), cboutbuffer, lpcbbytesreturned, core::mem::transmute(lpcompletion.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WSANtohl(s: P0, netlong: u32, lphostlong: *mut u32) -> i32 @@ -791,7 +817,7 @@ where #[inline] pub unsafe fn WSAProviderConfigChange(lpnotificationhandle: *mut super::super::Foundation::HANDLE, lpoverlapped: Option<*mut super::super::System::IO::OVERLAPPED>, lpcompletionroutine: LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSAProviderConfigChange(lpnotificationhandle : *mut super::super::Foundation:: HANDLE, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSAProviderConfigChange(lpnotificationhandle, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSAProviderConfigChange(lpnotificationhandle, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -800,7 +826,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn WSAQuerySocketSecurity(socket : SOCKET, securityquerytemplate : *const SOCKET_SECURITY_QUERY_TEMPLATE, securityquerytemplatelen : u32, securityqueryinfo : *mut SOCKET_SECURITY_QUERY_INFO, securityqueryinfolen : *mut u32, overlapped : *const super::super::System::IO:: OVERLAPPED, completionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSAQuerySocketSecurity(socket.param().abi(), core::mem::transmute(securityquerytemplate.unwrap_or(std::ptr::null())), securityquerytemplatelen, core::mem::transmute(securityqueryinfo.unwrap_or(std::ptr::null_mut())), securityqueryinfolen, core::mem::transmute(overlapped.unwrap_or(std::ptr::null())), completionroutine) + WSAQuerySocketSecurity(socket.param().abi(), core::mem::transmute(securityquerytemplate.unwrap_or(core::ptr::null())), securityquerytemplatelen, core::mem::transmute(securityqueryinfo.unwrap_or(core::ptr::null_mut())), securityqueryinfolen, core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), completionroutine) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -809,7 +835,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSARecv(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytesrecvd : *mut u32, lpflags : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSARecv(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(std::ptr::null_mut())), lpflags, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSARecv(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(core::ptr::null_mut())), lpflags, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSARecvDisconnect(s: P0, lpinbounddisconnectdata: Option<*const WSABUF>) -> i32 @@ -817,7 +843,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSARecvDisconnect(s : SOCKET, lpinbounddisconnectdata : *const WSABUF) -> i32); - WSARecvDisconnect(s.param().abi(), core::mem::transmute(lpinbounddisconnectdata.unwrap_or(std::ptr::null()))) + WSARecvDisconnect(s.param().abi(), core::mem::transmute(lpinbounddisconnectdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WSARecvEx(s: P0, buf: &mut [u8], flags: *mut i32) -> i32 @@ -834,7 +860,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSARecvFrom(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytesrecvd : *mut u32, lpflags : *mut u32, lpfrom : *mut SOCKADDR, lpfromlen : *mut i32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSARecvFrom(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(std::ptr::null_mut())), lpflags, core::mem::transmute(lpfrom.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpfromlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSARecvFrom(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytesrecvd.unwrap_or(core::ptr::null_mut())), lpflags, core::mem::transmute(lpfrom.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfromlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSARemoveServiceClass(lpserviceclassid: *const windows_core::GUID) -> i32 { @@ -861,7 +887,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSASend(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytessent : *mut u32, dwflags : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASend(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(std::ptr::null_mut())), dwflags, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSASend(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::ptr::null_mut())), dwflags, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSASendDisconnect(s: P0, lpoutbounddisconnectdata: Option<*const WSABUF>) -> i32 @@ -869,7 +895,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSASendDisconnect(s : SOCKET, lpoutbounddisconnectdata : *const WSABUF) -> i32); - WSASendDisconnect(s.param().abi(), core::mem::transmute(lpoutbounddisconnectdata.unwrap_or(std::ptr::null()))) + WSASendDisconnect(s.param().abi(), core::mem::transmute(lpoutbounddisconnectdata.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -878,7 +904,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSASendMsg(handle : SOCKET, lpmsg : *const WSAMSG, dwflags : u32, lpnumberofbytessent : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASendMsg(handle.param().abi(), lpmsg, dwflags, core::mem::transmute(lpnumberofbytessent.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSASendMsg(handle.param().abi(), lpmsg, dwflags, core::mem::transmute(lpnumberofbytessent.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -887,7 +913,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSASendTo(s : SOCKET, lpbuffers : *const WSABUF, dwbuffercount : u32, lpnumberofbytessent : *mut u32, dwflags : u32, lpto : *const SOCKADDR, itolen : i32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED, lpcompletionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASendTo(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(std::ptr::null_mut())), dwflags, core::mem::transmute(lpto.unwrap_or(std::ptr::null())), itolen, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), lpcompletionroutine) + WSASendTo(s.param().abi(), core::mem::transmute(lpbuffers.as_ptr()), lpbuffers.len().try_into().unwrap(), core::mem::transmute(lpnumberofbytessent.unwrap_or(core::ptr::null_mut())), dwflags, core::mem::transmute(lpto.unwrap_or(core::ptr::null())), itolen, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine) } #[inline] pub unsafe fn WSASetBlockingHook(lpblockfunc: super::super::Foundation::FARPROC) -> super::super::Foundation::FARPROC { @@ -926,7 +952,7 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn WSASetSocketPeerTargetName(socket : SOCKET, peertargetname : *const SOCKET_PEER_TARGET_NAME, peertargetnamelen : u32, overlapped : *const super::super::System::IO:: OVERLAPPED, completionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASetSocketPeerTargetName(socket.param().abi(), peertargetname, peertargetnamelen, core::mem::transmute(overlapped.unwrap_or(std::ptr::null())), completionroutine) + WSASetSocketPeerTargetName(socket.param().abi(), peertargetname, peertargetnamelen, core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), completionroutine) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -935,18 +961,18 @@ where P0: windows_core::Param, { windows_targets::link!("fwpuclnt.dll" "system" fn WSASetSocketSecurity(socket : SOCKET, securitysettings : *const SOCKET_SECURITY_SETTINGS, securitysettingslen : u32, overlapped : *const super::super::System::IO:: OVERLAPPED, completionroutine : LPWSAOVERLAPPED_COMPLETION_ROUTINE) -> i32); - WSASetSocketSecurity(socket.param().abi(), core::mem::transmute(securitysettings.unwrap_or(std::ptr::null())), securitysettingslen, core::mem::transmute(overlapped.unwrap_or(std::ptr::null())), completionroutine) + WSASetSocketSecurity(socket.param().abi(), core::mem::transmute(securitysettings.unwrap_or(core::ptr::null())), securitysettingslen, core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), completionroutine) } #[inline] pub unsafe fn WSASocketA(af: i32, r#type: i32, protocol: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOA>, g: u32, dwflags: u32) -> windows_core::Result { windows_targets::link!("ws2_32.dll" "system" fn WSASocketA(af : i32, r#type : i32, protocol : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOA, g : u32, dwflags : u32) -> SOCKET); - let result__ = WSASocketA(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), g, dwflags); + let result__ = WSASocketA(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), g, dwflags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn WSASocketW(af: i32, r#type: i32, protocol: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, g: u32, dwflags: u32) -> windows_core::Result { windows_targets::link!("ws2_32.dll" "system" fn WSASocketW(af : i32, r#type : i32, protocol : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOW, g : u32, dwflags : u32) -> SOCKET); - let result__ = WSASocketW(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), g, dwflags); + let result__ = WSASocketW(af, r#type, protocol, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), g, dwflags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -960,7 +986,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAStringToAddressA(addressstring : windows_core::PCSTR, addressfamily : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOA, lpaddress : *mut SOCKADDR, lpaddresslength : *mut i32) -> i32); - WSAStringToAddressA(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), lpaddress, lpaddresslength) + WSAStringToAddressA(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), lpaddress, lpaddresslength) } #[inline] pub unsafe fn WSAStringToAddressW(addressstring: P0, addressfamily: i32, lpprotocolinfo: Option<*const WSAPROTOCOL_INFOW>, lpaddress: *mut SOCKADDR, lpaddresslength: *mut i32) -> i32 @@ -968,7 +994,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSAStringToAddressW(addressstring : windows_core::PCWSTR, addressfamily : i32, lpprotocolinfo : *const WSAPROTOCOL_INFOW, lpaddress : *mut SOCKADDR, lpaddresslength : *mut i32) -> i32); - WSAStringToAddressW(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(std::ptr::null())), lpaddress, lpaddresslength) + WSAStringToAddressW(addressstring.param().abi(), addressfamily, core::mem::transmute(lpprotocolinfo.unwrap_or(core::ptr::null())), lpaddress, lpaddresslength) } #[inline] pub unsafe fn WSAUnadvertiseProvider(puuidproviderid: *const windows_core::GUID) -> i32 { @@ -1033,13 +1059,13 @@ pub unsafe fn WSCEnumNameSpaceProvidersEx32(lpdwbufferlength: *mut u32, lpnspbuf #[inline] pub unsafe fn WSCEnumProtocols(lpiprotocols: Option<*const i32>, lpprotocolbuffer: Option<*mut WSAPROTOCOL_INFOW>, lpdwbufferlength: *mut u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnumProtocols(lpiprotocols : *const i32, lpprotocolbuffer : *mut WSAPROTOCOL_INFOW, lpdwbufferlength : *mut u32, lperrno : *mut i32) -> i32); - WSCEnumProtocols(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(std::ptr::null_mut())), lpdwbufferlength, lperrno) + WSCEnumProtocols(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), core::mem::transmute(lpprotocolbuffer.unwrap_or(core::ptr::null_mut())), lpdwbufferlength, lperrno) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn WSCEnumProtocols32(lpiprotocols: Option<*const i32>, lpprotocolbuffer: *mut WSAPROTOCOL_INFOW, lpdwbufferlength: *mut u32, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCEnumProtocols32(lpiprotocols : *const i32, lpprotocolbuffer : *mut WSAPROTOCOL_INFOW, lpdwbufferlength : *mut u32, lperrno : *mut i32) -> i32); - WSCEnumProtocols32(core::mem::transmute(lpiprotocols.unwrap_or(std::ptr::null())), lpprotocolbuffer, lpdwbufferlength, lperrno) + WSCEnumProtocols32(core::mem::transmute(lpiprotocols.unwrap_or(core::ptr::null())), lpprotocolbuffer, lpdwbufferlength, lperrno) } #[inline] pub unsafe fn WSCGetApplicationCategory(path: &[u16], extra: Option<&[u16]>, ppermittedlspcategories: *mut u32, lperrno: *mut i32) -> i32 { @@ -1134,12 +1160,12 @@ where P2: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn WSCInstallProviderAndChains64_32(lpproviderid : *const windows_core::GUID, lpszproviderdllpath : windows_core::PCWSTR, lpszproviderdllpath32 : windows_core::PCWSTR, lpszlspname : windows_core::PCWSTR, dwserviceflags : u32, lpprotocolinfolist : *mut WSAPROTOCOL_INFOW, dwnumberofentries : u32, lpdwcatalogentryid : *mut u32, lperrno : *mut i32) -> i32); - WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), dwserviceflags, core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lpdwcatalogentryid.unwrap_or(std::ptr::null_mut())), lperrno) + WSCInstallProviderAndChains64_32(lpproviderid, lpszproviderdllpath.param().abi(), lpszproviderdllpath32.param().abi(), lpszlspname.param().abi(), dwserviceflags, core::mem::transmute(lpprotocolinfolist.as_ptr()), lpprotocolinfolist.len().try_into().unwrap(), core::mem::transmute(lpdwcatalogentryid.unwrap_or(core::ptr::null_mut())), lperrno) } #[inline] pub unsafe fn WSCSetApplicationCategory(path: &[u16], extra: Option<&[u16]>, permittedlspcategories: u32, pprevpermlspcat: Option<*mut u32>, lperrno: *mut i32) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn WSCSetApplicationCategory(path : windows_core::PCWSTR, pathlength : u32, extra : windows_core::PCWSTR, extralength : u32, permittedlspcategories : u32, pprevpermlspcat : *mut u32, lperrno : *mut i32) -> i32); - WSCSetApplicationCategory(core::mem::transmute(path.as_ptr()), path.len().try_into().unwrap(), core::mem::transmute(extra.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), permittedlspcategories, core::mem::transmute(pprevpermlspcat.unwrap_or(std::ptr::null_mut())), lperrno) + WSCSetApplicationCategory(core::mem::transmute(path.as_ptr()), path.len().try_into().unwrap(), core::mem::transmute(extra.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extra.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), permittedlspcategories, core::mem::transmute(pprevpermlspcat.unwrap_or(core::ptr::null_mut())), lperrno) } #[inline] pub unsafe fn WSCSetProviderInfo(lpproviderid: *const windows_core::GUID, infotype: WSC_PROVIDER_INFO_TYPE, info: &[u8], flags: u32, lperrno: *mut i32) -> i32 { @@ -1216,7 +1242,7 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn accept(s : SOCKET, addr : *mut SOCKADDR, addrlen : *mut i32) -> SOCKET); - let result__ = accept(s.param().abi(), core::mem::transmute(addr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(std::ptr::null_mut()))); + let result__ = accept(s.param().abi(), core::mem::transmute(addr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(addrlen.unwrap_or(core::ptr::null_mut()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1246,7 +1272,7 @@ where #[inline] pub unsafe fn freeaddrinfo(paddrinfo: Option<*const ADDRINFOA>) { windows_targets::link!("ws2_32.dll" "system" fn freeaddrinfo(paddrinfo : *const ADDRINFOA)); - freeaddrinfo(core::mem::transmute(paddrinfo.unwrap_or(std::ptr::null()))) + freeaddrinfo(core::mem::transmute(paddrinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn getaddrinfo(pnodename: P0, pservicename: P1, phints: Option<*const ADDRINFOA>, ppresult: *mut *mut ADDRINFOA) -> i32 @@ -1255,7 +1281,7 @@ where P1: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn getaddrinfo(pnodename : windows_core::PCSTR, pservicename : windows_core::PCSTR, phints : *const ADDRINFOA, ppresult : *mut *mut ADDRINFOA) -> i32); - getaddrinfo(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(std::ptr::null())), ppresult) + getaddrinfo(pnodename.param().abi(), pservicename.param().abi(), core::mem::transmute(phints.unwrap_or(core::ptr::null())), ppresult) } #[inline] pub unsafe fn gethostbyaddr(addr: &[u8], r#type: i32) -> *mut HOSTENT { @@ -1413,12 +1439,12 @@ where P0: windows_core::Param, { windows_targets::link!("ws2_32.dll" "system" fn recvfrom(s : SOCKET, buf : windows_core::PSTR, len : i32, flags : i32, from : *mut SOCKADDR, fromlen : *mut i32) -> i32); - recvfrom(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, core::mem::transmute(from.unwrap_or(std::ptr::null_mut())), core::mem::transmute(fromlen.unwrap_or(std::ptr::null_mut()))) + recvfrom(s.param().abi(), core::mem::transmute(buf.as_ptr()), buf.len().try_into().unwrap(), flags, core::mem::transmute(from.unwrap_or(core::ptr::null_mut())), core::mem::transmute(fromlen.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn select(nfds: i32, readfds: Option<*mut FD_SET>, writefds: Option<*mut FD_SET>, exceptfds: Option<*mut FD_SET>, timeout: Option<*const TIMEVAL>) -> i32 { windows_targets::link!("ws2_32.dll" "system" fn select(nfds : i32, readfds : *mut FD_SET, writefds : *mut FD_SET, exceptfds : *mut FD_SET, timeout : *const TIMEVAL) -> i32); - select(nfds, core::mem::transmute(readfds.unwrap_or(std::ptr::null_mut())), core::mem::transmute(writefds.unwrap_or(std::ptr::null_mut())), core::mem::transmute(exceptfds.unwrap_or(std::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(std::ptr::null()))) + select(nfds, core::mem::transmute(readfds.unwrap_or(core::ptr::null_mut())), core::mem::transmute(writefds.unwrap_or(core::ptr::null_mut())), core::mem::transmute(exceptfds.unwrap_or(core::ptr::null_mut())), core::mem::transmute(timeout.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn send(s: P0, buf: &[u8], flags: SEND_RECV_FLAGS) -> i32 diff --git a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs index 8caf844fab..83164e7524 100644 --- a/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Networking/WindowsWebServices/mod.rs @@ -6,7 +6,7 @@ where { windows_targets::link!("webauthn.dll" "system" fn WebAuthNAuthenticatorGetAssertion(hwnd : super::super::Foundation:: HWND, pwszrpid : windows_core::PCWSTR, pwebauthnclientdata : *const WEBAUTHN_CLIENT_DATA, pwebauthngetassertionoptions : *const WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS, ppwebauthnassertion : *mut *mut WEBAUTHN_ASSERTION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WebAuthNAuthenticatorGetAssertion(hwnd.param().abi(), pwszrpid.param().abi(), pwebauthnclientdata, core::mem::transmute(pwebauthngetassertionoptions.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WebAuthNAuthenticatorGetAssertion(hwnd.param().abi(), pwszrpid.param().abi(), pwebauthnclientdata, core::mem::transmute(pwebauthngetassertionoptions.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WebAuthNAuthenticatorMakeCredential(hwnd: P0, prpinformation: *const WEBAUTHN_RP_ENTITY_INFORMATION, puserinformation: *const WEBAUTHN_USER_ENTITY_INFORMATION, ppubkeycredparams: *const WEBAUTHN_COSE_CREDENTIAL_PARAMETERS, pwebauthnclientdata: *const WEBAUTHN_CLIENT_DATA, pwebauthnmakecredentialoptions: Option<*const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS>) -> windows_core::Result<*mut WEBAUTHN_CREDENTIAL_ATTESTATION> @@ -15,7 +15,7 @@ where { windows_targets::link!("webauthn.dll" "system" fn WebAuthNAuthenticatorMakeCredential(hwnd : super::super::Foundation:: HWND, prpinformation : *const WEBAUTHN_RP_ENTITY_INFORMATION, puserinformation : *const WEBAUTHN_USER_ENTITY_INFORMATION, ppubkeycredparams : *const WEBAUTHN_COSE_CREDENTIAL_PARAMETERS, pwebauthnclientdata : *const WEBAUTHN_CLIENT_DATA, pwebauthnmakecredentialoptions : *const WEBAUTHN_AUTHENTICATOR_MAKE_CREDENTIAL_OPTIONS, ppwebauthncredentialattestation : *mut *mut WEBAUTHN_CREDENTIAL_ATTESTATION) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WebAuthNAuthenticatorMakeCredential(hwnd.param().abi(), prpinformation, puserinformation, ppubkeycredparams, pwebauthnclientdata, core::mem::transmute(pwebauthnmakecredentialoptions.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WebAuthNAuthenticatorMakeCredential(hwnd.param().abi(), prpinformation, puserinformation, ppubkeycredparams, pwebauthnclientdata, core::mem::transmute(pwebauthnmakecredentialoptions.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WebAuthNCancelCurrentOperation(pcancellationid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -35,7 +35,7 @@ pub unsafe fn WebAuthNFreeAssertion(pwebauthnassertion: *const WEBAUTHN_ASSERTIO #[inline] pub unsafe fn WebAuthNFreeCredentialAttestation(pwebauthncredentialattestation: Option<*const WEBAUTHN_CREDENTIAL_ATTESTATION>) { windows_targets::link!("webauthn.dll" "system" fn WebAuthNFreeCredentialAttestation(pwebauthncredentialattestation : *const WEBAUTHN_CREDENTIAL_ATTESTATION)); - WebAuthNFreeCredentialAttestation(core::mem::transmute(pwebauthncredentialattestation.unwrap_or(std::ptr::null()))) + WebAuthNFreeCredentialAttestation(core::mem::transmute(pwebauthncredentialattestation.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn WebAuthNFreePlatformCredentialList(pcredentialdetailslist: *const WEBAUTHN_CREDENTIAL_DETAILS_LIST) { @@ -78,42 +78,42 @@ pub unsafe fn WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable() -> windows #[inline] pub unsafe fn WsAbandonCall(serviceproxy: *const WS_SERVICE_PROXY, callid: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbandonCall(serviceproxy : *const WS_SERVICE_PROXY, callid : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbandonCall(serviceproxy, callid, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbandonCall(serviceproxy, callid, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAbandonMessage(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbandonMessage(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbandonMessage(channel, message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbandonMessage(channel, message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAbortChannel(channel: *const WS_CHANNEL, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbortChannel(channel : *const WS_CHANNEL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbortChannel(channel, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbortChannel(channel, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAbortListener(listener: *const WS_LISTENER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbortListener(listener : *const WS_LISTENER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbortListener(listener, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbortListener(listener, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAbortServiceHost(servicehost: *const WS_SERVICE_HOST, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbortServiceHost(servicehost : *const WS_SERVICE_HOST, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbortServiceHost(servicehost, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbortServiceHost(servicehost, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAbortServiceProxy(serviceproxy: *const WS_SERVICE_PROXY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAbortServiceProxy(serviceproxy : *const WS_SERVICE_PROXY, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAbortServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAbortServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAcceptChannel(listener: *const WS_LISTENER, channel: *const WS_CHANNEL, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAcceptChannel(listener : *const WS_LISTENER, channel : *const WS_CHANNEL, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAcceptChannel(listener, channel, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAcceptChannel(listener, channel, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAddCustomHeader(message: *const WS_MESSAGE, headerdescription: *const WS_ELEMENT_DESCRIPTION, writeoption: WS_WRITE_OPTION, value: *const core::ffi::c_void, valuesize: u32, headerattributes: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAddCustomHeader(message : *const WS_MESSAGE, headerdescription : *const WS_ELEMENT_DESCRIPTION, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, headerattributes : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAddCustomHeader(message, headerdescription, writeoption, value, valuesize, headerattributes, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAddCustomHeader(message, headerdescription, writeoption, value, valuesize, headerattributes, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAddErrorString(error: *const WS_ERROR, string: *const WS_STRING) -> windows_core::Result<()> { @@ -123,57 +123,57 @@ pub unsafe fn WsAddErrorString(error: *const WS_ERROR, string: *const WS_STRING) #[inline] pub unsafe fn WsAddMappedHeader(message: *const WS_MESSAGE, headername: *const WS_XML_STRING, valuetype: WS_TYPE, writeoption: WS_WRITE_OPTION, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAddMappedHeader(message : *const WS_MESSAGE, headername : *const WS_XML_STRING, valuetype : WS_TYPE, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAddMappedHeader(message, headername, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAddMappedHeader(message, headername, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAddressMessage(message: *const WS_MESSAGE, address: Option<*const WS_ENDPOINT_ADDRESS>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAddressMessage(message : *const WS_MESSAGE, address : *const WS_ENDPOINT_ADDRESS, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAddressMessage(message, core::mem::transmute(address.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAddressMessage(message, core::mem::transmute(address.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAlloc(heap: *const WS_HEAP, size: usize, ptr: *mut *mut core::ffi::c_void, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAlloc(heap : *const WS_HEAP, size : usize, ptr : *mut *mut core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAlloc(heap, size, ptr, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAlloc(heap, size, ptr, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsAsyncExecute(asyncstate: *const WS_ASYNC_STATE, operation: WS_ASYNC_FUNCTION, callbackmodel: WS_CALLBACK_MODEL, callbackstate: Option<*const core::ffi::c_void>, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsAsyncExecute(asyncstate : *const WS_ASYNC_STATE, operation : WS_ASYNC_FUNCTION, callbackmodel : WS_CALLBACK_MODEL, callbackstate : *const core::ffi::c_void, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsAsyncExecute(asyncstate, operation, callbackmodel, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsAsyncExecute(asyncstate, operation, callbackmodel, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCall(serviceproxy: *const WS_SERVICE_PROXY, operation: *const WS_OPERATION_DESCRIPTION, arguments: Option<*const *const core::ffi::c_void>, heap: *const WS_HEAP, callproperties: Option<&[WS_CALL_PROPERTY]>, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCall(serviceproxy : *const WS_SERVICE_PROXY, operation : *const WS_OPERATION_DESCRIPTION, arguments : *const *const core::ffi::c_void, heap : *const WS_HEAP, callproperties : *const WS_CALL_PROPERTY, callpropertycount : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCall(serviceproxy, operation, core::mem::transmute(arguments.unwrap_or(std::ptr::null())), heap, core::mem::transmute(callproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), callproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCall(serviceproxy, operation, core::mem::transmute(arguments.unwrap_or(core::ptr::null())), heap, core::mem::transmute(callproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), callproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCheckMustUnderstandHeaders(message: *const WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCheckMustUnderstandHeaders(message : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCheckMustUnderstandHeaders(message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCheckMustUnderstandHeaders(message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCloseChannel(channel: *const WS_CHANNEL, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCloseChannel(channel : *const WS_CHANNEL, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCloseChannel(channel, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCloseChannel(channel, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCloseListener(listener: *const WS_LISTENER, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCloseListener(listener : *const WS_LISTENER, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCloseListener(listener, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCloseListener(listener, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCloseServiceHost(servicehost: *const WS_SERVICE_HOST, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCloseServiceHost(servicehost : *const WS_SERVICE_HOST, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCloseServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCloseServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCloseServiceProxy(serviceproxy: *const WS_SERVICE_PROXY, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCloseServiceProxy(serviceproxy : *const WS_SERVICE_PROXY, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCloseServiceProxy(serviceproxy, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCloseServiceProxy(serviceproxy, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCombineUrl(baseurl: *const WS_STRING, referenceurl: *const WS_STRING, flags: u32, heap: *const WS_HEAP, resulturl: *mut WS_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCombineUrl(baseurl : *const WS_STRING, referenceurl : *const WS_STRING, flags : u32, heap : *const WS_HEAP, resulturl : *mut WS_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCombineUrl(baseurl, referenceurl, flags, heap, resulturl, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCombineUrl(baseurl, referenceurl, flags, heap, resulturl, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCopyError(source: *const WS_ERROR, destination: *const WS_ERROR) -> windows_core::Result<()> { @@ -183,17 +183,17 @@ pub unsafe fn WsCopyError(source: *const WS_ERROR, destination: *const WS_ERROR) #[inline] pub unsafe fn WsCopyNode(writer: *const WS_XML_WRITER, reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCopyNode(writer : *const WS_XML_WRITER, reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCopyNode(writer, reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCopyNode(writer, reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateChannel(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, properties: Option<&[WS_CHANNEL_PROPERTY]>, securitydescription: Option<*const WS_SECURITY_DESCRIPTION>, channel: *mut *mut WS_CHANNEL, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateChannel(channeltype : WS_CHANNEL_TYPE, channelbinding : WS_CHANNEL_BINDING, properties : *const WS_CHANNEL_PROPERTY, propertycount : u32, securitydescription : *const WS_SECURITY_DESCRIPTION, channel : *mut *mut WS_CHANNEL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateChannel(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(std::ptr::null())), channel, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateChannel(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(core::ptr::null())), channel, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateChannelForListener(listener: *const WS_LISTENER, properties: Option<&[WS_CHANNEL_PROPERTY]>, channel: *mut *mut WS_CHANNEL, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateChannelForListener(listener : *const WS_LISTENER, properties : *const WS_CHANNEL_PROPERTY, propertycount : u32, channel : *mut *mut WS_CHANNEL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateChannelForListener(listener, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), channel, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateChannelForListener(listener, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), channel, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateError(properties: Option<&[WS_ERROR_PROPERTY]>) -> windows_core::Result<*mut WS_ERROR> { @@ -209,32 +209,32 @@ pub unsafe fn WsCreateFaultFromError(error: *const WS_ERROR, faulterrorcode: win #[inline] pub unsafe fn WsCreateHeap(maxsize: usize, trimsize: usize, properties: Option<*const WS_HEAP_PROPERTY>, propertycount: u32, heap: *mut *mut WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateHeap(maxsize : usize, trimsize : usize, properties : *const WS_HEAP_PROPERTY, propertycount : u32, heap : *mut *mut WS_HEAP, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateHeap(maxsize, trimsize, core::mem::transmute(properties.unwrap_or(std::ptr::null())), propertycount, heap, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateHeap(maxsize, trimsize, core::mem::transmute(properties.unwrap_or(core::ptr::null())), propertycount, heap, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateListener(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, properties: Option<&[WS_LISTENER_PROPERTY]>, securitydescription: Option<*const WS_SECURITY_DESCRIPTION>, listener: *mut *mut WS_LISTENER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateListener(channeltype : WS_CHANNEL_TYPE, channelbinding : WS_CHANNEL_BINDING, properties : *const WS_LISTENER_PROPERTY, propertycount : u32, securitydescription : *const WS_SECURITY_DESCRIPTION, listener : *mut *mut WS_LISTENER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateListener(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(std::ptr::null())), listener, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateListener(channeltype, channelbinding, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(securitydescription.unwrap_or(core::ptr::null())), listener, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMessage(envelopeversion: WS_ENVELOPE_VERSION, addressingversion: WS_ADDRESSING_VERSION, properties: Option<&[WS_MESSAGE_PROPERTY]>, message: *mut *mut WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateMessage(envelopeversion : WS_ENVELOPE_VERSION, addressingversion : WS_ADDRESSING_VERSION, properties : *const WS_MESSAGE_PROPERTY, propertycount : u32, message : *mut *mut WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateMessage(envelopeversion, addressingversion, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateMessage(envelopeversion, addressingversion, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMessageForChannel(channel: *const WS_CHANNEL, properties: Option<&[WS_MESSAGE_PROPERTY]>, message: *mut *mut WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateMessageForChannel(channel : *const WS_CHANNEL, properties : *const WS_MESSAGE_PROPERTY, propertycount : u32, message : *mut *mut WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateMessageForChannel(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateMessageForChannel(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateMetadata(properties: Option<&[WS_METADATA_PROPERTY]>, metadata: *mut *mut WS_METADATA, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateMetadata(properties : *const WS_METADATA_PROPERTY, propertycount : u32, metadata : *mut *mut WS_METADATA, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateMetadata(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), metadata, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateMetadata(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), metadata, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateReader(properties: Option<&[WS_XML_READER_PROPERTY]>, reader: *mut *mut WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateReader(properties : *const WS_XML_READER_PROPERTY, propertycount : u32, reader : *mut *mut WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateReader(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateReader(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, properties: Option<&[WS_SERVICE_ENDPOINT_PROPERTY]>, addressurl: Option<*const WS_STRING>, contract: *const WS_SERVICE_CONTRACT, authorizationcallback: WS_SERVICE_SECURITY_CALLBACK, heap: *const WS_HEAP, templatetype: WS_BINDING_TEMPLATE_TYPE, templatevalue: Option<*const core::ffi::c_void>, templatesize: u32, templatedescription: *const core::ffi::c_void, templatedescriptionsize: u32, serviceendpoint: *mut *mut WS_SERVICE_ENDPOINT, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -243,24 +243,24 @@ pub unsafe fn WsCreateServiceEndpointFromTemplate(channeltype: WS_CHANNEL_TYPE, channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(addressurl.unwrap_or(std::ptr::null())), + core::mem::transmute(addressurl.unwrap_or(core::ptr::null())), contract, authorizationcallback, heap, templatetype, - core::mem::transmute(templatevalue.unwrap_or(std::ptr::null())), + core::mem::transmute(templatevalue.unwrap_or(core::ptr::null())), templatesize, templatedescription, templatedescriptionsize, serviceendpoint, - core::mem::transmute(error.unwrap_or(std::ptr::null())), + core::mem::transmute(error.unwrap_or(core::ptr::null())), ) .ok() } #[inline] pub unsafe fn WsCreateServiceHost(endpoints: Option<&[*const WS_SERVICE_ENDPOINT]>, serviceproperties: Option<&[WS_SERVICE_PROPERTY]>, servicehost: *mut *mut WS_SERVICE_HOST, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateServiceHost(endpoints : *const *const WS_SERVICE_ENDPOINT, endpointcount : u16, serviceproperties : *const WS_SERVICE_PROPERTY, servicepropertycount : u32, servicehost : *mut *mut WS_SERVICE_HOST, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateServiceHost(core::mem::transmute(endpoints.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), endpoints.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(serviceproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), serviceproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), servicehost, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateServiceHost(core::mem::transmute(endpoints.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), endpoints.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(serviceproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), serviceproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), servicehost, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: WS_CHANNEL_BINDING, securitydescription: Option<*const WS_SECURITY_DESCRIPTION>, properties: Option<&[WS_PROXY_PROPERTY]>, channelproperties: Option<&[WS_CHANNEL_PROPERTY]>, serviceproxy: *mut *mut WS_SERVICE_PROXY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { @@ -268,75 +268,75 @@ pub unsafe fn WsCreateServiceProxy(channeltype: WS_CHANNEL_TYPE, channelbinding: WsCreateServiceProxy( channeltype, channelbinding, - core::mem::transmute(securitydescription.unwrap_or(std::ptr::null())), + core::mem::transmute(securitydescription.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(channelproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), channelproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), serviceproxy, - core::mem::transmute(error.unwrap_or(std::ptr::null())), + core::mem::transmute(error.unwrap_or(core::ptr::null())), ) .ok() } #[inline] pub unsafe fn WsCreateServiceProxyFromTemplate(channeltype: WS_CHANNEL_TYPE, properties: Option<&[WS_PROXY_PROPERTY]>, templatetype: WS_BINDING_TEMPLATE_TYPE, templatevalue: Option<*const core::ffi::c_void>, templatesize: u32, templatedescription: *const core::ffi::c_void, templatedescriptionsize: u32, serviceproxy: *mut *mut WS_SERVICE_PROXY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateServiceProxyFromTemplate(channeltype : WS_CHANNEL_TYPE, properties : *const WS_PROXY_PROPERTY, propertycount : u32, templatetype : WS_BINDING_TEMPLATE_TYPE, templatevalue : *const core::ffi::c_void, templatesize : u32, templatedescription : *const core::ffi::c_void, templatedescriptionsize : u32, serviceproxy : *mut *mut WS_SERVICE_PROXY, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateServiceProxyFromTemplate(channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), templatetype, core::mem::transmute(templatevalue.unwrap_or(std::ptr::null())), templatesize, templatedescription, templatedescriptionsize, serviceproxy, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateServiceProxyFromTemplate(channeltype, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), templatetype, core::mem::transmute(templatevalue.unwrap_or(core::ptr::null())), templatesize, templatedescription, templatedescriptionsize, serviceproxy, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateWriter(properties: Option<&[WS_XML_WRITER_PROPERTY]>, writer: *mut *mut WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateWriter(properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, writer : *mut *mut WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateWriter(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateWriter(core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateXmlBuffer(heap: *const WS_HEAP, properties: Option<&[WS_XML_BUFFER_PROPERTY]>, buffer: *mut *mut WS_XML_BUFFER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateXmlBuffer(heap : *const WS_HEAP, properties : *const WS_XML_BUFFER_PROPERTY, propertycount : u32, buffer : *mut *mut WS_XML_BUFFER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateXmlBuffer(heap, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), buffer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateXmlBuffer(heap, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), buffer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsCreateXmlSecurityToken(tokenxml: Option<*const WS_XML_BUFFER>, tokenkey: Option<*const WS_SECURITY_KEY_HANDLE>, properties: Option<&[WS_XML_SECURITY_TOKEN_PROPERTY]>, token: *mut *mut WS_SECURITY_TOKEN, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsCreateXmlSecurityToken(tokenxml : *const WS_XML_BUFFER, tokenkey : *const WS_SECURITY_KEY_HANDLE, properties : *const WS_XML_SECURITY_TOKEN_PROPERTY, propertycount : u32, token : *mut *mut WS_SECURITY_TOKEN, error : *const WS_ERROR) -> windows_core::HRESULT); - WsCreateXmlSecurityToken(core::mem::transmute(tokenxml.unwrap_or(std::ptr::null())), core::mem::transmute(tokenkey.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsCreateXmlSecurityToken(core::mem::transmute(tokenxml.unwrap_or(core::ptr::null())), core::mem::transmute(tokenkey.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsDateTimeToFileTime(datetime: *const WS_DATETIME, filetime: *mut super::super::Foundation::FILETIME, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsDateTimeToFileTime(datetime : *const WS_DATETIME, filetime : *mut super::super::Foundation:: FILETIME, error : *const WS_ERROR) -> windows_core::HRESULT); - WsDateTimeToFileTime(datetime, filetime, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsDateTimeToFileTime(datetime, filetime, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsDecodeUrl(url: *const WS_STRING, flags: u32, heap: *const WS_HEAP, outurl: *mut *mut WS_URL, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsDecodeUrl(url : *const WS_STRING, flags : u32, heap : *const WS_HEAP, outurl : *mut *mut WS_URL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsDecodeUrl(url, flags, heap, outurl, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsDecodeUrl(url, flags, heap, outurl, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsEncodeUrl(url: *const WS_URL, flags: u32, heap: *const WS_HEAP, outurl: *mut WS_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsEncodeUrl(url : *const WS_URL, flags : u32, heap : *const WS_HEAP, outurl : *mut WS_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsEncodeUrl(url, flags, heap, outurl, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsEncodeUrl(url, flags, heap, outurl, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsEndReaderCanonicalization(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsEndReaderCanonicalization(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsEndReaderCanonicalization(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsEndReaderCanonicalization(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsEndWriterCanonicalization(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsEndWriterCanonicalization(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsEndWriterCanonicalization(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsEndWriterCanonicalization(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFileTimeToDateTime(filetime: *const super::super::Foundation::FILETIME, datetime: *mut WS_DATETIME, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFileTimeToDateTime(filetime : *const super::super::Foundation:: FILETIME, datetime : *mut WS_DATETIME, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFileTimeToDateTime(filetime, datetime, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFileTimeToDateTime(filetime, datetime, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFillBody(message: *const WS_MESSAGE, minsize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFillBody(message : *const WS_MESSAGE, minsize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFillBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFillBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFillReader(reader: *const WS_XML_READER, minsize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFillReader(reader : *const WS_XML_READER, minsize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFillReader(reader, minsize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFillReader(reader, minsize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFindAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, required: P0, attributeindex: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -344,17 +344,17 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsFindAttribute(reader : *const WS_XML_READER, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, attributeindex : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFindAttribute(reader, localname, ns, required.param().abi(), attributeindex, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFindAttribute(reader, localname, ns, required.param().abi(), attributeindex, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFlushBody(message: *const WS_MESSAGE, minsize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFlushBody(message : *const WS_MESSAGE, minsize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFlushBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFlushBody(message, minsize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFlushWriter(writer: *const WS_XML_WRITER, minsize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsFlushWriter(writer : *const WS_XML_WRITER, minsize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsFlushWriter(writer, minsize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsFlushWriter(writer, minsize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsFreeChannel(channel: *const WS_CHANNEL) { @@ -414,17 +414,17 @@ pub unsafe fn WsFreeWriter(writer: *const WS_XML_WRITER) { #[inline] pub unsafe fn WsGetChannelProperty(channel: *const WS_CHANNEL, id: WS_CHANNEL_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetChannelProperty(channel : *const WS_CHANNEL, id : WS_CHANNEL_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetChannelProperty(channel, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetChannelProperty(channel, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetCustomHeader(message: *const WS_MESSAGE, customheaderdescription: *const WS_ELEMENT_DESCRIPTION, repeatingoption: WS_REPEATING_HEADER_OPTION, headerindex: u32, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, headerattributes: Option<*mut u32>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetCustomHeader(message : *const WS_MESSAGE, customheaderdescription : *const WS_ELEMENT_DESCRIPTION, repeatingoption : WS_REPEATING_HEADER_OPTION, headerindex : u32, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, headerattributes : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetCustomHeader(message, customheaderdescription, repeatingoption, headerindex, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(headerattributes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetCustomHeader(message, customheaderdescription, repeatingoption, headerindex, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(headerattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetDictionary(encoding: WS_ENCODING, dictionary: *mut *mut WS_XML_DICTIONARY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetDictionary(encoding : WS_ENCODING, dictionary : *mut *mut WS_XML_DICTIONARY, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetDictionary(encoding, dictionary, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetDictionary(encoding, dictionary, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetErrorProperty(error: *const WS_ERROR, id: WS_ERROR_PROPERTY_ID, buffer: *mut core::ffi::c_void, buffersize: u32) -> windows_core::Result<()> { @@ -440,7 +440,7 @@ pub unsafe fn WsGetErrorString(error: *const WS_ERROR, index: u32) -> windows_co #[inline] pub unsafe fn WsGetFaultErrorDetail(error: *const WS_ERROR, faultdetaildescription: *const WS_FAULT_DETAIL_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetFaultErrorDetail(error : *const WS_ERROR, faultdetaildescription : *const WS_FAULT_DETAIL_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32) -> windows_core::HRESULT); - WsGetFaultErrorDetail(error, faultdetaildescription, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize).ok() + WsGetFaultErrorDetail(error, faultdetaildescription, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize).ok() } #[inline] pub unsafe fn WsGetFaultErrorProperty(error: *const WS_ERROR, id: WS_FAULT_ERROR_PROPERTY_ID, buffer: *mut core::ffi::c_void, buffersize: u32) -> windows_core::Result<()> { @@ -450,47 +450,47 @@ pub unsafe fn WsGetFaultErrorProperty(error: *const WS_ERROR, id: WS_FAULT_ERROR #[inline] pub unsafe fn WsGetHeader(message: *const WS_MESSAGE, headertype: WS_HEADER_TYPE, valuetype: WS_TYPE, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetHeader(message : *const WS_MESSAGE, headertype : WS_HEADER_TYPE, valuetype : WS_TYPE, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetHeader(message, headertype, valuetype, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetHeader(message, headertype, valuetype, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetHeaderAttributes(message: *const WS_MESSAGE, reader: *const WS_XML_READER, headerattributes: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetHeaderAttributes(message : *const WS_MESSAGE, reader : *const WS_XML_READER, headerattributes : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetHeaderAttributes(message, reader, headerattributes, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetHeaderAttributes(message, reader, headerattributes, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetHeapProperty(heap: *const WS_HEAP, id: WS_HEAP_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetHeapProperty(heap : *const WS_HEAP, id : WS_HEAP_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetHeapProperty(heap, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetHeapProperty(heap, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetListenerProperty(listener: *const WS_LISTENER, id: WS_LISTENER_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetListenerProperty(listener : *const WS_LISTENER, id : WS_LISTENER_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetListenerProperty(listener, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetListenerProperty(listener, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetMappedHeader(message: *const WS_MESSAGE, headername: *const WS_XML_STRING, repeatingoption: WS_REPEATING_HEADER_OPTION, headerindex: u32, valuetype: WS_TYPE, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetMappedHeader(message : *const WS_MESSAGE, headername : *const WS_XML_STRING, repeatingoption : WS_REPEATING_HEADER_OPTION, headerindex : u32, valuetype : WS_TYPE, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetMappedHeader(message, headername, repeatingoption, headerindex, valuetype, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetMappedHeader(message, headername, repeatingoption, headerindex, valuetype, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetMessageProperty(message: *const WS_MESSAGE, id: WS_MESSAGE_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetMessageProperty(message : *const WS_MESSAGE, id : WS_MESSAGE_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetMessageProperty(message, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetMessageProperty(message, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetMetadataEndpoints(metadata: *const WS_METADATA, endpoints: *mut WS_METADATA_ENDPOINTS, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetMetadataEndpoints(metadata : *const WS_METADATA, endpoints : *mut WS_METADATA_ENDPOINTS, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetMetadataEndpoints(metadata, endpoints, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetMetadataEndpoints(metadata, endpoints, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetMetadataProperty(metadata: *const WS_METADATA, id: WS_METADATA_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetMetadataProperty(metadata : *const WS_METADATA, id : WS_METADATA_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetMetadataProperty(metadata, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetMetadataProperty(metadata, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetMissingMetadataDocumentAddress(metadata: *const WS_METADATA, address: *mut *mut WS_ENDPOINT_ADDRESS, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetMissingMetadataDocumentAddress(metadata : *const WS_METADATA, address : *mut *mut WS_ENDPOINT_ADDRESS, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetMissingMetadataDocumentAddress(metadata, address, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetMissingMetadataDocumentAddress(metadata, address, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetNamespaceFromPrefix(reader: *const WS_XML_READER, prefix: *const WS_XML_STRING, required: P0, ns: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -498,22 +498,22 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsGetNamespaceFromPrefix(reader : *const WS_XML_READER, prefix : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, ns : *mut *mut WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetNamespaceFromPrefix(reader, prefix, required.param().abi(), ns, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetNamespaceFromPrefix(reader, prefix, required.param().abi(), ns, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetOperationContextProperty(context: *const WS_OPERATION_CONTEXT, id: WS_OPERATION_CONTEXT_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetOperationContextProperty(context : *const WS_OPERATION_CONTEXT, id : WS_OPERATION_CONTEXT_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetOperationContextProperty(context, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetOperationContextProperty(context, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetPolicyAlternativeCount(policy: *const WS_POLICY, count: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetPolicyAlternativeCount(policy : *const WS_POLICY, count : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetPolicyAlternativeCount(policy, count, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetPolicyAlternativeCount(policy, count, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetPolicyProperty(policy: *const WS_POLICY, id: WS_POLICY_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetPolicyProperty(policy : *const WS_POLICY, id : WS_POLICY_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetPolicyProperty(policy, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetPolicyProperty(policy, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetPrefixFromNamespace(writer: *const WS_XML_WRITER, ns: *const WS_XML_STRING, required: P0, prefix: *mut *mut WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -521,67 +521,67 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsGetPrefixFromNamespace(writer : *const WS_XML_WRITER, ns : *const WS_XML_STRING, required : super::super::Foundation:: BOOL, prefix : *mut *mut WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetPrefixFromNamespace(writer, ns, required.param().abi(), prefix, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetPrefixFromNamespace(writer, ns, required.param().abi(), prefix, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetReaderNode(xmlreader: *const WS_XML_READER, node: *mut *mut WS_XML_NODE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetReaderNode(xmlreader : *const WS_XML_READER, node : *mut *mut WS_XML_NODE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetReaderNode(xmlreader, node, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetReaderNode(xmlreader, node, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetReaderPosition(reader: *const WS_XML_READER, nodeposition: *mut WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetReaderPosition(reader : *const WS_XML_READER, nodeposition : *mut WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetReaderPosition(reader, nodeposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetReaderPosition(reader, nodeposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetReaderProperty(reader: *const WS_XML_READER, id: WS_XML_READER_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetReaderProperty(reader : *const WS_XML_READER, id : WS_XML_READER_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetReaderProperty(reader, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetReaderProperty(reader, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetSecurityContextProperty(securitycontext: *const WS_SECURITY_CONTEXT, id: WS_SECURITY_CONTEXT_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetSecurityContextProperty(securitycontext : *const WS_SECURITY_CONTEXT, id : WS_SECURITY_CONTEXT_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetSecurityContextProperty(securitycontext, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetSecurityContextProperty(securitycontext, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetSecurityTokenProperty(securitytoken: *const WS_SECURITY_TOKEN, id: WS_SECURITY_TOKEN_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, heap: Option<*const WS_HEAP>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetSecurityTokenProperty(securitytoken : *const WS_SECURITY_TOKEN, id : WS_SECURITY_TOKEN_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, heap : *const WS_HEAP, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetSecurityTokenProperty(securitytoken, id, value, valuesize, core::mem::transmute(heap.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetSecurityTokenProperty(securitytoken, id, value, valuesize, core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetServiceHostProperty(servicehost: *const WS_SERVICE_HOST, id: WS_SERVICE_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetServiceHostProperty(servicehost : *const WS_SERVICE_HOST, id : WS_SERVICE_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetServiceHostProperty(servicehost, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetServiceHostProperty(servicehost, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetServiceProxyProperty(serviceproxy: *const WS_SERVICE_PROXY, id: WS_PROXY_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetServiceProxyProperty(serviceproxy : *const WS_SERVICE_PROXY, id : WS_PROXY_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetServiceProxyProperty(serviceproxy, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetServiceProxyProperty(serviceproxy, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetWriterPosition(writer: *const WS_XML_WRITER, nodeposition: *mut WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetWriterPosition(writer : *const WS_XML_WRITER, nodeposition : *mut WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetWriterPosition(writer, nodeposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetWriterPosition(writer, nodeposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetWriterProperty(writer: *const WS_XML_WRITER, id: WS_XML_WRITER_PROPERTY_ID, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetWriterProperty(writer : *const WS_XML_WRITER, id : WS_XML_WRITER_PROPERTY_ID, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetWriterProperty(writer, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetWriterProperty(writer, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsGetXmlAttribute(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, heap: *const WS_HEAP, valuechars: Option<*mut *mut u16>, valuecharcount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsGetXmlAttribute(reader : *const WS_XML_READER, localname : *const WS_XML_STRING, heap : *const WS_HEAP, valuechars : *mut *mut u16, valuecharcount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsGetXmlAttribute(reader, localname, heap, core::mem::transmute(valuechars.unwrap_or(std::ptr::null_mut())), valuecharcount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsGetXmlAttribute(reader, localname, heap, core::mem::transmute(valuechars.unwrap_or(core::ptr::null_mut())), valuecharcount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsInitializeMessage(message: *const WS_MESSAGE, initialization: WS_MESSAGE_INITIALIZATION, sourcemessage: Option<*const WS_MESSAGE>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsInitializeMessage(message : *const WS_MESSAGE, initialization : WS_MESSAGE_INITIALIZATION, sourcemessage : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsInitializeMessage(message, initialization, core::mem::transmute(sourcemessage.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsInitializeMessage(message, initialization, core::mem::transmute(sourcemessage.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsMarkHeaderAsUnderstood(message: *const WS_MESSAGE, headerposition: *const WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsMarkHeaderAsUnderstood(message : *const WS_MESSAGE, headerposition : *const WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsMarkHeaderAsUnderstood(message, headerposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsMarkHeaderAsUnderstood(message, headerposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsMatchPolicyAlternative(policy: *const WS_POLICY, alternativeindex: u32, policyconstraints: *const WS_POLICY_CONSTRAINTS, matchrequired: P0, heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -589,212 +589,212 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsMatchPolicyAlternative(policy : *const WS_POLICY, alternativeindex : u32, policyconstraints : *const WS_POLICY_CONSTRAINTS, matchrequired : super::super::Foundation:: BOOL, heap : *const WS_HEAP, error : *const WS_ERROR) -> windows_core::HRESULT); - WsMatchPolicyAlternative(policy, alternativeindex, policyconstraints, matchrequired.param().abi(), heap, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsMatchPolicyAlternative(policy, alternativeindex, policyconstraints, matchrequired.param().abi(), heap, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsMoveReader(reader: *const WS_XML_READER, moveto: WS_MOVE_TO, found: Option<*mut super::super::Foundation::BOOL>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsMoveReader(reader : *const WS_XML_READER, moveto : WS_MOVE_TO, found : *mut super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsMoveReader(reader, moveto, core::mem::transmute(found.unwrap_or(std::ptr::null_mut())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsMoveReader(reader, moveto, core::mem::transmute(found.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsMoveWriter(writer: *const WS_XML_WRITER, moveto: WS_MOVE_TO, found: Option<*mut super::super::Foundation::BOOL>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsMoveWriter(writer : *const WS_XML_WRITER, moveto : WS_MOVE_TO, found : *mut super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsMoveWriter(writer, moveto, core::mem::transmute(found.unwrap_or(std::ptr::null_mut())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsMoveWriter(writer, moveto, core::mem::transmute(found.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsOpenChannel(channel: *const WS_CHANNEL, endpointaddress: *const WS_ENDPOINT_ADDRESS, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsOpenChannel(channel : *const WS_CHANNEL, endpointaddress : *const WS_ENDPOINT_ADDRESS, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsOpenChannel(channel, endpointaddress, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsOpenChannel(channel, endpointaddress, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsOpenListener(listener: *const WS_LISTENER, url: *const WS_STRING, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsOpenListener(listener : *const WS_LISTENER, url : *const WS_STRING, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsOpenListener(listener, url, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsOpenListener(listener, url, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsOpenServiceHost(servicehost: *const WS_SERVICE_HOST, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsOpenServiceHost(servicehost : *const WS_SERVICE_HOST, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsOpenServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsOpenServiceHost(servicehost, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsOpenServiceProxy(serviceproxy: *const WS_SERVICE_PROXY, address: *const WS_ENDPOINT_ADDRESS, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsOpenServiceProxy(serviceproxy : *const WS_SERVICE_PROXY, address : *const WS_ENDPOINT_ADDRESS, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsOpenServiceProxy(serviceproxy, address, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsOpenServiceProxy(serviceproxy, address, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsPullBytes(writer: *const WS_XML_WRITER, callback: WS_PULL_BYTES_CALLBACK, callbackstate: Option<*const core::ffi::c_void>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsPullBytes(writer : *const WS_XML_WRITER, callback : WS_PULL_BYTES_CALLBACK, callbackstate : *const core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsPullBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsPullBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsPushBytes(writer: *const WS_XML_WRITER, callback: WS_PUSH_BYTES_CALLBACK, callbackstate: Option<*const core::ffi::c_void>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsPushBytes(writer : *const WS_XML_WRITER, callback : WS_PUSH_BYTES_CALLBACK, callbackstate : *const core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsPushBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsPushBytes(writer, callback, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadArray(reader: *const WS_XML_READER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, valuetype: WS_VALUE_TYPE, array: Option<*mut core::ffi::c_void>, arraysize: u32, itemoffset: u32, itemcount: u32, actualitemcount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadArray(reader : *const WS_XML_READER, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, valuetype : WS_VALUE_TYPE, array : *mut core::ffi::c_void, arraysize : u32, itemoffset : u32, itemcount : u32, actualitemcount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadArray(reader, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(std::ptr::null_mut())), arraysize, itemoffset, itemcount, actualitemcount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadArray(reader, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(core::ptr::null_mut())), arraysize, itemoffset, itemcount, actualitemcount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadAttribute(reader: *const WS_XML_READER, attributedescription: *const WS_ATTRIBUTE_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadAttribute(reader : *const WS_XML_READER, attributedescription : *const WS_ATTRIBUTE_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadAttribute(reader, attributedescription, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadAttribute(reader, attributedescription, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadBody(message: *const WS_MESSAGE, bodydescription: *const WS_ELEMENT_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadBody(message : *const WS_MESSAGE, bodydescription : *const WS_ELEMENT_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadBody(message, bodydescription, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadBody(message, bodydescription, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadBytes(reader: *const WS_XML_READER, bytes: *mut core::ffi::c_void, maxbytecount: u32, actualbytecount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadBytes(reader : *const WS_XML_READER, bytes : *mut core::ffi::c_void, maxbytecount : u32, actualbytecount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadBytes(reader, bytes, maxbytecount, actualbytecount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadBytes(reader, bytes, maxbytecount, actualbytecount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadChars(reader: *const WS_XML_READER, chars: &mut [u16], actualcharcount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadChars(reader : *const WS_XML_READER, chars : windows_core::PWSTR, maxcharcount : u32, actualcharcount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadChars(reader, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), actualcharcount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadChars(reader, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), actualcharcount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadCharsUtf8(reader: *const WS_XML_READER, bytes: &mut [u8], actualbytecount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadCharsUtf8(reader : *const WS_XML_READER, bytes : *mut u8, maxbytecount : u32, actualbytecount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadCharsUtf8(reader, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), actualbytecount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadCharsUtf8(reader, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), actualbytecount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadElement(reader: *const WS_XML_READER, elementdescription: *const WS_ELEMENT_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadElement(reader : *const WS_XML_READER, elementdescription : *const WS_ELEMENT_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadElement(reader, elementdescription, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadElement(reader, elementdescription, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadEndAttribute(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadEndAttribute(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadEndAttribute(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadEndAttribute(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadEndElement(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadEndElement(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadEndElement(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadEndElement(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadEndpointAddressExtension(reader: *const WS_XML_READER, endpointaddress: *const WS_ENDPOINT_ADDRESS, extensiontype: WS_ENDPOINT_ADDRESS_EXTENSION_TYPE, readoption: WS_READ_OPTION, heap: *const WS_HEAP, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadEndpointAddressExtension(reader : *const WS_XML_READER, endpointaddress : *const WS_ENDPOINT_ADDRESS, extensiontype : WS_ENDPOINT_ADDRESS_EXTENSION_TYPE, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadEndpointAddressExtension(reader, endpointaddress, extensiontype, readoption, heap, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadEndpointAddressExtension(reader, endpointaddress, extensiontype, readoption, heap, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadEnvelopeEnd(message: *const WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadEnvelopeEnd(message : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadEnvelopeStart(message: *const WS_MESSAGE, reader: *const WS_XML_READER, donecallback: WS_MESSAGE_DONE_CALLBACK, donecallbackstate: Option<*const core::ffi::c_void>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadEnvelopeStart(message : *const WS_MESSAGE, reader : *const WS_XML_READER, donecallback : WS_MESSAGE_DONE_CALLBACK, donecallbackstate : *const core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadEnvelopeStart(message, reader, donecallback, core::mem::transmute(donecallbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadEnvelopeStart(message, reader, donecallback, core::mem::transmute(donecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadMessageEnd(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadMessageEnd(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadMessageStart(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadMessageStart(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadMetadata(metadata: *const WS_METADATA, reader: *const WS_XML_READER, url: *const WS_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadMetadata(metadata : *const WS_METADATA, reader : *const WS_XML_READER, url : *const WS_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadMetadata(metadata, reader, url, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadMetadata(metadata, reader, url, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadNode(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadNode(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadNode(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadNode(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadQualifiedName(reader: *const WS_XML_READER, heap: *const WS_HEAP, prefix: Option<*mut WS_XML_STRING>, localname: *mut WS_XML_STRING, ns: Option<*mut WS_XML_STRING>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadQualifiedName(reader : *const WS_XML_READER, heap : *const WS_HEAP, prefix : *mut WS_XML_STRING, localname : *mut WS_XML_STRING, ns : *mut WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadQualifiedName(reader, heap, core::mem::transmute(prefix.unwrap_or(std::ptr::null_mut())), localname, core::mem::transmute(ns.unwrap_or(std::ptr::null_mut())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadQualifiedName(reader, heap, core::mem::transmute(prefix.unwrap_or(core::ptr::null_mut())), localname, core::mem::transmute(ns.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadStartAttribute(reader: *const WS_XML_READER, attributeindex: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadStartAttribute(reader : *const WS_XML_READER, attributeindex : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadStartAttribute(reader, attributeindex, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadStartAttribute(reader, attributeindex, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadStartElement(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadStartElement(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadStartElement(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadStartElement(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadToStartElement(reader: *const WS_XML_READER, localname: Option<*const WS_XML_STRING>, ns: Option<*const WS_XML_STRING>, found: Option<*mut super::super::Foundation::BOOL>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadToStartElement(reader : *const WS_XML_READER, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, found : *mut super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadToStartElement(reader, core::mem::transmute(localname.unwrap_or(std::ptr::null())), core::mem::transmute(ns.unwrap_or(std::ptr::null())), core::mem::transmute(found.unwrap_or(std::ptr::null_mut())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadToStartElement(reader, core::mem::transmute(localname.unwrap_or(core::ptr::null())), core::mem::transmute(ns.unwrap_or(core::ptr::null())), core::mem::transmute(found.unwrap_or(core::ptr::null_mut())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadType(reader: *const WS_XML_READER, typemapping: WS_TYPE_MAPPING, r#type: WS_TYPE, typedescription: Option<*const core::ffi::c_void>, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadType(reader : *const WS_XML_READER, typemapping : WS_TYPE_MAPPING, r#type : WS_TYPE, typedescription : *const core::ffi::c_void, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadType(reader, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(std::ptr::null())), readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadType(reader, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(core::ptr::null())), readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadValue(reader: *const WS_XML_READER, valuetype: WS_VALUE_TYPE, value: *mut core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadValue(reader : *const WS_XML_READER, valuetype : WS_VALUE_TYPE, value : *mut core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadValue(reader, valuetype, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadValue(reader, valuetype, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadXmlBuffer(reader: *const WS_XML_READER, heap: *const WS_HEAP, xmlbuffer: *mut *mut WS_XML_BUFFER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadXmlBuffer(reader : *const WS_XML_READER, heap : *const WS_HEAP, xmlbuffer : *mut *mut WS_XML_BUFFER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadXmlBuffer(reader, heap, xmlbuffer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadXmlBuffer(reader, heap, xmlbuffer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReadXmlBufferFromBytes(reader: *const WS_XML_READER, encoding: Option<*const WS_XML_READER_ENCODING>, properties: Option<&[WS_XML_READER_PROPERTY]>, bytes: *const core::ffi::c_void, bytecount: u32, heap: *const WS_HEAP, xmlbuffer: *mut *mut WS_XML_BUFFER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReadXmlBufferFromBytes(reader : *const WS_XML_READER, encoding : *const WS_XML_READER_ENCODING, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, bytes : *const core::ffi::c_void, bytecount : u32, heap : *const WS_HEAP, xmlbuffer : *mut *mut WS_XML_BUFFER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReadXmlBufferFromBytes(reader, core::mem::transmute(encoding.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), bytes, bytecount, heap, xmlbuffer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReadXmlBufferFromBytes(reader, core::mem::transmute(encoding.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), bytes, bytecount, heap, xmlbuffer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsReceiveMessage(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, messagedescriptions: &[*const WS_MESSAGE_DESCRIPTION], receiveoption: WS_RECEIVE_OPTION, readbodyoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: *mut core::ffi::c_void, valuesize: u32, index: Option<*mut u32>, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsReceiveMessage(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, messagedescriptions : *const *const WS_MESSAGE_DESCRIPTION, messagedescriptioncount : u32, receiveoption : WS_RECEIVE_OPTION, readbodyoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, index : *mut u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsReceiveMessage(channel, message, core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len().try_into().unwrap(), receiveoption, readbodyoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), value, valuesize, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsReceiveMessage(channel, message, core::mem::transmute(messagedescriptions.as_ptr()), messagedescriptions.len().try_into().unwrap(), receiveoption, readbodyoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), value, valuesize, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRegisterOperationForCancel(context: *const WS_OPERATION_CONTEXT, cancelcallback: WS_OPERATION_CANCEL_CALLBACK, freestatecallback: WS_OPERATION_FREE_STATE_CALLBACK, userstate: Option<*const core::ffi::c_void>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRegisterOperationForCancel(context : *const WS_OPERATION_CONTEXT, cancelcallback : WS_OPERATION_CANCEL_CALLBACK, freestatecallback : WS_OPERATION_FREE_STATE_CALLBACK, userstate : *const core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRegisterOperationForCancel(context, cancelcallback, freestatecallback, core::mem::transmute(userstate.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRegisterOperationForCancel(context, cancelcallback, freestatecallback, core::mem::transmute(userstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRemoveCustomHeader(message: *const WS_MESSAGE, headername: *const WS_XML_STRING, headerns: *const WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRemoveCustomHeader(message : *const WS_MESSAGE, headername : *const WS_XML_STRING, headerns : *const WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRemoveCustomHeader(message, headername, headerns, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRemoveCustomHeader(message, headername, headerns, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRemoveHeader(message: *const WS_MESSAGE, headertype: WS_HEADER_TYPE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRemoveHeader(message : *const WS_MESSAGE, headertype : WS_HEADER_TYPE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRemoveHeader(message, headertype, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRemoveHeader(message, headertype, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRemoveMappedHeader(message: *const WS_MESSAGE, headername: *const WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRemoveMappedHeader(message : *const WS_MESSAGE, headername : *const WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRemoveMappedHeader(message, headername, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRemoveMappedHeader(message, headername, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRemoveNode(nodeposition: *const WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRemoveNode(nodeposition : *const WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRemoveNode(nodeposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRemoveNode(nodeposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRequestReply(channel: *const WS_CHANNEL, requestmessage: *const WS_MESSAGE, requestmessagedescription: *const WS_MESSAGE_DESCRIPTION, writeoption: WS_WRITE_OPTION, requestbodyvalue: Option<*const core::ffi::c_void>, requestbodyvaluesize: u32, replymessage: *const WS_MESSAGE, replymessagedescription: *const WS_MESSAGE_DESCRIPTION, readoption: WS_READ_OPTION, heap: Option<*const WS_HEAP>, value: Option<*mut core::ffi::c_void>, valuesize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRequestReply(channel : *const WS_CHANNEL, requestmessage : *const WS_MESSAGE, requestmessagedescription : *const WS_MESSAGE_DESCRIPTION, writeoption : WS_WRITE_OPTION, requestbodyvalue : *const core::ffi::c_void, requestbodyvaluesize : u32, replymessage : *const WS_MESSAGE, replymessagedescription : *const WS_MESSAGE_DESCRIPTION, readoption : WS_READ_OPTION, heap : *const WS_HEAP, value : *mut core::ffi::c_void, valuesize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRequestReply(channel, requestmessage, requestmessagedescription, writeoption, core::mem::transmute(requestbodyvalue.unwrap_or(std::ptr::null())), requestbodyvaluesize, replymessage, replymessagedescription, readoption, core::mem::transmute(heap.unwrap_or(std::ptr::null())), core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), valuesize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRequestReply(channel, requestmessage, requestmessagedescription, writeoption, core::mem::transmute(requestbodyvalue.unwrap_or(core::ptr::null())), requestbodyvaluesize, replymessage, replymessagedescription, readoption, core::mem::transmute(heap.unwrap_or(core::ptr::null())), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), valuesize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRequestSecurityToken(channel: *const WS_CHANNEL, properties: Option<&[WS_REQUEST_SECURITY_TOKEN_PROPERTY]>, token: *mut *mut WS_SECURITY_TOKEN, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRequestSecurityToken(channel : *const WS_CHANNEL, properties : *const WS_REQUEST_SECURITY_TOKEN_PROPERTY, propertycount : u32, token : *mut *mut WS_SECURITY_TOKEN, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRequestSecurityToken(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRequestSecurityToken(channel, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), token, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetChannel(channel: *const WS_CHANNEL, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetChannel(channel : *const WS_CHANNEL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetChannel(channel, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetChannel(channel, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetError(error: *const WS_ERROR) -> windows_core::Result<()> { @@ -804,57 +804,57 @@ pub unsafe fn WsResetError(error: *const WS_ERROR) -> windows_core::Result<()> { #[inline] pub unsafe fn WsResetHeap(heap: *const WS_HEAP, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetHeap(heap : *const WS_HEAP, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetHeap(heap, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetHeap(heap, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetListener(listener: *const WS_LISTENER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetListener(listener : *const WS_LISTENER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetListener(listener, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetListener(listener, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetMessage(message: *const WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetMessage(message : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetMessage(message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetMessage(message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetMetadata(metadata: *const WS_METADATA, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetMetadata(metadata : *const WS_METADATA, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetMetadata(metadata, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetMetadata(metadata, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetServiceHost(servicehost: *const WS_SERVICE_HOST, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetServiceHost(servicehost : *const WS_SERVICE_HOST, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetServiceHost(servicehost, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetServiceHost(servicehost, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsResetServiceProxy(serviceproxy: *const WS_SERVICE_PROXY, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsResetServiceProxy(serviceproxy : *const WS_SERVICE_PROXY, error : *const WS_ERROR) -> windows_core::HRESULT); - WsResetServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsResetServiceProxy(serviceproxy, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsRevokeSecurityContext(securitycontext: *const WS_SECURITY_CONTEXT, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsRevokeSecurityContext(securitycontext : *const WS_SECURITY_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsRevokeSecurityContext(securitycontext, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsRevokeSecurityContext(securitycontext, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSendFaultMessageForError(channel: *const WS_CHANNEL, replymessage: *const WS_MESSAGE, faulterror: *const WS_ERROR, faulterrorcode: windows_core::HRESULT, faultdisclosure: WS_FAULT_DISCLOSURE, requestmessage: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSendFaultMessageForError(channel : *const WS_CHANNEL, replymessage : *const WS_MESSAGE, faulterror : *const WS_ERROR, faulterrorcode : windows_core::HRESULT, faultdisclosure : WS_FAULT_DISCLOSURE, requestmessage : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSendFaultMessageForError(channel, replymessage, faulterror, faulterrorcode, faultdisclosure, requestmessage, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSendFaultMessageForError(channel, replymessage, faulterror, faulterrorcode, faultdisclosure, requestmessage, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSendMessage(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, messagedescription: *const WS_MESSAGE_DESCRIPTION, writeoption: WS_WRITE_OPTION, bodyvalue: Option<*const core::ffi::c_void>, bodyvaluesize: u32, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSendMessage(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, messagedescription : *const WS_MESSAGE_DESCRIPTION, writeoption : WS_WRITE_OPTION, bodyvalue : *const core::ffi::c_void, bodyvaluesize : u32, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSendMessage(channel, message, messagedescription, writeoption, core::mem::transmute(bodyvalue.unwrap_or(std::ptr::null())), bodyvaluesize, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSendMessage(channel, message, messagedescription, writeoption, core::mem::transmute(bodyvalue.unwrap_or(core::ptr::null())), bodyvaluesize, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSendReplyMessage(channel: *const WS_CHANNEL, replymessage: *const WS_MESSAGE, replymessagedescription: *const WS_MESSAGE_DESCRIPTION, writeoption: WS_WRITE_OPTION, replybodyvalue: Option<*const core::ffi::c_void>, replybodyvaluesize: u32, requestmessage: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSendReplyMessage(channel : *const WS_CHANNEL, replymessage : *const WS_MESSAGE, replymessagedescription : *const WS_MESSAGE_DESCRIPTION, writeoption : WS_WRITE_OPTION, replybodyvalue : *const core::ffi::c_void, replybodyvaluesize : u32, requestmessage : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSendReplyMessage(channel, replymessage, replymessagedescription, writeoption, core::mem::transmute(replybodyvalue.unwrap_or(std::ptr::null())), replybodyvaluesize, requestmessage, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSendReplyMessage(channel, replymessage, replymessagedescription, writeoption, core::mem::transmute(replybodyvalue.unwrap_or(core::ptr::null())), replybodyvaluesize, requestmessage, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetChannelProperty(channel: *const WS_CHANNEL, id: WS_CHANNEL_PROPERTY_ID, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetChannelProperty(channel : *const WS_CHANNEL, id : WS_CHANNEL_PROPERTY_ID, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetChannelProperty(channel, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetChannelProperty(channel, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetErrorProperty(error: *const WS_ERROR, id: WS_ERROR_PROPERTY_ID, value: *const core::ffi::c_void, valuesize: u32) -> windows_core::Result<()> { @@ -864,7 +864,7 @@ pub unsafe fn WsSetErrorProperty(error: *const WS_ERROR, id: WS_ERROR_PROPERTY_I #[inline] pub unsafe fn WsSetFaultErrorDetail(error: *const WS_ERROR, faultdetaildescription: *const WS_FAULT_DETAIL_DESCRIPTION, writeoption: WS_WRITE_OPTION, value: Option<*const core::ffi::c_void>, valuesize: u32) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetFaultErrorDetail(error : *const WS_ERROR, faultdetaildescription : *const WS_FAULT_DETAIL_DESCRIPTION, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32) -> windows_core::HRESULT); - WsSetFaultErrorDetail(error, faultdetaildescription, writeoption, core::mem::transmute(value.unwrap_or(std::ptr::null())), valuesize).ok() + WsSetFaultErrorDetail(error, faultdetaildescription, writeoption, core::mem::transmute(value.unwrap_or(core::ptr::null())), valuesize).ok() } #[inline] pub unsafe fn WsSetFaultErrorProperty(error: *const WS_ERROR, id: WS_FAULT_ERROR_PROPERTY_ID, value: *const core::ffi::c_void, valuesize: u32) -> windows_core::Result<()> { @@ -874,162 +874,162 @@ pub unsafe fn WsSetFaultErrorProperty(error: *const WS_ERROR, id: WS_FAULT_ERROR #[inline] pub unsafe fn WsSetHeader(message: *const WS_MESSAGE, headertype: WS_HEADER_TYPE, valuetype: WS_TYPE, writeoption: WS_WRITE_OPTION, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetHeader(message : *const WS_MESSAGE, headertype : WS_HEADER_TYPE, valuetype : WS_TYPE, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetHeader(message, headertype, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetHeader(message, headertype, valuetype, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetInput(reader: *const WS_XML_READER, encoding: Option<*const WS_XML_READER_ENCODING>, input: Option<*const WS_XML_READER_INPUT>, properties: Option<&[WS_XML_READER_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetInput(reader : *const WS_XML_READER, encoding : *const WS_XML_READER_ENCODING, input : *const WS_XML_READER_INPUT, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetInput(reader, core::mem::transmute(encoding.unwrap_or(std::ptr::null())), core::mem::transmute(input.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetInput(reader, core::mem::transmute(encoding.unwrap_or(core::ptr::null())), core::mem::transmute(input.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetInputToBuffer(reader: *const WS_XML_READER, buffer: *const WS_XML_BUFFER, properties: Option<&[WS_XML_READER_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetInputToBuffer(reader : *const WS_XML_READER, buffer : *const WS_XML_BUFFER, properties : *const WS_XML_READER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetInputToBuffer(reader, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetInputToBuffer(reader, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetListenerProperty(listener: *const WS_LISTENER, id: WS_LISTENER_PROPERTY_ID, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetListenerProperty(listener : *const WS_LISTENER, id : WS_LISTENER_PROPERTY_ID, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetListenerProperty(listener, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetListenerProperty(listener, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetMessageProperty(message: *const WS_MESSAGE, id: WS_MESSAGE_PROPERTY_ID, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetMessageProperty(message : *const WS_MESSAGE, id : WS_MESSAGE_PROPERTY_ID, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetMessageProperty(message, id, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetMessageProperty(message, id, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetOutput(writer: *const WS_XML_WRITER, encoding: Option<*const WS_XML_WRITER_ENCODING>, output: Option<*const WS_XML_WRITER_OUTPUT>, properties: Option<&[WS_XML_WRITER_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetOutput(writer : *const WS_XML_WRITER, encoding : *const WS_XML_WRITER_ENCODING, output : *const WS_XML_WRITER_OUTPUT, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetOutput(writer, core::mem::transmute(encoding.unwrap_or(std::ptr::null())), core::mem::transmute(output.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetOutput(writer, core::mem::transmute(encoding.unwrap_or(core::ptr::null())), core::mem::transmute(output.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetOutputToBuffer(writer: *const WS_XML_WRITER, buffer: *const WS_XML_BUFFER, properties: Option<&[WS_XML_WRITER_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetOutputToBuffer(writer : *const WS_XML_WRITER, buffer : *const WS_XML_BUFFER, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetOutputToBuffer(writer, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetOutputToBuffer(writer, buffer, core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetReaderPosition(reader: *const WS_XML_READER, nodeposition: *const WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetReaderPosition(reader : *const WS_XML_READER, nodeposition : *const WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetReaderPosition(reader, nodeposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetReaderPosition(reader, nodeposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSetWriterPosition(writer: *const WS_XML_WRITER, nodeposition: *const WS_XML_NODE_POSITION, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSetWriterPosition(writer : *const WS_XML_WRITER, nodeposition : *const WS_XML_NODE_POSITION, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSetWriterPosition(writer, nodeposition, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSetWriterPosition(writer, nodeposition, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsShutdownSessionChannel(channel: *const WS_CHANNEL, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsShutdownSessionChannel(channel : *const WS_CHANNEL, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsShutdownSessionChannel(channel, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsShutdownSessionChannel(channel, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsSkipNode(reader: *const WS_XML_READER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsSkipNode(reader : *const WS_XML_READER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsSkipNode(reader, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsSkipNode(reader, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsStartReaderCanonicalization(reader: *const WS_XML_READER, writecallback: WS_WRITE_CALLBACK, writecallbackstate: Option<*const core::ffi::c_void>, properties: Option<&[WS_XML_CANONICALIZATION_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsStartReaderCanonicalization(reader : *const WS_XML_READER, writecallback : WS_WRITE_CALLBACK, writecallbackstate : *const core::ffi::c_void, properties : *const WS_XML_CANONICALIZATION_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsStartReaderCanonicalization(reader, writecallback, core::mem::transmute(writecallbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsStartReaderCanonicalization(reader, writecallback, core::mem::transmute(writecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsStartWriterCanonicalization(writer: *const WS_XML_WRITER, writecallback: WS_WRITE_CALLBACK, writecallbackstate: Option<*const core::ffi::c_void>, properties: Option<&[WS_XML_CANONICALIZATION_PROPERTY]>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsStartWriterCanonicalization(writer : *const WS_XML_WRITER, writecallback : WS_WRITE_CALLBACK, writecallbackstate : *const core::ffi::c_void, properties : *const WS_XML_CANONICALIZATION_PROPERTY, propertycount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsStartWriterCanonicalization(writer, writecallback, core::mem::transmute(writecallbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsStartWriterCanonicalization(writer, writecallback, core::mem::transmute(writecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsTrimXmlWhitespace(chars: &[u16], trimmedchars: *mut *mut u16, trimmedcount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsTrimXmlWhitespace(chars : windows_core::PCWSTR, charcount : u32, trimmedchars : *mut *mut u16, trimmedcount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsTrimXmlWhitespace(core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), trimmedchars, trimmedcount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsTrimXmlWhitespace(core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), trimmedchars, trimmedcount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsVerifyXmlNCName(ncnamechars: &[u16], error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsVerifyXmlNCName(ncnamechars : windows_core::PCWSTR, ncnamecharcount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsVerifyXmlNCName(core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsVerifyXmlNCName(core::mem::transmute(ncnamechars.as_ptr()), ncnamechars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteArray(writer: *const WS_XML_WRITER, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, valuetype: WS_VALUE_TYPE, array: Option<*const core::ffi::c_void>, arraysize: u32, itemoffset: u32, itemcount: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteArray(writer : *const WS_XML_WRITER, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, valuetype : WS_VALUE_TYPE, array : *const core::ffi::c_void, arraysize : u32, itemoffset : u32, itemcount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteArray(writer, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(std::ptr::null())), arraysize, itemoffset, itemcount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteArray(writer, localname, ns, valuetype, core::mem::transmute(array.unwrap_or(core::ptr::null())), arraysize, itemoffset, itemcount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteAttribute(writer: *const WS_XML_WRITER, attributedescription: *const WS_ATTRIBUTE_DESCRIPTION, writeoption: WS_WRITE_OPTION, value: Option<*const core::ffi::c_void>, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteAttribute(writer : *const WS_XML_WRITER, attributedescription : *const WS_ATTRIBUTE_DESCRIPTION, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteAttribute(writer, attributedescription, writeoption, core::mem::transmute(value.unwrap_or(std::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteAttribute(writer, attributedescription, writeoption, core::mem::transmute(value.unwrap_or(core::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteBody(message: *const WS_MESSAGE, bodydescription: *const WS_ELEMENT_DESCRIPTION, writeoption: WS_WRITE_OPTION, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteBody(message : *const WS_MESSAGE, bodydescription : *const WS_ELEMENT_DESCRIPTION, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteBody(message, bodydescription, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteBody(message, bodydescription, writeoption, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteBytes(writer: *const WS_XML_WRITER, bytes: *const core::ffi::c_void, bytecount: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteBytes(writer : *const WS_XML_WRITER, bytes : *const core::ffi::c_void, bytecount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteBytes(writer, bytes, bytecount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteBytes(writer, bytes, bytecount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteChars(writer: *const WS_XML_WRITER, chars: &[u16], error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteChars(writer : *const WS_XML_WRITER, chars : windows_core::PCWSTR, charcount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteChars(writer, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteChars(writer, core::mem::transmute(chars.as_ptr()), chars.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteCharsUtf8(writer: *const WS_XML_WRITER, bytes: &[u8], error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteCharsUtf8(writer : *const WS_XML_WRITER, bytes : *const u8, bytecount : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteCharsUtf8(writer, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteCharsUtf8(writer, core::mem::transmute(bytes.as_ptr()), bytes.len().try_into().unwrap(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteElement(writer: *const WS_XML_WRITER, elementdescription: *const WS_ELEMENT_DESCRIPTION, writeoption: WS_WRITE_OPTION, value: Option<*const core::ffi::c_void>, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteElement(writer : *const WS_XML_WRITER, elementdescription : *const WS_ELEMENT_DESCRIPTION, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteElement(writer, elementdescription, writeoption, core::mem::transmute(value.unwrap_or(std::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteElement(writer, elementdescription, writeoption, core::mem::transmute(value.unwrap_or(core::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEndAttribute(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEndAttribute(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEndAttribute(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEndAttribute(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEndCData(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEndCData(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEndCData(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEndCData(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEndElement(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEndElement(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEndElement(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEndElement(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEndStartElement(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEndStartElement(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEndStartElement(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEndStartElement(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEnvelopeEnd(message: *const WS_MESSAGE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEnvelopeEnd(message : *const WS_MESSAGE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEnvelopeEnd(message, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteEnvelopeStart(message: *const WS_MESSAGE, writer: *const WS_XML_WRITER, donecallback: WS_MESSAGE_DONE_CALLBACK, donecallbackstate: Option<*const core::ffi::c_void>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteEnvelopeStart(message : *const WS_MESSAGE, writer : *const WS_XML_WRITER, donecallback : WS_MESSAGE_DONE_CALLBACK, donecallbackstate : *const core::ffi::c_void, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteEnvelopeStart(message, writer, donecallback, core::mem::transmute(donecallbackstate.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteEnvelopeStart(message, writer, donecallback, core::mem::transmute(donecallbackstate.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteMessageEnd(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteMessageEnd(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteMessageEnd(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteMessageStart(channel: *const WS_CHANNEL, message: *const WS_MESSAGE, asynccontext: Option<*const WS_ASYNC_CONTEXT>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteMessageStart(channel : *const WS_CHANNEL, message : *const WS_MESSAGE, asynccontext : *const WS_ASYNC_CONTEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteMessageStart(channel, message, core::mem::transmute(asynccontext.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteNode(writer: *const WS_XML_WRITER, node: *const WS_XML_NODE, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteNode(writer : *const WS_XML_WRITER, node : *const WS_XML_NODE, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteNode(writer, node, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteNode(writer, node, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteQualifiedName(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, localname: *const WS_XML_STRING, ns: Option<*const WS_XML_STRING>, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteQualifiedName(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteQualifiedName(writer, core::mem::transmute(prefix.unwrap_or(std::ptr::null())), localname, core::mem::transmute(ns.unwrap_or(std::ptr::null())), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteQualifiedName(writer, core::mem::transmute(prefix.unwrap_or(core::ptr::null())), localname, core::mem::transmute(ns.unwrap_or(core::ptr::null())), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteStartAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, singlequote: P0, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -1037,42 +1037,42 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsWriteStartAttribute(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, singlequote : super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteStartAttribute(writer, core::mem::transmute(prefix.unwrap_or(std::ptr::null())), localname, ns, singlequote.param().abi(), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteStartAttribute(writer, core::mem::transmute(prefix.unwrap_or(core::ptr::null())), localname, ns, singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteStartCData(writer: *const WS_XML_WRITER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteStartCData(writer : *const WS_XML_WRITER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteStartCData(writer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteStartCData(writer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteStartElement(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, localname: *const WS_XML_STRING, ns: *const WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteStartElement(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, localname : *const WS_XML_STRING, ns : *const WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteStartElement(writer, core::mem::transmute(prefix.unwrap_or(std::ptr::null())), localname, ns, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteStartElement(writer, core::mem::transmute(prefix.unwrap_or(core::ptr::null())), localname, ns, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteText(writer: *const WS_XML_WRITER, text: *const WS_XML_TEXT, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteText(writer : *const WS_XML_WRITER, text : *const WS_XML_TEXT, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteText(writer, text, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteText(writer, text, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteType(writer: *const WS_XML_WRITER, typemapping: WS_TYPE_MAPPING, r#type: WS_TYPE, typedescription: Option<*const core::ffi::c_void>, writeoption: WS_WRITE_OPTION, value: Option<*const core::ffi::c_void>, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteType(writer : *const WS_XML_WRITER, typemapping : WS_TYPE_MAPPING, r#type : WS_TYPE, typedescription : *const core::ffi::c_void, writeoption : WS_WRITE_OPTION, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteType(writer, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(std::ptr::null())), writeoption, core::mem::transmute(value.unwrap_or(std::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteType(writer, typemapping, r#type, core::mem::transmute(typedescription.unwrap_or(core::ptr::null())), writeoption, core::mem::transmute(value.unwrap_or(core::ptr::null())), valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteValue(writer: *const WS_XML_WRITER, valuetype: WS_VALUE_TYPE, value: *const core::ffi::c_void, valuesize: u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteValue(writer : *const WS_XML_WRITER, valuetype : WS_VALUE_TYPE, value : *const core::ffi::c_void, valuesize : u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteValue(writer, valuetype, value, valuesize, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteValue(writer, valuetype, value, valuesize, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteXmlBuffer(writer: *const WS_XML_WRITER, xmlbuffer: *const WS_XML_BUFFER, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteXmlBuffer(writer : *const WS_XML_WRITER, xmlbuffer : *const WS_XML_BUFFER, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteXmlBuffer(writer, xmlbuffer, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteXmlBuffer(writer, xmlbuffer, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteXmlBufferToBytes(writer: *const WS_XML_WRITER, xmlbuffer: *const WS_XML_BUFFER, encoding: Option<*const WS_XML_WRITER_ENCODING>, properties: Option<&[WS_XML_WRITER_PROPERTY]>, heap: *const WS_HEAP, bytes: *mut *mut core::ffi::c_void, bytecount: *mut u32, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsWriteXmlBufferToBytes(writer : *const WS_XML_WRITER, xmlbuffer : *const WS_XML_BUFFER, encoding : *const WS_XML_WRITER_ENCODING, properties : *const WS_XML_WRITER_PROPERTY, propertycount : u32, heap : *const WS_HEAP, bytes : *mut *mut core::ffi::c_void, bytecount : *mut u32, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteXmlBufferToBytes(writer, xmlbuffer, core::mem::transmute(encoding.unwrap_or(std::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), heap, bytes, bytecount, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteXmlBufferToBytes(writer, xmlbuffer, core::mem::transmute(encoding.unwrap_or(core::ptr::null())), core::mem::transmute(properties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), properties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), heap, bytes, bytecount, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsWriteXmlnsAttribute(writer: *const WS_XML_WRITER, prefix: Option<*const WS_XML_STRING>, ns: *const WS_XML_STRING, singlequote: P0, error: Option<*const WS_ERROR>) -> windows_core::Result<()> @@ -1080,12 +1080,12 @@ where P0: windows_core::Param, { windows_targets::link!("webservices.dll" "system" fn WsWriteXmlnsAttribute(writer : *const WS_XML_WRITER, prefix : *const WS_XML_STRING, ns : *const WS_XML_STRING, singlequote : super::super::Foundation:: BOOL, error : *const WS_ERROR) -> windows_core::HRESULT); - WsWriteXmlnsAttribute(writer, core::mem::transmute(prefix.unwrap_or(std::ptr::null())), ns, singlequote.param().abi(), core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsWriteXmlnsAttribute(writer, core::mem::transmute(prefix.unwrap_or(core::ptr::null())), ns, singlequote.param().abi(), core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WsXmlStringEquals(string1: *const WS_XML_STRING, string2: *const WS_XML_STRING, error: Option<*const WS_ERROR>) -> windows_core::Result<()> { windows_targets::link!("webservices.dll" "system" fn WsXmlStringEquals(string1 : *const WS_XML_STRING, string2 : *const WS_XML_STRING, error : *const WS_ERROR) -> windows_core::HRESULT); - WsXmlStringEquals(string1, string2, core::mem::transmute(error.unwrap_or(std::ptr::null()))).ok() + WsXmlStringEquals(string1, string2, core::mem::transmute(error.unwrap_or(core::ptr::null()))).ok() } windows_core::imp::define_interface!(IContentPrefetcherTaskTrigger, IContentPrefetcherTaskTrigger_Vtbl, 0x1b35a14a_6094_4799_a60e_e474e15d4dc9); impl core::ops::Deref for IContentPrefetcherTaskTrigger { 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 4a608893b9..290b02a8cd 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/AppLocker/mod.rs @@ -13,12 +13,12 @@ where P1: windows_core::Param, { 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.param().abi(), inaccesstoken.param().abi(), outaccesstoken, dwflags, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null_mut()))).ok() + SaferComputeTokenFromLevel(levelhandle.param().abi(), inaccesstoken.param().abi(), outaccesstoken, dwflags, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SaferCreateLevel(dwscopeid: u32, dwlevelid: u32, openflags: u32, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: 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()))).ok() + SaferCreateLevel(dwscopeid, dwlevelid, openflags, plevelhandle, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SaferGetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: Option<*mut core::ffi::c_void>, dwinbuffersize: u32, lpdwoutbuffersize: *mut u32) -> windows_core::Result<()> @@ -26,18 +26,18 @@ where P0: windows_core::Param, { 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.param().abi(), dwinfotype, core::mem::transmute(lpquerybuffer.unwrap_or(std::ptr::null_mut())), dwinbuffersize, lpdwoutbuffersize).ok() + SaferGetLevelInformation(levelhandle.param().abi(), dwinfotype, core::mem::transmute(lpquerybuffer.unwrap_or(core::ptr::null_mut())), dwinbuffersize, lpdwoutbuffersize).ok() } #[inline] pub unsafe fn SaferGetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *mut core::ffi::c_void, infobufferretsize: *mut u32, lpreserved: 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()))).ok() + SaferGetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, infobufferretsize, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn SaferIdentifyLevel(pcodeproperties: Option<&[SAFER_CODE_PROPERTIES_V2]>, plevelhandle: *mut super::SAFER_LEVEL_HANDLE, lpreserved: 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().try_into().unwrap()), 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() + SaferIdentifyLevel(pcodeproperties.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcodeproperties.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), plevelhandle, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SaferRecordEventLogEntry(hlevel: P0, sztargetpath: P1, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -46,7 +46,7 @@ where P1: windows_core::Param, { 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.param().abi(), sztargetpath.param().abi(), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + SaferRecordEventLogEntry(hlevel.param().abi(), sztargetpath.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SaferSetLevelInformation(levelhandle: P0, dwinfotype: SAFER_OBJECT_INFO_CLASS, lpquerybuffer: *const core::ffi::c_void, dwinbuffersize: u32) -> windows_core::Result<()> @@ -59,7 +59,7 @@ where #[inline] pub unsafe fn SaferSetPolicyInformation(dwscopeid: u32, saferpolicyinfoclass: SAFER_POLICY_INFO_CLASS, infobuffersize: u32, infobuffer: *const core::ffi::c_void, lpreserved: 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()))).ok() + SaferSetPolicyInformation(dwscopeid, saferpolicyinfoclass, infobuffersize, infobuffer, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SaferiIsExecutableFileType(szfullpathname: P0, bfromshellexecute: P1) -> super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs index b3d54cb938..95d79ae57f 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/Provider/mod.rs @@ -161,11 +161,11 @@ impl AsyncIIdentityAuthentication { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Begin_ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Begin_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), core::mem::transmute(ppidentityproperties.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), core::mem::transmute(ppidentityproperties.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn Finish_ValidateIdentityCredential(&self, ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Finish_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidentityproperties.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Finish_ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidentityproperties.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -193,7 +193,7 @@ windows_core::imp::interface_hierarchy!(AsyncIIdentityProvider, windows_core::IU impl AsyncIIdentityProvider { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn Begin_GetIdentityEnum(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pfilterpropvarvalue: Option<*const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Begin_GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(std::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Begin_GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_GetIdentityEnum(&self) -> windows_core::Result { @@ -329,10 +329,10 @@ impl AsyncIIdentityStore { (windows_core::Interface::vtable(self).Finish_GetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn Begin_GetAt(&self, dwprovider: u32, pprovguid: Option<*mut windows_core::GUID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Begin_GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin_GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Finish_GetAt(&self, pprovguid: Option<*mut windows_core::GUID>, ppidentityprovider: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Finish_GetAt)(windows_core::Interface::as_raw(self), core::mem::transmute(pprovguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppidentityprovider)).ok() + (windows_core::Interface::vtable(self).Finish_GetAt)(windows_core::Interface::as_raw(self), core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppidentityprovider)).ok() } pub unsafe fn Begin_AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -347,14 +347,14 @@ impl AsyncIIdentityStore { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, cbsid, core::mem::transmute(psid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Begin_ConvertToSid)(windows_core::Interface::as_raw(self), lpszuniqueid.param().abi(), providerguid, cbsid, core::mem::transmute(psid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Finish_ConvertToSid(&self, psid: Option<*mut u8>, pcbrequiredsid: *mut u16) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Finish_ConvertToSid)(windows_core::Interface::as_raw(self), core::mem::transmute(psid.unwrap_or(std::ptr::null_mut())), pcbrequiredsid).ok() + (windows_core::Interface::vtable(self).Finish_ConvertToSid)(windows_core::Interface::as_raw(self), core::mem::transmute(psid.unwrap_or(core::ptr::null_mut())), pcbrequiredsid).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn Begin_EnumerateIdentities(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pfilterpropvarvalue: Option<*const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Begin_EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(std::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Begin_EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Finish_EnumerateIdentities(&self) -> windows_core::Result { @@ -547,7 +547,7 @@ impl IIdentityAuthentication { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn ValidateIdentityCredential(&self, credbuffer: &[u8], ppidentityproperties: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), core::mem::transmute(ppidentityproperties.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ValidateIdentityCredential)(windows_core::Interface::as_raw(self), core::mem::transmute(credbuffer.as_ptr()), credbuffer.len().try_into().unwrap(), core::mem::transmute(ppidentityproperties.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -571,7 +571,7 @@ impl IIdentityProvider { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn GetIdentityEnum(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pfilterpropvarvalue: Option<*const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(std::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetIdentityEnum)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn Create(&self, lpszusername: P0, pppropertystore: *mut Option, pkeywordstoadd: *const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> @@ -662,7 +662,7 @@ impl IIdentityStore { (windows_core::Interface::vtable(self).GetCount)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetAt(&self, dwprovider: u32, pprovguid: Option<*mut windows_core::GUID>, ppidentityprovider: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppidentityprovider)).ok() + (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), dwprovider, core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppidentityprovider)).ok() } pub unsafe fn AddToCache(&self, lpszuniqueid: P0, providerguid: *const windows_core::GUID) -> windows_core::Result<()> where @@ -679,7 +679,7 @@ impl IIdentityStore { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn EnumerateIdentities(&self, eidentitytype: IDENTITY_TYPE, pfilterkey: Option<*const super::super::super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pfilterpropvarvalue: Option<*const super::super::super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(std::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateIdentities)(windows_core::Interface::as_raw(self), eidentitytype, core::mem::transmute(pfilterkey.unwrap_or(core::ptr::null())), core::mem::transmute(pfilterpropvarvalue.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs index 7490b79fc1..d4c7088c5f 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authentication/Identity/mod.rs @@ -4,7 +4,7 @@ pub mod Provider; #[inline] pub unsafe fn AcceptSecurityContext(phcredential: Option<*const super::super::Credentials::SecHandle>, phcontext: Option<*const super::super::Credentials::SecHandle>, pinput: Option<*const SecBufferDesc>, fcontextreq: ASC_REQ_FLAGS, targetdatarep: u32, phnewcontext: Option<*mut super::super::Credentials::SecHandle>, poutput: Option<*mut SecBufferDesc>, pfcontextattr: *mut u32, ptsexpiry: Option<*mut i64>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn AcceptSecurityContext(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, pinput : *const SecBufferDesc, fcontextreq : ASC_REQ_FLAGS, targetdatarep : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - AcceptSecurityContext(core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), core::mem::transmute(pinput.unwrap_or(std::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))) + AcceptSecurityContext(core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pinput.unwrap_or(core::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AcquireCredentialsHandleA(pszprincipal : windows_core::PCSTR, pszpackage : windows_core::PCSTR, fcredentialuse : SECPKG_CRED, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *mut super::super::Credentials:: SecHandle, ptsexpiry : *mut i64) -> windows_core::HRESULT); - AcquireCredentialsHandleA(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(std::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))).ok() + AcquireCredentialsHandleA(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AcquireCredentialsHandleW(pszprincipal : windows_core::PCWSTR, pszpackage : windows_core::PCWSTR, fcredentialuse : SECPKG_CRED, pvlogonid : *const core::ffi::c_void, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, phcredential : *mut super::super::Credentials:: SecHandle, ptsexpiry : *mut i64) -> windows_core::HRESULT); - AcquireCredentialsHandleW(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(std::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))).ok() + AcquireCredentialsHandleW(pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pvlogonid.unwrap_or(core::ptr::null())), core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), phcredential, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -34,7 +34,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddCredentialsA(hcredentials : *const super::super::Credentials:: SecHandle, pszprincipal : windows_core::PCSTR, pszpackage : windows_core::PCSTR, fcredentialuse : u32, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, ptsexpiry : *mut i64) -> windows_core::HRESULT); - AddCredentialsA(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))).ok() + AddCredentialsA(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -44,7 +44,7 @@ where P1: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddCredentialsW(hcredentials : *const super::super::Credentials:: SecHandle, pszprincipal : windows_core::PCWSTR, pszpackage : windows_core::PCWSTR, fcredentialuse : u32, pauthdata : *const core::ffi::c_void, pgetkeyfn : SEC_GET_KEY_FN, pvgetkeyargument : *const core::ffi::c_void, ptsexpiry : *mut i64) -> windows_core::HRESULT); - AddCredentialsW(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pauthdata.unwrap_or(std::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(std::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))).ok() + AddCredentialsW(hcredentials, pszprincipal.param().abi(), pszpackage.param().abi(), fcredentialuse, core::mem::transmute(pauthdata.unwrap_or(core::ptr::null())), pgetkeyfn, core::mem::transmute(pvgetkeyargument.unwrap_or(core::ptr::null())), core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AddSecurityPackageA(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -52,7 +52,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddSecurityPackageA(pszpackagename : windows_core::PCSTR, poptions : *const SECURITY_PACKAGE_OPTIONS) -> windows_core::HRESULT); - AddSecurityPackageA(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + AddSecurityPackageA(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AddSecurityPackageW(pszpackagename: P0, poptions: Option<*const SECURITY_PACKAGE_OPTIONS>) -> windows_core::Result<()> @@ -60,7 +60,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn AddSecurityPackageW(pszpackagename : windows_core::PCWSTR, poptions : *const SECURITY_PACKAGE_OPTIONS) -> windows_core::HRESULT); - AddSecurityPackageW(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + AddSecurityPackageW(pszpackagename.param().abi(), core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -100,7 +100,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditEnumerateSubCategories(pauditcategoryguid : *const windows_core::GUID, bretrieveallsubcategories : super::super::super::Foundation:: BOOLEAN, ppauditsubcategoriesarray : *mut *mut windows_core::GUID, pdwcountreturned : *mut u32) -> super::super::super::Foundation:: BOOLEAN); - AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(std::ptr::null())), bretrieveallsubcategories.param().abi(), ppauditsubcategoriesarray, pdwcountreturned) + AuditEnumerateSubCategories(core::mem::transmute(pauditcategoryguid.unwrap_or(core::ptr::null())), bretrieveallsubcategories.param().abi(), ppauditsubcategoriesarray, pdwcountreturned) } #[inline] pub unsafe fn AuditFree(buffer: *const core::ffi::c_void) { @@ -177,7 +177,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditSetGlobalSaclA(objecttypename : windows_core::PCSTR, acl : *const super::super:: ACL) -> super::super::super::Foundation:: BOOLEAN); - AuditSetGlobalSaclA(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(std::ptr::null()))) + AuditSetGlobalSaclA(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AuditSetGlobalSaclW(objecttypename: P0, acl: Option<*const super::super::ACL>) -> super::super::super::Foundation::BOOLEAN @@ -185,7 +185,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AuditSetGlobalSaclW(objecttypename : windows_core::PCWSTR, acl : *const super::super:: ACL) -> super::super::super::Foundation:: BOOLEAN); - AuditSetGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(std::ptr::null()))) + AuditSetGlobalSaclW(objecttypename.param().abi(), core::mem::transmute(acl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn AuditSetPerUserPolicy(psid: P0, pauditpolicy: &[AUDIT_POLICY_INFORMATION]) -> super::super::super::Foundation::BOOLEAN @@ -240,13 +240,13 @@ pub unsafe fn CredMarshalTargetInfo(intargetinfo: *const super::super::Credentia #[inline] pub unsafe fn CredUnmarshalTargetInfo(buffer: *const u16, buffersize: u32, rettargetinfo: Option<*mut *mut super::super::Credentials::CREDENTIAL_TARGET_INFORMATIONW>, retactualsize: Option<*mut u32>) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("secur32.dll" "system" fn CredUnmarshalTargetInfo(buffer : *const u16, buffersize : u32, rettargetinfo : *mut *mut super::super::Credentials:: CREDENTIAL_TARGET_INFORMATIONW, retactualsize : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - CredUnmarshalTargetInfo(buffer, buffersize, core::mem::transmute(rettargetinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(retactualsize.unwrap_or(std::ptr::null_mut()))) + CredUnmarshalTargetInfo(buffer, buffersize, core::mem::transmute(rettargetinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(retactualsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn DecryptMessage(phcontext: *const super::super::Credentials::SecHandle, pmessage: *const SecBufferDesc, messageseqno: u32, pfqop: Option<*mut u32>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn DecryptMessage(phcontext : *const super::super::Credentials:: SecHandle, pmessage : *const SecBufferDesc, messageseqno : u32, pfqop : *mut u32) -> windows_core::HRESULT); - DecryptMessage(phcontext, pmessage, messageseqno, core::mem::transmute(pfqop.unwrap_or(std::ptr::null_mut()))) + DecryptMessage(phcontext, pmessage, messageseqno, core::mem::transmute(pfqop.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -366,18 +366,18 @@ pub unsafe fn InitSecurityInterfaceW() -> *mut SecurityFunctionTableW { pub unsafe fn InitializeSecurityContextA(phcredential: Option<*const super::super::Credentials::SecHandle>, phcontext: Option<*const super::super::Credentials::SecHandle>, psztargetname: Option<*const i8>, fcontextreq: ISC_REQ_FLAGS, reserved1: u32, targetdatarep: u32, pinput: Option<*const SecBufferDesc>, reserved2: u32, phnewcontext: Option<*mut super::super::Credentials::SecHandle>, poutput: Option<*mut SecBufferDesc>, pfcontextattr: *mut u32, ptsexpiry: Option<*mut i64>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn InitializeSecurityContextA(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : *const i8, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); InitializeSecurityContextA( - core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), - core::mem::transmute(psztargetname.unwrap_or(std::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), + core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(psztargetname.unwrap_or(core::ptr::null())), fcontextreq, reserved1, targetdatarep, - core::mem::transmute(pinput.unwrap_or(std::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, - core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, - core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), ) } #[cfg(feature = "Win32_Security_Credentials")] @@ -385,18 +385,18 @@ pub unsafe fn InitializeSecurityContextA(phcredential: Option<*const super::supe pub unsafe fn InitializeSecurityContextW(phcredential: Option<*const super::super::Credentials::SecHandle>, phcontext: Option<*const super::super::Credentials::SecHandle>, psztargetname: Option<*const u16>, fcontextreq: ISC_REQ_FLAGS, reserved1: u32, targetdatarep: u32, pinput: Option<*const SecBufferDesc>, reserved2: u32, phnewcontext: Option<*mut super::super::Credentials::SecHandle>, poutput: Option<*mut SecBufferDesc>, pfcontextattr: *mut u32, ptsexpiry: Option<*mut i64>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn InitializeSecurityContextW(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : *const u16, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); InitializeSecurityContextW( - core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), - core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), - core::mem::transmute(psztargetname.unwrap_or(std::ptr::null())), + core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), + core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), + core::mem::transmute(psztargetname.unwrap_or(core::ptr::null())), fcontextreq, reserved1, targetdatarep, - core::mem::transmute(pinput.unwrap_or(std::ptr::null())), + core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, - core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, - core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -414,7 +414,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn LsaCallAuthenticationPackage(lsahandle : super::super::super::Foundation:: HANDLE, authenticationpackage : u32, protocolsubmitbuffer : *const core::ffi::c_void, submitbufferlength : u32, protocolreturnbuffer : *mut *mut core::ffi::c_void, returnbufferlength : *mut u32, protocolstatus : *mut i32) -> super::super::super::Foundation:: NTSTATUS); - LsaCallAuthenticationPackage(lsahandle.param().abi(), authenticationpackage, protocolsubmitbuffer, submitbufferlength, core::mem::transmute(protocolreturnbuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(returnbufferlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(protocolstatus.unwrap_or(std::ptr::null_mut()))) + LsaCallAuthenticationPackage(lsahandle.param().abi(), authenticationpackage, protocolsubmitbuffer, submitbufferlength, core::mem::transmute(protocolreturnbuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnbufferlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(protocolstatus.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn LsaClose(objecthandle: P0) -> super::super::super::Foundation::NTSTATUS @@ -469,7 +469,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaEnumerateAccountsWithUserRight(policyhandle : LSA_HANDLE, userright : *const LSA_UNICODE_STRING, buffer : *mut *mut core::ffi::c_void, countreturned : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaEnumerateAccountsWithUserRight(policyhandle.param().abi(), core::mem::transmute(userright.unwrap_or(std::ptr::null())), buffer, countreturned) + LsaEnumerateAccountsWithUserRight(policyhandle.param().abi(), core::mem::transmute(userright.unwrap_or(core::ptr::null())), buffer, countreturned) } #[inline] pub unsafe fn LsaEnumerateLogonSessions(logonsessioncount: *mut u32, logonsessionlist: *mut *mut super::super::super::Foundation::LUID) -> super::super::super::Foundation::NTSTATUS { @@ -495,7 +495,7 @@ where #[inline] pub unsafe fn LsaFreeMemory(buffer: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaFreeMemory(buffer : *const core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaFreeMemory(core::mem::transmute(buffer.unwrap_or(std::ptr::null()))) + LsaFreeMemory(core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn LsaFreeReturnBuffer(buffer: *const core::ffi::c_void) -> super::super::super::Foundation::NTSTATUS { @@ -505,7 +505,7 @@ pub unsafe fn LsaFreeReturnBuffer(buffer: *const core::ffi::c_void) -> super::su #[inline] pub unsafe fn LsaGetAppliedCAPIDs(systemname: Option<*const LSA_UNICODE_STRING>, capids: *mut *mut super::super::PSID, capidcount: *mut u32) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaGetAppliedCAPIDs(systemname : *const LSA_UNICODE_STRING, capids : *mut *mut super::super:: PSID, capidcount : *mut u32) -> super::super::super::Foundation:: NTSTATUS); - LsaGetAppliedCAPIDs(core::mem::transmute(systemname.unwrap_or(std::ptr::null())), capids, capidcount) + LsaGetAppliedCAPIDs(core::mem::transmute(systemname.unwrap_or(core::ptr::null())), capids, capidcount) } #[inline] pub unsafe fn LsaGetLogonSessionData(logonid: *const super::super::super::Foundation::LUID, pplogonsessiondata: *mut *mut SECURITY_LOGON_SESSION_DATA) -> super::super::super::Foundation::NTSTATUS { @@ -518,7 +518,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn LsaLogonUser(lsahandle : super::super::super::Foundation:: HANDLE, originname : *const LSA_STRING, logontype : SECURITY_LOGON_TYPE, authenticationpackage : u32, authenticationinformation : *const core::ffi::c_void, authenticationinformationlength : u32, localgroups : *const super::super:: TOKEN_GROUPS, sourcecontext : *const super::super:: TOKEN_SOURCE, profilebuffer : *mut *mut core::ffi::c_void, profilebufferlength : *mut u32, logonid : *mut super::super::super::Foundation:: LUID, token : *mut super::super::super::Foundation:: HANDLE, quotas : *mut super::super:: QUOTA_LIMITS, substatus : *mut i32) -> super::super::super::Foundation:: NTSTATUS); - LsaLogonUser(lsahandle.param().abi(), originname, logontype, authenticationpackage, authenticationinformation, authenticationinformationlength, core::mem::transmute(localgroups.unwrap_or(std::ptr::null())), sourcecontext, profilebuffer, profilebufferlength, logonid, token, quotas, substatus) + LsaLogonUser(lsahandle.param().abi(), originname, logontype, authenticationpackage, authenticationinformation, authenticationinformationlength, core::mem::transmute(localgroups.unwrap_or(core::ptr::null())), sourcecontext, profilebuffer, profilebufferlength, logonid, token, quotas, substatus) } #[inline] pub unsafe fn LsaLookupAuthenticationPackage(lsahandle: P0, packagename: *const LSA_STRING, authenticationpackage: *mut u32) -> super::super::super::Foundation::NTSTATUS @@ -571,7 +571,7 @@ where #[inline] pub unsafe fn LsaOpenPolicy(systemname: Option<*const LSA_UNICODE_STRING>, objectattributes: *const LSA_OBJECT_ATTRIBUTES, desiredaccess: u32, policyhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("advapi32.dll" "system" fn LsaOpenPolicy(systemname : *const LSA_UNICODE_STRING, objectattributes : *const LSA_OBJECT_ATTRIBUTES, desiredaccess : u32, policyhandle : *mut LSA_HANDLE) -> super::super::super::Foundation:: NTSTATUS); - LsaOpenPolicy(core::mem::transmute(systemname.unwrap_or(std::ptr::null())), objectattributes, desiredaccess, policyhandle) + LsaOpenPolicy(core::mem::transmute(systemname.unwrap_or(core::ptr::null())), objectattributes, desiredaccess, policyhandle) } #[inline] pub unsafe fn LsaOpenTrustedDomainByName(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, desiredaccess: u32, trusteddomainhandle: *mut LSA_HANDLE) -> super::super::super::Foundation::NTSTATUS @@ -677,7 +677,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaSetDomainInformationPolicy(policyhandle : LSA_HANDLE, informationclass : POLICY_DOMAIN_INFORMATION_CLASS, buffer : *const core::ffi::c_void) -> super::super::super::Foundation:: NTSTATUS); - LsaSetDomainInformationPolicy(policyhandle.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(std::ptr::null()))) + LsaSetDomainInformationPolicy(policyhandle.param().abi(), informationclass, core::mem::transmute(buffer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn LsaSetForestTrustInformation(policyhandle: P0, trusteddomainname: *const LSA_UNICODE_STRING, foresttrustinfo: *const LSA_FOREST_TRUST_INFORMATION, checkonly: P1, collisioninfo: *mut *mut LSA_FOREST_TRUST_COLLISION_INFORMATION) -> super::super::super::Foundation::NTSTATUS @@ -728,7 +728,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LsaStorePrivateData(policyhandle : LSA_HANDLE, keyname : *const LSA_UNICODE_STRING, privatedata : *const LSA_UNICODE_STRING) -> super::super::super::Foundation:: NTSTATUS); - LsaStorePrivateData(policyhandle.param().abi(), keyname, core::mem::transmute(privatedata.unwrap_or(std::ptr::null()))) + LsaStorePrivateData(policyhandle.param().abi(), keyname, core::mem::transmute(privatedata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn LsaUnregisterPolicyChangeNotification(informationclass: POLICY_NOTIFICATION_INFORMATION_CLASS, notificationeventhandle: P0) -> super::super::super::Foundation::NTSTATUS @@ -853,7 +853,7 @@ where P0: windows_core::Param, { windows_targets::link!("slcext.dll" "system" fn SLActivateProduct(hslc : *const core::ffi::c_void, pproductskuid : *const windows_core::GUID, cbappspecificdata : u32, pvappspecificdata : *const core::ffi::c_void, pactivationinfo : *const SL_ACTIVATION_INFO_HEADER, pwszproxyserver : windows_core::PCWSTR, wproxyport : u16) -> windows_core::HRESULT); - SLActivateProduct(hslc, pproductskuid, cbappspecificdata, core::mem::transmute(pvappspecificdata.unwrap_or(std::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(std::ptr::null())), pwszproxyserver.param().abi(), wproxyport).ok() + SLActivateProduct(hslc, pproductskuid, cbappspecificdata, core::mem::transmute(pvappspecificdata.unwrap_or(core::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(core::ptr::null())), pwszproxyserver.param().abi(), wproxyport).ok() } #[inline] pub unsafe fn SLClose(hslc: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -866,7 +866,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLConsumeRight(hslc : *const core::ffi::c_void, pappid : *const windows_core::GUID, pproductskuid : *const windows_core::GUID, pwszrightname : windows_core::PCWSTR, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - SLConsumeRight(hslc, pappid, core::mem::transmute(pproductskuid.unwrap_or(std::ptr::null())), pwszrightname.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + SLConsumeRight(hslc, pappid, core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), pwszrightname.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SLDepositOfflineConfirmationId(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, pwszinstallationid: P0, pwszconfirmationid: P1) -> windows_core::Result<()> @@ -884,7 +884,7 @@ where P1: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLDepositOfflineConfirmationIdEx(hslc : *const core::ffi::c_void, pproductskuid : *const windows_core::GUID, pactivationinfo : *const SL_ACTIVATION_INFO_HEADER, pwszinstallationid : windows_core::PCWSTR, pwszconfirmationid : windows_core::PCWSTR) -> windows_core::HRESULT); - SLDepositOfflineConfirmationIdEx(hslc, core::mem::transmute(pproductskuid.unwrap_or(std::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(std::ptr::null())), pwszinstallationid.param().abi(), pwszconfirmationid.param().abi()).ok() + SLDepositOfflineConfirmationIdEx(hslc, core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(core::ptr::null())), pwszinstallationid.param().abi(), pwszconfirmationid.param().abi()).ok() } #[inline] pub unsafe fn SLFireEvent(hslc: *const core::ffi::c_void, pwszeventid: P0, papplicationid: *const windows_core::GUID) -> windows_core::Result<()> @@ -904,7 +904,7 @@ pub unsafe fn SLGenerateOfflineInstallationId(hslc: *const core::ffi::c_void, pp pub unsafe fn SLGenerateOfflineInstallationIdEx(hslc: *const core::ffi::c_void, pproductskuid: Option<*const windows_core::GUID>, pactivationinfo: Option<*const SL_ACTIVATION_INFO_HEADER>) -> windows_core::Result { windows_targets::link!("slc.dll" "system" fn SLGenerateOfflineInstallationIdEx(hslc : *const core::ffi::c_void, pproductskuid : *const windows_core::GUID, pactivationinfo : *const SL_ACTIVATION_INFO_HEADER, ppwszinstallationid : *mut windows_core::PWSTR) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SLGenerateOfflineInstallationIdEx(hslc, core::mem::transmute(pproductskuid.unwrap_or(std::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + SLGenerateOfflineInstallationIdEx(hslc, core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), core::mem::transmute(pactivationinfo.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn SLGetApplicationInformation(hslc: *const core::ffi::c_void, papplicationid: *const windows_core::GUID, pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -912,7 +912,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetApplicationInformation(hslc : *const core::ffi::c_void, papplicationid : *const windows_core::GUID, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetApplicationInformation(hslc, papplicationid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetApplicationInformation(hslc, papplicationid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetGenuineInformation(pqueryid: *const windows_core::GUID, pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -920,7 +920,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetGenuineInformation(pqueryid : *const windows_core::GUID, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetGenuineInformation(pqueryid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetGenuineInformation(pqueryid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetInstalledProductKeyIds(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, pnproductkeyids: *mut u32, ppproductkeyids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { @@ -944,7 +944,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetLicenseInformation(hslc : *const core::ffi::c_void, psllicenseid : *const windows_core::GUID, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetLicenseInformation(hslc, psllicenseid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetLicenseInformation(hslc, psllicenseid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetLicensingStatusInformation(hslc: *const core::ffi::c_void, pappid: Option<*const windows_core::GUID>, pproductskuid: Option<*const windows_core::GUID>, pwszrightname: P0, pnstatuscount: *mut u32, pplicensingstatus: *mut *mut SL_LICENSING_STATUS) -> windows_core::Result<()> @@ -952,7 +952,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetLicensingStatusInformation(hslc : *const core::ffi::c_void, pappid : *const windows_core::GUID, pproductskuid : *const windows_core::GUID, pwszrightname : windows_core::PCWSTR, pnstatuscount : *mut u32, pplicensingstatus : *mut *mut SL_LICENSING_STATUS) -> windows_core::HRESULT); - SLGetLicensingStatusInformation(hslc, core::mem::transmute(pappid.unwrap_or(std::ptr::null())), core::mem::transmute(pproductskuid.unwrap_or(std::ptr::null())), pwszrightname.param().abi(), pnstatuscount, pplicensingstatus).ok() + SLGetLicensingStatusInformation(hslc, core::mem::transmute(pappid.unwrap_or(core::ptr::null())), core::mem::transmute(pproductskuid.unwrap_or(core::ptr::null())), pwszrightname.param().abi(), pnstatuscount, pplicensingstatus).ok() } #[inline] pub unsafe fn SLGetPKeyId(hslc: *const core::ffi::c_void, pwszpkeyalgorithm: P0, pwszpkeystring: P1, pbpkeyspecificdata: Option<&[u8]>) -> windows_core::Result @@ -970,7 +970,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetPKeyInformation(hslc : *const core::ffi::c_void, ppkeyid : *const windows_core::GUID, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetPKeyInformation(hslc, ppkeyid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetPKeyInformation(hslc, ppkeyid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetPolicyInformation(hslc: *const core::ffi::c_void, pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -978,7 +978,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetPolicyInformation(hslc : *const core::ffi::c_void, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetPolicyInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetPolicyInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetPolicyInformationDWORD(hslc: *const core::ffi::c_void, pwszvaluename: P0) -> windows_core::Result @@ -995,7 +995,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetProductSkuInformation(hslc : *const core::ffi::c_void, pproductskuid : *const windows_core::GUID, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetProductSkuInformation(hslc, pproductskuid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetProductSkuInformation(hslc, pproductskuid, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetReferralInformation(hslc: *const core::ffi::c_void, ereferraltype: SLREFERRALTYPE, pskuorappid: *const windows_core::GUID, pwszvaluename: P0) -> windows_core::Result @@ -1009,7 +1009,7 @@ where #[inline] pub unsafe fn SLGetSLIDList(hslc: *const core::ffi::c_void, equeryidtype: SLIDTYPE, pqueryid: Option<*const windows_core::GUID>, ereturnidtype: SLIDTYPE, pnreturnids: *mut u32, ppreturnids: *mut *mut windows_core::GUID) -> windows_core::Result<()> { windows_targets::link!("slc.dll" "system" fn SLGetSLIDList(hslc : *const core::ffi::c_void, equeryidtype : SLIDTYPE, pqueryid : *const windows_core::GUID, ereturnidtype : SLIDTYPE, pnreturnids : *mut u32, ppreturnids : *mut *mut windows_core::GUID) -> windows_core::HRESULT); - SLGetSLIDList(hslc, equeryidtype, core::mem::transmute(pqueryid.unwrap_or(std::ptr::null())), ereturnidtype, pnreturnids, ppreturnids).ok() + SLGetSLIDList(hslc, equeryidtype, core::mem::transmute(pqueryid.unwrap_or(core::ptr::null())), ereturnidtype, pnreturnids, ppreturnids).ok() } #[inline] pub unsafe fn SLGetServerStatus(pwszserverurl: P0, pwszacquisitiontype: P1, pwszproxyserver: P2, wproxyport: u16) -> windows_core::Result @@ -1028,7 +1028,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetServiceInformation(hslc : *const core::ffi::c_void, pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetServiceInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetServiceInformation(hslc, pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetWindowsInformation(pwszvaluename: P0, pedatatype: Option<*mut SLDATATYPE>, pcbvalue: *mut u32, ppbvalue: *mut *mut u8) -> windows_core::Result<()> @@ -1036,7 +1036,7 @@ where P0: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLGetWindowsInformation(pwszvaluename : windows_core::PCWSTR, pedatatype : *mut SLDATATYPE, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> windows_core::HRESULT); - SLGetWindowsInformation(pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(std::ptr::null_mut())), pcbvalue, ppbvalue).ok() + SLGetWindowsInformation(pwszvaluename.param().abi(), core::mem::transmute(pedatatype.unwrap_or(core::ptr::null_mut())), pcbvalue, ppbvalue).ok() } #[inline] pub unsafe fn SLGetWindowsInformationDWORD(pwszvaluename: P0) -> windows_core::Result @@ -1066,7 +1066,7 @@ where #[inline] pub unsafe fn SLIsGenuineLocal(pappid: *const windows_core::GUID, pgenuinestate: *mut SL_GENUINE_STATE, puioptions: Option<*mut SL_NONGENUINE_UI_OPTIONS>) -> windows_core::Result<()> { windows_targets::link!("slwga.dll" "system" fn SLIsGenuineLocal(pappid : *const windows_core::GUID, pgenuinestate : *mut SL_GENUINE_STATE, puioptions : *mut SL_NONGENUINE_UI_OPTIONS) -> windows_core::HRESULT); - SLIsGenuineLocal(pappid, pgenuinestate, core::mem::transmute(puioptions.unwrap_or(std::ptr::null_mut()))).ok() + SLIsGenuineLocal(pappid, pgenuinestate, core::mem::transmute(puioptions.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SLOpen(phslc: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1079,7 +1079,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-slapi-l1-1-0.dll" "system" fn SLQueryLicenseValueFromApp(valuename : windows_core::PCWSTR, valuetype : *mut u32, databuffer : *mut core::ffi::c_void, datasize : u32, resultdatasize : *mut u32) -> windows_core::HRESULT); - SLQueryLicenseValueFromApp(valuename.param().abi(), core::mem::transmute(valuetype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(databuffer.unwrap_or(std::ptr::null_mut())), datasize, resultdatasize).ok() + SLQueryLicenseValueFromApp(valuename.param().abi(), core::mem::transmute(valuetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(databuffer.unwrap_or(core::ptr::null_mut())), datasize, resultdatasize).ok() } #[inline] pub unsafe fn SLRegisterEvent(hslc: Option<*const core::ffi::c_void>, pwszeventid: P0, papplicationid: *const windows_core::GUID, hevent: P1) -> windows_core::Result<()> @@ -1088,7 +1088,7 @@ where P1: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLRegisterEvent(hslc : *const core::ffi::c_void, pwszeventid : windows_core::PCWSTR, papplicationid : *const windows_core::GUID, hevent : super::super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - SLRegisterEvent(core::mem::transmute(hslc.unwrap_or(std::ptr::null())), pwszeventid.param().abi(), papplicationid, hevent.param().abi()).ok() + SLRegisterEvent(core::mem::transmute(hslc.unwrap_or(core::ptr::null())), pwszeventid.param().abi(), papplicationid, hevent.param().abi()).ok() } #[inline] pub unsafe fn SLSetCurrentProductKey(hslc: *const core::ffi::c_void, pproductskuid: *const windows_core::GUID, pproductkeyid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -1120,13 +1120,13 @@ where P1: windows_core::Param, { windows_targets::link!("slc.dll" "system" fn SLUnregisterEvent(hslc : *const core::ffi::c_void, pwszeventid : windows_core::PCWSTR, papplicationid : *const windows_core::GUID, hevent : super::super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - SLUnregisterEvent(core::mem::transmute(hslc.unwrap_or(std::ptr::null())), pwszeventid.param().abi(), papplicationid, hevent.param().abi()).ok() + SLUnregisterEvent(core::mem::transmute(hslc.unwrap_or(core::ptr::null())), pwszeventid.param().abi(), papplicationid, hevent.param().abi()).ok() } #[cfg(feature = "Win32_Security_Credentials")] #[inline] pub unsafe fn SaslAcceptSecurityContext(phcredential: Option<*const super::super::Credentials::SecHandle>, phcontext: Option<*const super::super::Credentials::SecHandle>, pinput: Option<*const SecBufferDesc>, fcontextreq: ASC_REQ_FLAGS, targetdatarep: u32, phnewcontext: Option<*mut super::super::Credentials::SecHandle>, poutput: Option<*mut SecBufferDesc>, pfcontextattr: *mut u32, ptsexpiry: Option<*mut i64>) -> windows_core::HRESULT { windows_targets::link!("secur32.dll" "system" fn SaslAcceptSecurityContext(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, pinput : *const SecBufferDesc, fcontextreq : ASC_REQ_FLAGS, targetdatarep : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - SaslAcceptSecurityContext(core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), core::mem::transmute(pinput.unwrap_or(std::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))) + SaslAcceptSecurityContext(core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), core::mem::transmute(pinput.unwrap_or(core::ptr::null())), fcontextreq, targetdatarep, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SaslEnumerateProfilesA(profilelist: *mut windows_core::PSTR, profilecount: *mut u32) -> windows_core::Result<()> { @@ -1142,7 +1142,7 @@ pub unsafe fn SaslEnumerateProfilesW(profilelist: *mut windows_core::PWSTR, prof #[inline] pub unsafe fn SaslGetContextOption(contexthandle: *const super::super::Credentials::SecHandle, option: u32, value: *mut core::ffi::c_void, size: u32, needed: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SaslGetContextOption(contexthandle : *const super::super::Credentials:: SecHandle, option : u32, value : *mut core::ffi::c_void, size : u32, needed : *mut u32) -> windows_core::HRESULT); - SaslGetContextOption(contexthandle, option, value, size, core::mem::transmute(needed.unwrap_or(std::ptr::null_mut()))).ok() + SaslGetContextOption(contexthandle, option, value, size, core::mem::transmute(needed.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SaslGetProfilePackageA(profilename: P0) -> windows_core::Result<*mut SecPkgInfoA> @@ -1181,7 +1181,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SaslInitializeSecurityContextA(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : windows_core::PCSTR, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - SaslInitializeSecurityContextA(core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(std::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))) + SaslInitializeSecurityContextA(core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -1190,7 +1190,7 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SaslInitializeSecurityContextW(phcredential : *const super::super::Credentials:: SecHandle, phcontext : *const super::super::Credentials:: SecHandle, psztargetname : windows_core::PCWSTR, fcontextreq : ISC_REQ_FLAGS, reserved1 : u32, targetdatarep : u32, pinput : *const SecBufferDesc, reserved2 : u32, phnewcontext : *mut super::super::Credentials:: SecHandle, poutput : *mut SecBufferDesc, pfcontextattr : *mut u32, ptsexpiry : *mut i64) -> windows_core::HRESULT); - SaslInitializeSecurityContextW(core::mem::transmute(phcredential.unwrap_or(std::ptr::null())), core::mem::transmute(phcontext.unwrap_or(std::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(std::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(std::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(std::ptr::null_mut()))) + SaslInitializeSecurityContextW(core::mem::transmute(phcredential.unwrap_or(core::ptr::null())), core::mem::transmute(phcontext.unwrap_or(core::ptr::null())), psztargetname.param().abi(), fcontextreq, reserved1, targetdatarep, core::mem::transmute(pinput.unwrap_or(core::ptr::null())), reserved2, core::mem::transmute(phnewcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutput.unwrap_or(core::ptr::null_mut())), pfcontextattr, core::mem::transmute(ptsexpiry.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security_Credentials")] #[inline] @@ -1288,7 +1288,7 @@ pub unsafe fn SslGetServerIdentity(clienthello: &[u8], serveridentity: *mut *mut #[inline] pub unsafe fn SspiCompareAuthIdentities(authidentity1: Option<*const core::ffi::c_void>, authidentity2: Option<*const core::ffi::c_void>, samesupplieduser: Option<*mut super::super::super::Foundation::BOOLEAN>, samesuppliedidentity: Option<*mut super::super::super::Foundation::BOOLEAN>) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiCompareAuthIdentities(authidentity1 : *const core::ffi::c_void, authidentity2 : *const core::ffi::c_void, samesupplieduser : *mut super::super::super::Foundation:: BOOLEAN, samesuppliedidentity : *mut super::super::super::Foundation:: BOOLEAN) -> windows_core::HRESULT); - SspiCompareAuthIdentities(core::mem::transmute(authidentity1.unwrap_or(std::ptr::null())), core::mem::transmute(authidentity2.unwrap_or(std::ptr::null())), core::mem::transmute(samesupplieduser.unwrap_or(std::ptr::null_mut())), core::mem::transmute(samesuppliedidentity.unwrap_or(std::ptr::null_mut()))).ok() + SspiCompareAuthIdentities(core::mem::transmute(authidentity1.unwrap_or(core::ptr::null())), core::mem::transmute(authidentity2.unwrap_or(core::ptr::null())), core::mem::transmute(samesupplieduser.unwrap_or(core::ptr::null_mut())), core::mem::transmute(samesuppliedidentity.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SspiCopyAuthIdentity(authdata: *const core::ffi::c_void, authdatacopy: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -1308,7 +1308,7 @@ pub unsafe fn SspiDecryptAuthIdentityEx(options: u32, encryptedauthdata: *mut co #[inline] pub unsafe fn SspiEncodeAuthIdentityAsStrings(pauthidentity: *const core::ffi::c_void, ppszusername: *mut windows_core::PCWSTR, ppszdomainname: *mut windows_core::PCWSTR, ppszpackedcredentialsstring: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> { windows_targets::link!("secur32.dll" "system" fn SspiEncodeAuthIdentityAsStrings(pauthidentity : *const core::ffi::c_void, ppszusername : *mut windows_core::PCWSTR, ppszdomainname : *mut windows_core::PCWSTR, ppszpackedcredentialsstring : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - SspiEncodeAuthIdentityAsStrings(pauthidentity, ppszusername, ppszdomainname, core::mem::transmute(ppszpackedcredentialsstring.unwrap_or(std::ptr::null_mut()))).ok() + SspiEncodeAuthIdentityAsStrings(pauthidentity, ppszusername, ppszdomainname, core::mem::transmute(ppszpackedcredentialsstring.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SspiEncodeStringsAsAuthIdentity(pszusername: P0, pszdomainname: P1, pszpackedcredentialsstring: P2, ppauthidentity: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1336,12 +1336,12 @@ where P0: windows_core::Param, { windows_targets::link!("secur32.dll" "system" fn SspiExcludePackage(authidentity : *const core::ffi::c_void, pszpackagename : windows_core::PCWSTR, ppnewauthidentity : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - SspiExcludePackage(core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), pszpackagename.param().abi(), ppnewauthidentity).ok() + SspiExcludePackage(core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), pszpackagename.param().abi(), ppnewauthidentity).ok() } #[inline] pub unsafe fn SspiFreeAuthIdentity(authdata: Option<*const core::ffi::c_void>) { windows_targets::link!("secur32.dll" "system" fn SspiFreeAuthIdentity(authdata : *const core::ffi::c_void)); - SspiFreeAuthIdentity(core::mem::transmute(authdata.unwrap_or(std::ptr::null()))) + SspiFreeAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SspiGetTargetHostName(psztargetname: P0) -> windows_core::Result @@ -1365,7 +1365,7 @@ pub unsafe fn SspiIsPromptingNeeded(errororntstatus: u32) -> super::super::super #[inline] pub unsafe fn SspiLocalFree(databuffer: Option<*const core::ffi::c_void>) { windows_targets::link!("secur32.dll" "system" fn SspiLocalFree(databuffer : *const core::ffi::c_void)); - SspiLocalFree(core::mem::transmute(databuffer.unwrap_or(std::ptr::null()))) + SspiLocalFree(core::mem::transmute(databuffer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SspiMarshalAuthIdentity(authidentity: *const core::ffi::c_void, authidentitylength: *mut u32, authidentitybytearray: *mut *mut i8) -> windows_core::Result<()> { @@ -1395,7 +1395,7 @@ where P1: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn SspiPromptForCredentialsA(psztargetname : windows_core::PCSTR, puiinfo : *const core::ffi::c_void, dwautherror : u32, pszpackage : windows_core::PCSTR, pinputauthidentity : *const core::ffi::c_void, ppauthidentity : *mut *mut core::ffi::c_void, pfsave : *mut i32, dwflags : u32) -> u32); - SspiPromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), dwautherror, pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(std::ptr::null())), ppauthidentity, core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + SspiPromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), dwautherror, pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::ptr::null())), ppauthidentity, core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn SspiPromptForCredentialsW(psztargetname: P0, puiinfo: Option<*const core::ffi::c_void>, dwautherror: u32, pszpackage: P1, pinputauthidentity: Option<*const core::ffi::c_void>, ppauthidentity: *mut *mut core::ffi::c_void, pfsave: Option<*mut i32>, dwflags: u32) -> u32 @@ -1404,7 +1404,7 @@ where P1: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn SspiPromptForCredentialsW(psztargetname : windows_core::PCWSTR, puiinfo : *const core::ffi::c_void, dwautherror : u32, pszpackage : windows_core::PCWSTR, pinputauthidentity : *const core::ffi::c_void, ppauthidentity : *mut *mut core::ffi::c_void, pfsave : *mut i32, dwflags : u32) -> u32); - SspiPromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), dwautherror, pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(std::ptr::null())), ppauthidentity, core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + SspiPromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), dwautherror, pszpackage.param().abi(), core::mem::transmute(pinputauthidentity.unwrap_or(core::ptr::null())), ppauthidentity, core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn SspiSetChannelBindingFlags(pbindings: *mut SecPkgContext_Bindings, flags: u32) -> windows_core::Result<()> { @@ -1424,7 +1424,7 @@ pub unsafe fn SspiValidateAuthIdentity(authdata: *const core::ffi::c_void) -> wi #[inline] pub unsafe fn SspiZeroAuthIdentity(authdata: Option<*const core::ffi::c_void>) { windows_targets::link!("secur32.dll" "system" fn SspiZeroAuthIdentity(authdata : *const core::ffi::c_void)); - SspiZeroAuthIdentity(core::mem::transmute(authdata.unwrap_or(std::ptr::null()))) + SspiZeroAuthIdentity(core::mem::transmute(authdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TokenBindingDeleteAllBindings() -> windows_core::Result<()> { @@ -1445,7 +1445,7 @@ where P0: windows_core::Param, { windows_targets::link!("tokenbinding.dll" "system" fn TokenBindingGenerateBinding(keytype : TOKENBINDING_KEY_PARAMETERS_TYPE, targeturl : windows_core::PCWSTR, bindingtype : TOKENBINDING_TYPE, tlsekm : *const core::ffi::c_void, tlsekmsize : u32, extensionformat : TOKENBINDING_EXTENSION_FORMAT, extensiondata : *const core::ffi::c_void, tokenbinding : *mut *mut core::ffi::c_void, tokenbindingsize : *mut u32, resultdata : *mut *mut TOKENBINDING_RESULT_DATA) -> windows_core::HRESULT); - TokenBindingGenerateBinding(keytype, targeturl.param().abi(), bindingtype, tlsekm, tlsekmsize, extensionformat, extensiondata, tokenbinding, tokenbindingsize, core::mem::transmute(resultdata.unwrap_or(std::ptr::null_mut()))).ok() + TokenBindingGenerateBinding(keytype, targeturl.param().abi(), bindingtype, tlsekm, tlsekmsize, extensionformat, extensiondata, tokenbinding, tokenbindingsize, core::mem::transmute(resultdata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn TokenBindingGenerateID(keytype: TOKENBINDING_KEY_PARAMETERS_TYPE, publickey: *const core::ffi::c_void, publickeysize: u32) -> windows_core::Result<*mut TOKENBINDING_RESULT_DATA> { 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 7e259edbdc..32a7044db9 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 @@ -87,14 +87,14 @@ impl IEffectivePermission2 { pszservername.param().abi(), psecurityobjects, dwsecurityobjectcount, - core::mem::transmute(pusergroups.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzusergroupsoperations.unwrap_or(std::ptr::null())), - core::mem::transmute(pdevicegroups.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzdevicegroupsoperations.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzuserclaims.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzuserclaimsoperations.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzdeviceclaims.unwrap_or(std::ptr::null())), - core::mem::transmute(pauthzdeviceclaimsoperations.unwrap_or(std::ptr::null())), + core::mem::transmute(pusergroups.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzusergroupsoperations.unwrap_or(core::ptr::null())), + core::mem::transmute(pdevicegroups.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzdevicegroupsoperations.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzuserclaims.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzuserclaimsoperations.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzdeviceclaims.unwrap_or(core::ptr::null())), + core::mem::transmute(pauthzdeviceclaimsoperations.unwrap_or(core::ptr::null())), peffpermresultlists, ) .ok() 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 0cbe92e0db..d95dd444a6 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Authorization/mod.rs @@ -8,7 +8,7 @@ where P2: windows_core::Param, { 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 AUTHZ_ACCESS_CHECK_RESULTS_HANDLE) -> super::super::Foundation:: BOOL); - AuthzAccessCheck(flags, hauthzclientcontext.param().abi(), prequest, hauditevent.param().abi(), psecuritydescriptor.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().try_into().unwrap()), preply, core::mem::transmute(phaccesscheckresults.unwrap_or(std::ptr::null_mut()))).ok() + AuthzAccessCheck(flags, hauthzclientcontext.param().abi(), prequest, hauditevent.param().abi(), psecuritydescriptor.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().try_into().unwrap()), preply, core::mem::transmute(phaccesscheckresults.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AuthzAddSidsToContext(hauthzclientcontext: P0, sids: Option<*const super::SID_AND_ATTRIBUTES>, sidcount: u32, restrictedsids: Option<*const super::SID_AND_ATTRIBUTES>, restrictedsidcount: u32, phnewauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> @@ -16,7 +16,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(sids.unwrap_or(std::ptr::null())), sidcount, core::mem::transmute(restrictedsids.unwrap_or(std::ptr::null())), restrictedsidcount, phnewauthzclientcontext).ok() + AuthzAddSidsToContext(hauthzclientcontext.param().abi(), core::mem::transmute(sids.unwrap_or(core::ptr::null())), sidcount, core::mem::transmute(restrictedsids.unwrap_or(core::ptr::null())), restrictedsidcount, phnewauthzclientcontext).ok() } #[inline] pub unsafe fn AuthzCachedAccessCheck(flags: u32, haccesscheckresults: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, preply: *mut AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> @@ -98,7 +98,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pexpirationtime.unwrap_or(std::ptr::null())), core::mem::transmute(identifier), dynamicgroupargs, phnewauthzclientcontext).ok() + AuthzInitializeContextFromAuthzContext(flags, hauthzclientcontext.param().abi(), core::mem::transmute(pexpirationtime.unwrap_or(core::ptr::null())), core::mem::transmute(identifier), dynamicgroupargs, phnewauthzclientcontext).ok() } #[inline] pub unsafe fn AuthzInitializeContextFromSid(flags: u32, usersid: P0, hauthzresourcemanager: P1, pexpirationtime: Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: Option<*const core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> @@ -107,7 +107,7 @@ where P1: windows_core::Param, { windows_targets::link!("authz.dll" "system" fn AuthzInitializeContextFromSid(flags : u32, usersid : super:: 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.param().abi(), hauthzresourcemanager.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() + AuthzInitializeContextFromSid(flags, usersid.param().abi(), hauthzresourcemanager.param().abi(), core::mem::transmute(pexpirationtime.unwrap_or(core::ptr::null())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs.unwrap_or(core::ptr::null())), phauthzclientcontext).ok() } #[inline] pub unsafe fn AuthzInitializeContextFromToken(flags: u32, tokenhandle: P0, hauthzresourcemanager: P1, pexpirationtime: Option<*const i64>, identifier: super::super::Foundation::LUID, dynamicgroupargs: Option<*const core::ffi::c_void>, phauthzclientcontext: *mut AUTHZ_CLIENT_CONTEXT_HANDLE) -> windows_core::Result<()> @@ -116,7 +116,7 @@ where P1: windows_core::Param, { 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.param().abi(), hauthzresourcemanager.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() + AuthzInitializeContextFromToken(flags, tokenhandle.param().abi(), hauthzresourcemanager.param().abi(), core::mem::transmute(pexpirationtime.unwrap_or(core::ptr::null())), core::mem::transmute(identifier), core::mem::transmute(dynamicgroupargs.unwrap_or(core::ptr::null())), phauthzclientcontext).ok() } #[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 AUTHZ_AUDIT_EVENT_HANDLE, dwadditionalparametercount: u32) -> windows_core::Result<()> @@ -159,7 +159,7 @@ where #[inline] pub unsafe fn AuthzInitializeResourceManagerEx(flags: AUTHZ_RESOURCE_MANAGER_FLAGS, pauthzinitinfo: 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).ok() + AuthzInitializeResourceManagerEx(flags, core::mem::transmute(pauthzinitinfo.unwrap_or(core::ptr::null())), phauthzresourcemanager).ok() } #[inline] pub unsafe fn AuthzInstallSecurityEventSource(dwflags: u32, pregistration: *const AUTHZ_SOURCE_SCHEMA_REGISTRATION) -> windows_core::Result<()> { @@ -172,7 +172,7 @@ where P0: windows_core::Param, { 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.param().abi(), claimclass, pclaimoperations, core::mem::transmute(pclaims.unwrap_or(std::ptr::null()))).ok() + AuthzModifyClaims(hauthzclientcontext.param().abi(), claimclass, pclaimoperations, core::mem::transmute(pclaims.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AuthzModifySecurityAttributes(hauthzclientcontext: P0, poperations: *const AUTHZ_SECURITY_ATTRIBUTE_OPERATION, pattributes: Option<*const AUTHZ_SECURITY_ATTRIBUTES_INFORMATION>) -> windows_core::Result<()> @@ -180,7 +180,7 @@ where P0: windows_core::Param, { 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.param().abi(), poperations, core::mem::transmute(pattributes.unwrap_or(std::ptr::null()))).ok() + AuthzModifySecurityAttributes(hauthzclientcontext.param().abi(), poperations, core::mem::transmute(pattributes.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AuthzModifySids(hauthzclientcontext: P0, sidclass: AUTHZ_CONTEXT_INFORMATION_CLASS, psidoperations: *const AUTHZ_SID_OPERATION, psids: Option<*const super::TOKEN_GROUPS>) -> windows_core::Result<()> @@ -188,7 +188,7 @@ where P0: windows_core::Param, { 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.param().abi(), sidclass, psidoperations, core::mem::transmute(psids.unwrap_or(std::ptr::null()))).ok() + AuthzModifySids(hauthzclientcontext.param().abi(), sidclass, psidoperations, core::mem::transmute(psids.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AuthzOpenObjectAudit(flags: u32, hauthzclientcontext: P0, prequest: *const AUTHZ_ACCESS_REQUEST, hauditevent: P1, psecuritydescriptor: P2, optionalsecuritydescriptorarray: Option<&[super::PSECURITY_DESCRIPTOR]>, preply: *const AUTHZ_ACCESS_REPLY) -> windows_core::Result<()> @@ -204,7 +204,7 @@ where #[inline] pub unsafe fn AuthzRegisterCapChangeNotification(phcapchangesubscription: *mut AUTHZ_CAP_CHANGE_SUBSCRIPTION_HANDLE, pfncapchangecallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, pcallbackcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("authz.dll" "system" fn AuthzRegisterCapChangeNotification(phcapchangesubscription : *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()))).ok() + AuthzRegisterCapChangeNotification(phcapchangesubscription, pfncapchangecallback, core::mem::transmute(pcallbackcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AuthzRegisterSecurityEventSource(dwflags: u32, szeventsourcename: P0, pheventprovider: *mut AUTHZ_SECURITY_EVENT_PROVIDER_HANDLE) -> windows_core::Result<()> @@ -282,7 +282,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildImpersonateExplicitAccessWithNameA(pexplicitaccess : *mut EXPLICIT_ACCESS_A, ptrusteename : windows_core::PCSTR, ptrustee : *const TRUSTEE_A, accesspermissions : u32, accessmode : ACCESS_MODE, inheritance : u32)); - BuildImpersonateExplicitAccessWithNameA(pexplicitaccess, ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(std::ptr::null())), accesspermissions, accessmode, inheritance) + BuildImpersonateExplicitAccessWithNameA(pexplicitaccess, ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::ptr::null())), accesspermissions, accessmode, inheritance) } #[inline] pub unsafe fn BuildImpersonateExplicitAccessWithNameW(pexplicitaccess: *mut EXPLICIT_ACCESS_W, ptrusteename: P0, ptrustee: Option<*const TRUSTEE_W>, accesspermissions: u32, accessmode: ACCESS_MODE, inheritance: u32) @@ -290,17 +290,17 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildImpersonateExplicitAccessWithNameW(pexplicitaccess : *mut EXPLICIT_ACCESS_W, ptrusteename : windows_core::PCWSTR, ptrustee : *const TRUSTEE_W, accesspermissions : u32, accessmode : ACCESS_MODE, inheritance : u32)); - BuildImpersonateExplicitAccessWithNameW(pexplicitaccess, ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(std::ptr::null())), accesspermissions, accessmode, inheritance) + BuildImpersonateExplicitAccessWithNameW(pexplicitaccess, ptrusteename.param().abi(), core::mem::transmute(ptrustee.unwrap_or(core::ptr::null())), accesspermissions, accessmode, inheritance) } #[inline] pub unsafe fn BuildImpersonateTrusteeA(ptrustee: *mut TRUSTEE_A, pimpersonatetrustee: Option<*const TRUSTEE_A>) { windows_targets::link!("advapi32.dll" "system" fn BuildImpersonateTrusteeA(ptrustee : *mut TRUSTEE_A, pimpersonatetrustee : *const TRUSTEE_A)); - BuildImpersonateTrusteeA(ptrustee, core::mem::transmute(pimpersonatetrustee.unwrap_or(std::ptr::null()))) + BuildImpersonateTrusteeA(ptrustee, core::mem::transmute(pimpersonatetrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BuildImpersonateTrusteeW(ptrustee: *mut TRUSTEE_W, pimpersonatetrustee: Option<*const TRUSTEE_W>) { windows_targets::link!("advapi32.dll" "system" fn BuildImpersonateTrusteeW(ptrustee : *mut TRUSTEE_W, pimpersonatetrustee : *const TRUSTEE_W)); - BuildImpersonateTrusteeW(ptrustee, core::mem::transmute(pimpersonatetrustee.unwrap_or(std::ptr::null()))) + BuildImpersonateTrusteeW(ptrustee, core::mem::transmute(pimpersonatetrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BuildSecurityDescriptorA(powner: Option<*const TRUSTEE_A>, pgroup: Option<*const TRUSTEE_A>, plistofaccessentries: Option<&[EXPLICIT_ACCESS_A]>, plistofauditentries: Option<&[EXPLICIT_ACCESS_A]>, poldsd: P0, psizenewsd: *mut u32, pnewsd: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR @@ -309,8 +309,8 @@ where { windows_targets::link!("advapi32.dll" "system" fn BuildSecurityDescriptorA(powner : *const TRUSTEE_A, pgroup : *const TRUSTEE_A, ccountofaccessentries : u32, plistofaccessentries : *const EXPLICIT_ACCESS_A, ccountofauditentries : u32, plistofauditentries : *const EXPLICIT_ACCESS_A, poldsd : super:: PSECURITY_DESCRIPTOR, psizenewsd : *mut u32, pnewsd : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); BuildSecurityDescriptorA( - core::mem::transmute(powner.unwrap_or(std::ptr::null())), - core::mem::transmute(pgroup.unwrap_or(std::ptr::null())), + core::mem::transmute(powner.unwrap_or(core::ptr::null())), + core::mem::transmute(pgroup.unwrap_or(core::ptr::null())), plistofaccessentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plistofaccessentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), plistofauditentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -327,8 +327,8 @@ where { windows_targets::link!("advapi32.dll" "system" fn BuildSecurityDescriptorW(powner : *const TRUSTEE_W, pgroup : *const TRUSTEE_W, ccountofaccessentries : u32, plistofaccessentries : *const EXPLICIT_ACCESS_W, ccountofauditentries : u32, plistofauditentries : *const EXPLICIT_ACCESS_W, poldsd : super:: PSECURITY_DESCRIPTOR, psizenewsd : *mut u32, pnewsd : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); BuildSecurityDescriptorW( - core::mem::transmute(powner.unwrap_or(std::ptr::null())), - core::mem::transmute(pgroup.unwrap_or(std::ptr::null())), + core::mem::transmute(powner.unwrap_or(core::ptr::null())), + core::mem::transmute(pgroup.unwrap_or(core::ptr::null())), plistofaccessentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(plistofaccessentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), plistofauditentries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -362,7 +362,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithObjectsAndNameA(ptrustee : *mut TRUSTEE_A, pobjname : *const OBJECTS_AND_NAME_A, objecttype : SE_OBJECT_TYPE, objecttypename : windows_core::PCSTR, inheritedobjecttypename : windows_core::PCSTR, name : windows_core::PCSTR)); - BuildTrusteeWithObjectsAndNameA(ptrustee, core::mem::transmute(pobjname.unwrap_or(std::ptr::null())), objecttype, objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) + BuildTrusteeWithObjectsAndNameA(ptrustee, core::mem::transmute(pobjname.unwrap_or(core::ptr::null())), objecttype, objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) } #[inline] pub unsafe fn BuildTrusteeWithObjectsAndNameW(ptrustee: *mut TRUSTEE_W, pobjname: Option<*const OBJECTS_AND_NAME_W>, objecttype: SE_OBJECT_TYPE, objecttypename: P0, inheritedobjecttypename: P1, name: P2) @@ -372,7 +372,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithObjectsAndNameW(ptrustee : *mut TRUSTEE_W, pobjname : *const OBJECTS_AND_NAME_W, objecttype : SE_OBJECT_TYPE, objecttypename : windows_core::PCWSTR, inheritedobjecttypename : windows_core::PCWSTR, name : windows_core::PCWSTR)); - BuildTrusteeWithObjectsAndNameW(ptrustee, core::mem::transmute(pobjname.unwrap_or(std::ptr::null())), objecttype, objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) + BuildTrusteeWithObjectsAndNameW(ptrustee, core::mem::transmute(pobjname.unwrap_or(core::ptr::null())), objecttype, objecttypename.param().abi(), inheritedobjecttypename.param().abi(), name.param().abi()) } #[inline] pub unsafe fn BuildTrusteeWithObjectsAndSidA(ptrustee: *mut TRUSTEE_A, pobjsid: Option<*const OBJECTS_AND_SID>, pobjectguid: Option<*const windows_core::GUID>, pinheritedobjectguid: Option<*const windows_core::GUID>, psid: P0) @@ -380,7 +380,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithObjectsAndSidA(ptrustee : *mut TRUSTEE_A, pobjsid : *const OBJECTS_AND_SID, pobjectguid : *const windows_core::GUID, pinheritedobjectguid : *const windows_core::GUID, psid : super:: PSID)); - BuildTrusteeWithObjectsAndSidA(ptrustee, core::mem::transmute(pobjsid.unwrap_or(std::ptr::null())), core::mem::transmute(pobjectguid.unwrap_or(std::ptr::null())), core::mem::transmute(pinheritedobjectguid.unwrap_or(std::ptr::null())), psid.param().abi()) + BuildTrusteeWithObjectsAndSidA(ptrustee, core::mem::transmute(pobjsid.unwrap_or(core::ptr::null())), core::mem::transmute(pobjectguid.unwrap_or(core::ptr::null())), core::mem::transmute(pinheritedobjectguid.unwrap_or(core::ptr::null())), psid.param().abi()) } #[inline] pub unsafe fn BuildTrusteeWithObjectsAndSidW(ptrustee: *mut TRUSTEE_W, pobjsid: Option<*const OBJECTS_AND_SID>, pobjectguid: Option<*const windows_core::GUID>, pinheritedobjectguid: Option<*const windows_core::GUID>, psid: P0) @@ -388,7 +388,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn BuildTrusteeWithObjectsAndSidW(ptrustee : *mut TRUSTEE_W, pobjsid : *const OBJECTS_AND_SID, pobjectguid : *const windows_core::GUID, pinheritedobjectguid : *const windows_core::GUID, psid : super:: PSID)); - BuildTrusteeWithObjectsAndSidW(ptrustee, core::mem::transmute(pobjsid.unwrap_or(std::ptr::null())), core::mem::transmute(pobjectguid.unwrap_or(std::ptr::null())), core::mem::transmute(pinheritedobjectguid.unwrap_or(std::ptr::null())), psid.param().abi()) + BuildTrusteeWithObjectsAndSidW(ptrustee, core::mem::transmute(pobjsid.unwrap_or(core::ptr::null())), core::mem::transmute(pobjectguid.unwrap_or(core::ptr::null())), core::mem::transmute(pinheritedobjectguid.unwrap_or(core::ptr::null())), psid.param().abi()) } #[inline] pub unsafe fn BuildTrusteeWithSidA(ptrustee: *mut TRUSTEE_A, psid: P0) @@ -412,7 +412,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor : super:: PSECURITY_DESCRIPTOR, requestedstringsdrevision : u32, securityinformation : super:: OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor : *mut windows_core::PSTR, stringsecuritydescriptorlen : *mut u32) -> super::super::Foundation:: BOOL); - ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor.param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(std::ptr::null_mut()))).ok() + ConvertSecurityDescriptorToStringSecurityDescriptorA(securitydescriptor.param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor: P0, requestedstringsdrevision: u32, securityinformation: super::OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor: *mut windows_core::PWSTR, stringsecuritydescriptorlen: Option<*mut u32>) -> windows_core::Result<()> @@ -420,7 +420,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor : super:: PSECURITY_DESCRIPTOR, requestedstringsdrevision : u32, securityinformation : super:: OBJECT_SECURITY_INFORMATION, stringsecuritydescriptor : *mut windows_core::PWSTR, stringsecuritydescriptorlen : *mut u32) -> super::super::Foundation:: BOOL); - ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor.param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(std::ptr::null_mut()))).ok() + ConvertSecurityDescriptorToStringSecurityDescriptorW(securitydescriptor.param().abi(), requestedstringsdrevision, securityinformation, stringsecuritydescriptor, core::mem::transmute(stringsecuritydescriptorlen.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ConvertSidToStringSidA(sid: P0, stringsid: *mut windows_core::PSTR) -> windows_core::Result<()> @@ -444,7 +444,7 @@ where P0: windows_core::Param, { 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.param().abi(), stringsdrevision, securitydescriptor, core::mem::transmute(securitydescriptorsize.unwrap_or(std::ptr::null_mut()))).ok() + ConvertStringSecurityDescriptorToSecurityDescriptorA(stringsecuritydescriptor.param().abi(), stringsdrevision, securitydescriptor, core::mem::transmute(securitydescriptorsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor: P0, stringsdrevision: u32, securitydescriptor: *mut super::PSECURITY_DESCRIPTOR, securitydescriptorsize: Option<*mut u32>) -> windows_core::Result<()> @@ -452,7 +452,7 @@ where P0: windows_core::Param, { 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.param().abi(), stringsdrevision, securitydescriptor, core::mem::transmute(securitydescriptorsize.unwrap_or(std::ptr::null_mut()))).ok() + ConvertStringSecurityDescriptorToSecurityDescriptorW(stringsecuritydescriptor.param().abi(), stringsdrevision, securitydescriptor, core::mem::transmute(securitydescriptorsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ConvertStringSidToSidA(stringsid: P0, sid: *mut super::PSID) -> windows_core::Result<()> @@ -473,7 +473,7 @@ where #[inline] pub unsafe fn FreeInheritedFromArray(pinheritarray: &[INHERITED_FROMW], pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>) -> super::super::Foundation::WIN32_ERROR { 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().try_into().unwrap(), core::mem::transmute(pfnarray.unwrap_or(std::ptr::null()))) + FreeInheritedFromArray(core::mem::transmute(pinheritarray.as_ptr()), pinheritarray.len().try_into().unwrap(), core::mem::transmute(pfnarray.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetAuditedPermissionsFromAclA(pacl: *const super::ACL, ptrustee: *const TRUSTEE_A, psuccessfulauditedrights: *mut u32, pfailedauditrights: *mut u32) -> super::super::Foundation::WIN32_ERROR { @@ -512,7 +512,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, 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.param().abi(), objecttype, securityinfo, container.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().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(std::ptr::null())), pgenericmapping, pinheritarray) + GetInheritanceSourceA(pobjectname.param().abi(), objecttype, securityinfo, container.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().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(core::ptr::null())), pgenericmapping, pinheritarray) } #[inline] pub unsafe fn GetInheritanceSourceW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, container: P1, pobjectclassguids: Option<&[*const windows_core::GUID]>, pacl: *const super::ACL, pfnarray: Option<*const FN_OBJECT_MGR_FUNCTS>, pgenericmapping: *const super::GENERIC_MAPPING, pinheritarray: *mut INHERITED_FROMW) -> super::super::Foundation::WIN32_ERROR @@ -521,27 +521,27 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetInheritanceSourceW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, 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.param().abi(), objecttype, securityinfo, container.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().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(std::ptr::null())), pgenericmapping, pinheritarray) + GetInheritanceSourceW(pobjectname.param().abi(), objecttype, securityinfo, container.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().try_into().unwrap()), pacl, core::mem::transmute(pfnarray.unwrap_or(core::ptr::null())), pgenericmapping, pinheritarray) } #[inline] pub unsafe fn GetMultipleTrusteeA(ptrustee: Option<*const TRUSTEE_A>) -> *mut TRUSTEE_A { windows_targets::link!("advapi32.dll" "system" fn GetMultipleTrusteeA(ptrustee : *const TRUSTEE_A) -> *mut TRUSTEE_A); - GetMultipleTrusteeA(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetMultipleTrusteeA(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetMultipleTrusteeOperationA(ptrustee: Option<*const TRUSTEE_A>) -> MULTIPLE_TRUSTEE_OPERATION { windows_targets::link!("advapi32.dll" "system" fn GetMultipleTrusteeOperationA(ptrustee : *const TRUSTEE_A) -> MULTIPLE_TRUSTEE_OPERATION); - GetMultipleTrusteeOperationA(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetMultipleTrusteeOperationA(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetMultipleTrusteeOperationW(ptrustee: Option<*const TRUSTEE_W>) -> MULTIPLE_TRUSTEE_OPERATION { windows_targets::link!("advapi32.dll" "system" fn GetMultipleTrusteeOperationW(ptrustee : *const TRUSTEE_W) -> MULTIPLE_TRUSTEE_OPERATION); - GetMultipleTrusteeOperationW(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetMultipleTrusteeOperationW(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetMultipleTrusteeW(ptrustee: Option<*const TRUSTEE_W>) -> *mut TRUSTEE_W { windows_targets::link!("advapi32.dll" "system" fn GetMultipleTrusteeW(ptrustee : *const TRUSTEE_W) -> *mut TRUSTEE_W); - GetMultipleTrusteeW(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetMultipleTrusteeW(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: Option<*mut super::PSID>, ppsidgroup: Option<*mut super::PSID>, ppdacl: Option<*mut *mut super::ACL>, ppsacl: Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR @@ -549,7 +549,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetNamedSecurityInfoA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, ppsidowner : *mut super:: PSID, ppsidgroup : *mut super:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetNamedSecurityInfoA(pobjectname.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.param().abi(), objecttype, securityinfo, core::mem::transmute(ppsidowner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsidgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsacl.unwrap_or(core::ptr::null_mut())), ppsecuritydescriptor) } #[inline] pub unsafe fn GetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: Option<*mut super::PSID>, ppsidgroup: Option<*mut super::PSID>, ppdacl: Option<*mut *mut super::ACL>, ppsacl: Option<*mut *mut super::ACL>, ppsecuritydescriptor: *mut super::PSECURITY_DESCRIPTOR) -> super::super::Foundation::WIN32_ERROR @@ -557,7 +557,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetNamedSecurityInfoW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, ppsidowner : *mut super:: PSID, ppsidgroup : *mut super:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetNamedSecurityInfoW(pobjectname.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.param().abi(), objecttype, securityinfo, core::mem::transmute(ppsidowner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsidgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsacl.unwrap_or(core::ptr::null_mut())), ppsecuritydescriptor) } #[inline] pub unsafe fn GetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, ppsidowner: Option<*mut super::PSID>, ppsidgroup: Option<*mut super::PSID>, ppdacl: Option<*mut *mut super::ACL>, ppsacl: Option<*mut *mut super::ACL>, ppsecuritydescriptor: Option<*mut super::PSECURITY_DESCRIPTOR>) -> super::super::Foundation::WIN32_ERROR @@ -565,7 +565,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn GetSecurityInfo(handle : super::super::Foundation:: HANDLE, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, ppsidowner : *mut super:: PSID, ppsidgroup : *mut super:: PSID, ppdacl : *mut *mut super:: ACL, ppsacl : *mut *mut super:: ACL, ppsecuritydescriptor : *mut super:: PSECURITY_DESCRIPTOR) -> super::super::Foundation:: WIN32_ERROR); - GetSecurityInfo(handle.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.param().abi(), objecttype, securityinfo, core::mem::transmute(ppsidowner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsidgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppdacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsacl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsecuritydescriptor.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetTrusteeFormA(ptrustee: *const TRUSTEE_A) -> TRUSTEE_FORM { @@ -590,12 +590,12 @@ pub unsafe fn GetTrusteeNameW(ptrustee: *const TRUSTEE_W) -> windows_core::PWSTR #[inline] pub unsafe fn GetTrusteeTypeA(ptrustee: Option<*const TRUSTEE_A>) -> TRUSTEE_TYPE { windows_targets::link!("advapi32.dll" "system" fn GetTrusteeTypeA(ptrustee : *const TRUSTEE_A) -> TRUSTEE_TYPE); - GetTrusteeTypeA(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetTrusteeTypeA(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn GetTrusteeTypeW(ptrustee: Option<*const TRUSTEE_W>) -> TRUSTEE_TYPE { windows_targets::link!("advapi32.dll" "system" fn GetTrusteeTypeW(ptrustee : *const TRUSTEE_W) -> TRUSTEE_TYPE); - GetTrusteeTypeW(core::mem::transmute(ptrustee.unwrap_or(std::ptr::null()))) + GetTrusteeTypeW(core::mem::transmute(ptrustee.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn LookupSecurityDescriptorPartsA(ppowner: Option<*mut *mut TRUSTEE_A>, ppgroup: Option<*mut *mut TRUSTEE_A>, pccountofaccessentries: Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_A, pccountofauditentries: Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_A, psd: P0) -> super::super::Foundation::WIN32_ERROR @@ -603,7 +603,7 @@ where P0: windows_core::Param, { 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.param().abi()) + LookupSecurityDescriptorPartsA(core::mem::transmute(ppowner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::ptr::null_mut())), pplistofaccessentries, core::mem::transmute(pccountofauditentries.unwrap_or(core::ptr::null_mut())), pplistofauditentries, psd.param().abi()) } #[inline] pub unsafe fn LookupSecurityDescriptorPartsW(ppowner: Option<*mut *mut TRUSTEE_W>, ppgroup: Option<*mut *mut TRUSTEE_W>, pccountofaccessentries: Option<*mut u32>, pplistofaccessentries: *mut *mut EXPLICIT_ACCESS_W, pccountofauditentries: Option<*mut u32>, pplistofauditentries: *mut *mut EXPLICIT_ACCESS_W, psd: P0) -> super::super::Foundation::WIN32_ERROR @@ -611,17 +611,17 @@ where P0: windows_core::Param, { 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.param().abi()) + LookupSecurityDescriptorPartsW(core::mem::transmute(ppowner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppgroup.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pccountofaccessentries.unwrap_or(core::ptr::null_mut())), pplistofaccessentries, core::mem::transmute(pccountofauditentries.unwrap_or(core::ptr::null_mut())), pplistofauditentries, psd.param().abi()) } #[inline] pub unsafe fn SetEntriesInAclA(plistofexplicitentries: Option<&[EXPLICIT_ACCESS_A]>, oldacl: Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> super::super::Foundation::WIN32_ERROR { 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().try_into().unwrap()), 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().try_into().unwrap()), core::mem::transmute(plistofexplicitentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(oldacl.unwrap_or(core::ptr::null())), newacl) } #[inline] pub unsafe fn SetEntriesInAclW(plistofexplicitentries: Option<&[EXPLICIT_ACCESS_W]>, oldacl: Option<*const super::ACL>, newacl: *mut *mut super::ACL) -> super::super::Foundation::WIN32_ERROR { 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().try_into().unwrap()), 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().try_into().unwrap()), core::mem::transmute(plistofexplicitentries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(oldacl.unwrap_or(core::ptr::null())), newacl) } #[inline] pub unsafe fn SetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR @@ -631,7 +631,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetNamedSecurityInfoA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, psidowner : super:: PSID, psidgroup : super:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), core::mem::transmute(psacl.unwrap_or(std::ptr::null()))) + SetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR @@ -641,7 +641,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetNamedSecurityInfoW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, psidowner : super:: PSID, psidgroup : super:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), core::mem::transmute(psacl.unwrap_or(std::ptr::null()))) + SetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetSecurityInfo(handle: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, psidowner: P1, psidgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>) -> super::super::Foundation::WIN32_ERROR @@ -651,7 +651,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetSecurityInfo(handle : super::super::Foundation:: HANDLE, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, psidowner : super:: PSID, psidgroup : super:: PSID, pdacl : *const super:: ACL, psacl : *const super:: ACL) -> super::super::Foundation:: WIN32_ERROR); - SetSecurityInfo(handle.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), core::mem::transmute(psacl.unwrap_or(std::ptr::null()))) + SetSecurityInfo(handle.param().abi(), objecttype, securityinfo, psidowner.param().abi(), psidgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TreeResetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P1, pgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -662,7 +662,7 @@ where P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: 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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), core::mem::transmute(psacl.unwrap_or(std::ptr::null())), keepexplicit.param().abi(), fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(std::ptr::null()))) + TreeResetNamedSecurityInfoA(pobjectname.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), keepexplicit.param().abi(), fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TreeResetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P1, pgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, keepexplicit: P3, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -673,7 +673,7 @@ where P3: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeResetNamedSecurityInfoW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: 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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), core::mem::transmute(psacl.unwrap_or(std::ptr::null())), keepexplicit.param().abi(), fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(std::ptr::null()))) + TreeResetNamedSecurityInfoW(pobjectname.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), keepexplicit.param().abi(), fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TreeSetNamedSecurityInfoA(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P1, pgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -683,7 +683,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeSetNamedSecurityInfoA(pobjectname : windows_core::PCSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: 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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), dwaction, fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TreeSetNamedSecurityInfoW(pobjectname: P0, objecttype: SE_OBJECT_TYPE, securityinfo: super::OBJECT_SECURITY_INFORMATION, powner: P1, pgroup: P2, pdacl: Option<*const super::ACL>, psacl: Option<*const super::ACL>, dwaction: TREE_SEC_INFO, fnprogress: FN_PROGRESS, progressinvokesetting: PROG_INVOKE_SETTING, args: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -693,7 +693,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn TreeSetNamedSecurityInfoW(pobjectname : windows_core::PCWSTR, objecttype : SE_OBJECT_TYPE, securityinfo : super:: OBJECT_SECURITY_INFORMATION, powner : super:: PSID, pgroup : super:: 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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.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.param().abi(), objecttype, securityinfo, powner.param().abi(), pgroup.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), dwaction, fnprogress, progressinvokesetting, core::mem::transmute(args.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Com")] windows_core::imp::define_interface!(IAzApplication, IAzApplication_Vtbl, 0x987bc7c7_b813_4d27_bede_6ba5ae867e95); 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 50ad634dd1..86fe2f1430 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Credentials/mod.rs @@ -121,7 +121,7 @@ where P1: windows_core::Param, { 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.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(std::ptr::null_mut())), pcbpackedcredentials).ok() + CredPackAuthenticationBufferA(dwflags, pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::ptr::null_mut())), pcbpackedcredentials).ok() } #[inline] pub unsafe fn CredPackAuthenticationBufferW(dwflags: CRED_PACK_FLAGS, pszusername: P0, pszpassword: P1, ppackedcredentials: Option<*mut u8>, pcbpackedcredentials: *mut u32) -> windows_core::Result<()> @@ -130,7 +130,7 @@ where P1: windows_core::Param, { 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.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(std::ptr::null_mut())), pcbpackedcredentials).ok() + CredPackAuthenticationBufferW(dwflags, pszusername.param().abi(), pszpassword.param().abi(), core::mem::transmute(ppackedcredentials.unwrap_or(core::ptr::null_mut())), pcbpackedcredentials).ok() } #[inline] pub unsafe fn CredProtectA(fasself: P0, pszcredentials: &[u8], pszprotectedcredentials: windows_core::PSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> @@ -138,7 +138,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars, core::mem::transmute(protectiontype.unwrap_or(std::ptr::null_mut()))).ok() + CredProtectA(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars, core::mem::transmute(protectiontype.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CredProtectW(fasself: P0, pszcredentials: &[u16], pszprotectedcredentials: windows_core::PWSTR, pcchmaxchars: *mut u32, protectiontype: Option<*mut CRED_PROTECTION_TYPE>) -> windows_core::Result<()> @@ -146,7 +146,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars, core::mem::transmute(protectiontype.unwrap_or(std::ptr::null_mut()))).ok() + CredProtectW(fasself.param().abi(), core::mem::transmute(pszcredentials.as_ptr()), pszcredentials.len().try_into().unwrap(), core::mem::transmute(pszprotectedcredentials), pcchmaxchars, core::mem::transmute(protectiontype.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CredReadA(targetname: P0, r#type: CRED_TYPE, flags: u32, credential: *mut *mut CREDENTIALA) -> windows_core::Result<()> @@ -198,7 +198,7 @@ where P0: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUICmdLinePromptForCredentialsA(psztargetname : windows_core::PCSTR, pcontext : *const SecHandle, dwautherror : u32, username : windows_core::PSTR, uluserbuffersize : u32, pszpassword : windows_core::PSTR, ulpasswordbuffersize : u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> u32); - CredUICmdLinePromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + CredUICmdLinePromptForCredentialsA(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn CredUICmdLinePromptForCredentialsW(psztargetname: P0, pcontext: Option<*const SecHandle>, dwautherror: u32, username: &mut [u16], pszpassword: &mut [u16], pfsave: Option<*mut super::super::Foundation::BOOL>, dwflags: CREDUI_FLAGS) -> u32 @@ -206,7 +206,7 @@ where P0: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUICmdLinePromptForCredentialsW(psztargetname : windows_core::PCWSTR, pcontext : *const SecHandle, dwautherror : u32, username : windows_core::PWSTR, uluserbuffersize : u32, pszpassword : windows_core::PWSTR, ulpasswordbuffersize : u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> u32); - CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + CredUICmdLinePromptForCredentialsW(psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), dwautherror, core::mem::transmute(username.as_ptr()), username.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn CredUIConfirmCredentialsA(psztargetname: P0, bconfirm: P1) -> u32 @@ -249,7 +249,7 @@ where P0: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIPromptForCredentialsA(puiinfo : *const CREDUI_INFOA, psztargetname : windows_core::PCSTR, pcontext : *const SecHandle, dwautherror : u32, pszusername : windows_core::PSTR, ulusernamebuffersize : u32, pszpassword : windows_core::PSTR, ulpasswordbuffersize : u32, save : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - CredUIPromptForCredentialsA(core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(save.unwrap_or(std::ptr::null_mut())), dwflags) + CredUIPromptForCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(save.unwrap_or(core::ptr::null_mut())), dwflags) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -258,19 +258,19 @@ where P0: windows_core::Param, { windows_targets::link!("credui.dll" "system" fn CredUIPromptForCredentialsW(puiinfo : *const CREDUI_INFOW, psztargetname : windows_core::PCWSTR, pcontext : *const SecHandle, dwautherror : u32, pszusername : windows_core::PWSTR, ulusernamebuffersize : u32, pszpassword : windows_core::PWSTR, ulpasswordbuffersize : u32, save : *mut super::super::Foundation:: BOOL, dwflags : CREDUI_FLAGS) -> super::super::Foundation:: WIN32_ERROR); - CredUIPromptForCredentialsW(core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(std::ptr::null())), dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(save.unwrap_or(std::ptr::null_mut())), dwflags) + CredUIPromptForCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), psztargetname.param().abi(), core::mem::transmute(pcontext.unwrap_or(core::ptr::null())), dwautherror, core::mem::transmute(pszusername.as_ptr()), pszusername.len().try_into().unwrap(), core::mem::transmute(pszpassword.as_ptr()), pszpassword.len().try_into().unwrap(), core::mem::transmute(save.unwrap_or(core::ptr::null_mut())), dwflags) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn CredUIPromptForWindowsCredentialsA(puiinfo: Option<*const CREDUI_INFOA>, dwautherror: u32, pulauthpackage: *mut u32, pvinauthbuffer: Option<*const core::ffi::c_void>, ulinauthbuffersize: u32, ppvoutauthbuffer: *mut *mut core::ffi::c_void, puloutauthbuffersize: *mut u32, pfsave: Option<*mut super::super::Foundation::BOOL>, dwflags: CREDUIWIN_FLAGS) -> u32 { windows_targets::link!("credui.dll" "system" fn CredUIPromptForWindowsCredentialsA(puiinfo : *const CREDUI_INFOA, dwautherror : u32, pulauthpackage : *mut u32, pvinauthbuffer : *const core::ffi::c_void, ulinauthbuffersize : u32, ppvoutauthbuffer : *mut *mut core::ffi::c_void, puloutauthbuffersize : *mut u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUIWIN_FLAGS) -> u32); - CredUIPromptForWindowsCredentialsA(core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), dwautherror, pulauthpackage, core::mem::transmute(pvinauthbuffer.unwrap_or(std::ptr::null())), ulinauthbuffersize, ppvoutauthbuffer, puloutauthbuffersize, core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + CredUIPromptForWindowsCredentialsA(core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), dwautherror, pulauthpackage, core::mem::transmute(pvinauthbuffer.unwrap_or(core::ptr::null())), ulinauthbuffersize, ppvoutauthbuffer, puloutauthbuffersize, core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] pub unsafe fn CredUIPromptForWindowsCredentialsW(puiinfo: Option<*const CREDUI_INFOW>, dwautherror: u32, pulauthpackage: *mut u32, pvinauthbuffer: Option<*const core::ffi::c_void>, ulinauthbuffersize: u32, ppvoutauthbuffer: *mut *mut core::ffi::c_void, puloutauthbuffersize: *mut u32, pfsave: Option<*mut super::super::Foundation::BOOL>, dwflags: CREDUIWIN_FLAGS) -> u32 { windows_targets::link!("credui.dll" "system" fn CredUIPromptForWindowsCredentialsW(puiinfo : *const CREDUI_INFOW, dwautherror : u32, pulauthpackage : *mut u32, pvinauthbuffer : *const core::ffi::c_void, ulinauthbuffersize : u32, ppvoutauthbuffer : *mut *mut core::ffi::c_void, puloutauthbuffersize : *mut u32, pfsave : *mut super::super::Foundation:: BOOL, dwflags : CREDUIWIN_FLAGS) -> u32); - CredUIPromptForWindowsCredentialsW(core::mem::transmute(puiinfo.unwrap_or(std::ptr::null())), dwautherror, pulauthpackage, core::mem::transmute(pvinauthbuffer.unwrap_or(std::ptr::null())), ulinauthbuffersize, ppvoutauthbuffer, puloutauthbuffersize, core::mem::transmute(pfsave.unwrap_or(std::ptr::null_mut())), dwflags) + CredUIPromptForWindowsCredentialsW(core::mem::transmute(puiinfo.unwrap_or(core::ptr::null())), dwautherror, pulauthpackage, core::mem::transmute(pvinauthbuffer.unwrap_or(core::ptr::null())), ulinauthbuffersize, ppvoutauthbuffer, puloutauthbuffersize, core::mem::transmute(pfsave.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn CredUIReadSSOCredW(pszrealm: P0, ppszusername: *mut windows_core::PWSTR) -> u32 @@ -294,12 +294,12 @@ where #[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: 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).ok() + CredUnPackAuthenticationBufferA(dwflags, pauthbuffer, cbauthbuffer, core::mem::transmute(pszusername), pcchlmaxusername, core::mem::transmute(pszdomainname), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszpassword), pcchmaxpassword).ok() } #[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: 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).ok() + CredUnPackAuthenticationBufferW(dwflags, pauthbuffer, cbauthbuffer, core::mem::transmute(pszusername), pcchmaxusername, core::mem::transmute(pszdomainname), core::mem::transmute(pcchmaxdomainname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszpassword), pcchmaxpassword).ok() } #[inline] pub unsafe fn CredUnmarshalCredentialA(marshaledcredential: P0, credtype: *mut CRED_MARSHAL_TYPE, credential: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -465,7 +465,7 @@ pub unsafe fn SCardEndTransaction(hcard: usize, dwdisposition: u32) -> i32 { #[inline] pub unsafe fn SCardEstablishContext(dwscope: SCARD_SCOPE, pvreserved1: Option<*const core::ffi::c_void>, pvreserved2: Option<*const core::ffi::c_void>, phcontext: *mut usize) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardEstablishContext(dwscope : SCARD_SCOPE, pvreserved1 : *const core::ffi::c_void, pvreserved2 : *const core::ffi::c_void, phcontext : *mut usize) -> i32); - SCardEstablishContext(dwscope, core::mem::transmute(pvreserved1.unwrap_or(std::ptr::null())), core::mem::transmute(pvreserved2.unwrap_or(std::ptr::null())), phcontext) + SCardEstablishContext(dwscope, core::mem::transmute(pvreserved1.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved2.unwrap_or(core::ptr::null())), phcontext) } #[inline] pub unsafe fn SCardForgetCardTypeA(hcontext: usize, szcardname: P0) -> i32 @@ -523,7 +523,7 @@ pub unsafe fn SCardFreeMemory(hcontext: usize, pvmem: *const core::ffi::c_void) #[inline] pub unsafe fn SCardGetAttrib(hcard: usize, dwattrid: u32, pbattr: Option<*mut u8>, pcbattrlen: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardGetAttrib(hcard : usize, dwattrid : u32, pbattr : *mut u8, pcbattrlen : *mut u32) -> i32); - SCardGetAttrib(hcard, dwattrid, core::mem::transmute(pbattr.unwrap_or(std::ptr::null_mut())), pcbattrlen) + SCardGetAttrib(hcard, dwattrid, core::mem::transmute(pbattr.unwrap_or(core::ptr::null_mut())), pcbattrlen) } #[inline] pub unsafe fn SCardGetCardTypeProviderNameA(hcontext: usize, szcardname: P0, dwproviderid: u32, szprovider: windows_core::PSTR, pcchprovider: *mut u32) -> i32 @@ -626,7 +626,7 @@ where P0: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardIntroduceCardTypeA(hcontext : usize, szcardname : windows_core::PCSTR, pguidprimaryprovider : *const windows_core::GUID, rgguidinterfaces : *const windows_core::GUID, dwinterfacecount : u32, pbatr : *const u8, pbatrmask : *const u8, cbatrlen : u32) -> i32); - SCardIntroduceCardTypeA(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(std::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(std::ptr::null())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) + SCardIntroduceCardTypeA(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::ptr::null())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) } #[inline] pub unsafe fn SCardIntroduceCardTypeW(hcontext: usize, szcardname: P0, pguidprimaryprovider: Option<*const windows_core::GUID>, rgguidinterfaces: Option<*const windows_core::GUID>, dwinterfacecount: u32, pbatr: *const u8, pbatrmask: *const u8, cbatrlen: u32) -> i32 @@ -634,7 +634,7 @@ where P0: windows_core::Param, { windows_targets::link!("winscard.dll" "system" fn SCardIntroduceCardTypeW(hcontext : usize, szcardname : windows_core::PCWSTR, pguidprimaryprovider : *const windows_core::GUID, rgguidinterfaces : *const windows_core::GUID, dwinterfacecount : u32, pbatr : *const u8, pbatrmask : *const u8, cbatrlen : u32) -> i32); - SCardIntroduceCardTypeW(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(std::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(std::ptr::null())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) + SCardIntroduceCardTypeW(hcontext, szcardname.param().abi(), core::mem::transmute(pguidprimaryprovider.unwrap_or(core::ptr::null())), core::mem::transmute(rgguidinterfaces.unwrap_or(core::ptr::null())), dwinterfacecount, pbatr, pbatrmask, cbatrlen) } #[inline] pub unsafe fn SCardIntroduceReaderA(hcontext: usize, szreadername: P0, szdevicename: P1) -> i32 @@ -678,12 +678,12 @@ pub unsafe fn SCardIsValidContext(hcontext: usize) -> i32 { #[inline] pub unsafe fn SCardListCardsA(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: windows_core::PSTR, pcchcards: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardListCardsA(hcontext : usize, pbatr : *const u8, rgquidinterfaces : *const windows_core::GUID, cguidinterfacecount : u32, mszcards : windows_core::PSTR, pcchcards : *mut u32) -> i32); - SCardListCardsA(hcontext, core::mem::transmute(pbatr.unwrap_or(std::ptr::null())), core::mem::transmute(rgquidinterfaces.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(mszcards), pcchcards) + SCardListCardsA(hcontext, core::mem::transmute(pbatr.unwrap_or(core::ptr::null())), core::mem::transmute(rgquidinterfaces.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(mszcards), pcchcards) } #[inline] pub unsafe fn SCardListCardsW(hcontext: usize, pbatr: Option<*const u8>, rgquidinterfaces: Option<&[windows_core::GUID]>, mszcards: windows_core::PWSTR, pcchcards: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardListCardsW(hcontext : usize, pbatr : *const u8, rgquidinterfaces : *const windows_core::GUID, cguidinterfacecount : u32, mszcards : windows_core::PWSTR, pcchcards : *mut u32) -> i32); - SCardListCardsW(hcontext, core::mem::transmute(pbatr.unwrap_or(std::ptr::null())), core::mem::transmute(rgquidinterfaces.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(mszcards), pcchcards) + SCardListCardsW(hcontext, core::mem::transmute(pbatr.unwrap_or(core::ptr::null())), core::mem::transmute(rgquidinterfaces.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgquidinterfaces.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(mszcards), pcchcards) } #[inline] pub unsafe fn SCardListInterfacesA(hcontext: usize, szcard: P0, pguidinterfaces: *mut windows_core::GUID, pcguidinterfaces: *mut u32) -> i32 @@ -788,7 +788,7 @@ where #[inline] pub unsafe fn SCardReconnect(hcard: usize, dwsharemode: u32, dwpreferredprotocols: u32, dwinitialization: u32, pdwactiveprotocol: Option<*mut u32>) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardReconnect(hcard : usize, dwsharemode : u32, dwpreferredprotocols : u32, dwinitialization : u32, pdwactiveprotocol : *mut u32) -> i32); - SCardReconnect(hcard, dwsharemode, dwpreferredprotocols, dwinitialization, core::mem::transmute(pdwactiveprotocol.unwrap_or(std::ptr::null_mut()))) + SCardReconnect(hcard, dwsharemode, dwpreferredprotocols, dwinitialization, core::mem::transmute(pdwactiveprotocol.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SCardReleaseContext(hcontext: usize) -> i32 { @@ -849,17 +849,17 @@ pub unsafe fn SCardState(hcard: usize, pdwstate: *mut u32, pdwprotocol: *mut u32 #[inline] pub unsafe fn SCardStatusA(hcard: usize, mszreadernames: windows_core::PSTR, pcchreaderlen: Option<*mut u32>, pdwstate: Option<*mut u32>, pdwprotocol: Option<*mut u32>, pbatr: Option<*mut u8>, pcbatrlen: Option<*mut u32>) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardStatusA(hcard : usize, mszreadernames : windows_core::PSTR, pcchreaderlen : *mut u32, pdwstate : *mut u32, pdwprotocol : *mut u32, pbatr : *mut u8, pcbatrlen : *mut u32) -> i32); - SCardStatusA(hcard, core::mem::transmute(mszreadernames), core::mem::transmute(pcchreaderlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwprotocol.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbatr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbatrlen.unwrap_or(std::ptr::null_mut()))) + SCardStatusA(hcard, core::mem::transmute(mszreadernames), core::mem::transmute(pcchreaderlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwprotocol.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbatr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbatrlen.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SCardStatusW(hcard: usize, mszreadernames: windows_core::PWSTR, pcchreaderlen: Option<*mut u32>, pdwstate: Option<*mut u32>, pdwprotocol: Option<*mut u32>, pbatr: Option<*mut u8>, pcbatrlen: Option<*mut u32>) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardStatusW(hcard : usize, mszreadernames : windows_core::PWSTR, pcchreaderlen : *mut u32, pdwstate : *mut u32, pdwprotocol : *mut u32, pbatr : *mut u8, pcbatrlen : *mut u32) -> i32); - SCardStatusW(hcard, core::mem::transmute(mszreadernames), core::mem::transmute(pcchreaderlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwprotocol.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbatr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbatrlen.unwrap_or(std::ptr::null_mut()))) + SCardStatusW(hcard, core::mem::transmute(mszreadernames), core::mem::transmute(pcchreaderlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwprotocol.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbatr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbatrlen.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SCardTransmit(hcard: usize, piosendpci: *const SCARD_IO_REQUEST, pbsendbuffer: &[u8], piorecvpci: Option<*mut SCARD_IO_REQUEST>, pbrecvbuffer: *mut u8, pcbrecvlength: *mut u32) -> i32 { windows_targets::link!("winscard.dll" "system" fn SCardTransmit(hcard : usize, piosendpci : *const SCARD_IO_REQUEST, pbsendbuffer : *const u8, cbsendlength : u32, piorecvpci : *mut SCARD_IO_REQUEST, pbrecvbuffer : *mut u8, pcbrecvlength : *mut u32) -> i32); - SCardTransmit(hcard, piosendpci, core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), core::mem::transmute(piorecvpci.unwrap_or(std::ptr::null_mut())), pbrecvbuffer, pcbrecvlength) + SCardTransmit(hcard, piosendpci, core::mem::transmute(pbsendbuffer.as_ptr()), pbsendbuffer.len().try_into().unwrap(), core::mem::transmute(piorecvpci.unwrap_or(core::ptr::null_mut())), pbrecvbuffer, pcbrecvlength) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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 645f98cd0a..85e6aa0a29 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,7 +1,7 @@ #[inline] pub unsafe fn CryptCATAdminAcquireContext(phcatadmin: *mut isize, pgsubsystem: 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).ok() + CryptCATAdminAcquireContext(phcatadmin, core::mem::transmute(pgsubsystem.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn CryptCATAdminAcquireContext2(phcatadmin: *mut isize, pgsubsystem: Option<*const windows_core::GUID>, pwszhashalgorithm: P0, pstronghashpolicy: Option<*const super::CERT_STRONG_SIGN_PARA>, dwflags: u32) -> windows_core::Result<()> @@ -9,7 +9,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pstronghashpolicy.unwrap_or(std::ptr::null())), dwflags).ok() + CryptCATAdminAcquireContext2(phcatadmin, core::mem::transmute(pgsubsystem.unwrap_or(core::ptr::null())), pwszhashalgorithm.param().abi(), core::mem::transmute(pstronghashpolicy.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn CryptCATAdminAddCatalog(hcatadmin: isize, pwszcatalogfile: P0, pwszselectbasename: P1, dwflags: u32) -> isize @@ -26,7 +26,7 @@ where P0: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminCalcHashFromFileHandle(hfile : super::super::super::Foundation:: HANDLE, pcbhash : *mut u32, pbhash : *mut u8, dwflags : u32) -> super::super::super::Foundation:: BOOL); - CryptCATAdminCalcHashFromFileHandle(hfile.param().abi(), pcbhash, core::mem::transmute(pbhash.unwrap_or(std::ptr::null_mut())), dwflags) + CryptCATAdminCalcHashFromFileHandle(hfile.param().abi(), pcbhash, core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), dwflags) } #[inline] pub unsafe fn CryptCATAdminCalcHashFromFileHandle2(hcatadmin: isize, hfile: P0, pcbhash: *mut u32, pbhash: Option<*mut u8>, dwflags: u32) -> windows_core::Result<()> @@ -34,12 +34,12 @@ where P0: windows_core::Param, { 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.param().abi(), pcbhash, core::mem::transmute(pbhash.unwrap_or(std::ptr::null_mut())), dwflags).ok() + CryptCATAdminCalcHashFromFileHandle2(hcatadmin, hfile.param().abi(), pcbhash, core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), dwflags).ok() } #[inline] pub unsafe fn CryptCATAdminEnumCatalogFromHash(hcatadmin: isize, pbhash: &[u8], dwflags: u32, phprevcatinfo: Option<*mut isize>) -> isize { windows_targets::link!("wintrust.dll" "system" fn CryptCATAdminEnumCatalogFromHash(hcatadmin : isize, pbhash : *const u8, cbhash : u32, dwflags : u32, phprevcatinfo : *mut isize) -> isize); - CryptCATAdminEnumCatalogFromHash(hcatadmin, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), dwflags, core::mem::transmute(phprevcatinfo.unwrap_or(std::ptr::null_mut()))) + CryptCATAdminEnumCatalogFromHash(hcatadmin, core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), dwflags, core::mem::transmute(phprevcatinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CryptCATAdminPauseServiceForBackup(dwflags: u32, fresume: P0) -> super::super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs index 07748fa2fe..e18ff9ed56 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/Certificates/mod.rs @@ -142,7 +142,7 @@ pub unsafe fn PstGetTrustAnchors(ptargetname: *const super::super::super::Founda #[inline] pub unsafe fn PstGetTrustAnchorsEx(ptargetname: *const super::super::super::Foundation::UNICODE_STRING, rgpcriteria: Option<&[super::CERT_SELECT_CRITERIA]>, pcertcontext: Option<*const super::CERT_CONTEXT>, pptrustedissuers: *mut *mut super::super::Authentication::Identity::SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation::NTSTATUS { windows_targets::link!("certpoleng.dll" "system" fn PstGetTrustAnchorsEx(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, ccriteria : u32, rgpcriteria : *const super:: CERT_SELECT_CRITERIA, pcertcontext : *const super:: CERT_CONTEXT, pptrustedissuers : *mut *mut super::super::Authentication::Identity:: SecPkgContext_IssuerListInfoEx) -> super::super::super::Foundation:: NTSTATUS); - PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcertcontext.unwrap_or(std::ptr::null())), pptrustedissuers) + PstGetTrustAnchorsEx(ptargetname, rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcertcontext.unwrap_or(core::ptr::null())), pptrustedissuers) } #[inline] pub unsafe fn PstGetUserNameForCertificate(pcertcontext: *const super::CERT_CONTEXT, username: *mut super::super::super::Foundation::UNICODE_STRING) -> super::super::super::Foundation::NTSTATUS { @@ -161,7 +161,7 @@ where P0: windows_core::Param, { windows_targets::link!("certpoleng.dll" "system" fn PstValidate(ptargetname : *const super::super::super::Foundation:: UNICODE_STRING, bisclient : super::super::super::Foundation:: BOOL, prequestedissuancepolicy : *const super:: CERT_USAGE_MATCH, phadditionalcertstore : *const super:: HCERTSTORE, pcert : *const super:: CERT_CONTEXT, pprovguid : *mut windows_core::GUID) -> super::super::super::Foundation:: NTSTATUS); - PstValidate(core::mem::transmute(ptargetname.unwrap_or(std::ptr::null())), bisclient.param().abi(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(std::ptr::null())), core::mem::transmute(phadditionalcertstore.unwrap_or(std::ptr::null())), pcert, core::mem::transmute(pprovguid.unwrap_or(std::ptr::null_mut()))) + PstValidate(core::mem::transmute(ptargetname.unwrap_or(core::ptr::null())), bisclient.param().abi(), core::mem::transmute(prequestedissuancepolicy.unwrap_or(core::ptr::null())), core::mem::transmute(phadditionalcertstore.unwrap_or(core::ptr::null())), pcert, core::mem::transmute(pprovguid.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Com")] windows_core::imp::define_interface!(IAlternativeName, IAlternativeName_Vtbl, 0x728ab313_217d_11da_b2a4_000e7bbb2b09); 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 40879b1893..623b519074 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 @@ -19,7 +19,7 @@ pub unsafe fn CryptSIPGetCaps(psubjinfo: *const SIP_SUBJECTINFO, pcaps: *mut SIP #[inline] pub unsafe fn CryptSIPGetSealedDigest(psubjectinfo: *const SIP_SUBJECTINFO, psig: Option<&[u8]>, pbdigest: Option<*mut u8>, pcbdigest: *mut u32) -> super::super::super::Foundation::BOOL { windows_targets::link!("wintrust.dll" "system" fn CryptSIPGetSealedDigest(psubjectinfo : *const SIP_SUBJECTINFO, psig : *const u8, dwsig : u32, pbdigest : *mut u8, pcbdigest : *mut u32) -> super::super::super::Foundation:: BOOL); - CryptSIPGetSealedDigest(psubjectinfo, core::mem::transmute(psig.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbdigest.unwrap_or(std::ptr::null_mut())), pcbdigest) + CryptSIPGetSealedDigest(psubjectinfo, core::mem::transmute(psig.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psig.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pbdigest.unwrap_or(core::ptr::null_mut())), pcbdigest) } #[cfg(feature = "Win32_Security_Cryptography_Catalog")] #[inline] 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 19bc5173c0..30b31055c2 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 @@ -47,7 +47,7 @@ where P1: windows_core::Param, { windows_targets::link!("cryptui.dll" "system" fn CryptUIWizDigitalSign(dwflags : u32, hwndparent : super::super::super::Foundation:: HWND, pwszwizardtitle : windows_core::PCWSTR, pdigitalsigninfo : *const CRYPTUI_WIZ_DIGITAL_SIGN_INFO, ppsigncontext : *mut *mut CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT) -> super::super::super::Foundation:: BOOL); - CryptUIWizDigitalSign(dwflags, hwndparent.param().abi(), pwszwizardtitle.param().abi(), pdigitalsigninfo, core::mem::transmute(ppsigncontext.unwrap_or(std::ptr::null_mut()))) + CryptUIWizDigitalSign(dwflags, hwndparent.param().abi(), pwszwizardtitle.param().abi(), pdigitalsigninfo, core::mem::transmute(ppsigncontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CryptUIWizExport(dwflags: CRYPTUI_WIZ_FLAGS, hwndparent: P0, pwszwizardtitle: P1, pexportinfo: *const CRYPTUI_WIZ_EXPORT_INFO, pvoid: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -56,7 +56,7 @@ where P1: windows_core::Param, { 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.param().abi(), pwszwizardtitle.param().abi(), pexportinfo, core::mem::transmute(pvoid.unwrap_or(std::ptr::null()))).ok() + CryptUIWizExport(dwflags, hwndparent.param().abi(), pwszwizardtitle.param().abi(), pexportinfo, core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptUIWizFreeDigitalSignContext(psigncontext: *const CRYPTUI_WIZ_DIGITAL_SIGN_CONTEXT) -> super::super::super::Foundation::BOOL { @@ -71,7 +71,7 @@ where P2: windows_core::Param, { 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.param().abi(), pwszwizardtitle.param().abi(), core::mem::transmute(pimportsrc.unwrap_or(std::ptr::null())), hdestcertstore.param().abi()).ok() + CryptUIWizImport(dwflags, hwndparent.param().abi(), pwszwizardtitle.param().abi(), core::mem::transmute(pimportsrc.unwrap_or(core::ptr::null())), hdestcertstore.param().abi()).ok() } pub const ACTION_REVOCATION_DEFAULT_CACHE: u32 = 131072u32; pub const ACTION_REVOCATION_DEFAULT_ONLINE: u32 = 65536u32; 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 76896d2fe7..96742b8ffc 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/Cryptography/mod.rs @@ -43,7 +43,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptCreateContext(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, pconfig : *const CRYPT_CONTEXT_CONFIG) -> super::super::Foundation:: NTSTATUS); - BCryptCreateContext(dwtable, pszcontext.param().abi(), core::mem::transmute(pconfig.unwrap_or(std::ptr::null()))) + BCryptCreateContext(dwtable, pszcontext.param().abi(), core::mem::transmute(pconfig.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BCryptCreateHash(halgorithm: BCRYPT_ALG_HANDLE, phhash: *mut BCRYPT_HASH_HANDLE, pbhashobject: Option<&mut [u8]>, pbsecret: Option<&[u8]>, dwflags: u32) -> super::super::Foundation::NTSTATUS { @@ -62,7 +62,7 @@ pub unsafe fn BCryptDecrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppa hkey, core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), + core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbiv.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbiv.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -86,7 +86,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptDeriveKey(hsharedsecret : BCRYPT_SECRET_HANDLE, pwszkdf : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptDeriveKey(hsharedsecret.param().abi(), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) + BCryptDeriveKey(hsharedsecret.param().abi(), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) } #[inline] pub unsafe fn BCryptDeriveKeyCapi(hhash: P0, htargetalg: P1, pbderivedkey: &mut [u8], dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -143,7 +143,7 @@ pub unsafe fn BCryptEncrypt(hkey: BCRYPT_KEY_HANDLE, pbinput: Option<&[u8]>, ppa hkey, core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), + core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbiv.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbiv.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), @@ -164,7 +164,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumContextFunctionProviders(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, dwinterface : BCRYPT_INTERFACE, pszfunction : windows_core::PCWSTR, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_CONTEXT_FUNCTION_PROVIDERS) -> super::super::Foundation:: NTSTATUS); - BCryptEnumContextFunctionProviders(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptEnumContextFunctionProviders(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptEnumContextFunctions(dwtable: BCRYPT_TABLE, pszcontext: P0, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_FUNCTIONS>) -> super::super::Foundation::NTSTATUS @@ -172,12 +172,12 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumContextFunctions(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, dwinterface : BCRYPT_INTERFACE, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_CONTEXT_FUNCTIONS) -> super::super::Foundation:: NTSTATUS); - BCryptEnumContextFunctions(dwtable, pszcontext.param().abi(), dwinterface, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptEnumContextFunctions(dwtable, pszcontext.param().abi(), dwinterface, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptEnumContexts(dwtable: BCRYPT_TABLE, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXTS>) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumContexts(dwtable : BCRYPT_TABLE, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_CONTEXTS) -> super::super::Foundation:: NTSTATUS); - BCryptEnumContexts(dwtable, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptEnumContexts(dwtable, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptEnumProviders(pszalgid: P0, pimplcount: *mut u32, ppimpllist: *mut *mut BCRYPT_PROVIDER_NAME, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -190,7 +190,7 @@ where #[inline] pub unsafe fn BCryptEnumRegisteredProviders(pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_PROVIDERS>) -> super::super::Foundation::NTSTATUS { windows_targets::link!("bcrypt.dll" "system" fn BCryptEnumRegisteredProviders(pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_PROVIDERS) -> super::super::Foundation:: NTSTATUS); - BCryptEnumRegisteredProviders(pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptEnumRegisteredProviders(pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptExportKey(hkey: P0, hexportkey: P1, pszblobtype: P2, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -285,7 +285,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptKeyDerivation(hkey : BCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> super::super::Foundation:: NTSTATUS); - BCryptKeyDerivation(hkey.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags) + BCryptKeyDerivation(hkey.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags) } #[inline] pub unsafe fn BCryptOpenAlgorithmProvider(phalgorithm: *mut BCRYPT_ALG_HANDLE, pszalgid: P0, pszimplementation: P1, dwflags: BCRYPT_OPEN_ALGORITHM_PROVIDER_FLAGS) -> super::super::Foundation::NTSTATUS @@ -307,7 +307,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptQueryContextConfiguration(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_CONTEXT_CONFIG) -> super::super::Foundation:: NTSTATUS); - BCryptQueryContextConfiguration(dwtable, pszcontext.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptQueryContextConfiguration(dwtable, pszcontext.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptQueryContextFunctionConfiguration(dwtable: BCRYPT_TABLE, pszcontext: P0, dwinterface: BCRYPT_INTERFACE, pszfunction: P1, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_CONTEXT_FUNCTION_CONFIG>) -> super::super::Foundation::NTSTATUS @@ -316,7 +316,7 @@ where P1: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptQueryContextFunctionConfiguration(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, dwinterface : BCRYPT_INTERFACE, pszfunction : windows_core::PCWSTR, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_CONTEXT_FUNCTION_CONFIG) -> super::super::Foundation:: NTSTATUS); - BCryptQueryContextFunctionConfiguration(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptQueryContextFunctionConfiguration(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptQueryContextFunctionProperty(dwtable: BCRYPT_TABLE, pszcontext: P0, dwinterface: BCRYPT_INTERFACE, pszfunction: P1, pszproperty: P2, pcbvalue: *mut u32, ppbvalue: Option<*mut *mut u8>) -> super::super::Foundation::NTSTATUS @@ -326,7 +326,7 @@ where P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptQueryContextFunctionProperty(dwtable : BCRYPT_TABLE, pszcontext : windows_core::PCWSTR, dwinterface : BCRYPT_INTERFACE, pszfunction : windows_core::PCWSTR, pszproperty : windows_core::PCWSTR, pcbvalue : *mut u32, ppbvalue : *mut *mut u8) -> super::super::Foundation:: NTSTATUS); - BCryptQueryContextFunctionProperty(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszproperty.param().abi(), pcbvalue, core::mem::transmute(ppbvalue.unwrap_or(std::ptr::null_mut()))) + BCryptQueryContextFunctionProperty(dwtable, pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszproperty.param().abi(), pcbvalue, core::mem::transmute(ppbvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptQueryProviderRegistration(pszprovider: P0, dwmode: BCRYPT_QUERY_PROVIDER_MODE, dwinterface: BCRYPT_INTERFACE, pcbbuffer: *mut u32, ppbuffer: Option<*mut *mut CRYPT_PROVIDER_REG>) -> super::super::Foundation::NTSTATUS @@ -334,7 +334,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptQueryProviderRegistration(pszprovider : windows_core::PCWSTR, dwmode : BCRYPT_QUERY_PROVIDER_MODE, dwinterface : BCRYPT_INTERFACE, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_PROVIDER_REG) -> super::super::Foundation:: NTSTATUS); - BCryptQueryProviderRegistration(pszprovider.param().abi(), dwmode, dwinterface, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptQueryProviderRegistration(pszprovider.param().abi(), dwmode, dwinterface, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptRegisterConfigChangeNotify(phevent: *mut super::super::Foundation::HANDLE) -> super::super::Foundation::NTSTATUS { @@ -358,7 +358,7 @@ where P2: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptResolveProviders(pszcontext : windows_core::PCWSTR, dwinterface : u32, pszfunction : windows_core::PCWSTR, pszprovider : windows_core::PCWSTR, dwmode : BCRYPT_QUERY_PROVIDER_MODE, dwflags : BCRYPT_RESOLVE_PROVIDERS_FLAGS, pcbbuffer : *mut u32, ppbuffer : *mut *mut CRYPT_PROVIDER_REFS) -> super::super::Foundation:: NTSTATUS); - BCryptResolveProviders(pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszprovider.param().abi(), dwmode, dwflags, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(std::ptr::null_mut()))) + BCryptResolveProviders(pszcontext.param().abi(), dwinterface, pszfunction.param().abi(), pszprovider.param().abi(), dwmode, dwflags, pcbbuffer, core::mem::transmute(ppbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BCryptSecretAgreement(hprivkey: P0, hpubkey: P1, phagreedsecret: *mut BCRYPT_SECRET_HANDLE, dwflags: u32) -> super::super::Foundation::NTSTATUS @@ -393,7 +393,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptSignHash(hkey : BCRYPT_KEY_HANDLE, ppaddinginfo : *const core::ffi::c_void, pbinput : *const u8, cbinput : u32, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptSignHash(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) + BCryptSignHash(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbinput.as_ptr()), pbinput.len().try_into().unwrap(), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags) } #[inline] pub unsafe fn BCryptUnregisterConfigChangeNotify(hevent: P0) -> super::super::Foundation::NTSTATUS @@ -409,7 +409,7 @@ where P0: windows_core::Param, { windows_targets::link!("bcrypt.dll" "system" fn BCryptVerifySignature(hkey : BCRYPT_KEY_HANDLE, ppaddinginfo : *const core::ffi::c_void, pbhash : *const u8, cbhash : u32, pbsignature : *const u8, cbsignature : u32, dwflags : BCRYPT_FLAGS) -> super::super::Foundation:: NTSTATUS); - BCryptVerifySignature(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags) + BCryptVerifySignature(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbhash.as_ptr()), pbhash.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags) } #[inline] pub unsafe fn CertAddCRLContextToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> @@ -417,7 +417,7 @@ where P0: windows_core::Param, { 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.param().abi(), pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCRLContextToStore(hcertstore.param().abi(), pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddCRLLinkToStore(hcertstore: P0, pcrlcontext: *const CRL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> @@ -425,7 +425,7 @@ where P0: windows_core::Param, { 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.param().abi(), pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCRLLinkToStore(hcertstore.param().abi(), pcrlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddCTLContextToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> @@ -433,7 +433,7 @@ where P0: windows_core::Param, { 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.param().abi(), pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCTLContextToStore(hcertstore.param().abi(), pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddCTLLinkToStore(hcertstore: P0, pctlcontext: *const CTL_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> @@ -441,7 +441,7 @@ where P0: windows_core::Param, { 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.param().abi(), pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCTLLinkToStore(hcertstore.param().abi(), pctlcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddCertificateContextToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> @@ -449,7 +449,7 @@ where P0: windows_core::Param, { 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.param().abi(), pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCertificateContextToStore(hcertstore.param().abi(), pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddCertificateLinkToStore(hcertstore: P0, pcertcontext: *const CERT_CONTEXT, dwadddisposition: u32, ppstorecontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> @@ -457,7 +457,7 @@ where P0: windows_core::Param, { 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.param().abi(), pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddCertificateLinkToStore(hcertstore.param().abi(), pcertcontext, dwadddisposition, core::mem::transmute(ppstorecontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddEncodedCRLToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8], dwadddisposition: u32, ppcrlcontext: Option<*mut *mut CRL_CONTEXT>) -> windows_core::Result<()> @@ -465,7 +465,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwcertencodingtype, core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcrlcontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddEncodedCRLToStore(hcertstore.param().abi(), dwcertencodingtype, core::mem::transmute(pbcrlencoded.as_ptr()), pbcrlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcrlcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddEncodedCTLToStore(hcertstore: P0, dwmsgandcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbctlencoded: &[u8], dwadddisposition: u32, ppctlcontext: Option<*mut *mut CTL_CONTEXT>) -> windows_core::Result<()> @@ -473,7 +473,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwmsgandcertencodingtype, core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppctlcontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddEncodedCTLToStore(hcertstore.param().abi(), dwmsgandcertencodingtype, core::mem::transmute(pbctlencoded.as_ptr()), pbctlencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppctlcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddEncodedCertificateToStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcertencoded: &[u8], dwadddisposition: u32, ppcertcontext: Option<*mut *mut CERT_CONTEXT>) -> windows_core::Result<()> @@ -481,7 +481,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwcertencodingtype, core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcertcontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddEncodedCertificateToStore(hcertstore.param().abi(), dwcertencodingtype, core::mem::transmute(pbcertencoded.as_ptr()), pbcertencoded.len().try_into().unwrap(), dwadddisposition, core::mem::transmute(ppcertcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddEncodedCertificateToSystemStoreA(szcertstorename: P0, pbcertencoded: &[u8]) -> windows_core::Result<()> @@ -510,12 +510,12 @@ where #[inline] pub unsafe fn CertAddRefServerOcspResponse(hserverocspresponse: Option<*const core::ffi::c_void>) { windows_targets::link!("crypt32.dll" "system" fn CertAddRefServerOcspResponse(hserverocspresponse : *const core::ffi::c_void)); - CertAddRefServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(std::ptr::null()))) + CertAddRefServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertAddRefServerOcspResponseContext(pserverocspresponsecontext: Option<*const CERT_SERVER_OCSP_RESPONSE_CONTEXT>) { windows_targets::link!("crypt32.dll" "system" fn CertAddRefServerOcspResponseContext(pserverocspresponsecontext : *const CERT_SERVER_OCSP_RESPONSE_CONTEXT)); - CertAddRefServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(std::ptr::null()))) + CertAddRefServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertAddSerializedElementToStore(hcertstore: P0, pbelement: &[u8], dwadddisposition: u32, dwflags: u32, dwcontexttypeflags: u32, pdwcontexttype: Option<*mut u32>, ppvcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -523,7 +523,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), dwadddisposition, dwflags, dwcontexttypeflags, core::mem::transmute(pdwcontexttype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppvcontext.unwrap_or(std::ptr::null_mut()))).ok() + CertAddSerializedElementToStore(hcertstore.param().abi(), core::mem::transmute(pbelement.as_ptr()), pbelement.len().try_into().unwrap(), dwadddisposition, dwflags, dwcontexttypeflags, core::mem::transmute(pdwcontexttype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppvcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertAddStoreToCollection(hcollectionstore: P0, hsiblingstore: P1, dwupdateflags: u32, dwpriority: u32) -> super::super::Foundation::BOOL @@ -542,7 +542,7 @@ pub unsafe fn CertAlgIdToOID(dwalgid: u32) -> windows_core::PCSTR { #[inline] pub unsafe fn CertCloseServerOcspResponse(hserverocspresponse: Option<*const core::ffi::c_void>, dwflags: u32) { windows_targets::link!("crypt32.dll" "system" fn CertCloseServerOcspResponse(hserverocspresponse : *const core::ffi::c_void, dwflags : u32)); - CertCloseServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(std::ptr::null())), dwflags) + CertCloseServerOcspResponse(core::mem::transmute(hserverocspresponse.unwrap_or(core::ptr::null())), dwflags) } #[inline] pub unsafe fn CertCloseStore(hcertstore: P0, dwflags: u32) -> windows_core::Result<()> @@ -578,7 +578,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwflags, dwctrltype, core::mem::transmute(pvctrlpara.unwrap_or(std::ptr::null()))).ok() + CertControlStore(hcertstore.param().abi(), dwflags, dwctrltype, core::mem::transmute(pvctrlpara.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertCreateCRLContext(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbcrlencoded: &[u8]) -> *mut CRL_CONTEXT { @@ -593,7 +593,7 @@ pub unsafe fn CertCreateCTLContext(dwmsgandcertencodingtype: u32, pbctlencoded: #[inline] pub unsafe fn CertCreateCTLEntryFromCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, rgoptattr: Option<&[CRYPT_ATTRIBUTE]>, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, pctlentry: 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().try_into().unwrap()), 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() + CertCreateCTLEntryFromCertificateContextProperties(pcertcontext, rgoptattr.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgoptattr.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pctlentry.unwrap_or(core::ptr::null_mut())), pcbctlentry).ok() } #[inline] pub unsafe fn CertCreateCertificateChainEngine(pconfig: *const CERT_CHAIN_ENGINE_CONFIG, phchainengine: *mut HCERTCHAINENGINE) -> windows_core::Result<()> { @@ -608,7 +608,7 @@ pub unsafe fn CertCreateCertificateContext(dwcertencodingtype: CERT_QUERY_ENCODI #[inline] pub unsafe fn CertCreateContext(dwcontexttype: u32, dwencodingtype: u32, pbencoded: &[u8], dwflags: u32, pcreatepara: Option<*const CERT_CREATE_CONTEXT_PARA>) -> *mut core::ffi::c_void { windows_targets::link!("crypt32.dll" "system" fn CertCreateContext(dwcontexttype : u32, dwencodingtype : u32, pbencoded : *const u8, cbencoded : u32, dwflags : u32, pcreatepara : *const CERT_CREATE_CONTEXT_PARA) -> *mut core::ffi::c_void); - CertCreateContext(dwcontexttype, dwencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pcreatepara.unwrap_or(std::ptr::null()))) + CertCreateContext(dwcontexttype, dwencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pcreatepara.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertCreateSelfSignCertificate(hcryptprovorncryptkey: P0, psubjectissuerblob: *const CRYPT_INTEGER_BLOB, dwflags: CERT_CREATE_SELFSIGN_FLAGS, pkeyprovinfo: Option<*const CRYPT_KEY_PROV_INFO>, psignaturealgorithm: Option<*const CRYPT_ALGORITHM_IDENTIFIER>, pstarttime: Option<*const super::super::Foundation::SYSTEMTIME>, pendtime: Option<*const super::super::Foundation::SYSTEMTIME>, pextensions: Option<*const CERT_EXTENSIONS>) -> *mut CERT_CONTEXT @@ -616,7 +616,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertCreateSelfSignCertificate(hcryptprovorncryptkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, psubjectissuerblob : *const CRYPT_INTEGER_BLOB, dwflags : CERT_CREATE_SELFSIGN_FLAGS, pkeyprovinfo : *const CRYPT_KEY_PROV_INFO, psignaturealgorithm : *const CRYPT_ALGORITHM_IDENTIFIER, pstarttime : *const super::super::Foundation:: SYSTEMTIME, pendtime : *const super::super::Foundation:: SYSTEMTIME, pextensions : *const CERT_EXTENSIONS) -> *mut CERT_CONTEXT); - CertCreateSelfSignCertificate(hcryptprovorncryptkey.param().abi(), psubjectissuerblob, dwflags, core::mem::transmute(pkeyprovinfo.unwrap_or(std::ptr::null())), core::mem::transmute(psignaturealgorithm.unwrap_or(std::ptr::null())), core::mem::transmute(pstarttime.unwrap_or(std::ptr::null())), core::mem::transmute(pendtime.unwrap_or(std::ptr::null())), core::mem::transmute(pextensions.unwrap_or(std::ptr::null()))) + CertCreateSelfSignCertificate(hcryptprovorncryptkey.param().abi(), psubjectissuerblob, dwflags, core::mem::transmute(pkeyprovinfo.unwrap_or(core::ptr::null())), core::mem::transmute(psignaturealgorithm.unwrap_or(core::ptr::null())), core::mem::transmute(pstarttime.unwrap_or(core::ptr::null())), core::mem::transmute(pendtime.unwrap_or(core::ptr::null())), core::mem::transmute(pextensions.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertDeleteCRLFromStore(pcrlcontext: *const CRL_CONTEXT) -> windows_core::Result<()> { @@ -636,12 +636,12 @@ pub unsafe fn CertDeleteCertificateFromStore(pcertcontext: *const CERT_CONTEXT) #[inline] pub unsafe fn CertDuplicateCRLContext(pcrlcontext: Option<*const CRL_CONTEXT>) -> *mut CRL_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertDuplicateCRLContext(pcrlcontext : *const CRL_CONTEXT) -> *mut CRL_CONTEXT); - CertDuplicateCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(std::ptr::null()))) + CertDuplicateCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertDuplicateCTLContext(pctlcontext: Option<*const CTL_CONTEXT>) -> *mut CTL_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertDuplicateCTLContext(pctlcontext : *const CTL_CONTEXT) -> *mut CTL_CONTEXT); - CertDuplicateCTLContext(core::mem::transmute(pctlcontext.unwrap_or(std::ptr::null()))) + CertDuplicateCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT { @@ -651,7 +651,7 @@ pub unsafe fn CertDuplicateCertificateChain(pchaincontext: *const CERT_CHAIN_CON #[inline] pub unsafe fn CertDuplicateCertificateContext(pcertcontext: Option<*const CERT_CONTEXT>) -> *mut CERT_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertDuplicateCertificateContext(pcertcontext : *const CERT_CONTEXT) -> *mut CERT_CONTEXT); - CertDuplicateCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(std::ptr::null()))) + CertDuplicateCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertDuplicateStore(hcertstore: P0) -> HCERTSTORE @@ -672,7 +672,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertEnumCRLsInStore(hcertstore : HCERTSTORE, pprevcrlcontext : *const CRL_CONTEXT) -> *mut CRL_CONTEXT); - CertEnumCRLsInStore(hcertstore.param().abi(), core::mem::transmute(pprevcrlcontext.unwrap_or(std::ptr::null()))) + CertEnumCRLsInStore(hcertstore.param().abi(), core::mem::transmute(pprevcrlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertEnumCTLContextProperties(pctlcontext: *const CTL_CONTEXT, dwpropid: u32) -> u32 { @@ -685,7 +685,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertEnumCTLsInStore(hcertstore : HCERTSTORE, pprevctlcontext : *const CTL_CONTEXT) -> *mut CTL_CONTEXT); - CertEnumCTLsInStore(hcertstore.param().abi(), core::mem::transmute(pprevctlcontext.unwrap_or(std::ptr::null()))) + CertEnumCTLsInStore(hcertstore.param().abi(), core::mem::transmute(pprevctlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertEnumCertificateContextProperties(pcertcontext: *const CERT_CONTEXT, dwpropid: u32) -> u32 { @@ -698,27 +698,27 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertEnumCertificatesInStore(hcertstore : HCERTSTORE, pprevcertcontext : *const CERT_CONTEXT) -> *mut CERT_CONTEXT); - CertEnumCertificatesInStore(hcertstore.param().abi(), core::mem::transmute(pprevcertcontext.unwrap_or(std::ptr::null()))) + CertEnumCertificatesInStore(hcertstore.param().abi(), core::mem::transmute(pprevcertcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertEnumPhysicalStore(pvsystemstore: *const core::ffi::c_void, dwflags: u32, pvarg: 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).ok() + CertEnumPhysicalStore(pvsystemstore, dwflags, core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenum).ok() } #[inline] pub unsafe fn CertEnumSubjectInSortedCTL(pctlcontext: *const CTL_CONTEXT, ppvnextsubject: *mut *mut core::ffi::c_void, psubjectidentifier: Option<*mut CRYPT_INTEGER_BLOB>, pencodedattributes: Option<*mut CRYPT_INTEGER_BLOB>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertEnumSubjectInSortedCTL(pctlcontext : *const CTL_CONTEXT, ppvnextsubject : *mut *mut core::ffi::c_void, psubjectidentifier : *mut CRYPT_INTEGER_BLOB, pencodedattributes : *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation:: BOOL); - CertEnumSubjectInSortedCTL(pctlcontext, ppvnextsubject, core::mem::transmute(psubjectidentifier.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pencodedattributes.unwrap_or(std::ptr::null_mut()))) + CertEnumSubjectInSortedCTL(pctlcontext, ppvnextsubject, core::mem::transmute(psubjectidentifier.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pencodedattributes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CertEnumSystemStore(dwflags: u32, pvsystemstorelocationpara: Option<*const core::ffi::c_void>, pvarg: Option<*mut core::ffi::c_void>, pfnenum: PFN_CERT_ENUM_SYSTEM_STORE) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertEnumSystemStore(dwflags : u32, pvsystemstorelocationpara : *const core::ffi::c_void, pvarg : *mut core::ffi::c_void, pfnenum : PFN_CERT_ENUM_SYSTEM_STORE) -> super::super::Foundation:: BOOL); - CertEnumSystemStore(dwflags, core::mem::transmute(pvsystemstorelocationpara.unwrap_or(std::ptr::null())), core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenum) + CertEnumSystemStore(dwflags, core::mem::transmute(pvsystemstorelocationpara.unwrap_or(core::ptr::null())), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenum) } #[inline] pub unsafe fn CertEnumSystemStoreLocation(dwflags: u32, pvarg: Option<*mut core::ffi::c_void>, pfnenum: PFN_CERT_ENUM_SYSTEM_STORE_LOCATION) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertEnumSystemStoreLocation(dwflags : u32, pvarg : *mut core::ffi::c_void, pfnenum : PFN_CERT_ENUM_SYSTEM_STORE_LOCATION) -> super::super::Foundation:: BOOL); - CertEnumSystemStoreLocation(dwflags, core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenum) + CertEnumSystemStoreLocation(dwflags, core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenum) } #[inline] pub unsafe fn CertFindAttribute(pszobjid: P0, rgattr: &[CRYPT_ATTRIBUTE]) -> *mut CRYPT_ATTRIBUTE @@ -734,7 +734,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertFindCRLInStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwfindflags : u32, dwfindtype : u32, pvfindpara : *const core::ffi::c_void, pprevcrlcontext : *const CRL_CONTEXT) -> *mut CRL_CONTEXT); - CertFindCRLInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(std::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(std::ptr::null()))) + CertFindCRLInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFindCTLInStore(hcertstore: P0, dwmsgandcertencodingtype: u32, dwfindflags: u32, dwfindtype: CERT_FIND_TYPE, pvfindpara: Option<*const core::ffi::c_void>, pprevctlcontext: Option<*const CTL_CONTEXT>) -> *mut CTL_CONTEXT @@ -742,12 +742,12 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertFindCTLInStore(hcertstore : HCERTSTORE, dwmsgandcertencodingtype : u32, dwfindflags : u32, dwfindtype : CERT_FIND_TYPE, pvfindpara : *const core::ffi::c_void, pprevctlcontext : *const CTL_CONTEXT) -> *mut CTL_CONTEXT); - CertFindCTLInStore(hcertstore.param().abi(), dwmsgandcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(std::ptr::null())), core::mem::transmute(pprevctlcontext.unwrap_or(std::ptr::null()))) + CertFindCTLInStore(hcertstore.param().abi(), dwmsgandcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevctlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFindCertificateInCRL(pcert: *const CERT_CONTEXT, pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, ppcrlentry: *mut *mut CRL_ENTRY) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertFindCertificateInCRL(pcert : *const CERT_CONTEXT, pcrlcontext : *const CRL_CONTEXT, dwflags : u32, pvreserved : *const core::ffi::c_void, ppcrlentry : *mut *mut CRL_ENTRY) -> super::super::Foundation:: BOOL); - CertFindCertificateInCRL(pcert, pcrlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), ppcrlentry) + CertFindCertificateInCRL(pcert, pcrlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), ppcrlentry) } #[inline] pub unsafe fn CertFindCertificateInStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwfindflags: u32, dwfindtype: CERT_FIND_FLAGS, pvfindpara: Option<*const core::ffi::c_void>, pprevcertcontext: Option<*const CERT_CONTEXT>) -> *mut CERT_CONTEXT @@ -755,7 +755,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertFindCertificateInStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwfindflags : u32, dwfindtype : CERT_FIND_FLAGS, pvfindpara : *const core::ffi::c_void, pprevcertcontext : *const CERT_CONTEXT) -> *mut CERT_CONTEXT); - CertFindCertificateInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(std::ptr::null())), core::mem::transmute(pprevcertcontext.unwrap_or(std::ptr::null()))) + CertFindCertificateInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevcertcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFindChainInStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwfindflags: CERT_FIND_CHAIN_IN_STORE_FLAGS, dwfindtype: u32, pvfindpara: Option<*const core::ffi::c_void>, pprevchaincontext: Option<*const CERT_CHAIN_CONTEXT>) -> *mut CERT_CHAIN_CONTEXT @@ -763,7 +763,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertFindChainInStore(hcertstore : HCERTSTORE, dwcertencodingtype : CERT_QUERY_ENCODING_TYPE, dwfindflags : CERT_FIND_CHAIN_IN_STORE_FLAGS, dwfindtype : u32, pvfindpara : *const core::ffi::c_void, pprevchaincontext : *const CERT_CHAIN_CONTEXT) -> *mut CERT_CHAIN_CONTEXT); - CertFindChainInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(std::ptr::null())), core::mem::transmute(pprevchaincontext.unwrap_or(std::ptr::null()))) + CertFindChainInStore(hcertstore.param().abi(), dwcertencodingtype, dwfindflags, dwfindtype, core::mem::transmute(pvfindpara.unwrap_or(core::ptr::null())), core::mem::transmute(pprevchaincontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFindExtension(pszobjid: P0, rgextensions: &[CERT_EXTENSION]) -> *mut CERT_EXTENSION @@ -789,17 +789,17 @@ pub unsafe fn CertFindSubjectInCTL(dwencodingtype: u32, dwsubjecttype: u32, pvsu #[inline] pub unsafe fn CertFindSubjectInSortedCTL(psubjectidentifier: *const CRYPT_INTEGER_BLOB, pctlcontext: *const CTL_CONTEXT, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, pencodedattributes: Option<*mut CRYPT_INTEGER_BLOB>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertFindSubjectInSortedCTL(psubjectidentifier : *const CRYPT_INTEGER_BLOB, pctlcontext : *const CTL_CONTEXT, dwflags : u32, pvreserved : *const core::ffi::c_void, pencodedattributes : *mut CRYPT_INTEGER_BLOB) -> super::super::Foundation:: BOOL); - CertFindSubjectInSortedCTL(psubjectidentifier, pctlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(pencodedattributes.unwrap_or(std::ptr::null_mut()))) + CertFindSubjectInSortedCTL(psubjectidentifier, pctlcontext, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pencodedattributes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CertFreeCRLContext(pcrlcontext: Option<*const CRL_CONTEXT>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertFreeCRLContext(pcrlcontext : *const CRL_CONTEXT) -> super::super::Foundation:: BOOL); - CertFreeCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(std::ptr::null()))) + CertFreeCRLContext(core::mem::transmute(pcrlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFreeCTLContext(pctlcontext: Option<*const CTL_CONTEXT>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertFreeCTLContext(pctlcontext : *const CTL_CONTEXT) -> super::super::Foundation:: BOOL); - CertFreeCTLContext(core::mem::transmute(pctlcontext.unwrap_or(std::ptr::null()))) + CertFreeCTLContext(core::mem::transmute(pctlcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFreeCertificateChain(pchaincontext: *const CERT_CHAIN_CONTEXT) { @@ -822,17 +822,17 @@ pub unsafe fn CertFreeCertificateChainList(prgpselection: *const *const CERT_CHA #[inline] pub unsafe fn CertFreeCertificateContext(pcertcontext: Option<*const CERT_CONTEXT>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertFreeCertificateContext(pcertcontext : *const CERT_CONTEXT) -> super::super::Foundation:: BOOL); - CertFreeCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(std::ptr::null()))) + CertFreeCertificateContext(core::mem::transmute(pcertcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertFreeServerOcspResponseContext(pserverocspresponsecontext: Option<*const CERT_SERVER_OCSP_RESPONSE_CONTEXT>) { windows_targets::link!("crypt32.dll" "system" fn CertFreeServerOcspResponseContext(pserverocspresponsecontext : *const CERT_SERVER_OCSP_RESPONSE_CONTEXT)); - CertFreeServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(std::ptr::null()))) + CertFreeServerOcspResponseContext(core::mem::transmute(pserverocspresponsecontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertGetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, pvdata: 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).ok() + CertGetCRLContextProperty(pcrlcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CertGetCRLFromStore(hcertstore: P0, pissuercontext: Option<*const CERT_CONTEXT>, pprevcrlcontext: Option<*const CRL_CONTEXT>, pdwflags: *mut u32) -> *mut CRL_CONTEXT @@ -840,12 +840,12 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertGetCRLFromStore(hcertstore : HCERTSTORE, pissuercontext : *const CERT_CONTEXT, pprevcrlcontext : *const CRL_CONTEXT, pdwflags : *mut u32) -> *mut CRL_CONTEXT); - CertGetCRLFromStore(hcertstore.param().abi(), core::mem::transmute(pissuercontext.unwrap_or(std::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(std::ptr::null())), pdwflags) + CertGetCRLFromStore(hcertstore.param().abi(), core::mem::transmute(pissuercontext.unwrap_or(core::ptr::null())), core::mem::transmute(pprevcrlcontext.unwrap_or(core::ptr::null())), pdwflags) } #[inline] pub unsafe fn CertGetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, pvdata: 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).ok() + CertGetCTLContextProperty(pctlcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CertGetCertificateChain(hchainengine: P0, pcertcontext: *const CERT_CONTEXT, ptime: Option<*const super::super::Foundation::FILETIME>, hadditionalstore: P1, pchainpara: *const CERT_CHAIN_PARA, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, ppchaincontext: *mut *mut CERT_CHAIN_CONTEXT) -> windows_core::Result<()> @@ -854,17 +854,17 @@ where P1: windows_core::Param, { 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.param().abi(), pcertcontext, core::mem::transmute(ptime.unwrap_or(std::ptr::null())), hadditionalstore.param().abi(), pchainpara, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), ppchaincontext).ok() + CertGetCertificateChain(hchainengine.param().abi(), pcertcontext, core::mem::transmute(ptime.unwrap_or(core::ptr::null())), hadditionalstore.param().abi(), pchainpara, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), ppchaincontext).ok() } #[inline] pub unsafe fn CertGetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, pvdata: 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).ok() + CertGetCertificateContextProperty(pcertcontext, dwpropid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CertGetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pusage: 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).ok() + CertGetEnhancedKeyUsage(pcertcontext, dwflags, core::mem::transmute(pusage.unwrap_or(core::ptr::null_mut())), pcbusage).ok() } #[inline] pub unsafe fn CertGetIntendedKeyUsage(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertinfo: *const CERT_INFO, pbkeyusage: &mut [u8]) -> windows_core::Result<()> { @@ -877,17 +877,17 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertGetIssuerCertificateFromStore(hcertstore : HCERTSTORE, psubjectcontext : *const CERT_CONTEXT, pprevissuercontext : *const CERT_CONTEXT, pdwflags : *mut u32) -> *mut CERT_CONTEXT); - CertGetIssuerCertificateFromStore(hcertstore.param().abi(), psubjectcontext, core::mem::transmute(pprevissuercontext.unwrap_or(std::ptr::null())), pdwflags) + CertGetIssuerCertificateFromStore(hcertstore.param().abi(), psubjectcontext, core::mem::transmute(pprevissuercontext.unwrap_or(core::ptr::null())), pdwflags) } #[inline] pub unsafe fn CertGetNameStringA(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: Option<*const core::ffi::c_void>, psznamestring: Option<&mut [u8]>) -> u32 { windows_targets::link!("crypt32.dll" "system" fn CertGetNameStringA(pcertcontext : *const CERT_CONTEXT, dwtype : u32, dwflags : u32, pvtypepara : *const core::ffi::c_void, psznamestring : windows_core::PSTR, cchnamestring : u32) -> u32); - CertGetNameStringA(pcertcontext, dwtype, dwflags, core::mem::transmute(pvtypepara.unwrap_or(std::ptr::null())), core::mem::transmute(psznamestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + CertGetNameStringA(pcertcontext, dwtype, dwflags, core::mem::transmute(pvtypepara.unwrap_or(core::ptr::null())), core::mem::transmute(psznamestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertGetNameStringW(pcertcontext: *const CERT_CONTEXT, dwtype: u32, dwflags: u32, pvtypepara: Option<*const core::ffi::c_void>, psznamestring: Option<&mut [u16]>) -> u32 { windows_targets::link!("crypt32.dll" "system" fn CertGetNameStringW(pcertcontext : *const CERT_CONTEXT, dwtype : u32, dwflags : u32, pvtypepara : *const core::ffi::c_void, psznamestring : windows_core::PWSTR, cchnamestring : u32) -> u32); - CertGetNameStringW(pcertcontext, dwtype, dwflags, core::mem::transmute(pvtypepara.unwrap_or(std::ptr::null())), core::mem::transmute(psznamestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + CertGetNameStringW(pcertcontext, dwtype, dwflags, core::mem::transmute(pvtypepara.unwrap_or(core::ptr::null())), core::mem::transmute(psznamestring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psznamestring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn CertGetPublicKeyLength(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, ppublickey: *const CERT_PUBLIC_KEY_INFO) -> u32 { @@ -897,7 +897,7 @@ pub unsafe fn CertGetPublicKeyLength(dwcertencodingtype: CERT_QUERY_ENCODING_TYP #[inline] pub unsafe fn CertGetServerOcspResponseContext(hserverocspresponse: *const core::ffi::c_void, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT { windows_targets::link!("crypt32.dll" "system" fn CertGetServerOcspResponseContext(hserverocspresponse : *const core::ffi::c_void, dwflags : u32, pvreserved : *const core::ffi::c_void) -> *mut CERT_SERVER_OCSP_RESPONSE_CONTEXT); - CertGetServerOcspResponseContext(hserverocspresponse, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CertGetServerOcspResponseContext(hserverocspresponse, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertGetStoreProperty(hcertstore: P0, dwpropid: u32, pvdata: Option<*mut core::ffi::c_void>, pcbdata: *mut u32) -> windows_core::Result<()> @@ -905,7 +905,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwpropid, core::mem::transmute(pvdata.unwrap_or(std::ptr::null_mut())), pcbdata).ok() + CertGetStoreProperty(hcertstore.param().abi(), dwpropid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CertGetSubjectCertificateFromStore(hcertstore: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pcertid: *const CERT_INFO) -> *mut CERT_CONTEXT @@ -918,7 +918,7 @@ where #[inline] pub unsafe fn CertGetValidUsages(rghcerts: &[*const CERT_CONTEXT], cnumoids: *mut i32, rghoids: 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().try_into().unwrap(), core::mem::transmute(rghcerts.as_ptr()), cnumoids, core::mem::transmute(rghoids.unwrap_or(std::ptr::null_mut())), pcboids).ok() + CertGetValidUsages(rghcerts.len().try_into().unwrap(), core::mem::transmute(rghcerts.as_ptr()), cnumoids, core::mem::transmute(rghoids.unwrap_or(core::ptr::null_mut())), pcboids).ok() } #[inline] pub unsafe fn CertIsRDNAttrsInCertificateName(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, dwflags: u32, pcertname: *const CRYPT_INTEGER_BLOB, prdn: *const CERT_RDN) -> windows_core::Result<()> { @@ -931,12 +931,12 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(psigningcert.unwrap_or(std::ptr::null()))).ok() + CertIsStrongHashToSign(pstrongsignpara, pwszcnghashalgid.param().abi(), core::mem::transmute(psigningcert.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertIsValidCRLForCertificate(pcert: *const CERT_CONTEXT, pcrl: *const CRL_CONTEXT, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertIsValidCRLForCertificate(pcert : *const CERT_CONTEXT, pcrl : *const CRL_CONTEXT, dwflags : u32, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertIsValidCRLForCertificate(pcert, pcrl, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CertIsValidCRLForCertificate(pcert, pcrl, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertIsWeakHash(dwhashusetype: u32, pwszcnghashalgid: P0, dwchainflags: u32, psignerchaincontext: Option<*const CERT_CHAIN_CONTEXT>, ptimestamp: Option<*const super::super::Foundation::FILETIME>, pwszfilename: P1) -> super::super::Foundation::BOOL @@ -945,7 +945,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertIsWeakHash(dwhashusetype : u32, pwszcnghashalgid : windows_core::PCWSTR, dwchainflags : u32, psignerchaincontext : *const CERT_CHAIN_CONTEXT, ptimestamp : *const super::super::Foundation:: FILETIME, pwszfilename : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CertIsWeakHash(dwhashusetype, pwszcnghashalgid.param().abi(), dwchainflags, core::mem::transmute(psignerchaincontext.unwrap_or(std::ptr::null())), core::mem::transmute(ptimestamp.unwrap_or(std::ptr::null())), pwszfilename.param().abi()) + CertIsWeakHash(dwhashusetype, pwszcnghashalgid.param().abi(), dwchainflags, core::mem::transmute(psignerchaincontext.unwrap_or(core::ptr::null())), core::mem::transmute(ptimestamp.unwrap_or(core::ptr::null())), pwszfilename.param().abi()) } #[inline] pub unsafe fn CertNameToStrA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pname: *const CRYPT_INTEGER_BLOB, dwstrtype: CERT_STRING_TYPE, psz: Option<&mut [u8]>) -> u32 { @@ -968,7 +968,7 @@ where #[inline] pub unsafe fn CertOpenServerOcspResponse(pchaincontext: *const CERT_CHAIN_CONTEXT, dwflags: u32, popenpara: Option<*const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA>) -> *mut core::ffi::c_void { windows_targets::link!("crypt32.dll" "system" fn CertOpenServerOcspResponse(pchaincontext : *const CERT_CHAIN_CONTEXT, dwflags : u32, popenpara : *const CERT_SERVER_OCSP_RESPONSE_OPEN_PARA) -> *mut core::ffi::c_void); - CertOpenServerOcspResponse(pchaincontext, dwflags, core::mem::transmute(popenpara.unwrap_or(std::ptr::null()))) + CertOpenServerOcspResponse(pchaincontext, dwflags, core::mem::transmute(popenpara.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertOpenStore(lpszstoreprovider: P0, dwencodingtype: CERT_QUERY_ENCODING_TYPE, hcryptprov: P1, dwflags: CERT_OPEN_STORE_FLAGS, pvpara: Option<*const core::ffi::c_void>) -> windows_core::Result @@ -977,7 +977,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertOpenStore(lpszstoreprovider : windows_core::PCSTR, dwencodingtype : CERT_QUERY_ENCODING_TYPE, hcryptprov : HCRYPTPROV_LEGACY, dwflags : CERT_OPEN_STORE_FLAGS, pvpara : *const core::ffi::c_void) -> HCERTSTORE); - let result__ = CertOpenStore(lpszstoreprovider.param().abi(), dwencodingtype, hcryptprov.param().abi(), dwflags, core::mem::transmute(pvpara.unwrap_or(std::ptr::null()))); + let result__ = CertOpenStore(lpszstoreprovider.param().abi(), dwencodingtype, hcryptprov.param().abi(), dwflags, core::mem::transmute(pvpara.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1016,12 +1016,12 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertRegisterPhysicalStore(pvsystemstore : *const core::ffi::c_void, dwflags : u32, pwszstorename : windows_core::PCWSTR, pstoreinfo : *const CERT_PHYSICAL_STORE_INFO, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertRegisterPhysicalStore(pvsystemstore, dwflags, pwszstorename.param().abi(), pstoreinfo, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CertRegisterPhysicalStore(pvsystemstore, dwflags, pwszstorename.param().abi(), pstoreinfo, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertRegisterSystemStore(pvsystemstore: *const core::ffi::c_void, dwflags: u32, pstoreinfo: Option<*const CERT_SYSTEM_STORE_INFO>, pvreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CertRegisterSystemStore(pvsystemstore : *const core::ffi::c_void, dwflags : u32, pstoreinfo : *const CERT_SYSTEM_STORE_INFO, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertRegisterSystemStore(pvsystemstore, dwflags, core::mem::transmute(pstoreinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CertRegisterSystemStore(pvsystemstore, dwflags, core::mem::transmute(pstoreinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertRemoveEnhancedKeyUsageIdentifier(pcertcontext: *const CERT_CONTEXT, pszusageidentifier: P0) -> windows_core::Result<()> @@ -1054,7 +1054,7 @@ where P0: windows_core::Param, { 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.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() + CertRetrieveLogoOrBiometricInfo(pcertcontext, lpszlogoorbiometrictype.param().abi(), dwretrievalflags, dwtimeout, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), ppbdata, pcbdata, core::mem::transmute(ppwszmimetype.unwrap_or(core::ptr::null_mut()))).ok() } #[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) -> windows_core::Result<()> @@ -1070,32 +1070,32 @@ where P0: windows_core::Param, { 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().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), hstore.param().abi(), pcselection, pprgpselection).ok() + CertSelectCertificateChains(core::mem::transmute(pselectioncontext.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pchainparameters.unwrap_or(core::ptr::null())), rgpcriteria.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpcriteria.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), hstore.param().abi(), pcselection, pprgpselection).ok() } #[inline] pub unsafe fn CertSerializeCRLStoreElement(pcrlcontext: *const CRL_CONTEXT, dwflags: u32, pbelement: 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).ok() + CertSerializeCRLStoreElement(pcrlcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), pcbelement).ok() } #[inline] pub unsafe fn CertSerializeCTLStoreElement(pctlcontext: *const CTL_CONTEXT, dwflags: u32, pbelement: 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).ok() + CertSerializeCTLStoreElement(pctlcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), pcbelement).ok() } #[inline] pub unsafe fn CertSerializeCertificateStoreElement(pcertcontext: *const CERT_CONTEXT, dwflags: u32, pbelement: 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).ok() + CertSerializeCertificateStoreElement(pcertcontext, dwflags, core::mem::transmute(pbelement.unwrap_or(core::ptr::null_mut())), pcbelement).ok() } #[inline] pub unsafe fn CertSetCRLContextProperty(pcrlcontext: *const CRL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: 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()))).ok() + CertSetCRLContextProperty(pcrlcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertSetCTLContextProperty(pctlcontext: *const CTL_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: 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()))).ok() + CertSetCTLContextProperty(pctlcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *const CERT_CONTEXT, pctlentry: *const CTL_ENTRY, dwflags: u32) -> windows_core::Result<()> { @@ -1105,12 +1105,12 @@ pub unsafe fn CertSetCertificateContextPropertiesFromCTLEntry(pcertcontext: *con #[inline] pub unsafe fn CertSetCertificateContextProperty(pcertcontext: *const CERT_CONTEXT, dwpropid: u32, dwflags: u32, pvdata: 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()))).ok() + CertSetCertificateContextProperty(pcertcontext, dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertSetEnhancedKeyUsage(pcertcontext: *const CERT_CONTEXT, pusage: 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()))).ok() + CertSetEnhancedKeyUsage(pcertcontext, core::mem::transmute(pusage.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CertSetStoreProperty(hcertstore: P0, dwpropid: u32, dwflags: u32, pvdata: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -1118,7 +1118,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CertSetStoreProperty(hcertstore : HCERTSTORE, dwpropid : u32, dwflags : u32, pvdata : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CertSetStoreProperty(hcertstore.param().abi(), dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(std::ptr::null()))) + CertSetStoreProperty(hcertstore.param().abi(), dwpropid, dwflags, core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CertStrToNameA(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: Option<*const core::ffi::c_void>, pbencoded: Option<*mut u8>, pcbencoded: *mut u32, ppszerror: Option<*mut windows_core::PCSTR>) -> windows_core::Result<()> @@ -1126,7 +1126,7 @@ where P0: windows_core::Param, { 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.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() + CertStrToNameA(dwcertencodingtype, pszx500.param().abi(), dwstrtype, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded, core::mem::transmute(ppszerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertStrToNameW(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszx500: P0, dwstrtype: CERT_STRING_TYPE, pvreserved: Option<*const core::ffi::c_void>, pbencoded: Option<*mut u8>, pcbencoded: *mut u32, ppszerror: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> @@ -1134,7 +1134,7 @@ where P0: windows_core::Param, { 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.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() + CertStrToNameW(dwcertencodingtype, pszx500.param().abi(), dwstrtype, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded, core::mem::transmute(ppszerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CertUnregisterPhysicalStore(pvsystemstore: *const core::ffi::c_void, dwflags: u32, pwszstorename: P0) -> super::super::Foundation::BOOL @@ -1157,12 +1157,12 @@ pub unsafe fn CertVerifyCRLRevocation(dwcertencodingtype: CERT_QUERY_ENCODING_TY #[inline] pub unsafe fn CertVerifyCRLTimeValidity(ptimetoverify: Option<*const super::super::Foundation::FILETIME>, pcrlinfo: *const CRL_INFO) -> i32 { windows_targets::link!("crypt32.dll" "system" fn CertVerifyCRLTimeValidity(ptimetoverify : *const super::super::Foundation:: FILETIME, pcrlinfo : *const CRL_INFO) -> i32); - CertVerifyCRLTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(std::ptr::null())), pcrlinfo) + CertVerifyCRLTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::ptr::null())), pcrlinfo) } #[inline] pub unsafe fn CertVerifyCTLUsage(dwencodingtype: u32, dwsubjecttype: u32, pvsubject: *const core::ffi::c_void, psubjectusage: *const CTL_USAGE, dwflags: u32, pverifyusagepara: 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).ok() + CertVerifyCTLUsage(dwencodingtype, dwsubjecttype, pvsubject, psubjectusage, dwflags, core::mem::transmute(pverifyusagepara.unwrap_or(core::ptr::null())), pverifyusagestatus).ok() } #[inline] pub unsafe fn CertVerifyCertificateChainPolicy(pszpolicyoid: P0, pchaincontext: *const CERT_CHAIN_CONTEXT, ppolicypara: *const CERT_CHAIN_POLICY_PARA, ppolicystatus: *mut CERT_CHAIN_POLICY_STATUS) -> super::super::Foundation::BOOL @@ -1175,17 +1175,17 @@ where #[inline] pub unsafe fn CertVerifyRevocation(dwencodingtype: u32, dwrevtype: u32, rgpvcontext: &[*const core::ffi::c_void], dwflags: u32, prevpara: 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().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), dwflags, core::mem::transmute(prevpara.unwrap_or(std::ptr::null())), prevstatus).ok() + CertVerifyRevocation(dwencodingtype, dwrevtype, rgpvcontext.len().try_into().unwrap(), core::mem::transmute(rgpvcontext.as_ptr()), dwflags, core::mem::transmute(prevpara.unwrap_or(core::ptr::null())), prevstatus).ok() } #[inline] pub unsafe fn CertVerifySubjectCertificateContext(psubject: *const CERT_CONTEXT, pissuer: 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).ok() + CertVerifySubjectCertificateContext(psubject, core::mem::transmute(pissuer.unwrap_or(core::ptr::null())), pdwflags).ok() } #[inline] pub unsafe fn CertVerifyTimeValidity(ptimetoverify: Option<*const super::super::Foundation::FILETIME>, pcertinfo: *const CERT_INFO) -> i32 { windows_targets::link!("crypt32.dll" "system" fn CertVerifyTimeValidity(ptimetoverify : *const super::super::Foundation:: FILETIME, pcertinfo : *const CERT_INFO) -> i32); - CertVerifyTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(std::ptr::null())), pcertinfo) + CertVerifyTimeValidity(core::mem::transmute(ptimetoverify.unwrap_or(core::ptr::null())), pcertinfo) } #[inline] pub unsafe fn CertVerifyValidityNesting(psubjectinfo: *const CERT_INFO, pissuerinfo: *const CERT_INFO) -> super::super::Foundation::BOOL { @@ -1200,7 +1200,7 @@ pub unsafe fn CloseCryptoHandle(hcrypto: *const INFORMATIONCARD_CRYPTO_HANDLE) - #[inline] pub unsafe fn CryptAcquireCertificatePrivateKey(pcert: *const CERT_CONTEXT, dwflags: CRYPT_ACQUIRE_FLAGS, pvparameters: Option<*const core::ffi::c_void>, phcryptprovorncryptkey: *mut HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, pdwkeyspec: Option<*mut CERT_KEY_SPEC>, pfcallerfreeprovorncryptkey: 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()))).ok() + CryptAcquireCertificatePrivateKey(pcert, dwflags, core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), phcryptprovorncryptkey, core::mem::transmute(pdwkeyspec.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfcallerfreeprovorncryptkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptAcquireContextA(phprov: *mut usize, szcontainer: P0, szprovider: P1, dwprovtype: u32, dwflags: u32) -> windows_core::Result<()> @@ -1241,7 +1241,7 @@ where #[inline] pub unsafe fn CryptContextAddRef(hprov: usize, pdwreserved: 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).ok() + CryptContextAddRef(hprov, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn CryptCreateAsyncHandle(dwflags: u32, phasync: *mut HCRYPTASYNC) -> super::super::Foundation::BOOL { @@ -1259,25 +1259,25 @@ where P0: windows_core::Param, { 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.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() + CryptCreateKeyIdentifierFromCSP(dwcertencodingtype, pszpubkeyoid.param().abi(), ppubkeystruc, cbpubkeystruc, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pbhash.unwrap_or(core::ptr::null_mut())), pcbhash).ok() } #[inline] pub unsafe fn CryptDecodeMessage(dwmsgtypeflags: u32, pdecryptpara: Option<*const CRYPT_DECRYPT_MESSAGE_PARA>, pverifypara: Option<*const CRYPT_VERIFY_MESSAGE_PARA>, dwsignerindex: u32, pbencodedblob: &[u8], dwprevinnercontenttype: u32, pdwmsgtype: Option<*mut u32>, pdwinnercontenttype: Option<*mut u32>, pbdecoded: Option<*mut u8>, pcbdecoded: Option<*mut u32>, ppxchgcert: Option<*mut *mut CERT_CONTEXT>, ppsignercert: 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, - core::mem::transmute(pdecryptpara.unwrap_or(std::ptr::null())), - core::mem::transmute(pverifypara.unwrap_or(std::ptr::null())), + core::mem::transmute(pdecryptpara.unwrap_or(core::ptr::null())), + core::mem::transmute(pverifypara.unwrap_or(core::ptr::null())), dwsignerindex, core::mem::transmute(pbencodedblob.as_ptr()), pbencodedblob.len().try_into().unwrap(), dwprevinnercontenttype, - core::mem::transmute(pdwmsgtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdwinnercontenttype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pbdecoded.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbdecoded.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())), + core::mem::transmute(pdwmsgtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwinnercontenttype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pbdecoded.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbdecoded.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppxchgcert.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppsignercert.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -1287,7 +1287,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pvstructinfo.unwrap_or(std::ptr::null_mut())), pcbstructinfo).ok() + CryptDecodeObject(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pvstructinfo.unwrap_or(core::ptr::null_mut())), pcbstructinfo).ok() } #[inline] pub unsafe fn CryptDecodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pbencoded: &[u8], dwflags: u32, pdecodepara: Option<*const CRYPT_DECODE_PARA>, pvstructinfo: Option<*mut core::ffi::c_void>, pcbstructinfo: *mut u32) -> windows_core::Result<()> @@ -1295,7 +1295,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pdecodepara.unwrap_or(std::ptr::null())), core::mem::transmute(pvstructinfo.unwrap_or(std::ptr::null_mut())), pcbstructinfo).ok() + CryptDecodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), dwflags, core::mem::transmute(pdecodepara.unwrap_or(core::ptr::null())), core::mem::transmute(pvstructinfo.unwrap_or(core::ptr::null_mut())), pcbstructinfo).ok() } #[inline] pub unsafe fn CryptDecrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: *mut u8, pdwdatalen: *mut u32) -> windows_core::Result<()> @@ -1308,12 +1308,12 @@ where #[inline] pub unsafe fn CryptDecryptAndVerifyMessageSignature(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbencryptedblob: &[u8], pbdecrypted: Option<*mut u8>, pcbdecrypted: Option<*mut u32>, ppxchgcert: Option<*mut *mut CERT_CONTEXT>, ppsignercert: 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().try_into().unwrap(), 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() + CryptDecryptAndVerifyMessageSignature(pdecryptpara, pverifypara, dwsignerindex, core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), core::mem::transmute(pbdecrypted.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdecrypted.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppxchgcert.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsignercert.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptDecryptMessage(pdecryptpara: *const CRYPT_DECRYPT_MESSAGE_PARA, pbencryptedblob: &[u8], pbdecrypted: Option<*mut u8>, pcbdecrypted: Option<*mut u32>, ppxchgcert: 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().try_into().unwrap(), 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() + CryptDecryptMessage(pdecryptpara, core::mem::transmute(pbencryptedblob.as_ptr()), pbencryptedblob.len().try_into().unwrap(), core::mem::transmute(pbdecrypted.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdecrypted.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppxchgcert.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptDeriveKey(hprov: usize, algid: ALG_ID, hbasedata: usize, dwflags: u32, phkey: *mut usize) -> windows_core::Result<()> { @@ -1333,12 +1333,12 @@ pub unsafe fn CryptDestroyKey(hkey: usize) -> windows_core::Result<()> { #[inline] pub unsafe fn CryptDuplicateHash(hhash: usize, pdwreserved: 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).ok() + CryptDuplicateHash(hhash, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, phhash).ok() } #[inline] pub unsafe fn CryptDuplicateKey(hkey: usize, pdwreserved: 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).ok() + CryptDuplicateKey(hkey, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, phkey).ok() } #[inline] pub unsafe fn CryptEncodeObject(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const core::ffi::c_void, pbencoded: Option<*mut u8>, pcbencoded: *mut u32) -> windows_core::Result<()> @@ -1346,7 +1346,7 @@ where P0: windows_core::Param, { 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.param().abi(), pvstructinfo, core::mem::transmute(pbencoded.unwrap_or(std::ptr::null_mut())), pcbencoded).ok() + CryptEncodeObject(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded).ok() } #[inline] pub unsafe fn CryptEncodeObjectEx(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, lpszstructtype: P0, pvstructinfo: *const core::ffi::c_void, dwflags: CRYPT_ENCODE_OBJECT_FLAGS, pencodepara: Option<*const CRYPT_ENCODE_PARA>, pvencoded: Option<*mut core::ffi::c_void>, pcbencoded: *mut u32) -> windows_core::Result<()> @@ -1354,7 +1354,7 @@ where P0: windows_core::Param, { 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.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() + CryptEncodeObjectEx(dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, dwflags, core::mem::transmute(pencodepara.unwrap_or(core::ptr::null())), core::mem::transmute(pvencoded.unwrap_or(core::ptr::null_mut())), pcbencoded).ok() } #[inline] pub unsafe fn CryptEncrypt(hkey: usize, hhash: usize, r#final: P0, dwflags: u32, pbdata: Option<&mut [u8]>, pdwdatalen: *mut u32) -> windows_core::Result<()> @@ -1367,7 +1367,7 @@ where #[inline] pub unsafe fn CryptEncryptMessage(pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobeencrypted: Option<&[u8]>, pbencryptedblob: 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().try_into().unwrap(), 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().try_into().unwrap()), core::mem::transmute(pbencryptedblob.unwrap_or(std::ptr::null_mut())), pcbencryptedblob).ok() + CryptEncryptMessage(pencryptpara, rgprecipientcert.len().try_into().unwrap(), 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().try_into().unwrap()), core::mem::transmute(pbencryptedblob.unwrap_or(core::ptr::null_mut())), pcbencryptedblob).ok() } #[inline] pub unsafe fn CryptEnumKeyIdentifierProperties(pkeyidentifier: Option<*const CRYPT_INTEGER_BLOB>, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: Option<*const core::ffi::c_void>, pvarg: Option<*mut core::ffi::c_void>, pfnenum: PFN_CRYPT_ENUM_KEYID_PROP) -> windows_core::Result<()> @@ -1375,7 +1375,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenum).ok() + CryptEnumKeyIdentifierProperties(core::mem::transmute(pkeyidentifier.unwrap_or(core::ptr::null())), dwpropid, dwflags, pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenum).ok() } #[inline] pub unsafe fn CryptEnumOIDFunction(dwencodingtype: u32, pszfuncname: P0, pszoid: P1, dwflags: u32, pvarg: Option<*mut core::ffi::c_void>, pfnenumoidfunc: PFN_CRYPT_ENUM_OID_FUNC) -> windows_core::Result<()> @@ -1384,37 +1384,37 @@ where P1: windows_core::Param, { 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.param().abi(), pszoid.param().abi(), dwflags, core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenumoidfunc).ok() + CryptEnumOIDFunction(dwencodingtype, pszfuncname.param().abi(), pszoid.param().abi(), dwflags, core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenumoidfunc).ok() } #[inline] pub unsafe fn CryptEnumOIDInfo(dwgroupid: u32, dwflags: u32, pvarg: Option<*mut core::ffi::c_void>, pfnenumoidinfo: PFN_CRYPT_ENUM_OID_INFO) -> super::super::Foundation::BOOL { windows_targets::link!("crypt32.dll" "system" fn CryptEnumOIDInfo(dwgroupid : u32, dwflags : u32, pvarg : *mut core::ffi::c_void, pfnenumoidinfo : PFN_CRYPT_ENUM_OID_INFO) -> super::super::Foundation:: BOOL); - CryptEnumOIDInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenumoidinfo) + CryptEnumOIDInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenumoidinfo) } #[inline] pub unsafe fn CryptEnumProviderTypesA(dwindex: u32, pdwreserved: 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).ok() + CryptEnumProviderTypesA(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, pdwprovtype, core::mem::transmute(sztypename), pcbtypename).ok() } #[inline] pub unsafe fn CryptEnumProviderTypesW(dwindex: u32, pdwreserved: 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).ok() + CryptEnumProviderTypesW(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, pdwprovtype, core::mem::transmute(sztypename), pcbtypename).ok() } #[inline] pub unsafe fn CryptEnumProvidersA(dwindex: u32, pdwreserved: 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).ok() + CryptEnumProvidersA(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, pdwprovtype, core::mem::transmute(szprovname), pcbprovname).ok() } #[inline] pub unsafe fn CryptEnumProvidersW(dwindex: u32, pdwreserved: 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).ok() + CryptEnumProvidersW(dwindex, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, pdwprovtype, core::mem::transmute(szprovname), pcbprovname).ok() } #[inline] pub unsafe fn CryptExportKey(hkey: usize, hexpkey: usize, dwblobtype: u32, dwflags: CRYPT_KEY_FLAGS, pbdata: 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).ok() + CryptExportKey(hkey, hexpkey, dwblobtype, dwflags, core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pdwdatalen).ok() } #[inline] pub unsafe fn CryptExportPKCS8(hcryptprov: usize, dwkeyspec: u32, pszprivatekeyobjid: P0, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pbprivatekeyblob: Option<*mut u8>, pcbprivatekeyblob: *mut u32) -> windows_core::Result<()> @@ -1422,7 +1422,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbprivatekeyblob.unwrap_or(std::ptr::null_mut())), pcbprivatekeyblob).ok() + CryptExportPKCS8(hcryptprov, dwkeyspec, pszprivatekeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbprivatekeyblob.unwrap_or(core::ptr::null_mut())), pcbprivatekeyblob).ok() } #[inline] pub unsafe fn CryptExportPublicKeyInfo(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> windows_core::Result<()> @@ -1430,7 +1430,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwkeyspec, dwcertencodingtype, core::mem::transmute(pinfo.unwrap_or(std::ptr::null_mut())), pcbinfo).ok() + CryptExportPublicKeyInfo(hcryptprovorncryptkey.param().abi(), dwkeyspec, dwcertencodingtype, core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), pcbinfo).ok() } #[inline] pub unsafe fn CryptExportPublicKeyInfoEx(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P1, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> windows_core::Result<()> @@ -1439,7 +1439,7 @@ where P1: windows_core::Param, { 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.param().abi(), dwkeyspec, dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pinfo.unwrap_or(std::ptr::null_mut())), pcbinfo).ok() + CryptExportPublicKeyInfoEx(hcryptprovorncryptkey.param().abi(), dwkeyspec, dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), pcbinfo).ok() } #[inline] pub unsafe fn CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pszpublickeyobjid: P1, dwflags: u32, pvauxinfo: Option<*const core::ffi::c_void>, pinfo: Option<*mut CERT_PUBLIC_KEY_INFO>, pcbinfo: *mut u32) -> super::super::Foundation::BOOL @@ -1448,12 +1448,12 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey : BCRYPT_KEY_HANDLE, 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); - CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey.param().abi(), dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pinfo.unwrap_or(std::ptr::null_mut())), pcbinfo) + CryptExportPublicKeyInfoFromBCryptKeyHandle(hbcryptkey.param().abi(), dwcertencodingtype, pszpublickeyobjid.param().abi(), dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pinfo.unwrap_or(core::ptr::null_mut())), pcbinfo) } #[inline] pub unsafe fn CryptFindCertificateKeyProvInfo(pcert: *const CERT_CONTEXT, dwflags: CRYPT_FIND_FLAGS, pvreserved: 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()))).ok() + CryptFindCertificateKeyProvInfo(pcert, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptFindLocalizedName(pwszcryptname: P0) -> windows_core::PCWSTR @@ -1474,7 +1474,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbformat.unwrap_or(std::ptr::null_mut())), pcbformat).ok() + CryptFormatObject(dwcertencodingtype, dwformattype, dwformatstrtype, core::mem::transmute(pformatstruct.unwrap_or(core::ptr::null())), lpszstructtype.param().abi(), core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbformat.unwrap_or(core::ptr::null_mut())), pcbformat).ok() } #[inline] pub unsafe fn CryptFreeOIDFunctionAddress(hfuncaddr: *const core::ffi::c_void, dwflags: u32) -> super::super::Foundation::BOOL { @@ -1498,7 +1498,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptGetAsyncParam(hasync : HCRYPTASYNC, pszparamoid : windows_core::PCSTR, ppvparam : *mut *mut core::ffi::c_void, ppfnfree : *mut PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation:: BOOL); - CryptGetAsyncParam(hasync.param().abi(), pszparamoid.param().abi(), core::mem::transmute(ppvparam.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppfnfree.unwrap_or(std::ptr::null_mut()))) + CryptGetAsyncParam(hasync.param().abi(), pszparamoid.param().abi(), core::mem::transmute(ppvparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppfnfree.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CryptGetDefaultOIDDllList(hfuncset: *const core::ffi::c_void, dwencodingtype: u32, pwszdlllist: windows_core::PWSTR, pcchdlllist: *mut u32) -> windows_core::Result<()> { @@ -1516,17 +1516,17 @@ where #[inline] pub unsafe fn CryptGetDefaultProviderA(dwprovtype: u32, pdwreserved: 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).ok() + CryptGetDefaultProviderA(dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pszprovname), pcbprovname).ok() } #[inline] pub unsafe fn CryptGetDefaultProviderW(dwprovtype: u32, pdwreserved: 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).ok() + CryptGetDefaultProviderW(dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pszprovname), pcbprovname).ok() } #[inline] pub unsafe fn CryptGetHashParam(hhash: usize, dwparam: u32, pbdata: 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).ok() + CryptGetHashParam(hhash, dwparam, core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[inline] pub unsafe fn CryptGetKeyIdentifierProperty(pkeyidentifier: *const CRYPT_INTEGER_BLOB, dwpropid: u32, dwflags: u32, pwszcomputername: P0, pvreserved: Option<*const core::ffi::c_void>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: *mut u32) -> windows_core::Result<()> @@ -1534,12 +1534,12 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(pvdata.unwrap_or(std::ptr::null_mut())), pcbdata).ok() + CryptGetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CryptGetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: 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).ok() + CryptGetKeyParam(hkey, dwparam, core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[inline] pub unsafe fn CryptGetMessageCertificates(dwmsgandcertencodingtype: u32, hcryptprov: P0, dwflags: u32, pbsignedblob: &[u8]) -> windows_core::Result @@ -1571,7 +1571,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszoid.param().abi(), pwszvaluename.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() + CryptGetOIDFunctionValue(dwencodingtype, pszfuncname.param().abi(), pszoid.param().abi(), pwszvaluename.param().abi(), core::mem::transmute(pdwvaluetype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbvaluedata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbvaluedata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptGetObjectUrl(pszurloid: P0, pvpara: *const core::ffi::c_void, dwflags: CRYPT_GET_URL_FLAGS, purlarray: Option<*mut CRYPT_URL_ARRAY>, pcburlarray: *mut u32, purlinfo: Option<*mut CRYPT_URL_INFO>, pcburlinfo: Option<*mut u32>, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1579,12 +1579,12 @@ where P0: windows_core::Param, { 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.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() + CryptGetObjectUrl(pszurloid.param().abi(), pvpara, dwflags, core::mem::transmute(purlarray.unwrap_or(core::ptr::null_mut())), pcburlarray, core::mem::transmute(purlinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcburlinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptGetProvParam(hprov: usize, dwparam: u32, pbdata: 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).ok() + CryptGetProvParam(hprov, dwparam, core::mem::transmute(pbdata.unwrap_or(core::ptr::null_mut())), pdwdatalen, dwflags).ok() } #[inline] pub unsafe fn CryptGetUserKey(hprov: usize, dwkeyspec: u32, phuserkey: *mut usize) -> windows_core::Result<()> { @@ -1597,7 +1597,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptHashCertificate(hcryptprov : HCRYPTPROV_LEGACY, algid : ALG_ID, dwflags : u32, pbencoded : *const u8, cbencoded : u32, pbcomputedhash : *mut u8, pcbcomputedhash : *mut u32) -> super::super::Foundation:: BOOL); - CryptHashCertificate(hcryptprov.param().abi(), algid, dwflags, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashCertificate(hcryptprov.param().abi(), algid, dwflags, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), pcbcomputedhash).ok() } #[inline] pub unsafe fn CryptHashCertificate2(pwszcnghashalgid: P0, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>, pbencoded: Option<&[u8]>, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> @@ -1605,7 +1605,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(pbcomputedhash.unwrap_or(std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashCertificate2(pwszcnghashalgid.param().abi(), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::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().try_into().unwrap()), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), pcbcomputedhash).ok() } #[inline] pub unsafe fn CryptHashData(hhash: usize, pbdata: &[u8], dwflags: u32) -> windows_core::Result<()> { @@ -1618,7 +1618,7 @@ where P0: windows_core::Param, { 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.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() + CryptHashMessage(phashpara, fdetachedhash.param().abi(), ctobehashed, rgpbtobehashed, rgcbtobehashed, core::mem::transmute(pbhashedblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhashedblob.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptHashPublicKeyInfo(hcryptprov: P0, algid: ALG_ID, dwflags: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: *mut u32) -> windows_core::Result<()> @@ -1626,7 +1626,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptHashPublicKeyInfo(hcryptprov : HCRYPTPROV_LEGACY, algid : ALG_ID, 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.param().abi(), algid, dwflags, dwcertencodingtype, pinfo, core::mem::transmute(pbcomputedhash.unwrap_or(std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashPublicKeyInfo(hcryptprov.param().abi(), algid, dwflags, dwcertencodingtype, pinfo, core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), pcbcomputedhash).ok() } #[inline] pub unsafe fn CryptHashSessionKey(hhash: usize, hkey: usize, dwflags: u32) -> windows_core::Result<()> { @@ -1639,7 +1639,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwcertencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(std::ptr::null_mut())), pcbcomputedhash).ok() + CryptHashToBeSigned(hcryptprov.param().abi(), dwcertencodingtype, core::mem::transmute(pbencoded.as_ptr()), pbencoded.len().try_into().unwrap(), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), pcbcomputedhash).ok() } #[inline] pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflags: CRYPT_KEY_FLAGS, phkey: *mut usize) -> windows_core::Result<()> { @@ -1649,7 +1649,7 @@ pub unsafe fn CryptImportKey(hprov: usize, pbdata: &[u8], hpubkey: usize, dwflag #[inline] pub unsafe fn CryptImportPKCS8(sprivatekeyandparams: CRYPT_PKCS8_IMPORT_PARAMS, dwflags: CRYPT_KEY_FLAGS, phcryptprov: Option<*mut usize>, pvauxinfo: 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()))).ok() + CryptImportPKCS8(core::mem::transmute(sprivatekeyandparams), dwflags, core::mem::transmute(phcryptprov.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, phkey: *mut usize) -> windows_core::Result<()> { @@ -1659,12 +1659,12 @@ pub unsafe fn CryptImportPublicKeyInfo(hcryptprov: usize, dwcertencodingtype: CE #[inline] pub unsafe fn CryptImportPublicKeyInfoEx(hcryptprov: usize, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, aikeyalg: ALG_ID, dwflags: u32, pvauxinfo: 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 : ALG_ID, 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).ok() + CryptImportPublicKeyInfoEx(hcryptprov, dwcertencodingtype, pinfo, aikeyalg, dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), phkey).ok() } #[inline] pub unsafe fn CryptImportPublicKeyInfoEx2(dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pinfo: *const CERT_PUBLIC_KEY_INFO, dwflags: CRYPT_IMPORT_PUBLIC_KEY_FLAGS, pvauxinfo: 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).ok() + CryptImportPublicKeyInfoEx2(dwcertencodingtype, pinfo, dwflags, core::mem::transmute(pvauxinfo.unwrap_or(core::ptr::null())), phkey).ok() } #[inline] pub unsafe fn CryptInitOIDFunctionSet(pszfuncname: P0, dwflags: u32) -> *mut core::ffi::c_void @@ -1677,12 +1677,12 @@ where #[inline] pub unsafe fn CryptInstallCancelRetrieval(pfncancel: PFN_CRYPT_CANCEL_RETRIEVAL, pvarg: Option<*const core::ffi::c_void>, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("cryptnet.dll" "system" fn CryptInstallCancelRetrieval(pfncancel : PFN_CRYPT_CANCEL_RETRIEVAL, pvarg : *const core::ffi::c_void, dwflags : u32, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptInstallCancelRetrieval(pfncancel, core::mem::transmute(pvarg.unwrap_or(std::ptr::null())), dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CryptInstallCancelRetrieval(pfncancel, core::mem::transmute(pvarg.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptInstallDefaultContext(hcryptprov: usize, dwdefaulttype: CRYPT_DEFAULT_CONTEXT_TYPE, pvdefaultpara: Option<*const core::ffi::c_void>, dwflags: CRYPT_DEFAULT_CONTEXT_FLAGS, pvreserved: 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).ok() + CryptInstallDefaultContext(hcryptprov, dwdefaulttype, core::mem::transmute(pvdefaultpara.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), phdefaultcontext).ok() } #[inline] pub unsafe fn CryptInstallOIDFunctionAddress(hmodule: P0, dwencodingtype: u32, pszfuncname: P1, rgfuncentry: &[CRYPT_OID_FUNC_ENTRY], dwflags: u32) -> super::super::Foundation::BOOL @@ -1701,12 +1701,12 @@ pub unsafe fn CryptMemAlloc(cbsize: u32) -> *mut core::ffi::c_void { #[inline] pub unsafe fn CryptMemFree(pv: Option<*const core::ffi::c_void>) { windows_targets::link!("crypt32.dll" "system" fn CryptMemFree(pv : *const core::ffi::c_void)); - CryptMemFree(core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + CryptMemFree(core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptMemRealloc(pv: Option<*const core::ffi::c_void>, cbsize: u32) -> *mut core::ffi::c_void { windows_targets::link!("crypt32.dll" "system" fn CryptMemRealloc(pv : *const core::ffi::c_void, cbsize : u32) -> *mut core::ffi::c_void); - CryptMemRealloc(core::mem::transmute(pv.unwrap_or(std::ptr::null())), cbsize) + CryptMemRealloc(core::mem::transmute(pv.unwrap_or(core::ptr::null())), cbsize) } #[inline] pub unsafe fn CryptMsgCalculateEncodedLength(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, pvmsgencodeinfo: *const core::ffi::c_void, pszinnercontentobjid: P0, cbdata: u32) -> u32 @@ -1719,12 +1719,12 @@ where #[inline] pub unsafe fn CryptMsgClose(hcryptmsg: 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()))).ok() + CryptMsgClose(core::mem::transmute(hcryptmsg.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptMsgControl(hcryptmsg: *const core::ffi::c_void, dwflags: u32, dwctrltype: u32, pvctrlpara: 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()))).ok() + CryptMsgControl(hcryptmsg, dwflags, dwctrltype, core::mem::transmute(pvctrlpara.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptMsgCountersign(hcryptmsg: *const core::ffi::c_void, dwindex: u32, rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO]) -> windows_core::Result<()> { @@ -1734,27 +1734,27 @@ pub unsafe fn CryptMsgCountersign(hcryptmsg: *const core::ffi::c_void, dwindex: #[inline] pub unsafe fn CryptMsgCountersignEncoded(dwencodingtype: u32, pbsignerinfo: &[u8], rgcountersigners: &[CMSG_SIGNER_ENCODE_INFO], pbcountersignature: 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().try_into().unwrap(), rgcountersigners.len().try_into().unwrap(), core::mem::transmute(rgcountersigners.as_ptr()), core::mem::transmute(pbcountersignature.unwrap_or(std::ptr::null_mut())), pcbcountersignature).ok() + CryptMsgCountersignEncoded(dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), rgcountersigners.len().try_into().unwrap(), core::mem::transmute(rgcountersigners.as_ptr()), core::mem::transmute(pbcountersignature.unwrap_or(core::ptr::null_mut())), pcbcountersignature).ok() } #[inline] pub unsafe fn CryptMsgDuplicate(hcryptmsg: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("crypt32.dll" "system" fn CryptMsgDuplicate(hcryptmsg : *const core::ffi::c_void) -> *mut core::ffi::c_void); - CryptMsgDuplicate(core::mem::transmute(hcryptmsg.unwrap_or(std::ptr::null()))) + CryptMsgDuplicate(core::mem::transmute(hcryptmsg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptMsgEncodeAndSignCTL(dwmsgencodingtype: u32, pctlinfo: *const CTL_INFO, psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: 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).ok() + CryptMsgEncodeAndSignCTL(dwmsgencodingtype, pctlinfo, psigninfo, dwflags, core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded).ok() } #[inline] pub unsafe fn CryptMsgGetAndVerifySigner(hcryptmsg: *const core::ffi::c_void, rghsignerstore: Option<&[HCERTSTORE]>, dwflags: u32, ppsigner: Option<*mut *mut CERT_CONTEXT>, pdwsignerindex: 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().try_into().unwrap()), 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() + CryptMsgGetAndVerifySigner(hcryptmsg, rghsignerstore.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rghsignerstore.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dwflags, core::mem::transmute(ppsigner.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwsignerindex.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptMsgGetParam(hcryptmsg: *const core::ffi::c_void, dwparamtype: u32, dwindex: u32, pvdata: 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).ok() + CryptMsgGetParam(hcryptmsg, dwparamtype, dwindex, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), pcbdata).ok() } #[inline] pub unsafe fn CryptMsgOpenToDecode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: u32, hcryptprov: P0, precipientinfo: Option<*const CERT_INFO>, pstreaminfo: Option<*const CMSG_STREAM_INFO>) -> *mut core::ffi::c_void @@ -1762,7 +1762,7 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptMsgOpenToDecode(dwmsgencodingtype : u32, dwflags : u32, dwmsgtype : u32, hcryptprov : HCRYPTPROV_LEGACY, precipientinfo : *const CERT_INFO, pstreaminfo : *const CMSG_STREAM_INFO) -> *mut core::ffi::c_void); - CryptMsgOpenToDecode(dwmsgencodingtype, dwflags, dwmsgtype, hcryptprov.param().abi(), core::mem::transmute(precipientinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pstreaminfo.unwrap_or(std::ptr::null()))) + CryptMsgOpenToDecode(dwmsgencodingtype, dwflags, dwmsgtype, hcryptprov.param().abi(), core::mem::transmute(precipientinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pstreaminfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptMsgOpenToEncode(dwmsgencodingtype: u32, dwflags: u32, dwmsgtype: CRYPT_MSG_TYPE, pvmsgencodeinfo: *const core::ffi::c_void, pszinnercontentobjid: P0, pstreaminfo: Option<*const CMSG_STREAM_INFO>) -> *mut core::ffi::c_void @@ -1770,12 +1770,12 @@ where P0: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptMsgOpenToEncode(dwmsgencodingtype : u32, dwflags : u32, dwmsgtype : CRYPT_MSG_TYPE, pvmsgencodeinfo : *const core::ffi::c_void, pszinnercontentobjid : windows_core::PCSTR, pstreaminfo : *const CMSG_STREAM_INFO) -> *mut core::ffi::c_void); - CryptMsgOpenToEncode(dwmsgencodingtype, dwflags, dwmsgtype, pvmsgencodeinfo, pszinnercontentobjid.param().abi(), core::mem::transmute(pstreaminfo.unwrap_or(std::ptr::null()))) + CryptMsgOpenToEncode(dwmsgencodingtype, dwflags, dwmsgtype, pvmsgencodeinfo, pszinnercontentobjid.param().abi(), core::mem::transmute(pstreaminfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptMsgSignCTL(dwmsgencodingtype: u32, pbctlcontent: &[u8], psigninfo: *const CMSG_SIGNED_ENCODE_INFO, dwflags: u32, pbencoded: 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().try_into().unwrap(), psigninfo, dwflags, core::mem::transmute(pbencoded.unwrap_or(std::ptr::null_mut())), pcbencoded).ok() + CryptMsgSignCTL(dwmsgencodingtype, core::mem::transmute(pbctlcontent.as_ptr()), pbctlcontent.len().try_into().unwrap(), psigninfo, dwflags, core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded).ok() } #[inline] pub unsafe fn CryptMsgUpdate(hcryptmsg: *const core::ffi::c_void, pbdata: Option<&[u8]>, ffinal: P0) -> windows_core::Result<()> @@ -1799,7 +1799,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), dwsignertype, pvsigner, dwflags, core::mem::transmute(pvextra.unwrap_or(std::ptr::null_mut()))).ok() + CryptMsgVerifyCountersignatureEncodedEx(hcryptprov.param().abi(), dwencodingtype, core::mem::transmute(pbsignerinfo.as_ptr()), pbsignerinfo.len().try_into().unwrap(), core::mem::transmute(pbsignerinfocountersignature.as_ptr()), pbsignerinfocountersignature.len().try_into().unwrap(), dwsignertype, pvsigner, dwflags, core::mem::transmute(pvextra.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptProtectData(pdatain: *const CRYPT_INTEGER_BLOB, szdatadescr: P0, poptionalentropy: Option<*const CRYPT_INTEGER_BLOB>, pvreserved: Option<*const core::ffi::c_void>, ppromptstruct: Option<*const CRYPTPROTECT_PROMPTSTRUCT>, dwflags: u32, pdataout: *mut CRYPT_INTEGER_BLOB) -> windows_core::Result<()> @@ -1807,7 +1807,7 @@ where P0: windows_core::Param, { 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.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() + CryptProtectData(pdatain, szdatadescr.param().abi(), core::mem::transmute(poptionalentropy.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppromptstruct.unwrap_or(core::ptr::null())), dwflags, pdataout).ok() } #[inline] pub unsafe fn CryptProtectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { @@ -1823,12 +1823,12 @@ pub unsafe fn CryptQueryObject(dwobjecttype: CERT_QUERY_OBJECT_TYPE, pvobject: * dwexpectedcontenttypeflags, dwexpectedformattypeflags, dwflags, - core::mem::transmute(pdwmsgandcertencodingtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdwcontenttype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pdwformattype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(phcertstore.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(phmsg.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppvcontext.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pdwmsgandcertencodingtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwcontenttype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pdwformattype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phcertstore.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(phmsg.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppvcontext.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -1870,7 +1870,7 @@ where P2: windows_core::Param, { windows_targets::link!("cryptnet.dll" "system" fn CryptRetrieveObjectByUrlA(pszurl : windows_core::PCSTR, pszobjectoid : windows_core::PCSTR, dwretrievalflags : u32, dwtimeout : u32, ppvobject : *mut *mut core::ffi::c_void, hasyncretrieve : HCRYPTASYNC, pcredentials : *const CRYPT_CREDENTIALS, pvverify : *const core::ffi::c_void, pauxinfo : *mut CRYPT_RETRIEVE_AUX_INFO) -> super::super::Foundation:: BOOL); - CryptRetrieveObjectByUrlA(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject, hasyncretrieve.param().abi(), core::mem::transmute(pcredentials.unwrap_or(std::ptr::null())), core::mem::transmute(pvverify.unwrap_or(std::ptr::null())), core::mem::transmute(pauxinfo.unwrap_or(std::ptr::null_mut()))) + CryptRetrieveObjectByUrlA(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject, hasyncretrieve.param().abi(), core::mem::transmute(pcredentials.unwrap_or(core::ptr::null())), core::mem::transmute(pvverify.unwrap_or(core::ptr::null())), core::mem::transmute(pauxinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CryptRetrieveObjectByUrlW(pszurl: P0, pszobjectoid: P1, dwretrievalflags: u32, dwtimeout: u32, ppvobject: *mut *mut core::ffi::c_void, hasyncretrieve: P2, pcredentials: Option<*const CRYPT_CREDENTIALS>, pvverify: Option<*const core::ffi::c_void>, pauxinfo: Option<*mut CRYPT_RETRIEVE_AUX_INFO>) -> super::super::Foundation::BOOL @@ -1880,7 +1880,7 @@ where P2: windows_core::Param, { windows_targets::link!("cryptnet.dll" "system" fn CryptRetrieveObjectByUrlW(pszurl : windows_core::PCWSTR, pszobjectoid : windows_core::PCSTR, dwretrievalflags : u32, dwtimeout : u32, ppvobject : *mut *mut core::ffi::c_void, hasyncretrieve : HCRYPTASYNC, pcredentials : *const CRYPT_CREDENTIALS, pvverify : *const core::ffi::c_void, pauxinfo : *mut CRYPT_RETRIEVE_AUX_INFO) -> super::super::Foundation:: BOOL); - CryptRetrieveObjectByUrlW(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject, hasyncretrieve.param().abi(), core::mem::transmute(pcredentials.unwrap_or(std::ptr::null())), core::mem::transmute(pvverify.unwrap_or(std::ptr::null())), core::mem::transmute(pauxinfo.unwrap_or(std::ptr::null_mut()))) + CryptRetrieveObjectByUrlW(pszurl.param().abi(), pszobjectoid.param().abi(), dwretrievalflags, dwtimeout, ppvobject, hasyncretrieve.param().abi(), core::mem::transmute(pcredentials.unwrap_or(core::ptr::null())), core::mem::transmute(pvverify.unwrap_or(core::ptr::null())), core::mem::transmute(pauxinfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CryptRetrieveTimeStamp(wszurl: P0, dwretrievalflags: u32, dwtimeout: u32, pszhashid: P1, ppara: Option<*const CRYPT_TIMESTAMP_PARA>, pbdata: &[u8], pptscontext: *mut *mut CRYPT_TIMESTAMP_CONTEXT, pptssigner: *mut *mut CERT_CONTEXT, phstore: Option<*mut HCERTSTORE>) -> windows_core::Result<()> @@ -1889,7 +1889,7 @@ where P1: windows_core::Param, { 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.param().abi(), dwretrievalflags, dwtimeout, pszhashid.param().abi(), core::mem::transmute(ppara.unwrap_or(std::ptr::null())), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pptscontext, pptssigner, core::mem::transmute(phstore.unwrap_or(std::ptr::null_mut()))).ok() + CryptRetrieveTimeStamp(wszurl.param().abi(), dwretrievalflags, dwtimeout, pszhashid.param().abi(), core::mem::transmute(ppara.unwrap_or(core::ptr::null())), core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), pptscontext, pptssigner, core::mem::transmute(phstore.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptSetAsyncParam(hasync: P0, pszparamoid: P1, pvparam: Option<*const core::ffi::c_void>, pfnfree: PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation::BOOL @@ -1898,7 +1898,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptSetAsyncParam(hasync : HCRYPTASYNC, pszparamoid : windows_core::PCSTR, pvparam : *const core::ffi::c_void, pfnfree : PFN_CRYPT_ASYNC_PARAM_FREE_FUNC) -> super::super::Foundation:: BOOL); - CryptSetAsyncParam(hasync.param().abi(), pszparamoid.param().abi(), core::mem::transmute(pvparam.unwrap_or(std::ptr::null())), pfnfree) + CryptSetAsyncParam(hasync.param().abi(), pszparamoid.param().abi(), core::mem::transmute(pvparam.unwrap_or(core::ptr::null())), pfnfree) } #[inline] pub unsafe fn CryptSetHashParam(hhash: usize, dwparam: CRYPT_SET_HASH_PARAM, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1911,7 +1911,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(pvdata.unwrap_or(std::ptr::null()))).ok() + CryptSetKeyIdentifierProperty(pkeyidentifier, dwpropid, dwflags, pwszcomputername.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptSetKeyParam(hkey: usize, dwparam: CRYPT_KEY_PARAM_ID, pbdata: *const u8, dwflags: u32) -> windows_core::Result<()> { @@ -1948,7 +1948,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(std::ptr::null())), dwflags).ok() + CryptSetProviderExA(pszprovname.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn CryptSetProviderExW(pszprovname: P0, dwprovtype: u32, pdwreserved: Option<*const u32>, dwflags: u32) -> windows_core::Result<()> @@ -1956,7 +1956,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(std::ptr::null())), dwflags).ok() + CryptSetProviderExW(pszprovname.param().abi(), dwprovtype, core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn CryptSetProviderW(pszprovname: P0, dwprovtype: u32) -> windows_core::Result<()> @@ -1973,12 +1973,12 @@ where P1: windows_core::Param, { 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.param().abi(), dwkeyspec, dwcertencodingtype, lpszstructtype.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() + CryptSignAndEncodeCertificate(hcryptprovorncryptkey.param().abi(), dwkeyspec, dwcertencodingtype, lpszstructtype.param().abi(), pvstructinfo, psignaturealgorithm, core::mem::transmute(pvhashauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbencoded.unwrap_or(core::ptr::null_mut())), pcbencoded).ok() } #[inline] pub unsafe fn CryptSignAndEncryptMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, pencryptpara: *const CRYPT_ENCRYPT_MESSAGE_PARA, rgprecipientcert: &[*const CERT_CONTEXT], pbtobesignedandencrypted: &[u8], pbsignedandencryptedblob: 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().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len().try_into().unwrap(), core::mem::transmute(pbsignedandencryptedblob.unwrap_or(std::ptr::null_mut())), pcbsignedandencryptedblob).ok() + CryptSignAndEncryptMessage(psignpara, pencryptpara, rgprecipientcert.len().try_into().unwrap(), core::mem::transmute(rgprecipientcert.as_ptr()), core::mem::transmute(pbtobesignedandencrypted.as_ptr()), pbtobesignedandencrypted.len().try_into().unwrap(), core::mem::transmute(pbsignedandencryptedblob.unwrap_or(core::ptr::null_mut())), pcbsignedandencryptedblob).ok() } #[inline] pub unsafe fn CryptSignCertificate(hcryptprovorncryptkey: P0, dwkeyspec: u32, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencodedtobesigned: &[u8], psignaturealgorithm: *const CRYPT_ALGORITHM_IDENTIFIER, pvhashauxinfo: Option<*const core::ffi::c_void>, pbsignature: Option<*mut u8>, pcbsignature: *mut u32) -> windows_core::Result<()> @@ -1986,7 +1986,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwkeyspec, dwcertencodingtype, core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), psignaturealgorithm, core::mem::transmute(pvhashauxinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbsignature.unwrap_or(std::ptr::null_mut())), pcbsignature).ok() + CryptSignCertificate(hcryptprovorncryptkey.param().abi(), dwkeyspec, dwcertencodingtype, core::mem::transmute(pbencodedtobesigned.as_ptr()), pbencodedtobesigned.len().try_into().unwrap(), psignaturealgorithm, core::mem::transmute(pvhashauxinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), pcbsignature).ok() } #[inline] pub unsafe fn CryptSignHashA(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -1994,7 +1994,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(std::ptr::null_mut())), pdwsiglen).ok() + CryptSignHashA(hhash, dwkeyspec, szdescription.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), pdwsiglen).ok() } #[inline] pub unsafe fn CryptSignHashW(hhash: usize, dwkeyspec: u32, szdescription: P0, dwflags: u32, pbsignature: Option<*mut u8>, pdwsiglen: *mut u32) -> windows_core::Result<()> @@ -2002,7 +2002,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(std::ptr::null_mut())), pdwsiglen).ok() + CryptSignHashW(hhash, dwkeyspec, szdescription.param().abi(), dwflags, core::mem::transmute(pbsignature.unwrap_or(core::ptr::null_mut())), pdwsiglen).ok() } #[inline] pub unsafe fn CryptSignMessage(psignpara: *const CRYPT_SIGN_MESSAGE_PARA, fdetachedsignature: P0, ctobesigned: u32, rgpbtobesigned: Option<*const *const u8>, rgcbtobesigned: *const u32, pbsignedblob: Option<*mut u8>, pcbsignedblob: *mut u32) -> windows_core::Result<()> @@ -2010,37 +2010,37 @@ where P0: windows_core::Param, { 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.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() + CryptSignMessage(psignpara, fdetachedsignature.param().abi(), ctobesigned, core::mem::transmute(rgpbtobesigned.unwrap_or(core::ptr::null())), rgcbtobesigned, core::mem::transmute(pbsignedblob.unwrap_or(core::ptr::null_mut())), pcbsignedblob).ok() } #[inline] pub unsafe fn CryptSignMessageWithKey(psignpara: *const CRYPT_KEY_SIGN_MESSAGE_PARA, pbtobesigned: &[u8], pbsignedblob: 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().try_into().unwrap(), core::mem::transmute(pbsignedblob.unwrap_or(std::ptr::null_mut())), pcbsignedblob).ok() + CryptSignMessageWithKey(psignpara, core::mem::transmute(pbtobesigned.as_ptr()), pbtobesigned.len().try_into().unwrap(), core::mem::transmute(pbsignedblob.unwrap_or(core::ptr::null_mut())), pcbsignedblob).ok() } #[inline] pub unsafe fn CryptStringToBinaryA(pszstring: &[u8], dwflags: CRYPT_STRING, pbbinary: Option<*mut u8>, pcbbinary: *mut u32, pdwskip: Option<*mut u32>, pdwflags: 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().try_into().unwrap(), 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() + CryptStringToBinaryA(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, core::mem::transmute(pbbinary.unwrap_or(core::ptr::null_mut())), pcbbinary, core::mem::transmute(pdwskip.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptStringToBinaryW(pszstring: &[u16], dwflags: CRYPT_STRING, pbbinary: Option<*mut u8>, pcbbinary: *mut u32, pdwskip: Option<*mut u32>, pdwflags: 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().try_into().unwrap(), 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() + CryptStringToBinaryW(core::mem::transmute(pszstring.as_ptr()), pszstring.len().try_into().unwrap(), dwflags, core::mem::transmute(pbbinary.unwrap_or(core::ptr::null_mut())), pcbbinary, core::mem::transmute(pdwskip.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptUninstallCancelRetrieval(dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL { windows_targets::link!("cryptnet.dll" "system" fn CryptUninstallCancelRetrieval(dwflags : u32, pvreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CryptUninstallCancelRetrieval(dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CryptUninstallCancelRetrieval(dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CryptUninstallDefaultContext(hdefaultcontext: Option<*const core::ffi::c_void>, dwflags: u32, pvreserved: 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()))).ok() + CryptUninstallDefaultContext(core::mem::transmute(hdefaultcontext.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CryptUnprotectData(pdatain: *const CRYPT_INTEGER_BLOB, ppszdatadescr: Option<*mut windows_core::PWSTR>, poptionalentropy: Option<*const CRYPT_INTEGER_BLOB>, pvreserved: Option<*const core::ffi::c_void>, ppromptstruct: 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).ok() + CryptUnprotectData(pdatain, core::mem::transmute(ppszdatadescr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poptionalentropy.unwrap_or(core::ptr::null())), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(ppromptstruct.unwrap_or(core::ptr::null())), dwflags, pdataout).ok() } #[inline] pub unsafe fn CryptUnprotectMemory(pdatain: *mut core::ffi::c_void, cbdatain: u32, dwflags: u32) -> windows_core::Result<()> { @@ -2077,7 +2077,7 @@ where P1: windows_core::Param, { windows_targets::link!("crypt32.dll" "system" fn CryptUpdateProtectedState(poldsid : super:: PSID, pwszoldpassword : windows_core::PCWSTR, dwflags : u32, pdwsuccesscount : *mut u32, pdwfailurecount : *mut u32) -> super::super::Foundation:: BOOL); - CryptUpdateProtectedState(poldsid.param().abi(), pwszoldpassword.param().abi(), dwflags, core::mem::transmute(pdwsuccesscount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwfailurecount.unwrap_or(std::ptr::null_mut()))).ok() + CryptUpdateProtectedState(poldsid.param().abi(), pwszoldpassword.param().abi(), dwflags, core::mem::transmute(pdwsuccesscount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwfailurecount.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifyCertificateSignature(hcryptprov: P0, dwcertencodingtype: CERT_QUERY_ENCODING_TYPE, pbencoded: &[u8], ppublickey: *const CERT_PUBLIC_KEY_INFO) -> windows_core::Result<()> @@ -2093,32 +2093,32 @@ where P0: windows_core::Param, { 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.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() + CryptVerifyCertificateSignatureEx(hcryptprov.param().abi(), dwcertencodingtype, dwsubjecttype, pvsubject, dwissuertype, core::mem::transmute(pvissuer.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(pvextra.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifyDetachedMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbdetachedhashblob: &[u8], ctobehashed: u32, rgpbtobehashed: *const *const u8, rgcbtobehashed: *const u32, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: 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().try_into().unwrap(), ctobehashed, rgpbtobehashed, rgcbtobehashed, core::mem::transmute(pbcomputedhash.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbcomputedhash.unwrap_or(std::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageHash(phashpara, core::mem::transmute(pbdetachedhashblob.as_ptr()), pbdetachedhashblob.len().try_into().unwrap(), ctobehashed, rgpbtobehashed, rgcbtobehashed, core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::ptr::null_mut()))).ok() } #[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: 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().try_into().unwrap(), ctobesigned, rgpbtobesigned, rgcbtobesigned, core::mem::transmute(ppsignercert.unwrap_or(std::ptr::null_mut()))).ok() + CryptVerifyDetachedMessageSignature(pverifypara, dwsignerindex, core::mem::transmute(pbdetachedsignblob.as_ptr()), pbdetachedsignblob.len().try_into().unwrap(), ctobesigned, rgpbtobesigned, rgcbtobesigned, core::mem::transmute(ppsignercert.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifyMessageHash(phashpara: *const CRYPT_HASH_MESSAGE_PARA, pbhashedblob: &[u8], pbtobehashed: Option<*mut u8>, pcbtobehashed: Option<*mut u32>, pbcomputedhash: Option<*mut u8>, pcbcomputedhash: 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().try_into().unwrap(), 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() + CryptVerifyMessageHash(phashpara, core::mem::transmute(pbhashedblob.as_ptr()), pbhashedblob.len().try_into().unwrap(), core::mem::transmute(pbtobehashed.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbtobehashed.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbcomputedhash.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbcomputedhash.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifyMessageSignature(pverifypara: *const CRYPT_VERIFY_MESSAGE_PARA, dwsignerindex: u32, pbsignedblob: &[u8], pbdecoded: Option<*mut u8>, pcbdecoded: Option<*mut u32>, ppsignercert: 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().try_into().unwrap(), 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() + CryptVerifyMessageSignature(pverifypara, dwsignerindex, core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), core::mem::transmute(pbdecoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdecoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsignercert.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifyMessageSignatureWithKey(pverifypara: *const CRYPT_KEY_VERIFY_MESSAGE_PARA, ppublickeyinfo: Option<*const CERT_PUBLIC_KEY_INFO>, pbsignedblob: &[u8], pbdecoded: Option<*mut u8>, pcbdecoded: 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().try_into().unwrap(), core::mem::transmute(pbdecoded.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbdecoded.unwrap_or(std::ptr::null_mut()))).ok() + CryptVerifyMessageSignatureWithKey(pverifypara, core::mem::transmute(ppublickeyinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbsignedblob.as_ptr()), pbsignedblob.len().try_into().unwrap(), core::mem::transmute(pbdecoded.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdecoded.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptVerifySignatureA(hhash: usize, pbsignature: &[u8], hpubkey: usize, szdescription: P0, dwflags: u32) -> windows_core::Result<()> @@ -2142,7 +2142,7 @@ where P0: windows_core::Param, { 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().try_into().unwrap(), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), hadditionalstore.param().abi(), pptscontext, pptssigner, core::mem::transmute(phstore.unwrap_or(std::ptr::null_mut()))).ok() + CryptVerifyTimeStampSignature(core::mem::transmute(pbtscontentinfo.as_ptr()), pbtscontentinfo.len().try_into().unwrap(), core::mem::transmute(pbdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), hadditionalstore.param().abi(), pptscontext, pptssigner, core::mem::transmute(phstore.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CryptXmlAddObject(hsignatureorobject: *const core::ffi::c_void, dwflags: u32, rgproperty: Option<&[CRYPT_XML_PROPERTY]>, pencoded: *const CRYPT_XML_BLOB) -> windows_core::Result<*mut CRYPT_XML_OBJECT> { @@ -2178,7 +2178,7 @@ pub unsafe fn CryptXmlEncode(hcryptxml: *const core::ffi::c_void, dwcharset: CRY #[inline] pub unsafe fn CryptXmlEnumAlgorithmInfo(dwgroupid: u32, dwflags: u32, pvarg: Option<*mut core::ffi::c_void>, pfnenumalginfo: PFN_CRYPT_XML_ENUM_ALG_INFO) -> windows_core::Result<()> { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlEnumAlgorithmInfo(dwgroupid : u32, dwflags : u32, pvarg : *mut core::ffi::c_void, pfnenumalginfo : PFN_CRYPT_XML_ENUM_ALG_INFO) -> windows_core::HRESULT); - CryptXmlEnumAlgorithmInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(std::ptr::null_mut())), pfnenumalginfo).ok() + CryptXmlEnumAlgorithmInfo(dwgroupid, dwflags, core::mem::transmute(pvarg.unwrap_or(core::ptr::null_mut())), pfnenumalginfo).ok() } #[inline] pub unsafe fn CryptXmlFindAlgorithmInfo(dwfindbytype: u32, pvfindby: *const core::ffi::c_void, dwgroupid: u32, dwflags: u32) -> *mut CRYPT_XML_ALGORITHM_INFO { @@ -2230,7 +2230,7 @@ pub unsafe fn CryptXmlImportPublicKey(dwflags: CRYPT_XML_FLAGS, pkeyvalue: *cons #[inline] pub unsafe fn CryptXmlOpenToDecode(pconfig: Option<*const CRYPT_XML_TRANSFORM_CHAIN_CONFIG>, dwflags: CRYPT_XML_FLAGS, rgproperty: Option<&[CRYPT_XML_PROPERTY]>, pencoded: *const CRYPT_XML_BLOB, phcryptxml: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlOpenToDecode(pconfig : *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags : CRYPT_XML_FLAGS, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pencoded : *const CRYPT_XML_BLOB, phcryptxml : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CryptXmlOpenToDecode(core::mem::transmute(pconfig.unwrap_or(std::ptr::null())), dwflags, core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencoded, phcryptxml).ok() + CryptXmlOpenToDecode(core::mem::transmute(pconfig.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pencoded, phcryptxml).ok() } #[inline] pub unsafe fn CryptXmlOpenToEncode(pconfig: Option<*const CRYPT_XML_TRANSFORM_CHAIN_CONFIG>, dwflags: CRYPT_XML_FLAGS, wszid: P0, rgproperty: Option<&[CRYPT_XML_PROPERTY]>, pencoded: Option<*const CRYPT_XML_BLOB>, phsignature: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -2238,7 +2238,7 @@ where P0: windows_core::Param, { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlOpenToEncode(pconfig : *const CRYPT_XML_TRANSFORM_CHAIN_CONFIG, dwflags : CRYPT_XML_FLAGS, wszid : windows_core::PCWSTR, rgproperty : *const CRYPT_XML_PROPERTY, cproperty : u32, pencoded : *const CRYPT_XML_BLOB, phsignature : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CryptXmlOpenToEncode(core::mem::transmute(pconfig.unwrap_or(std::ptr::null())), dwflags, wszid.param().abi(), core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pencoded.unwrap_or(std::ptr::null())), phsignature).ok() + CryptXmlOpenToEncode(core::mem::transmute(pconfig.unwrap_or(core::ptr::null())), dwflags, wszid.param().abi(), core::mem::transmute(rgproperty.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgproperty.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pencoded.unwrap_or(core::ptr::null())), phsignature).ok() } #[inline] pub unsafe fn CryptXmlSetHMACSecret(hsignature: *const core::ffi::c_void, pbsecret: &[u8]) -> windows_core::Result<()> { @@ -2251,7 +2251,7 @@ where P0: windows_core::Param, { windows_targets::link!("cryptxml.dll" "system" fn CryptXmlSign(hsignature : *const core::ffi::c_void, hkey : HCRYPTPROV_OR_NCRYPT_KEY_HANDLE, dwkeyspec : CERT_KEY_SPEC, dwflags : CRYPT_XML_FLAGS, dwkeyinfospec : CRYPT_XML_KEYINFO_SPEC, pvkeyinfospec : *const core::ffi::c_void, psignaturemethod : *const CRYPT_XML_ALGORITHM, pcanonicalization : *const CRYPT_XML_ALGORITHM) -> windows_core::HRESULT); - CryptXmlSign(hsignature, hkey.param().abi(), dwkeyspec, dwflags, dwkeyinfospec, core::mem::transmute(pvkeyinfospec.unwrap_or(std::ptr::null())), psignaturemethod, pcanonicalization).ok() + CryptXmlSign(hsignature, hkey.param().abi(), dwkeyspec, dwflags, dwkeyinfospec, core::mem::transmute(pvkeyinfospec.unwrap_or(core::ptr::null())), psignaturemethod, pcanonicalization).ok() } #[inline] pub unsafe fn CryptXmlVerifySignature(hsignature: *const core::ffi::c_void, hkey: P0, dwflags: CRYPT_XML_FLAGS) -> windows_core::Result<()> @@ -2283,7 +2283,7 @@ where P0: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn FindCertsByIssuer(pcertchains : *mut CERT_CHAIN, pcbcertchains : *mut u32, pccertchains : *mut u32, pbencodedissuername : *const u8, cbencodedissuername : u32, pwszpurpose : windows_core::PCWSTR, dwkeyspec : u32) -> windows_core::HRESULT); - FindCertsByIssuer(core::mem::transmute(pcertchains.unwrap_or(std::ptr::null_mut())), pcbcertchains, pccertchains, core::mem::transmute(pbencodedissuername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbencodedissuername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pwszpurpose.param().abi(), dwkeyspec).ok() + FindCertsByIssuer(core::mem::transmute(pcertchains.unwrap_or(core::ptr::null_mut())), pcbcertchains, pccertchains, core::mem::transmute(pbencodedissuername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbencodedissuername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pwszpurpose.param().abi(), dwkeyspec).ok() } #[inline] pub unsafe fn FreeToken(pallocmemory: *const GENERIC_XML_TOKEN) -> super::super::Foundation::BOOL { @@ -2301,7 +2301,7 @@ where #[inline] pub unsafe fn GetBrowserToken(dwparamtype: u32, pparam: *const core::ffi::c_void, pcbtoken: Option<*mut u32>, pptoken: Option<*mut *mut u8>) -> windows_core::Result<()> { windows_targets::link!("infocardapi.dll" "system" fn GetBrowserToken(dwparamtype : u32, pparam : *const core::ffi::c_void, pcbtoken : *mut u32, pptoken : *mut *mut u8) -> windows_core::HRESULT); - GetBrowserToken(dwparamtype, pparam, core::mem::transmute(pcbtoken.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptoken.unwrap_or(std::ptr::null_mut()))).ok() + GetBrowserToken(dwparamtype, pparam, core::mem::transmute(pcbtoken.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptoken.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetCryptoTransform(hsymmetriccrypto: *const INFORMATIONCARD_CRYPTO_HANDLE, mode: u32, padding: PaddingMode, feedbacksize: u32, direction: Direction, piv: &[u8]) -> windows_core::Result<*mut INFORMATIONCARD_CRYPTO_HANDLE> { @@ -2374,7 +2374,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptCreateClaim(hsubjectkey : NCRYPT_KEY_HANDLE, hauthoritykey : NCRYPT_KEY_HANDLE, dwclaimtype : u32, pparameterlist : *const BCryptBufferDesc, pbclaimblob : *mut u8, cbclaimblob : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - NCryptCreateClaim(hsubjectkey.param().abi(), hauthoritykey.param().abi(), dwclaimtype, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbclaimblob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbclaimblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptCreateClaim(hsubjectkey.param().abi(), hauthoritykey.param().abi(), dwclaimtype, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbclaimblob.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbclaimblob.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptCreatePersistedKey(hprovider: P0, phkey: *mut NCRYPT_KEY_HANDLE, pszalgid: P1, pszkeyname: P2, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2401,7 +2401,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptDecrypt(hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const core::ffi::c_void, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptDecrypt(hkey.param().abi(), core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptDecrypt(hkey.param().abi(), core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptDeleteKey(hkey: P0, dwflags: u32) -> windows_core::Result<()> @@ -2418,7 +2418,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptDeriveKey(hsharedsecret : NCRYPT_SECRET_HANDLE, pwszkdf : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - NCryptDeriveKey(hsharedsecret.param().abi(), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptDeriveKey(hsharedsecret.param().abi(), pwszkdf.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbderivedkey.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbderivedkey.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptEncrypt(hkey: P0, pbinput: Option<&[u8]>, ppaddinginfo: Option<*const core::ffi::c_void>, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2426,7 +2426,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptEncrypt(hkey : NCRYPT_KEY_HANDLE, pbinput : *const u8, cbinput : u32, ppaddinginfo : *const core::ffi::c_void, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptEncrypt(hkey.param().abi(), core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptEncrypt(hkey.param().abi(), core::mem::transmute(pbinput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbinput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptEnumAlgorithms(hprovider: P0, dwalgoperations: NCRYPT_OPERATION, pdwalgcount: *mut u32, ppalglist: *mut *mut NCryptAlgorithmName, dwflags: u32) -> windows_core::Result<()> @@ -2458,7 +2458,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptExportKey(hkey : NCRYPT_KEY_HANDLE, hexportkey : NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, pboutput : *mut u8, cboutput : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptExportKey(hkey.param().abi(), hexportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptExportKey(hkey.param().abi(), hexportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pboutput.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pboutput.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptFinalizeKey(hkey: P0, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2496,7 +2496,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptGetProtectionDescriptorInfo(hdescriptor : super:: NCRYPT_DESCRIPTOR_HANDLE, pmempara : *const NCRYPT_ALLOC_PARA, dwinfotype : u32, ppvinfo : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - NCryptGetProtectionDescriptorInfo(hdescriptor.param().abi(), core::mem::transmute(pmempara.unwrap_or(std::ptr::null())), dwinfotype, ppvinfo).ok() + NCryptGetProtectionDescriptorInfo(hdescriptor.param().abi(), core::mem::transmute(pmempara.unwrap_or(core::ptr::null())), dwinfotype, ppvinfo).ok() } #[inline] pub unsafe fn NCryptImportKey(hprovider: P0, himportkey: P1, pszblobtype: P2, pparameterlist: Option<*const BCryptBufferDesc>, phkey: *mut NCRYPT_KEY_HANDLE, pbdata: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2506,7 +2506,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptImportKey(hprovider : NCRYPT_PROV_HANDLE, himportkey : NCRYPT_KEY_HANDLE, pszblobtype : windows_core::PCWSTR, pparameterlist : *const BCryptBufferDesc, phkey : *mut NCRYPT_KEY_HANDLE, pbdata : *const u8, cbdata : u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptImportKey(hprovider.param().abi(), himportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), phkey, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), dwflags).ok() + NCryptImportKey(hprovider.param().abi(), himportkey.param().abi(), pszblobtype.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), phkey, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), dwflags).ok() } #[inline] pub unsafe fn NCryptIsAlgSupported(hprovider: P0, pszalgid: P1, dwflags: u32) -> windows_core::Result<()> @@ -2531,7 +2531,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptKeyDerivation(hkey : NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, pbderivedkey : *mut u8, cbderivedkey : u32, pcbresult : *mut u32, dwflags : u32) -> windows_core::HRESULT); - NCryptKeyDerivation(hkey.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags).ok() + NCryptKeyDerivation(hkey.param().abi(), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbderivedkey.as_ptr()), pbderivedkey.len().try_into().unwrap(), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptNotifyChangeKey(hprovider: P0, phevent: *mut super::super::Foundation::HANDLE, dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2565,7 +2565,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptProtectSecret(hdescriptor : super:: NCRYPT_DESCRIPTOR_HANDLE, dwflags : u32, pbdata : *const u8, cbdata : u32, pmempara : *const NCRYPT_ALLOC_PARA, hwnd : super::super::Foundation:: HWND, ppbprotectedblob : *mut *mut u8, pcbprotectedblob : *mut u32) -> windows_core::HRESULT); - NCryptProtectSecret(hdescriptor.param().abi(), dwflags, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(std::ptr::null())), hwnd.param().abi(), ppbprotectedblob, pcbprotectedblob).ok() + NCryptProtectSecret(hdescriptor.param().abi(), dwflags, core::mem::transmute(pbdata.as_ptr()), pbdata.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::ptr::null())), hwnd.param().abi(), ppbprotectedblob, pcbprotectedblob).ok() } #[inline] pub unsafe fn NCryptQueryProtectionDescriptorName(pwszname: P0, pwszdescriptorstring: windows_core::PWSTR, pcdescriptorstring: *mut usize, dwflags: u32) -> windows_core::Result<()> @@ -2608,7 +2608,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptSignHash(hkey : NCRYPT_KEY_HANDLE, ppaddinginfo : *const core::ffi::c_void, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *mut u8, cbsignature : u32, pcbresult : *mut u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptSignHash(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsignature.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() + NCryptSignHash(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbsignature.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, dwflags).ok() } #[inline] pub unsafe fn NCryptStreamClose(hstream: P0) -> windows_core::Result<()> @@ -2658,7 +2658,7 @@ where #[inline] pub unsafe fn NCryptTranslateHandle(phprovider: Option<*mut NCRYPT_PROV_HANDLE>, phkey: *mut NCRYPT_KEY_HANDLE, hlegacyprov: usize, hlegacykey: usize, dwlegacykeyspec: CERT_KEY_SPEC, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("ncrypt.dll" "system" fn NCryptTranslateHandle(phprovider : *mut NCRYPT_PROV_HANDLE, phkey : *mut NCRYPT_KEY_HANDLE, hlegacyprov : usize, hlegacykey : usize, dwlegacykeyspec : CERT_KEY_SPEC, dwflags : u32) -> windows_core::HRESULT); - NCryptTranslateHandle(core::mem::transmute(phprovider.unwrap_or(std::ptr::null_mut())), phkey, hlegacyprov, hlegacykey, dwlegacykeyspec, dwflags).ok() + NCryptTranslateHandle(core::mem::transmute(phprovider.unwrap_or(core::ptr::null_mut())), phkey, hlegacyprov, hlegacykey, dwlegacykeyspec, dwflags).ok() } #[inline] pub unsafe fn NCryptUnprotectSecret(phdescriptor: Option<*mut super::NCRYPT_DESCRIPTOR_HANDLE>, dwflags: NCRYPT_FLAGS, pbprotectedblob: &[u8], pmempara: Option<*const NCRYPT_ALLOC_PARA>, hwnd: P0, ppbdata: *mut *mut u8, pcbdata: *mut u32) -> windows_core::Result<()> @@ -2666,7 +2666,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptUnprotectSecret(phdescriptor : *mut super:: NCRYPT_DESCRIPTOR_HANDLE, dwflags : NCRYPT_FLAGS, pbprotectedblob : *const u8, cbprotectedblob : u32, pmempara : *const NCRYPT_ALLOC_PARA, hwnd : super::super::Foundation:: HWND, ppbdata : *mut *mut u8, pcbdata : *mut u32) -> windows_core::HRESULT); - NCryptUnprotectSecret(core::mem::transmute(phdescriptor.unwrap_or(std::ptr::null_mut())), dwflags, core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(std::ptr::null())), hwnd.param().abi(), ppbdata, pcbdata).ok() + NCryptUnprotectSecret(core::mem::transmute(phdescriptor.unwrap_or(core::ptr::null_mut())), dwflags, core::mem::transmute(pbprotectedblob.as_ptr()), pbprotectedblob.len().try_into().unwrap(), core::mem::transmute(pmempara.unwrap_or(core::ptr::null())), hwnd.param().abi(), ppbdata, pcbdata).ok() } #[inline] pub unsafe fn NCryptVerifyClaim(hsubjectkey: P0, hauthoritykey: P1, dwclaimtype: u32, pparameterlist: Option<*const BCryptBufferDesc>, pbclaimblob: &[u8], poutput: *mut BCryptBufferDesc, dwflags: u32) -> windows_core::Result<()> @@ -2675,7 +2675,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptVerifyClaim(hsubjectkey : NCRYPT_KEY_HANDLE, hauthoritykey : NCRYPT_KEY_HANDLE, dwclaimtype : u32, pparameterlist : *const BCryptBufferDesc, pbclaimblob : *const u8, cbclaimblob : u32, poutput : *mut BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - NCryptVerifyClaim(hsubjectkey.param().abi(), hauthoritykey.param().abi(), dwclaimtype, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), poutput, dwflags).ok() + NCryptVerifyClaim(hsubjectkey.param().abi(), hauthoritykey.param().abi(), dwclaimtype, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), core::mem::transmute(pbclaimblob.as_ptr()), pbclaimblob.len().try_into().unwrap(), poutput, dwflags).ok() } #[inline] pub unsafe fn NCryptVerifySignature(hkey: P0, ppaddinginfo: Option<*const core::ffi::c_void>, pbhashvalue: &[u8], pbsignature: &[u8], dwflags: NCRYPT_FLAGS) -> windows_core::Result<()> @@ -2683,7 +2683,7 @@ where P0: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn NCryptVerifySignature(hkey : NCRYPT_KEY_HANDLE, ppaddinginfo : *const core::ffi::c_void, pbhashvalue : *const u8, cbhashvalue : u32, pbsignature : *const u8, cbsignature : u32, dwflags : NCRYPT_FLAGS) -> windows_core::HRESULT); - NCryptVerifySignature(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(std::ptr::null())), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags).ok() + NCryptVerifySignature(hkey.param().abi(), core::mem::transmute(ppaddinginfo.unwrap_or(core::ptr::null())), core::mem::transmute(pbhashvalue.as_ptr()), pbhashvalue.len().try_into().unwrap(), core::mem::transmute(pbsignature.as_ptr()), pbsignature.len().try_into().unwrap(), dwflags).ok() } #[inline] pub unsafe fn PFXExportCertStore(hstore: P0, ppfx: *mut CRYPT_INTEGER_BLOB, szpassword: P1, dwflags: u32) -> windows_core::Result<()> @@ -2754,7 +2754,7 @@ where P0: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerSign(psubjectinfo : *const SIGNER_SUBJECT_INFO, psignercert : *const SIGNER_CERT, psignatureinfo : *const SIGNER_SIGNATURE_INFO, pproviderinfo : *const SIGNER_PROVIDER_INFO, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void) -> windows_core::HRESULT); - SignerSign(psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(std::ptr::null())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), core::mem::transmute(psipdata.unwrap_or(std::ptr::null()))).ok() + SignerSign(psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SignerSignEx(dwflags: SIGNER_SIGN_FLAGS, psubjectinfo: *const SIGNER_SUBJECT_INFO, psignercert: *const SIGNER_CERT, psignatureinfo: *const SIGNER_SIGNATURE_INFO, pproviderinfo: Option<*const SIGNER_PROVIDER_INFO>, pwszhttptimestamp: P0, psrequest: Option<*const CRYPT_ATTRIBUTES>, psipdata: Option<*const core::ffi::c_void>) -> windows_core::Result<*mut SIGNER_CONTEXT> @@ -2763,7 +2763,7 @@ where { windows_targets::link!("mssign32.dll" "system" fn SignerSignEx(dwflags : SIGNER_SIGN_FLAGS, psubjectinfo : *const SIGNER_SUBJECT_INFO, psignercert : *const SIGNER_CERT, psignatureinfo : *const SIGNER_SIGNATURE_INFO, pproviderinfo : *const SIGNER_PROVIDER_INFO, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SignerSignEx(dwflags, psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(std::ptr::null())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), core::mem::transmute(psipdata.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + SignerSignEx(dwflags, psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn SignerSignEx2(dwflags: SIGNER_SIGN_FLAGS, psubjectinfo: *const SIGNER_SUBJECT_INFO, psignercert: *const SIGNER_CERT, psignatureinfo: *const SIGNER_SIGNATURE_INFO, pproviderinfo: Option<*const SIGNER_PROVIDER_INFO>, dwtimestampflags: SIGNER_TIMESTAMP_FLAGS, psztimestampalgorithmoid: P0, pwszhttptimestamp: P1, psrequest: Option<*const CRYPT_ATTRIBUTES>, psipdata: Option<*const core::ffi::c_void>, ppsignercontext: *mut *mut SIGNER_CONTEXT, pcryptopolicy: Option<*const CERT_STRONG_SIGN_PARA>, preserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2772,7 +2772,7 @@ where P1: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerSignEx2(dwflags : SIGNER_SIGN_FLAGS, psubjectinfo : *const SIGNER_SUBJECT_INFO, psignercert : *const SIGNER_CERT, psignatureinfo : *const SIGNER_SIGNATURE_INFO, pproviderinfo : *const SIGNER_PROVIDER_INFO, dwtimestampflags : SIGNER_TIMESTAMP_FLAGS, psztimestampalgorithmoid : windows_core::PCSTR, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT, pcryptopolicy : *const CERT_STRONG_SIGN_PARA, preserved : *const core::ffi::c_void) -> windows_core::HRESULT); - SignerSignEx2(dwflags, psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(std::ptr::null())), dwtimestampflags, psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), core::mem::transmute(psipdata.unwrap_or(std::ptr::null())), ppsignercontext, core::mem::transmute(pcryptopolicy.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))).ok() + SignerSignEx2(dwflags, psubjectinfo, psignercert, psignatureinfo, core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), dwtimestampflags, psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), ppsignercontext, core::mem::transmute(pcryptopolicy.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SignerSignEx3(dwflags: SIGNER_SIGN_FLAGS, psubjectinfo: *const SIGNER_SUBJECT_INFO, psignercert: *const SIGNER_CERT, psignatureinfo: *const SIGNER_SIGNATURE_INFO, pproviderinfo: Option<*const SIGNER_PROVIDER_INFO>, dwtimestampflags: SIGNER_TIMESTAMP_FLAGS, psztimestampalgorithmoid: P0, pwszhttptimestamp: P1, psrequest: Option<*const CRYPT_ATTRIBUTES>, psipdata: Option<*const core::ffi::c_void>, ppsignercontext: *mut *mut SIGNER_CONTEXT, pcryptopolicy: Option<*const CERT_STRONG_SIGN_PARA>, pdigestsigninfo: Option<*const SIGNER_DIGEST_SIGN_INFO>, preserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2786,16 +2786,16 @@ where psubjectinfo, psignercert, psignatureinfo, - core::mem::transmute(pproviderinfo.unwrap_or(std::ptr::null())), + core::mem::transmute(pproviderinfo.unwrap_or(core::ptr::null())), dwtimestampflags, psztimestampalgorithmoid.param().abi(), pwszhttptimestamp.param().abi(), - core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), - core::mem::transmute(psipdata.unwrap_or(std::ptr::null())), + core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), + core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), ppsignercontext, - core::mem::transmute(pcryptopolicy.unwrap_or(std::ptr::null())), - core::mem::transmute(pdigestsigninfo.unwrap_or(std::ptr::null())), - core::mem::transmute(preserved.unwrap_or(std::ptr::null())), + core::mem::transmute(pcryptopolicy.unwrap_or(core::ptr::null())), + core::mem::transmute(pdigestsigninfo.unwrap_or(core::ptr::null())), + core::mem::transmute(preserved.unwrap_or(core::ptr::null())), ) .ok() } @@ -2805,7 +2805,7 @@ where P0: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerTimeStamp(psubjectinfo : *const SIGNER_SUBJECT_INFO, pwszhttptimestamp : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void) -> windows_core::HRESULT); - SignerTimeStamp(psubjectinfo, pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), core::mem::transmute(psipdata.unwrap_or(std::ptr::null()))).ok() + SignerTimeStamp(psubjectinfo, pwszhttptimestamp.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SignerTimeStampEx(dwflags: u32, psubjectinfo: *const SIGNER_SUBJECT_INFO, pwszhttptimestamp: P0, psrequest: *const CRYPT_ATTRIBUTES, psipdata: *const core::ffi::c_void) -> windows_core::Result<*mut SIGNER_CONTEXT> @@ -2832,7 +2832,7 @@ where P1: windows_core::Param, { windows_targets::link!("mssign32.dll" "system" fn SignerTimeStampEx3(dwflags : SIGNER_TIMESTAMP_FLAGS, dwindex : u32, psubjectinfo : *const SIGNER_SUBJECT_INFO, pwszhttptimestamp : windows_core::PCWSTR, pszalgorithmoid : windows_core::PCWSTR, psrequest : *const CRYPT_ATTRIBUTES, psipdata : *const core::ffi::c_void, ppsignercontext : *mut *mut SIGNER_CONTEXT, pcryptopolicy : *const CERT_STRONG_SIGN_PARA, preserved : *const core::ffi::c_void) -> windows_core::HRESULT); - SignerTimeStampEx3(dwflags, dwindex, psubjectinfo, pwszhttptimestamp.param().abi(), pszalgorithmoid.param().abi(), core::mem::transmute(psrequest.unwrap_or(std::ptr::null())), core::mem::transmute(psipdata.unwrap_or(std::ptr::null())), ppsignercontext, core::mem::transmute(pcryptopolicy.unwrap_or(std::ptr::null())), core::mem::transmute(preserved.unwrap_or(std::ptr::null()))).ok() + SignerTimeStampEx3(dwflags, dwindex, psubjectinfo, pwszhttptimestamp.param().abi(), pszalgorithmoid.param().abi(), core::mem::transmute(psrequest.unwrap_or(core::ptr::null())), core::mem::transmute(psipdata.unwrap_or(core::ptr::null())), ppsignercontext, core::mem::transmute(pcryptopolicy.unwrap_or(core::ptr::null())), core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SslChangeNotify(hevent: P0, dwflags: u32) -> windows_core::Result<()> @@ -2979,7 +2979,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandBinderKey(hsslprovider : NCRYPT_PROV_HANDLE, hearlykey : NCRYPT_KEY_HANDLE, phbinderkey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandBinderKey(hsslprovider.param().abi(), hearlykey.param().abi(), phbinderkey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandBinderKey(hsslprovider.param().abi(), hearlykey.param().abi(), phbinderkey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExpandExporterMasterKey(hsslprovider: P0, hbasekey: P1, hhashvalue: P2, phexportermasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -2989,7 +2989,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandExporterMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hbasekey : NCRYPT_KEY_HANDLE, hhashvalue : NCRYPT_HASH_HANDLE, phexportermasterkey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandExporterMasterKey(hsslprovider.param().abi(), hbasekey.param().abi(), hhashvalue.param().abi(), phexportermasterkey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandExporterMasterKey(hsslprovider.param().abi(), hbasekey.param().abi(), hhashvalue.param().abi(), phexportermasterkey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExpandPreSharedKey(hsslprovider: P0, hresumptionmasterkey: P1, pbticketnonce: Option<&[u8]>, phpresharedkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -2998,7 +2998,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandPreSharedKey(hsslprovider : NCRYPT_PROV_HANDLE, hresumptionmasterkey : NCRYPT_KEY_HANDLE, pbticketnonce : *const u8, cbticketnonce : u32, phpresharedkey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandPreSharedKey(hsslprovider.param().abi(), hresumptionmasterkey.param().abi(), core::mem::transmute(pbticketnonce.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbticketnonce.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), phpresharedkey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandPreSharedKey(hsslprovider.param().abi(), hresumptionmasterkey.param().abi(), core::mem::transmute(pbticketnonce.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbticketnonce.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), phpresharedkey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExpandResumptionMasterKey(hsslprovider: P0, hmasterkey: P1, hhashvalue: P2, phresumptionmasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -3008,7 +3008,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandResumptionMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hmasterkey : NCRYPT_KEY_HANDLE, hhashvalue : NCRYPT_HASH_HANDLE, phresumptionmasterkey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandResumptionMasterKey(hsslprovider.param().abi(), hmasterkey.param().abi(), hhashvalue.param().abi(), phresumptionmasterkey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandResumptionMasterKey(hsslprovider.param().abi(), hmasterkey.param().abi(), hhashvalue.param().abi(), phresumptionmasterkey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExpandTrafficKeys(hsslprovider: P0, hbasekey: P1, hhashvalue: P2, phclienttraffickey: Option<*mut NCRYPT_KEY_HANDLE>, phservertraffickey: Option<*mut NCRYPT_KEY_HANDLE>, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -3018,7 +3018,7 @@ where P2: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandTrafficKeys(hsslprovider : NCRYPT_PROV_HANDLE, hbasekey : NCRYPT_KEY_HANDLE, hhashvalue : NCRYPT_HASH_HANDLE, phclienttraffickey : *mut NCRYPT_KEY_HANDLE, phservertraffickey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandTrafficKeys(hsslprovider.param().abi(), hbasekey.param().abi(), hhashvalue.param().abi(), core::mem::transmute(phclienttraffickey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phservertraffickey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandTrafficKeys(hsslprovider.param().abi(), hbasekey.param().abi(), hhashvalue.param().abi(), core::mem::transmute(phclienttraffickey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phservertraffickey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExpandWriteKey(hsslprovider: P0, hbasetraffickey: P1, phwritekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -3027,7 +3027,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExpandWriteKey(hsslprovider : NCRYPT_PROV_HANDLE, hbasetraffickey : NCRYPT_KEY_HANDLE, phwritekey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExpandWriteKey(hsslprovider.param().abi(), hbasetraffickey.param().abi(), phwritekey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExpandWriteKey(hsslprovider.param().abi(), hbasetraffickey.param().abi(), phwritekey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExportKey(hsslprovider: P0, hkey: P1, pszblobtype: P2, pboutput: Option<&mut [u8]>, pcbresult: *mut u32, dwflags: u32) -> windows_core::Result<()> @@ -3068,7 +3068,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExtractEarlyKey(hsslprovider : NCRYPT_PROV_HANDLE, hpresharedkey : NCRYPT_KEY_HANDLE, phearlykey : *mut NCRYPT_KEY_HANDLE, dwprotocol : u32, dwciphersuite : u32, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExtractEarlyKey(hsslprovider.param().abi(), hpresharedkey.param().abi(), phearlykey, dwprotocol, dwciphersuite, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExtractEarlyKey(hsslprovider.param().abi(), hpresharedkey.param().abi(), phearlykey, dwprotocol, dwciphersuite, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExtractHandshakeKey(hsslprovider: P0, hprivatekey: P1, hpublickey: P2, hearlykey: P3, phhandshakekey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -3079,7 +3079,7 @@ where P3: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExtractHandshakeKey(hsslprovider : NCRYPT_PROV_HANDLE, hprivatekey : NCRYPT_KEY_HANDLE, hpublickey : NCRYPT_KEY_HANDLE, hearlykey : NCRYPT_KEY_HANDLE, phhandshakekey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExtractHandshakeKey(hsslprovider.param().abi(), hprivatekey.param().abi(), hpublickey.param().abi(), hearlykey.param().abi(), phhandshakekey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExtractHandshakeKey(hsslprovider.param().abi(), hprivatekey.param().abi(), hpublickey.param().abi(), hearlykey.param().abi(), phhandshakekey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslExtractMasterKey(hsslprovider: P0, hhandshakekey: P1, phmasterkey: *mut NCRYPT_KEY_HANDLE, pparameterlist: Option<*const BCryptBufferDesc>, dwflags: u32) -> windows_core::Result<()> @@ -3088,7 +3088,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslExtractMasterKey(hsslprovider : NCRYPT_PROV_HANDLE, hhandshakekey : NCRYPT_KEY_HANDLE, phmasterkey : *mut NCRYPT_KEY_HANDLE, pparameterlist : *const BCryptBufferDesc, dwflags : u32) -> windows_core::HRESULT); - SslExtractMasterKey(hsslprovider.param().abi(), hhandshakekey.param().abi(), phmasterkey, core::mem::transmute(pparameterlist.unwrap_or(std::ptr::null())), dwflags).ok() + SslExtractMasterKey(hsslprovider.param().abi(), hhandshakekey.param().abi(), phmasterkey, core::mem::transmute(pparameterlist.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn SslFreeBuffer(pvinput: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -3155,7 +3155,7 @@ where P1: windows_core::Param, { windows_targets::link!("ncrypt.dll" "system" fn SslGetProviderProperty(hsslprovider : NCRYPT_PROV_HANDLE, pszproperty : windows_core::PCWSTR, ppboutput : *mut *mut u8, pcboutput : *mut u32, ppenumstate : *mut *mut core::ffi::c_void, dwflags : u32) -> windows_core::HRESULT); - SslGetProviderProperty(hsslprovider.param().abi(), pszproperty.param().abi(), ppboutput, pcboutput, core::mem::transmute(ppenumstate.unwrap_or(std::ptr::null_mut())), dwflags).ok() + SslGetProviderProperty(hsslprovider.param().abi(), pszproperty.param().abi(), ppboutput, pcboutput, core::mem::transmute(ppenumstate.unwrap_or(core::ptr::null_mut())), dwflags).ok() } #[inline] pub unsafe fn SslHashHandshake(hsslprovider: P0, hhandshakehash: P1, pbinput: &[u8], dwflags: u32) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs index 3845f51ee5..8fefbff6c0 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/DiagnosticDataQuery/mod.rs @@ -288,7 +288,7 @@ where { windows_targets::link!("diagnosticdataquery.dll" "system" fn DdqIsDiagnosticRecordSampledIn(hsession : HDIAGNOSTIC_DATA_QUERY_SESSION, providergroup : *const windows_core::GUID, providerid : *const windows_core::GUID, providername : windows_core::PCWSTR, eventid : *const u32, eventname : windows_core::PCWSTR, eventversion : *const u32, eventkeywords : *const u64, issampledin : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DdqIsDiagnosticRecordSampledIn(hsession.param().abi(), providergroup, core::mem::transmute(providerid.unwrap_or(std::ptr::null())), providername.param().abi(), core::mem::transmute(eventid.unwrap_or(std::ptr::null())), eventname.param().abi(), core::mem::transmute(eventversion.unwrap_or(std::ptr::null())), core::mem::transmute(eventkeywords.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + DdqIsDiagnosticRecordSampledIn(hsession.param().abi(), providergroup, core::mem::transmute(providerid.unwrap_or(core::ptr::null())), providername.param().abi(), core::mem::transmute(eventid.unwrap_or(core::ptr::null())), eventname.param().abi(), core::mem::transmute(eventversion.unwrap_or(core::ptr::null())), core::mem::transmute(eventkeywords.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn DdqSetTranscriptConfiguration(hsession: P0, desiredconfig: *const DIAGNOSTIC_DATA_EVENT_TRANSCRIPT_CONFIGURATION) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs index c0ece0d5ae..a5abfd39cf 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/EnterpriseData/mod.rs @@ -47,7 +47,7 @@ where P0: windows_core::Param, { windows_targets::link!("srpapi.dll" "system" fn SrpGetEnterpriseIds(tokenhandle : super::super::Foundation:: HANDLE, numberofbytes : *mut u32, enterpriseids : *mut windows_core::PCWSTR, enterpriseidcount : *mut u32) -> windows_core::HRESULT); - SrpGetEnterpriseIds(tokenhandle.param().abi(), core::mem::transmute(numberofbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(enterpriseids.unwrap_or(std::ptr::null_mut())), enterpriseidcount).ok() + SrpGetEnterpriseIds(tokenhandle.param().abi(), core::mem::transmute(numberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(enterpriseids.unwrap_or(core::ptr::null_mut())), enterpriseidcount).ok() } #[inline] pub unsafe fn SrpGetEnterprisePolicy(tokenhandle: P0) -> windows_core::Result @@ -91,7 +91,7 @@ where P0: windows_core::Param, { windows_targets::link!("efswrt.dll" "system" fn UnprotectFile(fileorfolderpath : windows_core::PCWSTR, options : *const FILE_UNPROTECT_OPTIONS) -> windows_core::HRESULT); - UnprotectFile(fileorfolderpath.param().abi(), core::mem::transmute(options.unwrap_or(std::ptr::null()))).ok() + UnprotectFile(fileorfolderpath.param().abi(), core::mem::transmute(options.unwrap_or(core::ptr::null()))).ok() } windows_core::imp::define_interface!(IProtectionPolicyManagerInterop, IProtectionPolicyManagerInterop_Vtbl, 0x4652651d_c1fe_4ba1_9f0a_c0f56596f721); impl core::ops::Deref for IProtectionPolicyManagerInterop { 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 680440e4e6..c0d07c952f 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/WinTrust/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("wintrust.dll" "system" fn OpenPersonalTrustDBDialogEx(hwndparent : super::super::Foundation:: HWND, dwflags : u32, pvreserved : *mut *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - OpenPersonalTrustDBDialogEx(hwndparent.param().abi(), dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null_mut()))) + OpenPersonalTrustDBDialogEx(hwndparent.param().abi(), dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Security_Cryptography_Catalog", feature = "Win32_Security_Cryptography_Sip"))] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Security/mod.rs b/crates/libs/windows/src/Windows/Win32/Security/mod.rs index 0e29b176a3..8b1574b3db 100644 --- a/crates/libs/windows/src/Windows/Win32/Security/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Security/mod.rs @@ -37,7 +37,7 @@ where P1: windows_core::Param, { 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheck(psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, genericmapping, core::mem::transmute(privilegeset.unwrap_or(std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() + AccessCheck(psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, genericmapping, core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() } #[inline] pub unsafe fn AccessCheckAndAuditAlarmA(subsystemname: P0, handleid: 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 super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -49,7 +49,7 @@ where P4: windows_core::Param, { 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 super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, pfgenerateonclose).ok() + AccessCheckAndAuditAlarmA(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, pfgenerateonclose).ok() } #[inline] pub unsafe fn AccessCheckAndAuditAlarmW(subsystemname: P0, handleid: 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 super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -61,7 +61,7 @@ where P4: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckAndAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, desiredaccess : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccess : *mut u32, accessstatus : *mut super::Foundation:: BOOL, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(std::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, pfgenerateonclose) + AccessCheckAndAuditAlarmW(subsystemname.param().abi(), core::mem::transmute(handleid.unwrap_or(core::ptr::null())), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), desiredaccess, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatus, pfgenerateonclose) } #[inline] pub unsafe fn AccessCheckByType(psecuritydescriptor: P0, principalselfsid: P1, clienttoken: P2, desiredaccess: u32, objecttypelist: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, privilegeset: Option<*mut PRIVILEGE_SET>, privilegesetlength: *mut u32, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -71,7 +71,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByType(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByType(psecuritydescriptor.param().abi(), principalselfsid.param().abi(), clienttoken.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().try_into().unwrap()), genericmapping, core::mem::transmute(privilegeset.unwrap_or(std::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() + AccessCheckByType(psecuritydescriptor.param().abi(), principalselfsid.param().abi(), clienttoken.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().try_into().unwrap()), genericmapping, core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), privilegesetlength, grantedaccess, accessstatus).ok() } #[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: Option<&mut [OBJECT_TYPE_LIST]>, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatus: *mut super::Foundation::BOOL, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -107,7 +107,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultList(psecuritydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : 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.param().abi(), principalselfsid.param().abi(), clienttoken.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() + AccessCheckByTypeResultList(psecuritydescriptor.param().abi(), principalselfsid.param().abi(), clienttoken.param().abi(), desiredaccess, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), objecttypelistlength, genericmapping, core::mem::transmute(privilegeset.unwrap_or(core::ptr::null_mut())), privilegesetlength, grantedaccesslist, accessstatuslist).ok() } #[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: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -120,7 +120,7 @@ where P5: windows_core::Param, { 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 : 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() + AccessCheckByTypeResultListAndAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() } #[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: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P6, grantedaccess: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -134,7 +134,7 @@ where P6: windows_core::Param, { 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 : 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.param().abi(), handleid, clienttoken.param().abi(), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() + AccessCheckByTypeResultListAndAuditAlarmByHandleA(subsystemname.param().abi(), handleid, clienttoken.param().abi(), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccess, accessstatuslist, pfgenerateonclose).ok() } #[inline] pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(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: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P6, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -148,7 +148,7 @@ where P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, clienttoken : super::Foundation:: HANDLE, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname.param().abi(), handleid, clienttoken.param().abi(), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccesslist, accessstatuslist, pfgenerateonclose) + AccessCheckByTypeResultListAndAuditAlarmByHandleW(subsystemname.param().abi(), handleid, clienttoken.param().abi(), objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccesslist, accessstatuslist, pfgenerateonclose) } #[inline] pub unsafe fn AccessCheckByTypeResultListAndAuditAlarmW(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: Option<*mut OBJECT_TYPE_LIST>, objecttypelistlength: u32, genericmapping: *const GENERIC_MAPPING, objectcreation: P5, grantedaccesslist: *mut u32, accessstatuslist: *mut u32, pfgenerateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -161,7 +161,7 @@ where P5: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn AccessCheckByTypeResultListAndAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, securitydescriptor : PSECURITY_DESCRIPTOR, principalselfsid : PSID, desiredaccess : u32, audittype : AUDIT_EVENT_TYPE, flags : u32, objecttypelist : *mut OBJECT_TYPE_LIST, objecttypelistlength : u32, genericmapping : *const GENERIC_MAPPING, objectcreation : super::Foundation:: BOOL, grantedaccesslist : *mut u32, accessstatuslist : *mut u32, pfgenerateonclose : *mut super::Foundation:: BOOL) -> super::Foundation:: BOOL); - AccessCheckByTypeResultListAndAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(std::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccesslist, accessstatuslist, pfgenerateonclose) + AccessCheckByTypeResultListAndAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), securitydescriptor.param().abi(), principalselfsid.param().abi(), desiredaccess, audittype, flags, core::mem::transmute(objecttypelist.unwrap_or(core::ptr::null_mut())), objecttypelistlength, genericmapping, objectcreation.param().abi(), grantedaccesslist, accessstatuslist, pfgenerateonclose) } #[inline] pub unsafe fn AddAccessAllowedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> windows_core::Result<()> @@ -185,7 +185,7 @@ where P0: windows_core::Param, { 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 : 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.param().abi()).ok() + AddAccessAllowedObjectAce(pacl, dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::ptr::null())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::ptr::null())), psid.param().abi()).ok() } #[inline] pub unsafe fn AddAccessDeniedAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, accessmask: u32, psid: P0) -> windows_core::Result<()> @@ -209,7 +209,7 @@ where P0: windows_core::Param, { 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 : 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.param().abi()).ok() + AddAccessDeniedObjectAce(pacl, dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::ptr::null())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::ptr::null())), psid.param().abi()).ok() } #[inline] pub unsafe fn AddAce(pacl: *mut ACL, dwacerevision: ACE_REVISION, dwstartingaceindex: u32, pacelist: *const core::ffi::c_void, nacelistlength: u32) -> windows_core::Result<()> { @@ -244,7 +244,7 @@ where P2: windows_core::Param, { 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 : 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.param().abi(), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() + AddAuditAccessObjectAce(pacl, dwacerevision, aceflags, accessmask, core::mem::transmute(objecttypeguid.unwrap_or(core::ptr::null())), core::mem::transmute(inheritedobjecttypeguid.unwrap_or(core::ptr::null())), psid.param().abi(), bauditsuccess.param().abi(), bauditfailure.param().abi()).ok() } #[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) -> windows_core::Result<()> @@ -286,7 +286,7 @@ where P1: windows_core::Param, { 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.param().abi(), resettodefault.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() + AdjustTokenGroups(tokenhandle.param().abi(), resettodefault.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AdjustTokenPrivileges(tokenhandle: P0, disableallprivileges: P1, newstate: Option<*const TOKEN_PRIVILEGES>, bufferlength: u32, previousstate: Option<*mut TOKEN_PRIVILEGES>, returnlength: Option<*mut u32>) -> windows_core::Result<()> @@ -295,7 +295,7 @@ where P1: windows_core::Param, { 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.param().abi(), disableallprivileges.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() + AdjustTokenPrivileges(tokenhandle.param().abi(), disableallprivileges.param().abi(), core::mem::transmute(newstate.unwrap_or(core::ptr::null())), bufferlength, core::mem::transmute(previousstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() } #[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 PSID) -> windows_core::Result<()> { @@ -352,7 +352,7 @@ where P2: windows_core::Param, { 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.param().abi(), currentsecuritydescriptor.param().abi(), newsecuritydescriptor, core::mem::transmute(objecttype.unwrap_or(std::ptr::null())), isdirectoryobject.param().abi(), genericmapping).ok() + ConvertToAutoInheritPrivateObjectSecurity(parentdescriptor.param().abi(), currentsecuritydescriptor.param().abi(), newsecuritydescriptor, core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), isdirectoryobject.param().abi(), genericmapping).ok() } #[inline] pub unsafe fn CopySid(ndestinationsidlength: u32, pdestinationsid: PSID, psourcesid: P0) -> windows_core::Result<()> @@ -382,7 +382,7 @@ where P3: windows_core::Param, { 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.param().abi(), creatordescriptor.param().abi(), newdescriptor, core::mem::transmute(objecttype.unwrap_or(std::ptr::null())), iscontainerobject.param().abi(), autoinheritflags, token.param().abi(), genericmapping).ok() + CreatePrivateObjectSecurityEx(parentdescriptor.param().abi(), creatordescriptor.param().abi(), newdescriptor, core::mem::transmute(objecttype.unwrap_or(core::ptr::null())), iscontainerobject.param().abi(), autoinheritflags, token.param().abi(), genericmapping).ok() } #[inline] pub unsafe fn CreatePrivateObjectSecurityWithMultipleInheritance(parentdescriptor: P0, creatordescriptor: P1, newdescriptor: *mut PSECURITY_DESCRIPTOR, objecttypes: Option<&[*const windows_core::GUID]>, iscontainerobject: P2, autoinheritflags: SECURITY_AUTO_INHERIT_FLAGS, token: P3, genericmapping: *const GENERIC_MAPPING) -> windows_core::Result<()> @@ -454,7 +454,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwdesiredaccess, core::mem::transmute(lptokenattributes.unwrap_or(std::ptr::null())), impersonationlevel, tokentype, phnewtoken).ok() + DuplicateTokenEx(hexistingtoken.param().abi(), dwdesiredaccess, core::mem::transmute(lptokenattributes.unwrap_or(core::ptr::null())), impersonationlevel, tokentype, phnewtoken).ok() } #[inline] pub unsafe fn EqualDomainSid(psid1: P0, psid2: P1, pfequal: *mut super::Foundation::BOOL) -> windows_core::Result<()> @@ -509,7 +509,7 @@ pub unsafe fn GetAclInformation(pacl: *const ACL, paclinformation: *mut core::ff #[inline] pub unsafe fn GetAppContainerAce(acl: *const ACL, startingaceindex: u32, appcontainerace: *mut *mut core::ffi::c_void, appcontaineraceindex: Option<*mut u32>) -> super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn GetAppContainerAce(acl : *const ACL, startingaceindex : u32, appcontainerace : *mut *mut core::ffi::c_void, appcontaineraceindex : *mut u32) -> super::Foundation:: BOOL); - GetAppContainerAce(acl, startingaceindex, appcontainerace, core::mem::transmute(appcontaineraceindex.unwrap_or(std::ptr::null_mut()))) + GetAppContainerAce(acl, startingaceindex, appcontainerace, core::mem::transmute(appcontaineraceindex.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCachedSigningLevel(file: P0, flags: *mut u32, signinglevel: *mut u32, thumbprint: Option<*mut u8>, thumbprintsize: Option<*mut u32>, thumbprintalgorithm: Option<*mut u32>) -> super::Foundation::BOOL @@ -517,7 +517,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCachedSigningLevel(file : super::Foundation:: HANDLE, flags : *mut u32, signinglevel : *mut u32, thumbprint : *mut u8, thumbprintsize : *mut u32, thumbprintalgorithm : *mut u32) -> super::Foundation:: BOOL); - GetCachedSigningLevel(file.param().abi(), flags, signinglevel, core::mem::transmute(thumbprint.unwrap_or(std::ptr::null_mut())), core::mem::transmute(thumbprintsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(thumbprintalgorithm.unwrap_or(std::ptr::null_mut()))) + GetCachedSigningLevel(file.param().abi(), flags, signinglevel, core::mem::transmute(thumbprint.unwrap_or(core::ptr::null_mut())), core::mem::transmute(thumbprintsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(thumbprintalgorithm.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFileSecurityA(lpfilename: P0, requestedinformation: u32, psecuritydescriptor: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> @@ -647,7 +647,7 @@ where P0: windows_core::Param, { 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.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(std::ptr::null_mut())), tokeninformationlength, returnlength).ok() + GetTokenInformation(tokenhandle.param().abi(), tokeninformationclass, core::mem::transmute(tokeninformation.unwrap_or(core::ptr::null_mut())), tokeninformationlength, returnlength).ok() } #[inline] pub unsafe fn GetUserObjectSecurity(hobj: P0, psirequested: *const u32, psid: PSECURITY_DESCRIPTOR, nlength: u32, lpnlengthneeded: *mut u32) -> windows_core::Result<()> @@ -756,7 +756,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserExA(lpszusername : windows_core::PCSTR, lpszdomain : windows_core::PCSTR, lpszpassword : windows_core::PCSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> super::Foundation:: BOOL); - LogonUserExA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pplogonsid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppprofilebuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwprofilelength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pquotalimits.unwrap_or(std::ptr::null_mut()))).ok() + LogonUserExA(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplogonsid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppprofilebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwprofilelength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pquotalimits.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn LogonUserExW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: Option<*mut super::Foundation::HANDLE>, pplogonsid: Option<*mut PSID>, ppprofilebuffer: Option<*mut *mut core::ffi::c_void>, pdwprofilelength: Option<*mut u32>, pquotalimits: Option<*mut QUOTA_LIMITS>) -> windows_core::Result<()> @@ -766,7 +766,7 @@ where P2: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn LogonUserExW(lpszusername : windows_core::PCWSTR, lpszdomain : windows_core::PCWSTR, lpszpassword : windows_core::PCWSTR, dwlogontype : LOGON32_LOGON, dwlogonprovider : LOGON32_PROVIDER, phtoken : *mut super::Foundation:: HANDLE, pplogonsid : *mut PSID, ppprofilebuffer : *mut *mut core::ffi::c_void, pdwprofilelength : *mut u32, pquotalimits : *mut QUOTA_LIMITS) -> super::Foundation:: BOOL); - LogonUserExW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pplogonsid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppprofilebuffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwprofilelength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pquotalimits.unwrap_or(std::ptr::null_mut()))).ok() + LogonUserExW(lpszusername.param().abi(), lpszdomain.param().abi(), lpszpassword.param().abi(), dwlogontype, dwlogonprovider, core::mem::transmute(phtoken.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pplogonsid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppprofilebuffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwprofilelength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pquotalimits.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn LogonUserW(lpszusername: P0, lpszdomain: P1, lpszpassword: P2, dwlogontype: LOGON32_LOGON, dwlogonprovider: LOGON32_PROVIDER, phtoken: *mut super::Foundation::HANDLE) -> windows_core::Result<()> @@ -872,7 +872,7 @@ where P0: windows_core::Param, { 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 : PSID, lpdwownersize : *mut u32, pprimarygroup : PSID, lpdwprimarygroupsize : *mut u32) -> super::Foundation:: BOOL); - MakeAbsoluteSD(pselfrelativesecuritydescriptor.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() + MakeAbsoluteSD(pselfrelativesecuritydescriptor.param().abi(), pabsolutesecuritydescriptor, lpdwabsolutesecuritydescriptorsize, core::mem::transmute(pdacl.unwrap_or(core::ptr::null_mut())), lpdwdaclsize, core::mem::transmute(psacl.unwrap_or(core::ptr::null_mut())), lpdwsaclsize, powner, lpdwownersize, pprimarygroup, lpdwprimarygroupsize).ok() } #[inline] pub unsafe fn MakeSelfRelativeSD(pabsolutesecuritydescriptor: P0, pselfrelativesecuritydescriptor: PSECURITY_DESCRIPTOR, lpdwbufferlength: *mut u32) -> windows_core::Result<()> @@ -935,7 +935,7 @@ where P6: windows_core::Param, { 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectOpenAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose).ok() + ObjectOpenAuditAlarmA(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose).ok() } #[inline] pub unsafe fn ObjectOpenAuditAlarmW(subsystemname: P0, handleid: *const core::ffi::c_void, objecttypename: P1, objectname: P2, psecuritydescriptor: P3, clienttoken: P4, desiredaccess: u32, grantedaccess: u32, privileges: Option<*const PRIVILEGE_SET>, objectcreation: P5, accessgranted: P6, generateonclose: *mut super::Foundation::BOOL) -> super::Foundation::BOOL @@ -949,7 +949,7 @@ where P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ObjectOpenAuditAlarmW(subsystemname : windows_core::PCWSTR, handleid : *const core::ffi::c_void, objecttypename : windows_core::PCWSTR, objectname : windows_core::PCWSTR, 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 super::Foundation:: BOOL) -> super::Foundation:: BOOL); - ObjectOpenAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(std::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) + ObjectOpenAuditAlarmW(subsystemname.param().abi(), handleid, objecttypename.param().abi(), objectname.param().abi(), psecuritydescriptor.param().abi(), clienttoken.param().abi(), desiredaccess, grantedaccess, core::mem::transmute(privileges.unwrap_or(core::ptr::null())), objectcreation.param().abi(), accessgranted.param().abi(), generateonclose) } #[inline] 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<()> @@ -1028,7 +1028,7 @@ where P0: windows_core::Param, { windows_targets::link!("ntdll.dll" "system" fn RtlNormalizeSecurityDescriptor(securitydescriptor : *mut PSECURITY_DESCRIPTOR, securitydescriptorlength : u32, newsecuritydescriptor : *mut PSECURITY_DESCRIPTOR, newsecuritydescriptorlength : *mut u32, checkonly : super::Foundation:: BOOLEAN) -> super::Foundation:: BOOLEAN); - RtlNormalizeSecurityDescriptor(securitydescriptor, securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(std::ptr::null_mut())), checkonly.param().abi()) + RtlNormalizeSecurityDescriptor(securitydescriptor, securitydescriptorlength, core::mem::transmute(newsecuritydescriptor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(newsecuritydescriptorlength.unwrap_or(core::ptr::null_mut())), checkonly.param().abi()) } #[inline] pub unsafe fn SetAclInformation(pacl: *mut ACL, paclinformation: *const core::ffi::c_void, naclinformationlength: u32, dwaclinformationclass: ACL_INFORMATION_CLASS) -> windows_core::Result<()> { @@ -1110,7 +1110,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(pdacl.unwrap_or(std::ptr::null())), bdacldefaulted.param().abi()).ok() + SetSecurityDescriptorDacl(psecuritydescriptor, bdaclpresent.param().abi(), core::mem::transmute(pdacl.unwrap_or(core::ptr::null())), bdacldefaulted.param().abi()).ok() } #[inline] pub unsafe fn SetSecurityDescriptorGroup(psecuritydescriptor: PSECURITY_DESCRIPTOR, pgroup: P0, bgroupdefaulted: P1) -> windows_core::Result<()> @@ -1133,7 +1133,7 @@ where #[inline] pub unsafe fn SetSecurityDescriptorRMControl(securitydescriptor: PSECURITY_DESCRIPTOR, rmcontrol: Option<*const u8>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn SetSecurityDescriptorRMControl(securitydescriptor : PSECURITY_DESCRIPTOR, rmcontrol : *const u8) -> u32); - SetSecurityDescriptorRMControl(securitydescriptor, core::mem::transmute(rmcontrol.unwrap_or(std::ptr::null()))) + SetSecurityDescriptorRMControl(securitydescriptor, core::mem::transmute(rmcontrol.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetSecurityDescriptorSacl(psecuritydescriptor: PSECURITY_DESCRIPTOR, bsaclpresent: P0, psacl: Option<*const ACL>, bsacldefaulted: P1) -> windows_core::Result<()> @@ -1142,7 +1142,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(psacl.unwrap_or(std::ptr::null())), bsacldefaulted.param().abi()).ok() + SetSecurityDescriptorSacl(psecuritydescriptor, bsaclpresent.param().abi(), core::mem::transmute(psacl.unwrap_or(core::ptr::null())), bsacldefaulted.param().abi()).ok() } #[inline] pub unsafe fn SetTokenInformation(tokenhandle: P0, tokeninformationclass: TOKEN_INFORMATION_CLASS, tokeninformation: *const core::ffi::c_void, tokeninformationlength: u32) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs index 6f483f6804..48167ce336 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Cabinets/mod.rs @@ -11,7 +11,7 @@ where #[inline] pub unsafe fn FCICreate(perf: *const ERF, pfnfcifp: PFNFCIFILEPLACED, pfna: PFNFCIALLOC, pfnf: PFNFCIFREE, pfnopen: PFNFCIOPEN, pfnread: PFNFCIREAD, pfnwrite: PFNFCIWRITE, pfnclose: PFNFCICLOSE, pfnseek: PFNFCISEEK, pfndelete: PFNFCIDELETE, pfnfcigtf: PFNFCIGETTEMPFILE, pccab: *const CCAB, pv: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("cabinet.dll" "cdecl" fn FCICreate(perf : *const ERF, pfnfcifp : PFNFCIFILEPLACED, pfna : PFNFCIALLOC, pfnf : PFNFCIFREE, pfnopen : PFNFCIOPEN, pfnread : PFNFCIREAD, pfnwrite : PFNFCIWRITE, pfnclose : PFNFCICLOSE, pfnseek : PFNFCISEEK, pfndelete : PFNFCIDELETE, pfnfcigtf : PFNFCIGETTEMPFILE, pccab : *const CCAB, pv : *const core::ffi::c_void) -> *mut core::ffi::c_void); - FCICreate(perf, pfnfcifp, pfna, pfnf, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, pfndelete, pfnfcigtf, pccab, core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + FCICreate(perf, pfnfcifp, pfna, pfnf, pfnopen, pfnread, pfnwrite, pfnclose, pfnseek, pfndelete, pfnfcigtf, pccab, core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FCIDestroy(hfci: *const core::ffi::c_void) -> super::super::Foundation::BOOL { @@ -38,7 +38,7 @@ where P1: windows_core::Param, { windows_targets::link!("cabinet.dll" "cdecl" fn FDICopy(hfdi : *const core::ffi::c_void, pszcabinet : windows_core::PCSTR, pszcabpath : windows_core::PCSTR, flags : i32, pfnfdin : PFNFDINOTIFY, pfnfdid : PFNFDIDECRYPT, pvuser : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - FDICopy(hfdi, pszcabinet.param().abi(), pszcabpath.param().abi(), flags, pfnfdin, pfnfdid, core::mem::transmute(pvuser.unwrap_or(std::ptr::null()))) + FDICopy(hfdi, pszcabinet.param().abi(), pszcabpath.param().abi(), flags, pfnfdin, pfnfdid, core::mem::transmute(pvuser.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FDICreate(pfnalloc: PFNALLOC, pfnfree: PFNFREE, pfnopen: PFNOPEN, pfnread: PFNREAD, pfnwrite: PFNWRITE, pfnclose: PFNCLOSE, pfnseek: PFNSEEK, cputype: FDICREATE_CPU_TYPE, perf: *mut ERF) -> *mut core::ffi::c_void { @@ -53,7 +53,7 @@ pub unsafe fn FDIDestroy(hfdi: *const core::ffi::c_void) -> super::super::Founda #[inline] pub unsafe fn FDIIsCabinet(hfdi: *const core::ffi::c_void, hf: isize, pfdici: Option<*mut FDICABINETINFO>) -> super::super::Foundation::BOOL { windows_targets::link!("cabinet.dll" "cdecl" fn FDIIsCabinet(hfdi : *const core::ffi::c_void, hf : isize, pfdici : *mut FDICABINETINFO) -> super::super::Foundation:: BOOL); - FDIIsCabinet(hfdi, hf, core::mem::transmute(pfdici.unwrap_or(std::ptr::null_mut()))) + FDIIsCabinet(hfdi, hf, core::mem::transmute(pfdici.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FDITruncateCabinet(hfdi: *const core::ffi::c_void, pszcabinetname: P0, ifoldertodelete: u16) -> super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs index 5d18ca77d6..339ed1d9cf 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/CloudFilters/mod.rs @@ -14,7 +14,7 @@ where { windows_targets::link!("cldapi.dll" "system" fn CfConnectSyncRoot(syncrootpath : windows_core::PCWSTR, callbacktable : *const CF_CALLBACK_REGISTRATION, callbackcontext : *const core::ffi::c_void, connectflags : CF_CONNECT_FLAGS, connectionkey : *mut CF_CONNECTION_KEY) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CfConnectSyncRoot(syncrootpath.param().abi(), callbacktable, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), connectflags, &mut result__).map(|| result__) + CfConnectSyncRoot(syncrootpath.param().abi(), callbacktable, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), connectflags, &mut result__).map(|| result__) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -23,7 +23,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfConvertToPlaceholder(filehandle : super::super::Foundation:: HANDLE, fileidentity : *const core::ffi::c_void, fileidentitylength : u32, convertflags : CF_CONVERT_FLAGS, convertusn : *mut i64, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - CfConvertToPlaceholder(filehandle.param().abi(), core::mem::transmute(fileidentity.unwrap_or(std::ptr::null())), fileidentitylength, convertflags, core::mem::transmute(convertusn.unwrap_or(std::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))).ok() + CfConvertToPlaceholder(filehandle.param().abi(), core::mem::transmute(fileidentity.unwrap_or(core::ptr::null())), fileidentitylength, convertflags, core::mem::transmute(convertusn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Storage_FileSystem")] #[inline] @@ -32,7 +32,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfCreatePlaceholders(basedirectorypath : windows_core::PCWSTR, placeholderarray : *mut CF_PLACEHOLDER_CREATE_INFO, placeholdercount : u32, createflags : CF_CREATE_FLAGS, entriesprocessed : *mut u32) -> windows_core::HRESULT); - CfCreatePlaceholders(basedirectorypath.param().abi(), core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), createflags, core::mem::transmute(entriesprocessed.unwrap_or(std::ptr::null_mut()))).ok() + CfCreatePlaceholders(basedirectorypath.param().abi(), core::mem::transmute(placeholderarray.as_ptr()), placeholderarray.len().try_into().unwrap(), createflags, core::mem::transmute(entriesprocessed.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -41,7 +41,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfDehydratePlaceholder(filehandle : super::super::Foundation:: HANDLE, startingoffset : i64, length : i64, dehydrateflags : CF_DEHYDRATE_FLAGS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - CfDehydratePlaceholder(filehandle.param().abi(), startingoffset, length, dehydrateflags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))).ok() + CfDehydratePlaceholder(filehandle.param().abi(), startingoffset, length, dehydrateflags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfDisconnectSyncRoot(connectionkey: P0) -> windows_core::Result<()> @@ -72,7 +72,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetPlaceholderInfo(filehandle : super::super::Foundation:: HANDLE, infoclass : CF_PLACEHOLDER_INFO_CLASS, infobuffer : *mut core::ffi::c_void, infobufferlength : u32, returnedlength : *mut u32) -> windows_core::HRESULT); - CfGetPlaceholderInfo(filehandle.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))).ok() + CfGetPlaceholderInfo(filehandle.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfGetPlaceholderRangeInfo(filehandle: P0, infoclass: CF_PLACEHOLDER_RANGE_INFO_CLASS, startingoffset: i64, length: i64, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> @@ -80,7 +80,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetPlaceholderRangeInfo(filehandle : super::super::Foundation:: HANDLE, infoclass : CF_PLACEHOLDER_RANGE_INFO_CLASS, startingoffset : i64, length : i64, infobuffer : *mut core::ffi::c_void, infobufferlength : u32, returnedlength : *mut u32) -> windows_core::HRESULT); - CfGetPlaceholderRangeInfo(filehandle.param().abi(), infoclass, startingoffset, length, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))).ok() + CfGetPlaceholderRangeInfo(filehandle.param().abi(), infoclass, startingoffset, length, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfGetPlaceholderRangeInfoForHydration(connectionkey: P0, transferkey: i64, fileid: i64, infoclass: CF_PLACEHOLDER_RANGE_INFO_CLASS, startingoffset: i64, rangelength: i64, infobuffer: *mut core::ffi::c_void, infobuffersize: u32, infobufferwritten: Option<*mut u32>) -> windows_core::Result<()> @@ -88,7 +88,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetPlaceholderRangeInfoForHydration(connectionkey : CF_CONNECTION_KEY, transferkey : i64, fileid : i64, infoclass : CF_PLACEHOLDER_RANGE_INFO_CLASS, startingoffset : i64, rangelength : i64, infobuffer : *mut core::ffi::c_void, infobuffersize : u32, infobufferwritten : *mut u32) -> windows_core::HRESULT); - CfGetPlaceholderRangeInfoForHydration(connectionkey.param().abi(), transferkey, fileid, infoclass, startingoffset, rangelength, infobuffer, infobuffersize, core::mem::transmute(infobufferwritten.unwrap_or(std::ptr::null_mut()))).ok() + CfGetPlaceholderRangeInfoForHydration(connectionkey.param().abi(), transferkey, fileid, infoclass, startingoffset, rangelength, infobuffer, infobuffersize, core::mem::transmute(infobufferwritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfGetPlaceholderStateFromAttributeTag(fileattributes: u32, reparsetag: u32) -> CF_PLACEHOLDER_STATE { @@ -119,7 +119,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetSyncRootInfoByHandle(filehandle : super::super::Foundation:: HANDLE, infoclass : CF_SYNC_ROOT_INFO_CLASS, infobuffer : *mut core::ffi::c_void, infobufferlength : u32, returnedlength : *mut u32) -> windows_core::HRESULT); - CfGetSyncRootInfoByHandle(filehandle.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))).ok() + CfGetSyncRootInfoByHandle(filehandle.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfGetSyncRootInfoByPath(filepath: P0, infoclass: CF_SYNC_ROOT_INFO_CLASS, infobuffer: *mut core::ffi::c_void, infobufferlength: u32, returnedlength: Option<*mut u32>) -> windows_core::Result<()> @@ -127,7 +127,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfGetSyncRootInfoByPath(filepath : windows_core::PCWSTR, infoclass : CF_SYNC_ROOT_INFO_CLASS, infobuffer : *mut core::ffi::c_void, infobufferlength : u32, returnedlength : *mut u32) -> windows_core::HRESULT); - CfGetSyncRootInfoByPath(filepath.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(std::ptr::null_mut()))).ok() + CfGetSyncRootInfoByPath(filepath.param().abi(), infoclass, infobuffer, infobufferlength, core::mem::transmute(returnedlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfGetTransferKey(filehandle: P0) -> windows_core::Result @@ -153,7 +153,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfHydratePlaceholder(filehandle : super::super::Foundation:: HANDLE, startingoffset : i64, length : i64, hydrateflags : CF_HYDRATE_FLAGS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - CfHydratePlaceholder(filehandle.param().abi(), startingoffset, length, hydrateflags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))).ok() + CfHydratePlaceholder(filehandle.param().abi(), startingoffset, length, hydrateflags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfOpenFileWithOplock(filepath: P0, flags: CF_OPEN_FILE_FLAGS) -> windows_core::Result @@ -227,7 +227,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfReportSyncStatus(syncrootpath : windows_core::PCWSTR, syncstatus : *const CF_SYNC_STATUS) -> windows_core::HRESULT); - CfReportSyncStatus(syncrootpath.param().abi(), core::mem::transmute(syncstatus.unwrap_or(std::ptr::null()))).ok() + CfReportSyncStatus(syncrootpath.param().abi(), core::mem::transmute(syncstatus.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -236,7 +236,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfRevertPlaceholder(filehandle : super::super::Foundation:: HANDLE, revertflags : CF_REVERT_FLAGS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - CfRevertPlaceholder(filehandle.param().abi(), revertflags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))).ok() + CfRevertPlaceholder(filehandle.param().abi(), revertflags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_CorrelationVector")] #[inline] @@ -253,7 +253,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfSetInSyncState(filehandle : super::super::Foundation:: HANDLE, insyncstate : CF_IN_SYNC_STATE, insyncflags : CF_SET_IN_SYNC_FLAGS, insyncusn : *mut i64) -> windows_core::HRESULT); - CfSetInSyncState(filehandle.param().abi(), insyncstate, insyncflags, core::mem::transmute(insyncusn.unwrap_or(std::ptr::null_mut()))).ok() + CfSetInSyncState(filehandle.param().abi(), insyncstate, insyncflags, core::mem::transmute(insyncusn.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -262,7 +262,7 @@ where P0: windows_core::Param, { windows_targets::link!("cldapi.dll" "system" fn CfSetPinState(filehandle : super::super::Foundation:: HANDLE, pinstate : CF_PIN_STATE, pinflags : CF_SET_PIN_FLAGS, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - CfSetPinState(filehandle.param().abi(), pinstate, pinflags, core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut()))).ok() + CfSetPinState(filehandle.param().abi(), pinstate, pinflags, core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CfUnregisterSyncRoot(syncrootpath: P0) -> windows_core::Result<()> @@ -281,14 +281,14 @@ where windows_targets::link!("cldapi.dll" "system" fn CfUpdatePlaceholder(filehandle : super::super::Foundation:: HANDLE, fsmetadata : *const CF_FS_METADATA, fileidentity : *const core::ffi::c_void, fileidentitylength : u32, dehydraterangearray : *const CF_FILE_RANGE, dehydraterangecount : u32, updateflags : CF_UPDATE_FLAGS, updateusn : *mut i64, overlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); CfUpdatePlaceholder( filehandle.param().abi(), - core::mem::transmute(fsmetadata.unwrap_or(std::ptr::null())), - core::mem::transmute(fileidentity.unwrap_or(std::ptr::null())), + core::mem::transmute(fsmetadata.unwrap_or(core::ptr::null())), + core::mem::transmute(fileidentity.unwrap_or(core::ptr::null())), fileidentitylength, core::mem::transmute(dehydraterangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dehydraterangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), updateflags, - core::mem::transmute(updateusn.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(overlapped.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(updateusn.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(overlapped.unwrap_or(core::ptr::null_mut())), ) .ok() } 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 139f801d87..fdcd08aadc 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Compression/mod.rs @@ -20,17 +20,17 @@ where P0: windows_core::Param, { 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.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() + Compress(compressorhandle.param().abi(), core::mem::transmute(uncompresseddata.unwrap_or(core::ptr::null())), uncompresseddatasize, core::mem::transmute(compressedbuffer.unwrap_or(core::ptr::null_mut())), compressedbuffersize, compresseddatasize).ok() } #[inline] pub unsafe fn CreateCompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: Option<*const COMPRESS_ALLOCATION_ROUTINES>, compressorhandle: *mut COMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn CreateCompressor(algorithm : COMPRESS_ALGORITHM, allocationroutines : *const COMPRESS_ALLOCATION_ROUTINES, compressorhandle : *mut COMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - CreateCompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(std::ptr::null())), compressorhandle).ok() + CreateCompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(core::ptr::null())), compressorhandle).ok() } #[inline] pub unsafe fn CreateDecompressor(algorithm: COMPRESS_ALGORITHM, allocationroutines: Option<*const COMPRESS_ALLOCATION_ROUTINES>, decompressorhandle: *mut DECOMPRESSOR_HANDLE) -> windows_core::Result<()> { windows_targets::link!("cabinet.dll" "system" fn CreateDecompressor(algorithm : COMPRESS_ALGORITHM, allocationroutines : *const COMPRESS_ALLOCATION_ROUTINES, decompressorhandle : *mut DECOMPRESSOR_HANDLE) -> super::super::Foundation:: BOOL); - CreateDecompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(std::ptr::null())), decompressorhandle).ok() + CreateDecompressor(algorithm, core::mem::transmute(allocationroutines.unwrap_or(core::ptr::null())), decompressorhandle).ok() } #[inline] pub unsafe fn Decompress(decompressorhandle: P0, compresseddata: Option<*const core::ffi::c_void>, compresseddatasize: usize, uncompressedbuffer: Option<*mut core::ffi::c_void>, uncompressedbuffersize: usize, uncompresseddatasize: Option<*mut usize>) -> windows_core::Result<()> @@ -38,7 +38,7 @@ where P0: windows_core::Param, { windows_targets::link!("cabinet.dll" "system" fn Decompress(decompressorhandle : DECOMPRESSOR_HANDLE, 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.param().abi(), 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() + Decompress(decompressorhandle.param().abi(), core::mem::transmute(compresseddata.unwrap_or(core::ptr::null())), compresseddatasize, core::mem::transmute(uncompressedbuffer.unwrap_or(core::ptr::null_mut())), uncompressedbuffersize, core::mem::transmute(uncompresseddatasize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueryCompressorInformation(compressorhandle: P0, compressinformationclass: COMPRESS_INFORMATION_CLASS, compressinformation: *mut core::ffi::c_void, compressinformationsize: usize) -> windows_core::Result<()> 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 6b041c3d7f..eb73a9443f 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/FileSystem/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { 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.param().abi(), core::mem::transmute(pcbcontainer.unwrap_or(std::ptr::null())), pwszcontainerpath.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))).ok() + AddLogContainer(hlog.param().abi(), core::mem::transmute(pcbcontainer.unwrap_or(core::ptr::null())), pwszcontainerpath.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AddLogContainerSet(hlog: P0, pcbcontainer: Option<*const u64>, rgwszcontainerpath: &[windows_core::PCWSTR], preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> @@ -13,7 +13,7 @@ where P0: windows_core::Param, { 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.param().abi(), rgwszcontainerpath.len().try_into().unwrap(), 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() + AddLogContainerSet(hlog.param().abi(), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(pcbcontainer.unwrap_or(core::ptr::null())), core::mem::transmute(rgwszcontainerpath.as_ptr()), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -135,7 +135,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(pbnamecontainsspaces.unwrap_or(std::ptr::null_mut())), pbnamelegal).ok() + CheckNameLegalDOS8Dot3A(lpname.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().try_into().unwrap()), core::mem::transmute(pbnamecontainsspaces.unwrap_or(core::ptr::null_mut())), pbnamelegal).ok() } #[inline] pub unsafe fn CheckNameLegalDOS8Dot3W(lpname: P0, lpoemname: Option<&mut [u8]>, pbnamecontainsspaces: Option<*mut super::super::Foundation::BOOL>, pbnamelegal: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> @@ -143,7 +143,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(pbnamecontainsspaces.unwrap_or(std::ptr::null_mut())), pbnamelegal).ok() + CheckNameLegalDOS8Dot3W(lpname.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().try_into().unwrap()), core::mem::transmute(pbnamecontainsspaces.unwrap_or(core::ptr::null_mut())), pbnamelegal).ok() } #[inline] pub unsafe fn CloseAndResetLogFile(hlog: P0) -> windows_core::Result<()> @@ -210,7 +210,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CopyFile2(pwszexistingfilename : windows_core::PCWSTR, pwsznewfilename : windows_core::PCWSTR, pextendedparameters : *const COPYFILE2_EXTENDED_PARAMETERS) -> windows_core::HRESULT); - CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), core::mem::transmute(pextendedparameters.unwrap_or(std::ptr::null()))).ok() + CopyFile2(pwszexistingfilename.param().abi(), pwsznewfilename.param().abi(), core::mem::transmute(pextendedparameters.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CopyFileA(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> @@ -229,7 +229,7 @@ where P1: windows_core::Param, { 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 super::super::Foundation:: BOOL, dwcopyflags : u32) -> super::super::Foundation:: BOOL); - CopyFileExA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(std::ptr::null_mut())), dwcopyflags).ok() + CopyFileExA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null_mut())), dwcopyflags).ok() } #[inline] pub unsafe fn CopyFileExW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*mut super::super::Foundation::BOOL>, dwcopyflags: u32) -> windows_core::Result<()> @@ -238,7 +238,7 @@ where P1: windows_core::Param, { 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 super::super::Foundation:: BOOL, dwcopyflags : u32) -> super::super::Foundation:: BOOL); - CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(std::ptr::null_mut())), dwcopyflags).ok() + CopyFileExW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null_mut())), dwcopyflags).ok() } #[inline] pub unsafe fn CopyFileFromAppW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> super::super::Foundation::BOOL @@ -258,7 +258,7 @@ where P2: windows_core::Param, { 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 super::super::Foundation:: BOOL, dwcopyflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CopyFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(std::ptr::null())), dwcopyflags, htransaction.param().abi()).ok() + CopyFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null())), dwcopyflags, htransaction.param().abi()).ok() } #[inline] pub unsafe fn CopyFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, pbcancel: Option<*const super::super::Foundation::BOOL>, dwcopyflags: u32, htransaction: P2) -> windows_core::Result<()> @@ -268,7 +268,7 @@ where P2: windows_core::Param, { 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 super::super::Foundation:: BOOL, dwcopyflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - CopyFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(std::ptr::null())), dwcopyflags, htransaction.param().abi()).ok() + CopyFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), core::mem::transmute(pbcancel.unwrap_or(core::ptr::null())), dwcopyflags, htransaction.param().abi()).ok() } #[inline] pub unsafe fn CopyFileW(lpexistingfilename: P0, lpnewfilename: P1, bfailifexists: P2) -> windows_core::Result<()> @@ -292,7 +292,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateDirectoryA(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -302,7 +302,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateDirectoryExA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -312,7 +312,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateDirectoryExW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -321,7 +321,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CreateDirectoryFromAppW(lppathname : windows_core::PCWSTR, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: BOOL); - CreateDirectoryFromAppW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + CreateDirectoryFromAppW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -332,7 +332,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), htransaction.param().abi()).ok() + CreateDirectoryTransactedA(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), htransaction.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -343,7 +343,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), htransaction.param().abi()).ok() + CreateDirectoryTransactedW(lptemplatedirectory.param().abi(), lpnewdirectory.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), htransaction.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -352,7 +352,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateDirectoryW(lppathname.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -372,7 +372,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFile2(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, dwcreationdisposition : FILE_CREATION_DISPOSITION, pcreateexparams : *const CREATEFILE2_EXTENDED_PARAMETERS) -> super::super::Foundation:: HANDLE); - let result__ = CreateFile2(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(std::ptr::null()))); + let result__ = CreateFile2(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -382,7 +382,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CreateFile2FromAppW(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : u32, dwcreationdisposition : u32, pcreateexparams : *const CREATEFILE2_EXTENDED_PARAMETERS) -> super::super::Foundation:: HANDLE); - CreateFile2FromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(std::ptr::null()))) + CreateFile2FromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, dwcreationdisposition, core::mem::transmute(pcreateexparams.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -392,7 +392,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileA(lpfilename : windows_core::PCSTR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : FILE_CREATION_DISPOSITION, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES, htemplatefile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()); + let result__ = CreateFileA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -403,7 +403,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn CreateFileFromAppW(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : u32, dwflagsandattributes : u32, htemplatefile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - CreateFileFromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()) + CreateFileFromAppW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -414,7 +414,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileTransactedA(lpfilename : windows_core::PCSTR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : FILE_CREATION_DISPOSITION, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES, htemplatefile : super::super::Foundation:: HANDLE, htransaction : super::super::Foundation:: HANDLE, pusminiversion : *const TXFS_MINIVERSION, lpextendedparameter : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileTransactedA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi(), htransaction.param().abi(), core::mem::transmute(pusminiversion.unwrap_or(std::ptr::null())), core::mem::transmute(lpextendedparameter.unwrap_or(std::ptr::null()))); + let result__ = CreateFileTransactedA(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi(), htransaction.param().abi(), core::mem::transmute(pusminiversion.unwrap_or(core::ptr::null())), core::mem::transmute(lpextendedparameter.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -426,7 +426,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileTransactedW(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : FILE_CREATION_DISPOSITION, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES, htemplatefile : super::super::Foundation:: HANDLE, htransaction : super::super::Foundation:: HANDLE, pusminiversion : *const TXFS_MINIVERSION, lpextendedparameter : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileTransactedW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi(), htransaction.param().abi(), core::mem::transmute(pusminiversion.unwrap_or(std::ptr::null())), core::mem::transmute(lpextendedparameter.unwrap_or(std::ptr::null()))); + let result__ = CreateFileTransactedW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi(), htransaction.param().abi(), core::mem::transmute(pusminiversion.unwrap_or(core::ptr::null())), core::mem::transmute(lpextendedparameter.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -437,7 +437,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileW(lpfilename : windows_core::PCWSTR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwcreationdisposition : FILE_CREATION_DISPOSITION, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES, htemplatefile : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()); + let result__ = CreateFileW(lpfilename.param().abi(), dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwcreationdisposition, dwflagsandattributes, htemplatefile.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -448,7 +448,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateHardLinkA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -459,7 +459,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), htransaction.param().abi()).ok() + CreateHardLinkTransactedA(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), htransaction.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -470,7 +470,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), htransaction.param().abi()).ok() + CreateHardLinkTransactedW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), htransaction.param().abi()).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -480,7 +480,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))).ok() + CreateHardLinkW(lpfilename.param().abi(), lpexistingfilename.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CreateIoRing(ioringversion: IORING_VERSION, flags: IORING_CREATE_FLAGS, submissionqueuesize: u32, completionqueuesize: u32) -> windows_core::Result { @@ -721,7 +721,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn DuplicateEncryptionInfoFile(srcfilename : windows_core::PCWSTR, dstfilename : windows_core::PCWSTR, dwcreationdistribution : u32, dwattributes : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> u32); - DuplicateEncryptionInfoFile(srcfilename.param().abi(), dstfilename.param().abi(), dwcreationdistribution, dwattributes, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + DuplicateEncryptionInfoFile(srcfilename.param().abi(), dstfilename.param().abi(), dwcreationdistribution, dwattributes, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EncryptFileA(lpfilename: P0) -> windows_core::Result<()> @@ -826,7 +826,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileExA(lpfilename : windows_core::PCSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : FIND_FIRST_EX_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstFileExA(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(std::ptr::null())), dwadditionalflags); + let result__ = FindFirstFileExA(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), dwadditionalflags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -835,7 +835,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn FindFirstFileExFromAppW(lpfilename : windows_core::PCWSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : u32) -> super::super::Foundation:: HANDLE); - FindFirstFileExFromAppW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(std::ptr::null())), dwadditionalflags) + FindFirstFileExFromAppW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), dwadditionalflags) } #[inline] pub unsafe fn FindFirstFileExW(lpfilename: P0, finfolevelid: FINDEX_INFO_LEVELS, lpfindfiledata: *mut core::ffi::c_void, fsearchop: FINDEX_SEARCH_OPS, lpsearchfilter: Option<*const core::ffi::c_void>, dwadditionalflags: FIND_FIRST_EX_FLAGS) -> windows_core::Result @@ -843,7 +843,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileExW(lpfilename : windows_core::PCWSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : FIND_FIRST_EX_FLAGS) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstFileExW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(std::ptr::null())), dwadditionalflags); + let result__ = FindFirstFileExW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), dwadditionalflags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -872,7 +872,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileTransactedA(lpfilename : windows_core::PCSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstFileTransactedA(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(std::ptr::null())), dwadditionalflags, htransaction.param().abi()); + let result__ = FindFirstFileTransactedA(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), dwadditionalflags, htransaction.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -882,7 +882,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn FindFirstFileTransactedW(lpfilename : windows_core::PCWSTR, finfolevelid : FINDEX_INFO_LEVELS, lpfindfiledata : *mut core::ffi::c_void, fsearchop : FINDEX_SEARCH_OPS, lpsearchfilter : *const core::ffi::c_void, dwadditionalflags : u32, htransaction : super::super::Foundation:: HANDLE) -> super::super::Foundation:: HANDLE); - let result__ = FindFirstFileTransactedW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(std::ptr::null())), dwadditionalflags, htransaction.param().abi()); + let result__ = FindFirstFileTransactedW(lpfilename.param().abi(), finfolevelid, lpfindfiledata, fsearchop, core::mem::transmute(lpsearchfilter.unwrap_or(core::ptr::null())), dwadditionalflags, htransaction.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1037,7 +1037,7 @@ where #[inline] pub unsafe fn FlushLogBuffers(pvmarshal: *const core::ffi::c_void, poverlapped: 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()))).ok() + FlushLogBuffers(pvmarshal, core::mem::transmute(poverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1083,7 +1083,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeA(lpfilename : windows_core::PCSTR, lpfilesizehigh : *mut u32) -> u32); - GetCompressedFileSizeA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(std::ptr::null_mut()))) + GetCompressedFileSizeA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCompressedFileSizeTransactedA(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: P1) -> u32 @@ -1092,7 +1092,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeTransactedA(lpfilename : windows_core::PCSTR, lpfilesizehigh : *mut u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetCompressedFileSizeTransactedA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(std::ptr::null_mut())), htransaction.param().abi()) + GetCompressedFileSizeTransactedA(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::ptr::null_mut())), htransaction.param().abi()) } #[inline] pub unsafe fn GetCompressedFileSizeTransactedW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>, htransaction: P1) -> u32 @@ -1101,7 +1101,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeTransactedW(lpfilename : windows_core::PCWSTR, lpfilesizehigh : *mut u32, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetCompressedFileSizeTransactedW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(std::ptr::null_mut())), htransaction.param().abi()) + GetCompressedFileSizeTransactedW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::ptr::null_mut())), htransaction.param().abi()) } #[inline] pub unsafe fn GetCompressedFileSizeW(lpfilename: P0, lpfilesizehigh: Option<*mut u32>) -> u32 @@ -1109,7 +1109,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetCompressedFileSizeW(lpfilename : windows_core::PCWSTR, lpfilesizehigh : *mut u32) -> u32); - GetCompressedFileSizeW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(std::ptr::null_mut()))) + GetCompressedFileSizeW(lpfilename.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCurrentClockTransactionManager(transactionmanagerhandle: P0, tmvirtualclock: *mut i64) -> windows_core::Result<()> @@ -1125,7 +1125,7 @@ where P0: windows_core::Param, { 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.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() + GetDiskFreeSpaceA(lprootpathname.param().abi(), core::mem::transmute(lpsectorspercluster.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpbytespersector.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpnumberoffreeclusters.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberofclusters.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetDiskFreeSpaceExA(lpdirectoryname: P0, lpfreebytesavailabletocaller: Option<*mut u64>, lptotalnumberofbytes: Option<*mut u64>, lptotalnumberoffreebytes: Option<*mut u64>) -> windows_core::Result<()> @@ -1133,7 +1133,7 @@ where P0: windows_core::Param, { 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.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() + GetDiskFreeSpaceExA(lpdirectoryname.param().abi(), core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetDiskFreeSpaceExW(lpdirectoryname: P0, lpfreebytesavailabletocaller: Option<*mut u64>, lptotalnumberofbytes: Option<*mut u64>, lptotalnumberoffreebytes: Option<*mut u64>) -> windows_core::Result<()> @@ -1141,7 +1141,7 @@ where P0: windows_core::Param, { 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.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() + GetDiskFreeSpaceExW(lpdirectoryname.param().abi(), core::mem::transmute(lpfreebytesavailabletocaller.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetDiskFreeSpaceW(lprootpathname: P0, lpsectorspercluster: Option<*mut u32>, lpbytespersector: Option<*mut u32>, lpnumberoffreeclusters: Option<*mut u32>, lptotalnumberofclusters: Option<*mut u32>) -> windows_core::Result<()> @@ -1149,7 +1149,7 @@ where P0: windows_core::Param, { 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.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() + GetDiskFreeSpaceW(lprootpathname.param().abi(), core::mem::transmute(lpsectorspercluster.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpbytespersector.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpnumberoffreeclusters.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalnumberofclusters.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetDiskSpaceInformationA(rootpath: P0, diskspaceinfo: *mut DISK_SPACE_INFORMATION) -> windows_core::Result<()> @@ -1311,7 +1311,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFileSize(hfile : super::super::Foundation:: HANDLE, lpfilesizehigh : *mut u32) -> u32); - GetFileSize(hfile.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(std::ptr::null_mut()))) + GetFileSize(hfile.param().abi(), core::mem::transmute(lpfilesizehigh.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFileSizeEx(hfile: P0, lpfilesize: *mut i64) -> windows_core::Result<()> @@ -1327,7 +1327,7 @@ where P0: windows_core::Param, { 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.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() + GetFileTime(hfile.param().abi(), core::mem::transmute(lpcreationtime.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplastaccesstime.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplastwritetime.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetFileType(hfile: P0) -> FILE_TYPE @@ -1367,7 +1367,7 @@ where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeA(lptstrfilename : windows_core::PCSTR, lpdwhandle : *mut u32) -> u32); - GetFileVersionInfoSizeA(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(std::ptr::null_mut()))) + GetFileVersionInfoSizeA(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFileVersionInfoSizeExA(dwflags: GET_FILE_VERSION_INFO_FLAGS, lpwstrfilename: P0, lpdwhandle: *mut u32) -> u32 @@ -1391,7 +1391,7 @@ where P0: windows_core::Param, { windows_targets::link!("version.dll" "system" fn GetFileVersionInfoSizeW(lptstrfilename : windows_core::PCWSTR, lpdwhandle : *mut u32) -> u32); - GetFileVersionInfoSizeW(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(std::ptr::null_mut()))) + GetFileVersionInfoSizeW(lptstrfilename.param().abi(), core::mem::transmute(lpdwhandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFileVersionInfoW(lptstrfilename: P0, dwhandle: u32, dwlen: u32, lpdata: *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1423,7 +1423,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameA(lpfilename : windows_core::PCSTR, nbufferlength : u32, lpbuffer : windows_core::PSTR, lpfilepart : *mut windows_core::PSTR) -> u32); - GetFullPathNameA(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut()))) + GetFullPathNameA(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFullPathNameTransactedA(lpfilename: P0, lpbuffer: Option<&mut [u8]>, lpfilepart: Option<*mut windows_core::PSTR>, htransaction: P1) -> u32 @@ -1432,7 +1432,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameTransactedA(lpfilename : windows_core::PCSTR, nbufferlength : u32, lpbuffer : windows_core::PSTR, lpfilepart : *mut windows_core::PSTR, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetFullPathNameTransactedA(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut())), htransaction.param().abi()) + GetFullPathNameTransactedA(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut())), htransaction.param().abi()) } #[inline] pub unsafe fn GetFullPathNameTransactedW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>, htransaction: P1) -> u32 @@ -1441,7 +1441,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameTransactedW(lpfilename : windows_core::PCWSTR, nbufferlength : u32, lpbuffer : windows_core::PWSTR, lpfilepart : *mut windows_core::PWSTR, htransaction : super::super::Foundation:: HANDLE) -> u32); - GetFullPathNameTransactedW(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut())), htransaction.param().abi()) + GetFullPathNameTransactedW(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut())), htransaction.param().abi()) } #[inline] pub unsafe fn GetFullPathNameW(lpfilename: P0, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -1449,7 +1449,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFullPathNameW(lpfilename : windows_core::PCWSTR, nbufferlength : u32, lpbuffer : windows_core::PWSTR, lpfilepart : *mut windows_core::PWSTR) -> u32); - GetFullPathNameW(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut()))) + GetFullPathNameW(lpfilename.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetIoRingInfo(ioring: P0, info: *mut IORING_INFO) -> windows_core::Result<()> @@ -1672,9 +1672,9 @@ where lprootpathname.param().abi(), core::mem::transmute(lpvolumenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(lpvolumeserialnumber.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpfilesystemflags.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpvolumeserialnumber.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) @@ -1690,9 +1690,9 @@ where hfile.param().abi(), core::mem::transmute(lpvolumenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(lpvolumeserialnumber.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpfilesystemflags.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpvolumeserialnumber.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) @@ -1708,9 +1708,9 @@ where lprootpathname.param().abi(), core::mem::transmute(lpvolumenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpvolumenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(lpvolumeserialnumber.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpmaximumcomponentlength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpfilesystemflags.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpvolumeserialnumber.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpmaximumcomponentlength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpfilesystemflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfilesystemnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpfilesystemnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), ) @@ -1963,7 +1963,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), dwflags, htransaction.param().abi()).ok() + MoveFileTransactedA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), dwflags, htransaction.param().abi()).ok() } #[inline] pub unsafe fn MoveFileTransactedW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS, htransaction: P2) -> windows_core::Result<()> @@ -1973,7 +1973,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), dwflags, htransaction.param().abi()).ok() + MoveFileTransactedW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), dwflags, htransaction.param().abi()).ok() } #[inline] pub unsafe fn MoveFileW(lpexistingfilename: P0, lpnewfilename: P1) -> windows_core::Result<()> @@ -1991,7 +1991,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), dwflags).ok() + MoveFileWithProgressA(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn MoveFileWithProgressW(lpexistingfilename: P0, lpnewfilename: P1, lpprogressroutine: LPPROGRESS_ROUTINE, lpdata: Option<*const core::ffi::c_void>, dwflags: MOVE_FILE_FLAGS) -> windows_core::Result<()> @@ -2000,7 +2000,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), dwflags).ok() + MoveFileWithProgressW(lpexistingfilename.param().abi(), lpnewfilename.param().abi(), lpprogressroutine, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn NetConnectionEnum(servername: P0, qualifier: P1, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 @@ -2009,7 +2009,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetConnectionEnum(servername : windows_core::PCWSTR, qualifier : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetConnectionEnum(servername.param().abi(), qualifier.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetConnectionEnum(servername.param().abi(), qualifier.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetFileClose(servername: P0, fileid: u32) -> u32 @@ -2027,7 +2027,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetFileEnum(servername : windows_core::PCWSTR, basepath : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut usize) -> u32); - NetFileEnum(servername.param().abi(), basepath.param().abi(), username.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetFileEnum(servername.param().abi(), basepath.param().abi(), username.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetFileGetInfo(servername: P0, fileid: u32, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2059,7 +2059,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetServerAliasEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resumehandle : *mut u32) -> u32); - NetServerAliasEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(std::ptr::null_mut()))) + NetServerAliasEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resumehandle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetSessionDel(servername: P0, uncclientname: P1, username: P2) -> u32 @@ -2079,7 +2079,7 @@ where P2: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetSessionEnum(servername : windows_core::PCWSTR, uncclientname : windows_core::PCWSTR, username : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetSessionEnum(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetSessionEnum(servername.param().abi(), uncclientname.param().abi(), username.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetSessionGetInfo(servername: P0, uncclientname: P1, username: P2, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2097,7 +2097,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareAdd(servername : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetShareAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetShareAdd(servername.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetShareCheck(servername: P0, device: P1, r#type: *mut u32) -> u32 @@ -2140,7 +2140,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareEnum(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetShareEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetShareEnum(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetShareEnumSticky(servername: P0, level: u32, bufptr: *mut *mut u8, prefmaxlen: u32, entriesread: *mut u32, totalentries: *mut u32, resume_handle: Option<*mut u32>) -> u32 @@ -2148,7 +2148,7 @@ where P0: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareEnumSticky(servername : windows_core::PCWSTR, level : u32, bufptr : *mut *mut u8, prefmaxlen : u32, entriesread : *mut u32, totalentries : *mut u32, resume_handle : *mut u32) -> u32); - NetShareEnumSticky(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(std::ptr::null_mut()))) + NetShareEnumSticky(servername.param().abi(), level, bufptr, prefmaxlen, entriesread, totalentries, core::mem::transmute(resume_handle.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetShareGetInfo(servername: P0, netname: P1, level: u32, bufptr: *mut *mut u8) -> u32 @@ -2166,7 +2166,7 @@ where P1: windows_core::Param, { windows_targets::link!("netapi32.dll" "system" fn NetShareSetInfo(servername : windows_core::PCWSTR, netname : windows_core::PCWSTR, level : u32, buf : *const u8, parm_err : *mut u32) -> u32); - NetShareSetInfo(servername.param().abi(), netname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(std::ptr::null_mut()))) + NetShareSetInfo(servername.param().abi(), netname.param().abi(), level, buf, core::mem::transmute(parm_err.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn NetStatisticsGet(servername: *const i8, service: *const i8, level: u32, options: u32, buffer: *mut *mut u8) -> u32 { @@ -2213,7 +2213,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn OpenFileById(hvolumehint : super::super::Foundation:: HANDLE, lpfileid : *const FILE_ID_DESCRIPTOR, dwdesiredaccess : u32, dwsharemode : FILE_SHARE_MODE, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwflagsandattributes : FILE_FLAGS_AND_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = OpenFileById(hvolumehint.param().abi(), lpfileid, dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwflagsandattributes); + let result__ = OpenFileById(hvolumehint.param().abi(), lpfileid, dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwflagsandattributes); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -2292,7 +2292,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len().try_into().unwrap(), 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() + PrepareLogArchive(hlog.param().abi(), core::mem::transmute(pszbaselogfilename.as_ptr()), pszbaselogfilename.len().try_into().unwrap(), core::mem::transmute(plsnlow.unwrap_or(core::ptr::null())), core::mem::transmute(plsnhigh.unwrap_or(core::ptr::null())), core::mem::transmute(pcactuallength.unwrap_or(core::ptr::null_mut())), poffbaselogfiledata, pcbbaselogfilelength, plsnbase, plsnlast, plsncurrentarchivetail, ppvarchivecontext).ok() } #[inline] pub unsafe fn PrepareTape(hdevice: P0, dwoperation: PREPARE_TAPE_OPERATION, bimmediate: P1) -> u32 @@ -2368,7 +2368,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpbuffer, nbufferlength, bwatchsubtree.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() + ReadDirectoryChangesExW(hdirectory.param().abi(), lpbuffer, nbufferlength, bwatchsubtree.param().abi(), dwnotifyfilter, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine, readdirectorynotifyinformationclass).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2378,12 +2378,12 @@ where P1: windows_core::Param, { 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.param().abi(), lpbuffer, nbufferlength, bwatchsubtree.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() + ReadDirectoryChangesW(hdirectory.param().abi(), lpbuffer, nbufferlength, bwatchsubtree.param().abi(), dwnotifyfilter, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), lpcompletionroutine).ok() } #[inline] pub unsafe fn ReadEncryptedFileRaw(pfexportcallback: PFE_EXPORT_FUNC, pvcallbackcontext: Option<*const core::ffi::c_void>, pvcontext: *const core::ffi::c_void) -> u32 { windows_targets::link!("advapi32.dll" "system" fn ReadEncryptedFileRaw(pfexportcallback : PFE_EXPORT_FUNC, pvcallbackcontext : *const core::ffi::c_void, pvcontext : *const core::ffi::c_void) -> u32); - ReadEncryptedFileRaw(pfexportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(std::ptr::null())), pvcontext) + ReadEncryptedFileRaw(pfexportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), pvcontext) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2392,7 +2392,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn ReadFile(hfile : super::super::Foundation:: HANDLE, lpbuffer : *mut u8, nnumberofbytestoread : u32, lpnumberofbytesread : *mut u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ReadFile(hfile.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().try_into().unwrap()), core::mem::transmute(lpnumberofbytesread.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut()))).ok() + ReadFile(hfile.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().try_into().unwrap()), core::mem::transmute(lpnumberofbytesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2410,7 +2410,7 @@ where P0: windows_core::Param, { 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.param().abi(), asegmentarray, nnumberofbytestoread, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), lpoverlapped).ok() + ReadFileScatter(hfile.param().abi(), asegmentarray, nnumberofbytestoread, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), lpoverlapped).ok() } #[inline] pub unsafe fn ReadLogArchiveMetadata(pvarchivecontext: *mut core::ffi::c_void, cboffset: u32, cbbytestoread: u32, pbreadbuffer: *mut u8, pcbbytesread: *mut u32) -> windows_core::Result<()> { @@ -2549,7 +2549,7 @@ where P2: windows_core::Param, { 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.param().abi(), pwszcontainerpath.param().abi(), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))).ok() + RemoveLogContainer(hlog.param().abi(), pwszcontainerpath.param().abi(), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RemoveLogContainerSet(hlog: P0, rgwszcontainerpath: &[windows_core::PCWSTR], fforce: P1, preserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> @@ -2558,7 +2558,7 @@ where P1: windows_core::Param, { 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.param().abi(), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(std::ptr::null_mut()))).ok() + RemoveLogContainerSet(hlog.param().abi(), rgwszcontainerpath.len().try_into().unwrap(), core::mem::transmute(rgwszcontainerpath.as_ptr()), fforce.param().abi(), core::mem::transmute(preserved.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RemoveLogPolicy(hlog: P0, epolicytype: CLFS_MGMT_POLICY_TYPE) -> windows_core::Result<()> @@ -2593,7 +2593,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + ReplaceFileA(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ReplaceFileFromAppW(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: u32, lpexclude: Option<*const core::ffi::c_void>, lpreserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -2603,7 +2603,7 @@ where P2: windows_core::Param, { windows_targets::link!("api-ms-win-core-file-fromapp-l1-1-0.dll" "system" fn ReplaceFileFromAppW(lpreplacedfilename : windows_core::PCWSTR, lpreplacementfilename : windows_core::PCWSTR, lpbackupfilename : windows_core::PCWSTR, dwreplaceflags : u32, lpexclude : *const core::ffi::c_void, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReplaceFileFromAppW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + ReplaceFileFromAppW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ReplaceFileW(lpreplacedfilename: P0, lpreplacementfilename: P1, lpbackupfilename: P2, dwreplaceflags: REPLACE_FILE_FLAGS, lpexclude: Option<*const core::ffi::c_void>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2613,7 +2613,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(std::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + ReplaceFileW(lpreplacedfilename.param().abi(), lpreplacementfilename.param().abi(), lpbackupfilename.param().abi(), dwreplaceflags, core::mem::transmute(lpexclude.unwrap_or(core::ptr::null())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -2680,7 +2680,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SearchPathA(lppath : windows_core::PCSTR, lpfilename : windows_core::PCSTR, lpextension : windows_core::PCSTR, nbufferlength : u32, lpbuffer : windows_core::PSTR, lpfilepart : *mut windows_core::PSTR) -> u32); - SearchPathA(lppath.param().abi(), lpfilename.param().abi(), lpextension.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut()))) + SearchPathA(lppath.param().abi(), lpfilename.param().abi(), lpextension.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SearchPathW(lppath: P0, lpfilename: P1, lpextension: P2, lpbuffer: Option<&mut [u16]>, lpfilepart: Option<*mut windows_core::PWSTR>) -> u32 @@ -2690,7 +2690,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SearchPathW(lppath : windows_core::PCWSTR, lpfilename : windows_core::PCWSTR, lpextension : windows_core::PCWSTR, nbufferlength : u32, lpbuffer : windows_core::PWSTR, lpfilepart : *mut windows_core::PWSTR) -> u32); - SearchPathW(lppath.param().abi(), lpfilename.param().abi(), lpextension.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(std::ptr::null_mut()))) + SearchPathW(lppath.param().abi(), lpfilename.param().abi(), lpextension.param().abi(), lpbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lpfilepart.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2699,7 +2699,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn SetEncryptedFileMetadata(lpfilename : windows_core::PCWSTR, pboldmetadata : *const u8, pbnewmetadata : *const u8, pownerhash : *const ENCRYPTION_CERTIFICATE_HASH, dwoperation : u32, pcertificatesadded : *const ENCRYPTION_CERTIFICATE_HASH_LIST) -> u32); - SetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pboldmetadata.unwrap_or(std::ptr::null())), pbnewmetadata, pownerhash, dwoperation, core::mem::transmute(pcertificatesadded.unwrap_or(std::ptr::null()))) + SetEncryptedFileMetadata(lpfilename.param().abi(), core::mem::transmute(pboldmetadata.unwrap_or(core::ptr::null())), pbnewmetadata, pownerhash, dwoperation, core::mem::transmute(pcertificatesadded.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetEndOfFile(hfile: P0) -> windows_core::Result<()> @@ -2817,7 +2817,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetFilePointer(hfile : super::super::Foundation:: HANDLE, ldistancetomove : i32, lpdistancetomovehigh : *mut i32, dwmovemethod : SET_FILE_POINTER_MOVE_METHOD) -> u32); - SetFilePointer(hfile.param().abi(), ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(std::ptr::null_mut())), dwmovemethod) + SetFilePointer(hfile.param().abi(), ldistancetomove, core::mem::transmute(lpdistancetomovehigh.unwrap_or(core::ptr::null_mut())), dwmovemethod) } #[inline] pub unsafe fn SetFilePointerEx(hfile: P0, lidistancetomove: i64, lpnewfilepointer: Option<*mut i64>, dwmovemethod: SET_FILE_POINTER_MOVE_METHOD) -> windows_core::Result<()> @@ -2825,7 +2825,7 @@ where P0: windows_core::Param, { 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.param().abi(), lidistancetomove, core::mem::transmute(lpnewfilepointer.unwrap_or(std::ptr::null_mut())), dwmovemethod).ok() + SetFilePointerEx(hfile.param().abi(), lidistancetomove, core::mem::transmute(lpnewfilepointer.unwrap_or(core::ptr::null_mut())), dwmovemethod).ok() } #[inline] pub unsafe fn SetFileShortNameA(hfile: P0, lpshortname: P1) -> windows_core::Result<()> @@ -2851,7 +2851,7 @@ where P0: windows_core::Param, { 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.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() + SetFileTime(hfile.param().abi(), core::mem::transmute(lpcreationtime.unwrap_or(core::ptr::null())), core::mem::transmute(lplastaccesstime.unwrap_or(core::ptr::null())), core::mem::transmute(lplastwritetime.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SetFileValidData(hfile: P0, validdatalength: i64) -> windows_core::Result<()> @@ -2938,13 +2938,13 @@ where #[inline] pub unsafe fn SetUserFileEncryptionKey(pencryptioncertificate: Option<*const ENCRYPTION_CERTIFICATE>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn SetUserFileEncryptionKey(pencryptioncertificate : *const ENCRYPTION_CERTIFICATE) -> u32); - SetUserFileEncryptionKey(core::mem::transmute(pencryptioncertificate.unwrap_or(std::ptr::null()))) + SetUserFileEncryptionKey(core::mem::transmute(pencryptioncertificate.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn SetUserFileEncryptionKeyEx(pencryptioncertificate: Option<*const ENCRYPTION_CERTIFICATE>, dwcapabilities: u32, dwflags: u32, pvreserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn SetUserFileEncryptionKeyEx(pencryptioncertificate : *const ENCRYPTION_CERTIFICATE, dwcapabilities : u32, dwflags : u32, pvreserved : *const core::ffi::c_void) -> u32); - SetUserFileEncryptionKeyEx(core::mem::transmute(pencryptioncertificate.unwrap_or(std::ptr::null())), dwcapabilities, dwflags, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + SetUserFileEncryptionKeyEx(core::mem::transmute(pencryptioncertificate.unwrap_or(core::ptr::null())), dwcapabilities, dwflags, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetVolumeLabelA(lprootpathname: P0, lpvolumename: P1) -> windows_core::Result<()> @@ -2996,7 +2996,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-ioring-l1-1-0.dll" "system" fn SubmitIoRing(ioring : HIORING, waitoperations : u32, milliseconds : u32, submittedentries : *mut u32) -> windows_core::HRESULT); - SubmitIoRing(ioring.param().abi(), waitoperations, milliseconds, core::mem::transmute(submittedentries.unwrap_or(std::ptr::null_mut()))).ok() + SubmitIoRing(ioring.param().abi(), waitoperations, milliseconds, core::mem::transmute(submittedentries.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn TerminateLogArchive(pvarchivecontext: *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -3012,7 +3012,7 @@ pub unsafe fn TerminateReadLog(pvcursorcontext: *mut core::ffi::c_void) -> windo #[inline] pub unsafe fn TruncateLog(pvmarshal: *const core::ffi::c_void, plsnend: *const CLS_LSN, lpoverlapped: 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()))).ok() + TruncateLog(pvmarshal, plsnend, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn TxfGetThreadMiniVersionForCreate() -> u16 { @@ -3050,12 +3050,12 @@ pub unsafe fn TxfLogReadRecords(txflogcontext: *const core::ffi::c_void, bufferl #[inline] pub unsafe fn TxfLogRecordGetFileName(recordbuffer: *const core::ffi::c_void, recordbufferlengthinbytes: u32, namebuffer: windows_core::PWSTR, namebufferlengthinbytes: *mut u32, txfid: Option<*mut TXF_ID>) -> super::super::Foundation::BOOL { windows_targets::link!("txfw32.dll" "system" fn TxfLogRecordGetFileName(recordbuffer : *const core::ffi::c_void, recordbufferlengthinbytes : u32, namebuffer : windows_core::PWSTR, namebufferlengthinbytes : *mut u32, txfid : *mut TXF_ID) -> super::super::Foundation:: BOOL); - TxfLogRecordGetFileName(recordbuffer, recordbufferlengthinbytes, core::mem::transmute(namebuffer), namebufferlengthinbytes, core::mem::transmute(txfid.unwrap_or(std::ptr::null_mut()))) + TxfLogRecordGetFileName(recordbuffer, recordbufferlengthinbytes, core::mem::transmute(namebuffer), namebufferlengthinbytes, core::mem::transmute(txfid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn TxfLogRecordGetGenericType(recordbuffer: *const core::ffi::c_void, recordbufferlengthinbytes: u32, generictype: *mut u32, virtualclock: Option<*mut i64>) -> super::super::Foundation::BOOL { windows_targets::link!("txfw32.dll" "system" fn TxfLogRecordGetGenericType(recordbuffer : *const core::ffi::c_void, recordbufferlengthinbytes : u32, generictype : *mut u32, virtualclock : *mut i64) -> super::super::Foundation:: BOOL); - TxfLogRecordGetGenericType(recordbuffer, recordbufferlengthinbytes, generictype, core::mem::transmute(virtualclock.unwrap_or(std::ptr::null_mut()))) + TxfLogRecordGetGenericType(recordbuffer, recordbufferlengthinbytes, generictype, core::mem::transmute(virtualclock.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn TxfReadMetadataInfo(filehandle: P0, txffileid: *mut TXF_ID, lastlsn: *mut CLS_LSN, transactionstate: *mut u32, lockingtransaction: *mut windows_core::GUID) -> super::super::Foundation::BOOL @@ -3172,7 +3172,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofEnumEntries(volumename : windows_core::PCWSTR, provider : u32, enumproc : WofEnumEntryProc, userdata : *const core::ffi::c_void) -> windows_core::HRESULT); - WofEnumEntries(volumename.param().abi(), provider, enumproc, core::mem::transmute(userdata.unwrap_or(std::ptr::null()))).ok() + WofEnumEntries(volumename.param().abi(), provider, enumproc, core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WofFileEnumFiles(volumename: P0, algorithm: u32, enumproc: WofEnumFilesProc, userdata: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -3180,7 +3180,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofFileEnumFiles(volumename : windows_core::PCWSTR, algorithm : u32, enumproc : WofEnumFilesProc, userdata : *const core::ffi::c_void) -> windows_core::HRESULT); - WofFileEnumFiles(volumename.param().abi(), algorithm, enumproc, core::mem::transmute(userdata.unwrap_or(std::ptr::null()))).ok() + WofFileEnumFiles(volumename.param().abi(), algorithm, enumproc, core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WofGetDriverVersion(fileorvolumehandle: P0, provider: u32) -> windows_core::Result @@ -3197,7 +3197,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofIsExternalFile(filepath : windows_core::PCWSTR, isexternalfile : *mut super::super::Foundation:: BOOL, provider : *mut u32, externalfileinfo : *mut core::ffi::c_void, bufferlength : *mut u32) -> windows_core::HRESULT); - WofIsExternalFile(filepath.param().abi(), core::mem::transmute(isexternalfile.unwrap_or(std::ptr::null_mut())), core::mem::transmute(provider.unwrap_or(std::ptr::null_mut())), core::mem::transmute(externalfileinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(bufferlength.unwrap_or(std::ptr::null_mut()))).ok() + WofIsExternalFile(filepath.param().abi(), core::mem::transmute(isexternalfile.unwrap_or(core::ptr::null_mut())), core::mem::transmute(provider.unwrap_or(core::ptr::null_mut())), core::mem::transmute(externalfileinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(bufferlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WofSetFileDataLocation(filehandle: P0, provider: u32, externalfileinfo: *const core::ffi::c_void, length: u32) -> windows_core::Result<()> @@ -3231,7 +3231,7 @@ where P0: windows_core::Param, { windows_targets::link!("wofutil.dll" "system" fn WofWimEnumFiles(volumename : windows_core::PCWSTR, datasourceid : i64, enumproc : WofEnumFilesProc, userdata : *const core::ffi::c_void) -> windows_core::HRESULT); - WofWimEnumFiles(volumename.param().abi(), datasourceid, enumproc, core::mem::transmute(userdata.unwrap_or(std::ptr::null()))).ok() + WofWimEnumFiles(volumename.param().abi(), datasourceid, enumproc, core::mem::transmute(userdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WofWimRemoveEntry(volumename: P0, datasourceid: i64) -> windows_core::Result<()> @@ -3279,7 +3279,7 @@ pub unsafe fn Wow64RevertWow64FsRedirection(olvalue: *const core::ffi::c_void) - #[inline] pub unsafe fn WriteEncryptedFileRaw(pfimportcallback: PFE_IMPORT_FUNC, pvcallbackcontext: Option<*const core::ffi::c_void>, pvcontext: *const core::ffi::c_void) -> u32 { windows_targets::link!("advapi32.dll" "system" fn WriteEncryptedFileRaw(pfimportcallback : PFE_IMPORT_FUNC, pvcallbackcontext : *const core::ffi::c_void, pvcontext : *const core::ffi::c_void) -> u32); - WriteEncryptedFileRaw(pfimportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(std::ptr::null())), pvcontext) + WriteEncryptedFileRaw(pfimportcallback, core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), pvcontext) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -3288,7 +3288,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()), core::mem::transmute(lpnumberofbyteswritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut()))).ok() + WriteFile(hfile.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().try_into().unwrap()), core::mem::transmute(lpnumberofbyteswritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -3306,7 +3306,7 @@ where P0: windows_core::Param, { 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.param().abi(), asegmentarray, nnumberofbytestowrite, core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), lpoverlapped).ok() + WriteFileGather(hfile.param().abi(), asegmentarray, nnumberofbytestowrite, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), lpoverlapped).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs index a9741fb5dc..83e72e2483 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Imapi/mod.rs @@ -1461,7 +1461,7 @@ impl IDiscRecorder { (windows_core::Interface::vtable(self).GetRecorderType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDisplayNames(&self, pbstrvendorid: Option<*mut windows_core::BSTR>, pbstrproductid: Option<*mut windows_core::BSTR>, pbstrrevision: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDisplayNames)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrvendorid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrproductid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrrevision.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDisplayNames)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstrvendorid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrproductid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrrevision.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetBasePnPID(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs index 512c45a929..28e0251701 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/InstallableFileSystems/mod.rs @@ -35,7 +35,7 @@ where { windows_targets::link!("fltlib.dll" "system" fn FilterConnectCommunicationPort(lpportname : windows_core::PCWSTR, dwoptions : u32, lpcontext : *const core::ffi::c_void, wsizeofcontext : u16, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, hport : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - FilterConnectCommunicationPort(lpportname.param().abi(), dwoptions, core::mem::transmute(lpcontext.unwrap_or(std::ptr::null())), wsizeofcontext, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + FilterConnectCommunicationPort(lpportname.param().abi(), dwoptions, core::mem::transmute(lpcontext.unwrap_or(core::ptr::null())), wsizeofcontext, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn FilterCreate(lpfiltername: P0) -> windows_core::Result @@ -100,7 +100,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterGetMessage(hport : super::super::Foundation:: HANDLE, lpmessagebuffer : *mut FILTER_MESSAGE_HEADER, dwmessagebuffersize : u32, lpoverlapped : *mut super::super::System::IO:: OVERLAPPED) -> windows_core::HRESULT); - FilterGetMessage(hport.param().abi(), lpmessagebuffer, dwmessagebuffersize, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut()))).ok() + FilterGetMessage(hport.param().abi(), lpmessagebuffer, dwmessagebuffersize, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn FilterInstanceClose(hinstance: P0) -> windows_core::Result<()> @@ -175,7 +175,7 @@ where P0: windows_core::Param, { windows_targets::link!("fltlib.dll" "system" fn FilterSendMessage(hport : super::super::Foundation:: HANDLE, lpinbuffer : *const core::ffi::c_void, dwinbuffersize : u32, lpoutbuffer : *mut core::ffi::c_void, dwoutbuffersize : u32, lpbytesreturned : *mut u32) -> windows_core::HRESULT); - FilterSendMessage(hport.param().abi(), lpinbuffer, dwinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(std::ptr::null_mut())), dwoutbuffersize, lpbytesreturned).ok() + FilterSendMessage(hport.param().abi(), lpinbuffer, dwinbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), dwoutbuffersize, lpbytesreturned).ok() } #[inline] pub unsafe fn FilterUnload(lpfiltername: P0) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs index e934d0e461..ee618736ff 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Jet/mod.rs @@ -6,7 +6,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetAddColumnA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const i8, pcolumndef : *const JET_COLUMNDEF, pvdefault : *const core::ffi::c_void, cbdefault : u32, pcolumnid : *mut u32) -> i32); - JetAddColumnA(sesid.param().abi(), tableid.param().abi(), szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(std::ptr::null())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(std::ptr::null_mut()))) + JetAddColumnA(sesid.param().abi(), tableid.param().abi(), szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(core::ptr::null())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -16,7 +16,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetAddColumnW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const u16, pcolumndef : *const JET_COLUMNDEF, pvdefault : *const core::ffi::c_void, cbdefault : u32, pcolumnid : *mut u32) -> i32); - JetAddColumnW(sesid.param().abi(), tableid.param().abi(), szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(std::ptr::null())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(std::ptr::null_mut()))) + JetAddColumnW(sesid.param().abi(), tableid.param().abi(), szcolumnname, pcolumndef, core::mem::transmute(pvdefault.unwrap_or(core::ptr::null())), cbdefault, core::mem::transmute(pcolumnid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetAttachDatabase2A(sesid: P0, szfilename: *const i8, cpgdatabasesizemax: u32, grbit: u32) -> i32 @@ -95,7 +95,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetBeginSessionA(instance : JET_INSTANCE, psesid : *mut JET_SESID, szusername : *const i8, szpassword : *const i8) -> i32); - JetBeginSessionA(instance.param().abi(), psesid, core::mem::transmute(szusername.unwrap_or(std::ptr::null())), core::mem::transmute(szpassword.unwrap_or(std::ptr::null()))) + JetBeginSessionA(instance.param().abi(), psesid, core::mem::transmute(szusername.unwrap_or(core::ptr::null())), core::mem::transmute(szpassword.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JetBeginSessionW(instance: P0, psesid: *mut JET_SESID, szusername: Option<*const u16>, szpassword: Option<*const u16>) -> i32 @@ -103,7 +103,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetBeginSessionW(instance : JET_INSTANCE, psesid : *mut JET_SESID, szusername : *const u16, szpassword : *const u16) -> i32); - JetBeginSessionW(instance.param().abi(), psesid, core::mem::transmute(szusername.unwrap_or(std::ptr::null())), core::mem::transmute(szpassword.unwrap_or(std::ptr::null()))) + JetBeginSessionW(instance.param().abi(), psesid, core::mem::transmute(szusername.unwrap_or(core::ptr::null())), core::mem::transmute(szpassword.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JetBeginTransaction(sesid: P0) -> i32 @@ -180,7 +180,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCommitTransaction2(sesid : JET_SESID, grbit : u32, cmsecdurablecommit : u32, pcommitid : *mut JET_COMMIT_ID) -> i32); - JetCommitTransaction2(sesid.param().abi(), grbit, cmsecdurablecommit, core::mem::transmute(pcommitid.unwrap_or(std::ptr::null_mut()))) + JetCommitTransaction2(sesid.param().abi(), grbit, cmsecdurablecommit, core::mem::transmute(pcommitid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetCompactA(sesid: P0, szdatabasesrc: *const i8, szdatabasedest: *const i8, pfnstatus: JET_PFNSTATUS, pconvert: Option<*const JET_CONVERT_A>, grbit: u32) -> i32 @@ -188,7 +188,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCompactA(sesid : JET_SESID, szdatabasesrc : *const i8, szdatabasedest : *const i8, pfnstatus : JET_PFNSTATUS, pconvert : *const JET_CONVERT_A, grbit : u32) -> i32); - JetCompactA(sesid.param().abi(), szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(std::ptr::null())), grbit) + JetCompactA(sesid.param().abi(), szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetCompactW(sesid: P0, szdatabasesrc: *const u16, szdatabasedest: *const u16, pfnstatus: JET_PFNSTATUS, pconvert: Option<*const JET_CONVERT_W>, grbit: u32) -> i32 @@ -196,7 +196,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCompactW(sesid : JET_SESID, szdatabasesrc : *const u16, szdatabasedest : *const u16, pfnstatus : JET_PFNSTATUS, pconvert : *const JET_CONVERT_W, grbit : u32) -> i32); - JetCompactW(sesid.param().abi(), szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(std::ptr::null())), grbit) + JetCompactW(sesid.param().abi(), szdatabasesrc, szdatabasedest, pfnstatus, core::mem::transmute(pconvert.unwrap_or(core::ptr::null())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -235,7 +235,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCreateDatabaseA(sesid : JET_SESID, szfilename : *const i8, szconnect : *const i8, pdbid : *mut u32, grbit : u32) -> i32); - JetCreateDatabaseA(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(std::ptr::null())), pdbid, grbit) + JetCreateDatabaseA(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), pdbid, grbit) } #[inline] pub unsafe fn JetCreateDatabaseW(sesid: P0, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 @@ -243,7 +243,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetCreateDatabaseW(sesid : JET_SESID, szfilename : *const u16, szconnect : *const u16, pdbid : *mut u32, grbit : u32) -> i32); - JetCreateDatabaseW(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(std::ptr::null())), pdbid, grbit) + JetCreateDatabaseW(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), pdbid, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -329,22 +329,22 @@ where #[inline] pub unsafe fn JetCreateInstance2A(pinstance: *mut JET_INSTANCE, szinstancename: Option<*const i8>, szdisplayname: Option<*const i8>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateInstance2A(pinstance : *mut JET_INSTANCE, szinstancename : *const i8, szdisplayname : *const i8, grbit : u32) -> i32); - JetCreateInstance2A(pinstance, core::mem::transmute(szinstancename.unwrap_or(std::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(std::ptr::null())), grbit) + JetCreateInstance2A(pinstance, core::mem::transmute(szinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetCreateInstance2W(pinstance: *mut JET_INSTANCE, szinstancename: Option<*const u16>, szdisplayname: Option<*const u16>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateInstance2W(pinstance : *mut JET_INSTANCE, szinstancename : *const u16, szdisplayname : *const u16, grbit : u32) -> i32); - JetCreateInstance2W(pinstance, core::mem::transmute(szinstancename.unwrap_or(std::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(std::ptr::null())), grbit) + JetCreateInstance2W(pinstance, core::mem::transmute(szinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(szdisplayname.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetCreateInstanceA(pinstance: *mut JET_INSTANCE, szinstancename: Option<*const i8>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateInstanceA(pinstance : *mut JET_INSTANCE, szinstancename : *const i8) -> i32); - JetCreateInstanceA(pinstance, core::mem::transmute(szinstancename.unwrap_or(std::ptr::null()))) + JetCreateInstanceA(pinstance, core::mem::transmute(szinstancename.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JetCreateInstanceW(pinstance: *mut JET_INSTANCE, szinstancename: Option<*const u16>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetCreateInstanceW(pinstance : *mut JET_INSTANCE, szinstancename : *const u16) -> i32); - JetCreateInstanceW(pinstance, core::mem::transmute(szinstancename.unwrap_or(std::ptr::null()))) + JetCreateInstanceW(pinstance, core::mem::transmute(szinstancename.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -443,7 +443,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragment2A(sesid : JET_SESID, dbid : u32, sztablename : *const i8, pcpasses : *mut u32, pcseconds : *mut u32, callback : JET_CALLBACK, grbit : u32) -> i32); - JetDefragment2A(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), callback, grbit) + JetDefragment2A(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), callback, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -452,7 +452,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragment2W(sesid : JET_SESID, dbid : u32, sztablename : *const u16, pcpasses : *mut u32, pcseconds : *mut u32, callback : JET_CALLBACK, grbit : u32) -> i32); - JetDefragment2W(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), callback, grbit) + JetDefragment2W(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), callback, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -461,7 +461,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragment3A(sesid : JET_SESID, szdatabasename : *const i8, sztablename : *const i8, pcpasses : *mut u32, pcseconds : *mut u32, callback : JET_CALLBACK, pvcontext : *const core::ffi::c_void, grbit : u32) -> i32); - JetDefragment3A(sesid.param().abi(), szdatabasename, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), callback, pvcontext, grbit) + JetDefragment3A(sesid.param().abi(), szdatabasename, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), callback, pvcontext, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -470,7 +470,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragment3W(sesid : JET_SESID, szdatabasename : *const u16, sztablename : *const u16, pcpasses : *mut u32, pcseconds : *mut u32, callback : JET_CALLBACK, pvcontext : *const core::ffi::c_void, grbit : u32) -> i32); - JetDefragment3W(sesid.param().abi(), szdatabasename, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), callback, pvcontext, grbit) + JetDefragment3W(sesid.param().abi(), szdatabasename, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), callback, pvcontext, grbit) } #[inline] pub unsafe fn JetDefragmentA(sesid: P0, dbid: u32, sztablename: Option<*const i8>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, grbit: u32) -> i32 @@ -478,7 +478,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragmentA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, pcpasses : *mut u32, pcseconds : *mut u32, grbit : u32) -> i32); - JetDefragmentA(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), grbit) + JetDefragmentA(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), grbit) } #[inline] pub unsafe fn JetDefragmentW(sesid: P0, dbid: u32, sztablename: Option<*const u16>, pcpasses: Option<*mut u32>, pcseconds: Option<*mut u32>, grbit: u32) -> i32 @@ -486,7 +486,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDefragmentW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, pcpasses : *mut u32, pcseconds : *mut u32, grbit : u32) -> i32); - JetDefragmentW(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(std::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(std::ptr::null_mut())), grbit) + JetDefragmentW(sesid.param().abi(), dbid, core::mem::transmute(sztablename.unwrap_or(core::ptr::null())), core::mem::transmute(pcpasses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcseconds.unwrap_or(core::ptr::null_mut())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -580,7 +580,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDetachDatabase2A(sesid : JET_SESID, szfilename : *const i8, grbit : u32) -> i32); - JetDetachDatabase2A(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(std::ptr::null())), grbit) + JetDetachDatabase2A(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetDetachDatabase2W(sesid: P0, szfilename: Option<*const u16>, grbit: u32) -> i32 @@ -588,7 +588,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDetachDatabase2W(sesid : JET_SESID, szfilename : *const u16, grbit : u32) -> i32); - JetDetachDatabase2W(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(std::ptr::null())), grbit) + JetDetachDatabase2W(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetDetachDatabaseA(sesid: P0, szfilename: Option<*const i8>) -> i32 @@ -596,7 +596,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDetachDatabaseA(sesid : JET_SESID, szfilename : *const i8) -> i32); - JetDetachDatabaseA(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(std::ptr::null()))) + JetDetachDatabaseA(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JetDetachDatabaseW(sesid: P0, szfilename: Option<*const u16>) -> i32 @@ -604,7 +604,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetDetachDatabaseW(sesid : JET_SESID, szfilename : *const u16) -> i32); - JetDetachDatabaseW(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(std::ptr::null()))) + JetDetachDatabaseW(sesid.param().abi(), core::mem::transmute(szfilename.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -628,13 +628,13 @@ where #[inline] pub unsafe fn JetEnableMultiInstanceA(psetsysparam: Option<&[JET_SETSYSPARAM_A]>, pcsetsucceed: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetEnableMultiInstanceA(psetsysparam : *const JET_SETSYSPARAM_A, csetsysparam : u32, pcsetsucceed : *mut u32) -> i32); - JetEnableMultiInstanceA(core::mem::transmute(psetsysparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcsetsucceed.unwrap_or(std::ptr::null_mut()))) + JetEnableMultiInstanceA(core::mem::transmute(psetsysparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcsetsucceed.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] pub unsafe fn JetEnableMultiInstanceW(psetsysparam: Option<&[JET_SETSYSPARAM_W]>, pcsetsucceed: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetEnableMultiInstanceW(psetsysparam : *const JET_SETSYSPARAM_W, csetsysparam : u32, pcsetsucceed : *mut u32) -> i32); - JetEnableMultiInstanceW(core::mem::transmute(psetsysparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcsetsucceed.unwrap_or(std::ptr::null_mut()))) + JetEnableMultiInstanceW(core::mem::transmute(psetsysparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psetsysparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcsetsucceed.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetEndExternalBackup() -> i32 { @@ -673,7 +673,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetEnumerateColumns(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, cenumcolumnid : u32, rgenumcolumnid : *const JET_ENUMCOLUMNID, pcenumcolumn : *mut u32, prgenumcolumn : *mut *mut JET_ENUMCOLUMN, pfnrealloc : JET_PFNREALLOC, pvrealloccontext : *const core::ffi::c_void, cbdatamost : u32, grbit : u32) -> i32); - JetEnumerateColumns(sesid.param().abi(), tableid.param().abi(), rgenumcolumnid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgenumcolumnid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcenumcolumn, prgenumcolumn, pfnrealloc, core::mem::transmute(pvrealloccontext.unwrap_or(std::ptr::null())), cbdatamost, grbit) + JetEnumerateColumns(sesid.param().abi(), tableid.param().abi(), rgenumcolumnid.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgenumcolumnid.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcenumcolumn, prgenumcolumn, pfnrealloc, core::mem::transmute(pvrealloccontext.unwrap_or(core::ptr::null())), cbdatamost, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -683,17 +683,17 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetEscrowUpdate(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, columnid : u32, pv : *const core::ffi::c_void, cbmax : u32, pvold : *mut core::ffi::c_void, cboldmax : u32, pcboldactual : *mut u32, grbit : u32) -> i32); - JetEscrowUpdate(sesid.param().abi(), tableid.param().abi(), columnid, pv, cbmax, core::mem::transmute(pvold.unwrap_or(std::ptr::null_mut())), cboldmax, core::mem::transmute(pcboldactual.unwrap_or(std::ptr::null_mut())), grbit) + JetEscrowUpdate(sesid.param().abi(), tableid.param().abi(), columnid, pv, cbmax, core::mem::transmute(pvold.unwrap_or(core::ptr::null_mut())), cboldmax, core::mem::transmute(pcboldactual.unwrap_or(core::ptr::null_mut())), grbit) } #[inline] pub unsafe fn JetExternalRestore2A(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, ploginfo: *mut JET_LOGINFO_A, sztargetinstancename: Option<*const i8>, sztargetinstancelogpath: Option<*const i8>, sztargetinstancecheckpointpath: Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetExternalRestore2A(szcheckpointfilepath : *const i8, szlogpath : *const i8, rgrstmap : *const JET_RSTMAP_A, crstfilemap : i32, szbackuplogpath : *const i8, ploginfo : *mut JET_LOGINFO_A, sztargetinstancename : *const i8, sztargetinstancelogpath : *const i8, sztargetinstancecheckpointpath : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestore2A(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, core::mem::transmute(sztargetinstancename.unwrap_or(std::ptr::null())), core::mem::transmute(sztargetinstancelogpath.unwrap_or(std::ptr::null())), core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(std::ptr::null())), pfn) + JetExternalRestore2A(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, core::mem::transmute(sztargetinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(sztargetinstancelogpath.unwrap_or(core::ptr::null())), core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetExternalRestore2W(szcheckpointfilepath: *const u16, szlogpath: *const u16, rgrstmap: Option<&[JET_RSTMAP_W]>, szbackuplogpath: *const u16, ploginfo: *mut JET_LOGINFO_W, sztargetinstancename: Option<*const u16>, sztargetinstancelogpath: Option<*const u16>, sztargetinstancecheckpointpath: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetExternalRestore2W(szcheckpointfilepath : *const u16, szlogpath : *const u16, rgrstmap : *const JET_RSTMAP_W, crstfilemap : i32, szbackuplogpath : *const u16, ploginfo : *mut JET_LOGINFO_W, sztargetinstancename : *const u16, sztargetinstancelogpath : *const u16, sztargetinstancecheckpointpath : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetExternalRestore2W(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, core::mem::transmute(sztargetinstancename.unwrap_or(std::ptr::null())), core::mem::transmute(sztargetinstancelogpath.unwrap_or(std::ptr::null())), core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(std::ptr::null())), pfn) + JetExternalRestore2W(szcheckpointfilepath, szlogpath, core::mem::transmute(rgrstmap.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), rgrstmap.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), szbackuplogpath, ploginfo, core::mem::transmute(sztargetinstancename.unwrap_or(core::ptr::null())), core::mem::transmute(sztargetinstancelogpath.unwrap_or(core::ptr::null())), core::mem::transmute(sztargetinstancecheckpointpath.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetExternalRestoreA(szcheckpointfilepath: *const i8, szlogpath: *const i8, rgrstmap: Option<&[JET_RSTMAP_A]>, szbackuplogpath: *const i8, genlow: i32, genhigh: i32, pfn: JET_PFNSTATUS) -> i32 { @@ -716,7 +716,7 @@ where #[inline] pub unsafe fn JetGetAttachInfoA(szzdatabases: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoA(szzdatabases : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoA(core::mem::transmute(szzdatabases.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetAttachInfoA(core::mem::transmute(szzdatabases.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetAttachInfoInstanceA(instance: P0, szzdatabases: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 @@ -724,7 +724,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoInstanceA(instance : JET_INSTANCE, szzdatabases : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoInstanceA(instance.param().abi(), core::mem::transmute(szzdatabases.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetAttachInfoInstanceA(instance.param().abi(), core::mem::transmute(szzdatabases.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzdatabases.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetAttachInfoInstanceW(instance: P0, szzdatabases: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 @@ -732,12 +732,12 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoInstanceW(instance : JET_INSTANCE, szzdatabases : *mut u16, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoInstanceW(instance.param().abi(), core::mem::transmute(szzdatabases.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetAttachInfoInstanceW(instance.param().abi(), core::mem::transmute(szzdatabases.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetAttachInfoW(wszzdatabases: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetAttachInfoW(wszzdatabases : *mut u16, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetAttachInfoW(core::mem::transmute(wszzdatabases.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetAttachInfoW(core::mem::transmute(wszzdatabases.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -747,7 +747,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetBookmark(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvbookmark : *mut core::ffi::c_void, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetBookmark(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetBookmark(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetColumnInfoA(sesid: P0, dbid: u32, sztablename: *const i8, pcolumnnameorid: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 @@ -755,7 +755,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetColumnInfoA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, pcolumnnameorid : *const i8, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetColumnInfoA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pcolumnnameorid.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetColumnInfoA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pcolumnnameorid.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[inline] pub unsafe fn JetGetColumnInfoW(sesid: P0, dbid: u32, sztablename: *const u16, pwcolumnnameorid: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 @@ -763,7 +763,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetColumnInfoW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, pwcolumnnameorid : *const u16, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetColumnInfoW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pwcolumnnameorid.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetColumnInfoW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pwcolumnnameorid.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -824,7 +824,7 @@ where #[inline] pub unsafe fn JetGetErrorInfoW(pvcontext: Option<*const core::ffi::c_void>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetErrorInfoW(pvcontext : *const core::ffi::c_void, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32, grbit : u32) -> i32); - JetGetErrorInfoW(core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel, grbit) + JetGetErrorInfoW(core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel, grbit) } #[inline] pub unsafe fn JetGetIndexInfoA(sesid: P0, dbid: u32, sztablename: *const i8, szindexname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 @@ -832,7 +832,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetIndexInfoA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, szindexname : *const i8, pvresult : *mut core::ffi::c_void, cbresult : u32, infolevel : u32) -> i32); - JetGetIndexInfoA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), pvresult, cbresult, infolevel) + JetGetIndexInfoA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), pvresult, cbresult, infolevel) } #[inline] pub unsafe fn JetGetIndexInfoW(sesid: P0, dbid: u32, sztablename: *const u16, szindexname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbresult: u32, infolevel: u32) -> i32 @@ -840,7 +840,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetIndexInfoW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, szindexname : *const u16, pvresult : *mut core::ffi::c_void, cbresult : u32, infolevel : u32) -> i32); - JetGetIndexInfoW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), pvresult, cbresult, infolevel) + JetGetIndexInfoW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), pvresult, cbresult, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -885,7 +885,7 @@ where #[inline] pub unsafe fn JetGetLogInfoA(szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoA(szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoA(core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoA(core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetLogInfoInstance2A(instance: P0, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_A>) -> i32 @@ -893,7 +893,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstance2A(instance : JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32, ploginfo : *mut JET_LOGINFO_A) -> i32); - JetGetLogInfoInstance2A(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoInstance2A(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetLogInfoInstance2W(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>, ploginfo: Option<*mut JET_LOGINFO_W>) -> i32 @@ -901,7 +901,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstance2W(instance : JET_INSTANCE, wszzlogs : *mut u16, cbmax : u32, pcbactual : *mut u32, ploginfo : *mut JET_LOGINFO_W) -> i32); - JetGetLogInfoInstance2W(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoInstance2W(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ploginfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetLogInfoInstanceA(instance: P0, szzlogs: Option<&mut [u8]>, pcbactual: Option<*mut u32>) -> i32 @@ -909,7 +909,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstanceA(instance : JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoInstanceA(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoInstanceA(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetLogInfoInstanceW(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 @@ -917,12 +917,12 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoInstanceW(instance : JET_INSTANCE, wszzlogs : *mut u16, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoInstanceW(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoInstanceW(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetLogInfoW(szzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetGetLogInfoW(szzlogs : *mut u16, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetLogInfoW(core::mem::transmute(szzlogs.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetLogInfoW(core::mem::transmute(szzlogs.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetObjectInfoA(sesid: P0, dbid: u32, objtyp: u32, szcontainername: Option<*const i8>, szobjectname: Option<*const i8>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 @@ -930,7 +930,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetObjectInfoA(sesid : JET_SESID, dbid : u32, objtyp : u32, szcontainername : *const i8, szobjectname : *const i8, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetObjectInfoA(sesid.param().abi(), dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(std::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetObjectInfoA(sesid.param().abi(), dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(core::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[inline] pub unsafe fn JetGetObjectInfoW(sesid: P0, dbid: u32, objtyp: u32, szcontainername: Option<*const u16>, szobjectname: Option<*const u16>, pvresult: *mut core::ffi::c_void, cbmax: u32, infolevel: u32) -> i32 @@ -938,7 +938,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetObjectInfoW(sesid : JET_SESID, dbid : u32, objtyp : u32, szcontainername : *const u16, szobjectname : *const u16, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetObjectInfoW(sesid.param().abi(), dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(std::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetObjectInfoW(sesid.param().abi(), dbid, objtyp, core::mem::transmute(szcontainername.unwrap_or(core::ptr::null())), core::mem::transmute(szobjectname.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -978,7 +978,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetSecondaryIndexBookmark(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvsecondarykey : *mut core::ffi::c_void, cbsecondarykeymax : u32, pcbsecondarykeyactual : *mut u32, pvprimarybookmark : *mut core::ffi::c_void, cbprimarybookmarkmax : u32, pcbprimarybookmarkactual : *mut u32, grbit : u32) -> i32); - JetGetSecondaryIndexBookmark(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvsecondarykey.unwrap_or(std::ptr::null_mut())), cbsecondarykeymax, core::mem::transmute(pcbsecondarykeyactual.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvprimarybookmark.unwrap_or(std::ptr::null_mut())), cbprimarybookmarkmax, core::mem::transmute(pcbprimarybookmarkactual.unwrap_or(std::ptr::null_mut())), grbit) + JetGetSecondaryIndexBookmark(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvsecondarykey.unwrap_or(core::ptr::null_mut())), cbsecondarykeymax, core::mem::transmute(pcbsecondarykeyactual.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvprimarybookmark.unwrap_or(core::ptr::null_mut())), cbprimarybookmarkmax, core::mem::transmute(pcbprimarybookmarkactual.unwrap_or(core::ptr::null_mut())), grbit) } #[inline] pub unsafe fn JetGetSessionParameter(sesid: P0, sesparamid: u32, pvparam: &mut [u8], pcbparamactual: Option<*mut u32>) -> i32 @@ -986,7 +986,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetSessionParameter(sesid : JET_SESID, sesparamid : u32, pvparam : *mut core::ffi::c_void, cbparammax : u32, pcbparamactual : *mut u32) -> i32); - JetGetSessionParameter(sesid.param().abi(), sesparamid, core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), core::mem::transmute(pcbparamactual.unwrap_or(std::ptr::null_mut()))) + JetGetSessionParameter(sesid.param().abi(), sesparamid, core::mem::transmute(pvparam.as_ptr()), pvparam.len().try_into().unwrap(), core::mem::transmute(pcbparamactual.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -996,7 +996,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetSystemParameterA(instance : JET_INSTANCE, sesid : JET_SESID, paramid : u32, plparam : *mut super::StructuredStorage:: JET_API_PTR, szparam : *mut i8, cbmax : u32) -> i32); - JetGetSystemParameterA(instance.param().abi(), sesid.param().abi(), paramid, core::mem::transmute(plparam.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + JetGetSystemParameterA(instance.param().abi(), sesid.param().abi(), paramid, core::mem::transmute(plparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szparam.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szparam.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1006,7 +1006,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetSystemParameterW(instance : JET_INSTANCE, sesid : JET_SESID, paramid : u32, plparam : *mut super::StructuredStorage:: JET_API_PTR, szparam : *mut u16, cbmax : u32) -> i32); - JetGetSystemParameterW(instance.param().abi(), sesid.param().abi(), paramid, core::mem::transmute(plparam.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szparam.unwrap_or(std::ptr::null_mut())), cbmax) + JetGetSystemParameterW(instance.param().abi(), sesid.param().abi(), paramid, core::mem::transmute(plparam.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szparam.unwrap_or(core::ptr::null_mut())), cbmax) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1016,7 +1016,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTableColumnInfoA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const i8, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetTableColumnInfoA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetTableColumnInfoA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1026,7 +1026,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTableColumnInfoW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szcolumnname : *const u16, pvresult : *mut core::ffi::c_void, cbmax : u32, infolevel : u32) -> i32); - JetGetTableColumnInfoW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname.unwrap_or(std::ptr::null())), pvresult, cbmax, infolevel) + JetGetTableColumnInfoW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szcolumnname.unwrap_or(core::ptr::null())), pvresult, cbmax, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1036,7 +1036,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTableIndexInfoA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, pvresult : *mut core::ffi::c_void, cbresult : u32, infolevel : u32) -> i32); - JetGetTableIndexInfoA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), pvresult, cbresult, infolevel) + JetGetTableIndexInfoA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), pvresult, cbresult, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1046,7 +1046,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTableIndexInfoW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16, pvresult : *mut core::ffi::c_void, cbresult : u32, infolevel : u32) -> i32); - JetGetTableIndexInfoW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), pvresult, cbresult, infolevel) + JetGetTableIndexInfoW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), pvresult, cbresult, infolevel) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1079,7 +1079,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTruncateLogInfoInstanceA(instance : JET_INSTANCE, szzlogs : *mut i8, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetTruncateLogInfoInstanceA(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetTruncateLogInfoInstanceA(instance.param().abi(), core::mem::transmute(szzlogs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szzlogs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetTruncateLogInfoInstanceW(instance: P0, wszzlogs: Option<*mut u16>, cbmax: u32, pcbactual: Option<*mut u32>) -> i32 @@ -1087,7 +1087,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGetTruncateLogInfoInstanceW(instance : JET_INSTANCE, wszzlogs : *mut u16, cbmax : u32, pcbactual : *mut u32) -> i32); - JetGetTruncateLogInfoInstanceW(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetGetTruncateLogInfoInstanceW(instance.param().abi(), core::mem::transmute(wszzlogs.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetGetVersion(sesid: P0, pwversion: *mut u32) -> i32 @@ -1125,7 +1125,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetGotoSecondaryIndexBookmark(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvsecondarykey : *const core::ffi::c_void, cbsecondarykey : u32, pvprimarybookmark : *const core::ffi::c_void, cbprimarybookmark : u32, grbit : u32) -> i32); - JetGotoSecondaryIndexBookmark(sesid.param().abi(), tableid.param().abi(), pvsecondarykey, cbsecondarykey, core::mem::transmute(pvprimarybookmark.unwrap_or(std::ptr::null())), cbprimarybookmark, grbit) + JetGotoSecondaryIndexBookmark(sesid.param().abi(), tableid.param().abi(), pvsecondarykey, cbsecondarykey, core::mem::transmute(pvprimarybookmark.unwrap_or(core::ptr::null())), cbprimarybookmark, grbit) } #[inline] pub unsafe fn JetGrowDatabase(sesid: P0, dbid: u32, cpg: u32, pcpgreal: *const u32) -> i32 @@ -1156,22 +1156,22 @@ where #[inline] pub unsafe fn JetInit(pinstance: Option<*mut JET_INSTANCE>) -> i32 { windows_targets::link!("esent.dll" "system" fn JetInit(pinstance : *mut JET_INSTANCE) -> i32); - JetInit(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut()))) + JetInit(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JetInit2(pinstance: Option<*mut JET_INSTANCE>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetInit2(pinstance : *mut JET_INSTANCE, grbit : u32) -> i32); - JetInit2(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut())), grbit) + JetInit2(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut())), grbit) } #[inline] pub unsafe fn JetInit3A(pinstance: Option<*mut JET_INSTANCE>, prstinfo: Option<*const JET_RSTINFO_A>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetInit3A(pinstance : *mut JET_INSTANCE, prstinfo : *const JET_RSTINFO_A, grbit : u32) -> i32); - JetInit3A(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(std::ptr::null())), grbit) + JetInit3A(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(core::ptr::null())), grbit) } #[inline] pub unsafe fn JetInit3W(pinstance: Option<*mut JET_INSTANCE>, prstinfo: Option<*const JET_RSTINFO_W>, grbit: u32) -> i32 { windows_targets::link!("esent.dll" "system" fn JetInit3W(pinstance : *mut JET_INSTANCE, prstinfo : *const JET_RSTINFO_W, grbit : u32) -> i32); - JetInit3W(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(std::ptr::null())), grbit) + JetInit3W(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prstinfo.unwrap_or(core::ptr::null())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1190,7 +1190,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetMakeKey(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvdata : *const core::ffi::c_void, cbdata : u32, grbit : u32) -> i32); - JetMakeKey(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata, grbit) + JetMakeKey(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1299,7 +1299,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetOpenDatabaseA(sesid : JET_SESID, szfilename : *const i8, szconnect : *const i8, pdbid : *mut u32, grbit : u32) -> i32); - JetOpenDatabaseA(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(std::ptr::null())), pdbid, grbit) + JetOpenDatabaseA(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), pdbid, grbit) } #[inline] pub unsafe fn JetOpenDatabaseW(sesid: P0, szfilename: *const u16, szconnect: Option<*const u16>, pdbid: *mut u32, grbit: u32) -> i32 @@ -1307,7 +1307,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetOpenDatabaseW(sesid : JET_SESID, szfilename : *const u16, szconnect : *const u16, pdbid : *mut u32, grbit : u32) -> i32); - JetOpenDatabaseW(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(std::ptr::null())), pdbid, grbit) + JetOpenDatabaseW(sesid.param().abi(), szfilename, core::mem::transmute(szconnect.unwrap_or(core::ptr::null())), pdbid, grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1346,7 +1346,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetOpenTableA(sesid : JET_SESID, dbid : u32, sztablename : *const i8, pvparameters : *const core::ffi::c_void, cbparameters : u32, grbit : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID) -> i32); - JetOpenTableA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(std::ptr::null())), cbparameters, grbit, ptableid) + JetOpenTableA(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), cbparameters, grbit, ptableid) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1355,7 +1355,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetOpenTableW(sesid : JET_SESID, dbid : u32, sztablename : *const u16, pvparameters : *const core::ffi::c_void, cbparameters : u32, grbit : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID) -> i32); - JetOpenTableW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(std::ptr::null())), cbparameters, grbit, ptableid) + JetOpenTableW(sesid.param().abi(), dbid, sztablename, core::mem::transmute(pvparameters.unwrap_or(core::ptr::null())), cbparameters, grbit, ptableid) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1382,7 +1382,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetOpenTempTable3(sesid : JET_SESID, prgcolumndef : *const JET_COLUMNDEF, ccolumn : u32, pidxunicode : *const JET_UNICODEINDEX, grbit : u32, ptableid : *mut super::StructuredStorage:: JET_TABLEID, prgcolumnid : *mut u32) -> i32); - JetOpenTempTable3(sesid.param().abi(), prgcolumndef, ccolumn, core::mem::transmute(pidxunicode.unwrap_or(std::ptr::null())), grbit, ptableid, prgcolumnid) + JetOpenTempTable3(sesid.param().abi(), prgcolumndef, ccolumn, core::mem::transmute(pidxunicode.unwrap_or(core::ptr::null())), grbit, ptableid, prgcolumnid) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1420,7 +1420,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetPrereadIndexRanges(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, rgindexranges : *const JET_INDEX_RANGE, cindexranges : u32, pcrangespreread : *mut u32, rgcolumnidpreread : *const u32, ccolumnidpreread : u32, grbit : u32) -> i32); - JetPrereadIndexRanges(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len().try_into().unwrap(), core::mem::transmute(pcrangespreread.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), grbit) + JetPrereadIndexRanges(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(rgindexranges.as_ptr()), rgindexranges.len().try_into().unwrap(), core::mem::transmute(pcrangespreread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rgcolumnidpreread.as_ptr()), rgcolumnidpreread.len().try_into().unwrap(), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1430,7 +1430,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetPrereadKeys(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, rgpvkeys : *const *const core::ffi::c_void, rgcbkeys : *const u32, ckeys : i32, pckeyspreread : *mut i32, grbit : u32) -> i32); - JetPrereadKeys(sesid.param().abi(), tableid.param().abi(), rgpvkeys, rgcbkeys, ckeys, core::mem::transmute(pckeyspreread.unwrap_or(std::ptr::null_mut())), grbit) + JetPrereadKeys(sesid.param().abi(), tableid.param().abi(), rgpvkeys, rgcbkeys, ckeys, core::mem::transmute(pckeyspreread.unwrap_or(core::ptr::null_mut())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1439,7 +1439,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetReadFile(hffile : super::StructuredStorage:: JET_HANDLE, pv : *mut core::ffi::c_void, cb : u32, pcbactual : *mut u32) -> i32); - JetReadFile(hffile.param().abi(), pv, cb, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetReadFile(hffile.param().abi(), pv, cb, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1449,7 +1449,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetReadFileInstance(instance : JET_INSTANCE, hffile : super::StructuredStorage:: JET_HANDLE, pv : *mut core::ffi::c_void, cb : u32, pcbactual : *mut u32) -> i32); - JetReadFileInstance(instance.param().abi(), hffile.param().abi(), pv, cb, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetReadFileInstance(instance.param().abi(), hffile.param().abi(), pv, cb, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1459,7 +1459,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetRegisterCallback(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, cbtyp : u32, pcallback : JET_CALLBACK, pvcontext : *const core::ffi::c_void, phcallbackid : *const super::StructuredStorage:: JET_HANDLE) -> i32); - JetRegisterCallback(sesid.param().abi(), tableid.param().abi(), cbtyp, pcallback, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), phcallbackid) + JetRegisterCallback(sesid.param().abi(), tableid.param().abi(), cbtyp, pcallback, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), phcallbackid) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1526,12 +1526,12 @@ where #[inline] pub unsafe fn JetRestore2A(sz: *const i8, szdest: Option<*const i8>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestore2A(sz : *const i8, szdest : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetRestore2A(sz, core::mem::transmute(szdest.unwrap_or(std::ptr::null())), pfn) + JetRestore2A(sz, core::mem::transmute(szdest.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetRestore2W(sz: *const u16, szdest: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 { windows_targets::link!("esent.dll" "system" fn JetRestore2W(sz : *const u16, szdest : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetRestore2W(sz, core::mem::transmute(szdest.unwrap_or(std::ptr::null())), pfn) + JetRestore2W(sz, core::mem::transmute(szdest.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetRestoreA(szsource: *const i8, pfn: JET_PFNSTATUS) -> i32 { @@ -1544,7 +1544,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetRestoreInstanceA(instance : JET_INSTANCE, sz : *const i8, szdest : *const i8, pfn : JET_PFNSTATUS) -> i32); - JetRestoreInstanceA(instance.param().abi(), sz, core::mem::transmute(szdest.unwrap_or(std::ptr::null())), pfn) + JetRestoreInstanceA(instance.param().abi(), sz, core::mem::transmute(szdest.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetRestoreInstanceW(instance: P0, sz: *const u16, szdest: Option<*const u16>, pfn: JET_PFNSTATUS) -> i32 @@ -1552,7 +1552,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetRestoreInstanceW(instance : JET_INSTANCE, sz : *const u16, szdest : *const u16, pfn : JET_PFNSTATUS) -> i32); - JetRestoreInstanceW(instance.param().abi(), sz, core::mem::transmute(szdest.unwrap_or(std::ptr::null())), pfn) + JetRestoreInstanceW(instance.param().abi(), sz, core::mem::transmute(szdest.unwrap_or(core::ptr::null())), pfn) } #[inline] pub unsafe fn JetRestoreW(szsource: *const u16, pfn: JET_PFNSTATUS) -> i32 { @@ -1567,7 +1567,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetRetrieveColumn(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, columnid : u32, pvdata : *mut core::ffi::c_void, cbdata : u32, pcbactual : *mut u32, grbit : u32, pretinfo : *mut JET_RETINFO) -> i32); - JetRetrieveColumn(sesid.param().abi(), tableid.param().abi(), columnid, core::mem::transmute(pvdata.unwrap_or(std::ptr::null_mut())), cbdata, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut())), grbit, core::mem::transmute(pretinfo.unwrap_or(std::ptr::null_mut()))) + JetRetrieveColumn(sesid.param().abi(), tableid.param().abi(), columnid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), cbdata, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), grbit, core::mem::transmute(pretinfo.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1587,7 +1587,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetRetrieveKey(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvkey : *mut core::ffi::c_void, cbmax : u32, pcbactual : *mut u32, grbit : u32) -> i32); - JetRetrieveKey(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvkey.unwrap_or(std::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut())), grbit) + JetRetrieveKey(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvkey.unwrap_or(core::ptr::null_mut())), cbmax, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), grbit) } #[inline] pub unsafe fn JetRollback(sesid: P0, grbit: u32) -> i32 @@ -1615,7 +1615,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetColumn(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, columnid : u32, pvdata : *const core::ffi::c_void, cbdata : u32, grbit : u32, psetinfo : *const JET_SETINFO) -> i32); - JetSetColumn(sesid.param().abi(), tableid.param().abi(), columnid, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata, grbit, core::mem::transmute(psetinfo.unwrap_or(std::ptr::null()))) + JetSetColumn(sesid.param().abi(), tableid.param().abi(), columnid, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata, grbit, core::mem::transmute(psetinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JetSetColumnDefaultValueA(sesid: P0, dbid: u32, sztablename: *const i8, szcolumnname: *const i8, pvdata: *const core::ffi::c_void, cbdata: u32, grbit: u32) -> i32 @@ -1651,7 +1651,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex2A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, grbit : u32) -> i32); - JetSetCurrentIndex2A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), grbit) + JetSetCurrentIndex2A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1661,7 +1661,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex2W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16, grbit : u32) -> i32); - JetSetCurrentIndex2W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), grbit) + JetSetCurrentIndex2W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), grbit) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1671,7 +1671,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex3A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, grbit : u32, itagsequence : u32) -> i32); - JetSetCurrentIndex3A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), grbit, itagsequence) + JetSetCurrentIndex3A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), grbit, itagsequence) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1681,7 +1681,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex3W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16, grbit : u32, itagsequence : u32) -> i32); - JetSetCurrentIndex3W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), grbit, itagsequence) + JetSetCurrentIndex3W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), grbit, itagsequence) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1691,7 +1691,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex4A(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8, pindexid : *const JET_INDEXID, grbit : u32, itagsequence : u32) -> i32); - JetSetCurrentIndex4A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), core::mem::transmute(pindexid.unwrap_or(std::ptr::null())), grbit, itagsequence) + JetSetCurrentIndex4A(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), grbit, itagsequence) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1701,7 +1701,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndex4W(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16, pindexid : *const JET_INDEXID, grbit : u32, itagsequence : u32) -> i32); - JetSetCurrentIndex4W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null())), core::mem::transmute(pindexid.unwrap_or(std::ptr::null())), grbit, itagsequence) + JetSetCurrentIndex4W(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), grbit, itagsequence) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1711,7 +1711,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndexA(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const i8) -> i32); - JetSetCurrentIndexA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null()))) + JetSetCurrentIndexA(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1721,7 +1721,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetCurrentIndexW(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, szindexname : *const u16) -> i32); - JetSetCurrentIndexW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(std::ptr::null()))) + JetSetCurrentIndexW(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(szindexname.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1786,7 +1786,7 @@ where P0: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetSessionParameter(sesid : JET_SESID, sesparamid : u32, pvparam : *const core::ffi::c_void, cbparam : u32) -> i32); - JetSetSessionParameter(sesid.param().abi(), sesparamid, core::mem::transmute(pvparam.unwrap_or(std::ptr::null())), cbparam) + JetSetSessionParameter(sesid.param().abi(), sesparamid, core::mem::transmute(pvparam.unwrap_or(core::ptr::null())), cbparam) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1796,7 +1796,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetSystemParameterA(pinstance : *mut JET_INSTANCE, sesid : JET_SESID, paramid : u32, lparam : super::StructuredStorage:: JET_API_PTR, szparam : *const i8) -> i32); - JetSetSystemParameterA(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut())), sesid.param().abi(), paramid, lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(std::ptr::null()))) + JetSetSystemParameterA(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut())), sesid.param().abi(), paramid, lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1806,7 +1806,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetSetSystemParameterW(pinstance : *mut JET_INSTANCE, sesid : JET_SESID, paramid : u32, lparam : super::StructuredStorage:: JET_API_PTR, szparam : *const u16) -> i32); - JetSetSystemParameterW(core::mem::transmute(pinstance.unwrap_or(std::ptr::null_mut())), sesid.param().abi(), paramid, lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(std::ptr::null()))) + JetSetSystemParameterW(core::mem::transmute(pinstance.unwrap_or(core::ptr::null_mut())), sesid.param().abi(), paramid, lparam.param().abi(), core::mem::transmute(szparam.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1900,7 +1900,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetUpdate(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvbookmark : *mut core::ffi::c_void, cbbookmark : u32, pcbactual : *mut u32) -> i32); - JetUpdate(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(std::ptr::null_mut())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut()))) + JetUpdate(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(core::ptr::null_mut())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Storage_StructuredStorage")] #[inline] @@ -1910,7 +1910,7 @@ where P1: windows_core::Param, { windows_targets::link!("esent.dll" "system" fn JetUpdate2(sesid : JET_SESID, tableid : super::StructuredStorage:: JET_TABLEID, pvbookmark : *mut core::ffi::c_void, cbbookmark : u32, pcbactual : *mut u32, grbit : u32) -> i32); - JetUpdate2(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(std::ptr::null_mut())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null_mut())), grbit) + JetUpdate2(sesid.param().abi(), tableid.param().abi(), core::mem::transmute(pvbookmark.unwrap_or(core::ptr::null_mut())), cbbookmark, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null_mut())), grbit) } pub const JET_BASE_NAME_LENGTH: u32 = 3u32; pub const JET_ColInfoGrbitMinimalInfo: u32 = 1073741824u32; diff --git a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs index 10cb4b3e40..bbfaabeb0d 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/OfflineFiles/mod.rs @@ -9,12 +9,12 @@ where #[inline] pub unsafe fn OfflineFilesQueryStatus(pbactive: Option<*mut super::super::Foundation::BOOL>, pbenabled: Option<*mut super::super::Foundation::BOOL>) -> u32 { windows_targets::link!("cscapi.dll" "system" fn OfflineFilesQueryStatus(pbactive : *mut super::super::Foundation:: BOOL, pbenabled : *mut super::super::Foundation:: BOOL) -> u32); - OfflineFilesQueryStatus(core::mem::transmute(pbactive.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(std::ptr::null_mut()))) + OfflineFilesQueryStatus(core::mem::transmute(pbactive.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OfflineFilesQueryStatusEx(pbactive: Option<*mut super::super::Foundation::BOOL>, pbenabled: Option<*mut super::super::Foundation::BOOL>, pbavailable: Option<*mut super::super::Foundation::BOOL>) -> u32 { windows_targets::link!("cscapi.dll" "system" fn OfflineFilesQueryStatusEx(pbactive : *mut super::super::Foundation:: BOOL, pbenabled : *mut super::super::Foundation:: BOOL, pbavailable : *mut super::super::Foundation:: BOOL) -> u32); - OfflineFilesQueryStatusEx(core::mem::transmute(pbactive.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbavailable.unwrap_or(std::ptr::null_mut()))) + OfflineFilesQueryStatusEx(core::mem::transmute(pbactive.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbenabled.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbavailable.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn OfflineFilesStart() -> u32 { @@ -99,7 +99,7 @@ impl IOfflineFilesCache { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.param().abi(), dwsynccontrol, pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Synchronize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), core::mem::transmute(rgpszpaths.as_ptr()), rgpszpaths.len().try_into().unwrap(), basync.param().abi(), dwsynccontrol, pisyncconflicthandler.param().abi(), piprogress.param().abi(), core::mem::transmute(psyncid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn DeleteItems(&self, rgpszpaths: &[windows_core::PCWSTR], dwflags: u32, basync: P0, piprogress: P1) -> windows_core::Result<()> where 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 87c055a227..abbf552b54 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 @@ -13,7 +13,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernelbase.dll" "system" fn AddPackageDependency(packagedependencyid : windows_core::PCWSTR, rank : i32, options : AddPackageDependencyOptions, packagedependencycontext : *mut PACKAGEDEPENDENCY_CONTEXT, packagefullname : *mut windows_core::PWSTR) -> windows_core::HRESULT); - AddPackageDependency(packagedependencyid.param().abi(), rank, options, packagedependencycontext, core::mem::transmute(packagefullname.unwrap_or(std::ptr::null_mut()))).ok() + AddPackageDependency(packagedependencyid.param().abi(), rank, options, packagedependencycontext, core::mem::transmute(packagefullname.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AppPolicyGetClrCompat(processtoken: P0, policy: *mut AppPolicyClrCompat) -> super::super::super::Foundation::WIN32_ERROR @@ -130,7 +130,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), packagefilters, count, core::mem::transmute(packagefullnames.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(buffer), core::mem::transmute(packageproperties.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn FormatApplicationUserModelId(packagefamilyname: P0, packagerelativeapplicationid: P1, applicationusermodelidlength: *mut u32, applicationusermodelid: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR @@ -175,22 +175,22 @@ pub unsafe fn GetCurrentPackageFullName(packagefullnamelength: *mut u32, package #[inline] pub unsafe fn GetCurrentPackageId(bufferlength: *mut u32, buffer: Option<*mut u8>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCurrentPackageInfo(flags: u32, bufferlength: *mut u32, buffer: Option<*mut u8>, count: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCurrentPackageInfo2(flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: Option<*mut u8>, count: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetCurrentPackageInfo3(flags: u32, packageinfotype: PackageInfo3Type, bufferlength: *mut u32, buffer: Option<*mut core::ffi::c_void>, count: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn GetCurrentPackageInfo3(flags : u32, packageinfotype : PackageInfo3Type, bufferlength : *mut u32, buffer : *mut core::ffi::c_void, count : *mut u32) -> windows_core::HRESULT); - GetCurrentPackageInfo3(flags, packageinfotype, bufferlength, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(count.unwrap_or(std::ptr::null_mut()))).ok() + GetCurrentPackageInfo3(flags, packageinfotype, bufferlength, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetCurrentPackagePath(pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { @@ -219,7 +219,7 @@ where #[inline] pub unsafe fn GetPackageApplicationIds(packageinforeference: *const _PACKAGE_INFO_REFERENCE, bufferlength: *mut u32, buffer: Option<*mut u8>, count: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetPackageFamilyName(hprocess: P0, packagefamilynamelength: *mut u32, packagefamilyname: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR @@ -264,17 +264,17 @@ where P0: windows_core::Param, { 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.param().abi(), bufferlength, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut()))) + GetPackageId(hprocess.param().abi(), bufferlength, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetPackageInfo(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, bufferlength: *mut u32, buffer: Option<*mut u8>, count: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetPackageInfo2(packageinforeference: *const _PACKAGE_INFO_REFERENCE, flags: u32, packagepathtype: PackagePathType, bufferlength: *mut u32, buffer: Option<*mut u8>, count: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetPackagePath(packageid: *const PACKAGE_ID, reserved: u32, pathlength: *mut u32, path: windows_core::PWSTR) -> super::super::super::Foundation::WIN32_ERROR { @@ -303,7 +303,7 @@ where P0: windows_core::Param, { 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.param().abi(), count, core::mem::transmute(packagefullnames.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(buffer)) + GetPackagesByPackageFamily(packagefamilyname.param().abi(), count, core::mem::transmute(packagefullnames.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(buffer)) } #[inline] pub unsafe fn GetProcessesInVirtualizationContext(packagefamilyname: P0, count: *mut u32, processes: *mut *mut super::super::super::Foundation::HANDLE) -> windows_core::Result<()> @@ -388,7 +388,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, bufferlength, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut()))) + PackageIdFromFullName(packagefullname.param().abi(), flags, bufferlength, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut()))) } #[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 diff --git a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs index df5288ccb4..bc742f90d1 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/ProjectedFileSystem/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjClearNegativePathCache(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, totalentrynumber : *mut u32) -> windows_core::HRESULT); - PrjClearNegativePathCache(namespacevirtualizationcontext.param().abi(), core::mem::transmute(totalentrynumber.unwrap_or(std::ptr::null_mut()))).ok() + PrjClearNegativePathCache(namespacevirtualizationcontext.param().abi(), core::mem::transmute(totalentrynumber.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PrjCompleteCommand(namespacevirtualizationcontext: P0, commandid: i32, completionresult: windows_core::HRESULT, extendedparameters: Option<*const PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS>) -> windows_core::Result<()> @@ -20,7 +20,7 @@ where P0: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjCompleteCommand(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, commandid : i32, completionresult : windows_core::HRESULT, extendedparameters : *const PRJ_COMPLETE_COMMAND_EXTENDED_PARAMETERS) -> windows_core::HRESULT); - PrjCompleteCommand(namespacevirtualizationcontext.param().abi(), commandid, completionresult, core::mem::transmute(extendedparameters.unwrap_or(std::ptr::null()))).ok() + PrjCompleteCommand(namespacevirtualizationcontext.param().abi(), commandid, completionresult, core::mem::transmute(extendedparameters.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn PrjDeleteFile(namespacevirtualizationcontext: P0, destinationfilename: P1, updateflags: PRJ_UPDATE_TYPES, failurereason: Option<*mut PRJ_UPDATE_FAILURE_CAUSES>) -> windows_core::Result<()> @@ -29,7 +29,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjDeleteFile(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, updateflags : PRJ_UPDATE_TYPES, failurereason : *mut PRJ_UPDATE_FAILURE_CAUSES) -> windows_core::HRESULT); - PrjDeleteFile(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), updateflags, core::mem::transmute(failurereason.unwrap_or(std::ptr::null_mut()))).ok() + PrjDeleteFile(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), updateflags, core::mem::transmute(failurereason.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PrjDoesNameContainWildCards(filename: P0) -> super::super::Foundation::BOOLEAN @@ -64,7 +64,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjFillDirEntryBuffer(filename : windows_core::PCWSTR, filebasicinfo : *const PRJ_FILE_BASIC_INFO, direntrybufferhandle : PRJ_DIR_ENTRY_BUFFER_HANDLE) -> windows_core::HRESULT); - PrjFillDirEntryBuffer(filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(std::ptr::null())), direntrybufferhandle.param().abi()).ok() + PrjFillDirEntryBuffer(filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::ptr::null())), direntrybufferhandle.param().abi()).ok() } #[inline] pub unsafe fn PrjFillDirEntryBuffer2(direntrybufferhandle: P0, filename: P1, filebasicinfo: Option<*const PRJ_FILE_BASIC_INFO>, extendedinfo: Option<*const PRJ_EXTENDED_INFO>) -> windows_core::Result<()> @@ -73,7 +73,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjFillDirEntryBuffer2(direntrybufferhandle : PRJ_DIR_ENTRY_BUFFER_HANDLE, filename : windows_core::PCWSTR, filebasicinfo : *const PRJ_FILE_BASIC_INFO, extendedinfo : *const PRJ_EXTENDED_INFO) -> windows_core::HRESULT); - PrjFillDirEntryBuffer2(direntrybufferhandle.param().abi(), filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(std::ptr::null())), core::mem::transmute(extendedinfo.unwrap_or(std::ptr::null()))).ok() + PrjFillDirEntryBuffer2(direntrybufferhandle.param().abi(), filename.param().abi(), core::mem::transmute(filebasicinfo.unwrap_or(core::ptr::null())), core::mem::transmute(extendedinfo.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn PrjFreeAlignedBuffer(buffer: *const core::ffi::c_void) { @@ -104,7 +104,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjMarkDirectoryAsPlaceholder(rootpathname : windows_core::PCWSTR, targetpathname : windows_core::PCWSTR, versioninfo : *const PRJ_PLACEHOLDER_VERSION_INFO, virtualizationinstanceid : *const windows_core::GUID) -> windows_core::HRESULT); - PrjMarkDirectoryAsPlaceholder(rootpathname.param().abi(), targetpathname.param().abi(), core::mem::transmute(versioninfo.unwrap_or(std::ptr::null())), virtualizationinstanceid).ok() + PrjMarkDirectoryAsPlaceholder(rootpathname.param().abi(), targetpathname.param().abi(), core::mem::transmute(versioninfo.unwrap_or(core::ptr::null())), virtualizationinstanceid).ok() } #[inline] pub unsafe fn PrjStartVirtualizing(virtualizationrootpath: P0, callbacks: *const PRJ_CALLBACKS, instancecontext: Option<*const core::ffi::c_void>, options: Option<*const PRJ_STARTVIRTUALIZING_OPTIONS>) -> windows_core::Result @@ -113,7 +113,7 @@ where { windows_targets::link!("projectedfslib.dll" "system" fn PrjStartVirtualizing(virtualizationrootpath : windows_core::PCWSTR, callbacks : *const PRJ_CALLBACKS, instancecontext : *const core::ffi::c_void, options : *const PRJ_STARTVIRTUALIZING_OPTIONS, namespacevirtualizationcontext : *mut PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - PrjStartVirtualizing(virtualizationrootpath.param().abi(), callbacks, core::mem::transmute(instancecontext.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + PrjStartVirtualizing(virtualizationrootpath.param().abi(), callbacks, core::mem::transmute(instancecontext.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn PrjStopVirtualizing(namespacevirtualizationcontext: P0) @@ -130,7 +130,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjUpdateFileIfNeeded(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, placeholderinfo : *const PRJ_PLACEHOLDER_INFO, placeholderinfosize : u32, updateflags : PRJ_UPDATE_TYPES, failurereason : *mut PRJ_UPDATE_FAILURE_CAUSES) -> windows_core::HRESULT); - PrjUpdateFileIfNeeded(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, updateflags, core::mem::transmute(failurereason.unwrap_or(std::ptr::null_mut()))).ok() + PrjUpdateFileIfNeeded(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, updateflags, core::mem::transmute(failurereason.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PrjWriteFileData(namespacevirtualizationcontext: P0, datastreamid: *const windows_core::GUID, buffer: *const core::ffi::c_void, byteoffset: u64, length: u32) -> windows_core::Result<()> @@ -156,7 +156,7 @@ where P1: windows_core::Param, { windows_targets::link!("projectedfslib.dll" "system" fn PrjWritePlaceholderInfo2(namespacevirtualizationcontext : PRJ_NAMESPACE_VIRTUALIZATION_CONTEXT, destinationfilename : windows_core::PCWSTR, placeholderinfo : *const PRJ_PLACEHOLDER_INFO, placeholderinfosize : u32, extendedinfo : *const PRJ_EXTENDED_INFO) -> windows_core::HRESULT); - PrjWritePlaceholderInfo2(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, core::mem::transmute(extendedinfo.unwrap_or(std::ptr::null()))).ok() + PrjWritePlaceholderInfo2(namespacevirtualizationcontext.param().abi(), destinationfilename.param().abi(), placeholderinfo, placeholderinfosize, core::mem::transmute(extendedinfo.unwrap_or(core::ptr::null()))).ok() } pub const PRJ_CB_DATA_FLAG_ENUM_RESTART_SCAN: PRJ_CALLBACK_DATA_FLAGS = PRJ_CALLBACK_DATA_FLAGS(1i32); pub const PRJ_CB_DATA_FLAG_ENUM_RETURN_SINGLE_ENTRY: PRJ_CALLBACK_DATA_FLAGS = PRJ_CALLBACK_DATA_FLAGS(2i32); 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 d8167f93fc..07435076d6 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vhd/mod.rs @@ -23,7 +23,7 @@ where P1: windows_core::Param, { 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.param().abi(), securitydescriptor.param().abi(), flags, providerspecificflags, core::mem::transmute(parameters.unwrap_or(std::ptr::null())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + AttachVirtualDisk(virtualdiskhandle.param().abi(), securitydescriptor.param().abi(), flags, providerspecificflags, core::mem::transmute(parameters.unwrap_or(core::ptr::null())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn BreakMirrorVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR @@ -40,7 +40,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, core::mem::transmute(parameters.unwrap_or(std::ptr::null())), core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + CompactVirtualDisk(virtualdiskhandle.param().abi(), flags, core::mem::transmute(parameters.unwrap_or(core::ptr::null())), core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CompleteForkVirtualDisk(virtualdiskhandle: P0) -> super::super::Foundation::WIN32_ERROR @@ -58,7 +58,7 @@ where P1: windows_core::Param, { 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.param().abi(), virtualdiskaccessmask, securitydescriptor.param().abi(), flags, providerspecificflags, parameters, core::mem::transmute(overlapped.unwrap_or(std::ptr::null())), handle) + CreateVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, securitydescriptor.param().abi(), flags, providerspecificflags, parameters, core::mem::transmute(overlapped.unwrap_or(core::ptr::null())), handle) } #[inline] pub unsafe fn DeleteSnapshotVhdSet(virtualdiskhandle: P0, parameters: *const DELETE_SNAPSHOT_VHDSET_PARAMETERS, flags: DELETE_SNAPSHOT_VHDSET_FLAG) -> super::super::Foundation::WIN32_ERROR @@ -99,7 +99,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + ExpandVirtualDisk(virtualdiskhandle.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -121,7 +121,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, storagedependencyinfosize, storagedependencyinfo, core::mem::transmute(sizeused.unwrap_or(std::ptr::null_mut()))) + GetStorageDependencyInformation(objecthandle.param().abi(), flags, storagedependencyinfosize, storagedependencyinfo, core::mem::transmute(sizeused.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfosize: *mut u32, virtualdiskinfo: *mut GET_VIRTUAL_DISK_INFO, sizeused: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -129,7 +129,7 @@ where P0: windows_core::Param, { 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.param().abi(), virtualdiskinfosize, virtualdiskinfo, core::mem::transmute(sizeused.unwrap_or(std::ptr::null_mut()))) + GetVirtualDiskInformation(virtualdiskhandle.param().abi(), virtualdiskinfosize, virtualdiskinfo, core::mem::transmute(sizeused.unwrap_or(core::ptr::null_mut()))) } #[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 @@ -163,7 +163,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + MergeVirtualDisk(virtualdiskhandle.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -188,7 +188,7 @@ where P0: windows_core::Param, { 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.param().abi(), virtualdiskaccessmask, flags, core::mem::transmute(parameters.unwrap_or(std::ptr::null())), handle) + OpenVirtualDisk(virtualstoragetype, path.param().abi(), virtualdiskaccessmask, flags, core::mem::transmute(parameters.unwrap_or(core::ptr::null())), handle) } #[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 @@ -214,7 +214,7 @@ where P0: windows_core::Param, { 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.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(std::ptr::null()))) + ResizeVirtualDisk(virtualdiskhandle.param().abi(), flags, parameters, core::mem::transmute(overlapped.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetVirtualDiskInformation(virtualdiskhandle: P0, virtualdiskinfo: *const SET_VIRTUAL_DISK_INFO) -> super::super::Foundation::WIN32_ERROR diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Vss/impl.rs b/crates/libs/windows/src/Windows/Win32/Storage/Vss/impl.rs index e6e61dc05d..5572b6c31a 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Vss/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Vss/impl.rs @@ -631,7 +631,7 @@ impl IVssCreateWriterMetadata_Vtbl { } #[doc(hidden)] #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] -struct IVssCreateWriterMetadata_ImplVtbl(std::marker::PhantomData); +struct IVssCreateWriterMetadata_ImplVtbl(core::marker::PhantomData); #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] impl IVssCreateWriterMetadata_ImplVtbl { const VTABLE: IVssCreateWriterMetadata_Vtbl = IVssCreateWriterMetadata_Vtbl::new::(); @@ -1477,7 +1477,7 @@ impl IVssWriterComponents_Vtbl { } } #[doc(hidden)] -struct IVssWriterComponents_ImplVtbl(std::marker::PhantomData); +struct IVssWriterComponents_ImplVtbl(core::marker::PhantomData); impl IVssWriterComponents_ImplVtbl { const VTABLE: IVssWriterComponents_Vtbl = IVssWriterComponents_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs index 0dc34d6e30..0043898df6 100644 --- a/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Storage/Xps/mod.rs @@ -17,7 +17,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeviceCapabilitiesA(pdevice : windows_core::PCSTR, pport : windows_core::PCSTR, fwcapability : PRINTER_DEVICE_CAPABILITIES, poutput : windows_core::PSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEA) -> i32); - DeviceCapabilitiesA(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null()))) + DeviceCapabilitiesA(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -27,7 +27,7 @@ where P1: windows_core::Param, { windows_targets::link!("winspool.drv" "system" fn DeviceCapabilitiesW(pdevice : windows_core::PCWSTR, pport : windows_core::PCWSTR, fwcapability : PRINTER_DEVICE_CAPABILITIES, poutput : windows_core::PWSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEW) -> i32); - DeviceCapabilitiesW(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null()))) + DeviceCapabilitiesW(pdevice.param().abi(), pport.param().abi(), fwcapability, core::mem::transmute(poutput), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -54,7 +54,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn Escape(hdc : super::super::Graphics::Gdi:: HDC, iescape : i32, cjin : i32, pvin : windows_core::PCSTR, pvout : *mut core::ffi::c_void) -> i32); - Escape(hdc.param().abi(), iescape, pvin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pvin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pvout.unwrap_or(std::ptr::null_mut()))) + Escape(hdc.param().abi(), iescape, pvin.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pvin.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pvout.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs index 0eaf706eb0..6b6888795f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/AddressBook/mod.rs @@ -213,7 +213,7 @@ pub unsafe fn MAPIInitIdle(lpvreserved: *mut core::ffi::c_void) -> i32 { pub unsafe fn OpenStreamOnFile(lpallocatebuffer: LPALLOCATEBUFFER, lpfreebuffer: LPFREEBUFFER, ulflags: u32, lpszfilename: *const i8, lpszprefix: Option<*const i8>) -> windows_core::Result { windows_targets::link!("mapi32.dll" "system" fn OpenStreamOnFile(lpallocatebuffer : LPALLOCATEBUFFER, lpfreebuffer : LPFREEBUFFER, ulflags : u32, lpszfilename : *const i8, lpszprefix : *const i8, lppstream : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - OpenStreamOnFile(lpallocatebuffer, lpfreebuffer, ulflags, lpszfilename, core::mem::transmute(lpszprefix.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + OpenStreamOnFile(lpallocatebuffer, lpfreebuffer, ulflags, lpszfilename, core::mem::transmute(lpszprefix.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -379,7 +379,7 @@ impl IABContainer { #[cfg(feature = "Win32_System_Com")] pub unsafe fn ResolveNames(&self, lpproptagarray: Option<*const SPropTagArray>, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(std::ptr::null())), ulflags, lpadrlist, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(core::ptr::null())), ulflags, lpadrlist, &mut result__).map(|| result__) } } #[repr(C)] @@ -548,7 +548,7 @@ impl IDistList { #[cfg(feature = "Win32_System_Com")] pub unsafe fn ResolveNames(&self, lpproptagarray: Option<*const SPropTagArray>, ulflags: u32, lpadrlist: *const ADRLIST) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(std::ptr::null())), ulflags, lpadrlist, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).ResolveNames)(windows_core::Interface::as_raw(self), core::mem::transmute(lpproptagarray.unwrap_or(core::ptr::null())), ulflags, lpadrlist, &mut result__).map(|| result__) } } #[repr(C)] @@ -606,11 +606,11 @@ impl IMAPIContainer { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn SetSearchCriteria(&self, lprestriction: Option<*const SRestriction>, lpcontainerlist: Option<*const SBinaryArray>, ulsearchflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetSearchCriteria)(windows_core::Interface::as_raw(self), core::mem::transmute(lprestriction.unwrap_or(std::ptr::null())), core::mem::transmute(lpcontainerlist.unwrap_or(std::ptr::null())), ulsearchflags).ok() + (windows_core::Interface::vtable(self).SetSearchCriteria)(windows_core::Interface::as_raw(self), core::mem::transmute(lprestriction.unwrap_or(core::ptr::null())), core::mem::transmute(lpcontainerlist.unwrap_or(core::ptr::null())), ulsearchflags).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSearchCriteria(&self, ulflags: u32, lpprestriction: *mut *mut SRestriction, lppcontainerlist: *mut *mut SBinaryArray, lpulsearchstate: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSearchCriteria)(windows_core::Interface::as_raw(self), ulflags, lpprestriction, lppcontainerlist, core::mem::transmute(lpulsearchstate.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSearchCriteria)(windows_core::Interface::as_raw(self), ulflags, lpprestriction, lppcontainerlist, core::mem::transmute(lpulsearchstate.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -671,7 +671,7 @@ impl IMAPIFolder { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), lpmsglist, core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), lpdestfolder, uluiparam, lpprogress.param().abi(), ulflags).ok() + (windows_core::Interface::vtable(self).CopyMessages)(windows_core::Interface::as_raw(self), lpmsglist, core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), lpdestfolder, uluiparam, lpprogress.param().abi(), ulflags).ok() } pub unsafe fn DeleteMessages(&self, lpmsglist: *const SBinaryArray, uluiparam: usize, lpprogress: P0, ulflags: u32) -> windows_core::Result<()> where @@ -681,13 +681,13 @@ impl IMAPIFolder { } pub unsafe fn CreateFolder(&self, ulfoldertype: u32, lpszfoldername: *const i8, lpszfoldercomment: Option<*const i8>, lpinterface: Option<*const windows_core::GUID>, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).CreateFolder)(windows_core::Interface::as_raw(self), ulfoldertype, lpszfoldername, core::mem::transmute(lpszfoldercomment.unwrap_or(std::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFolder)(windows_core::Interface::as_raw(self), ulfoldertype, lpszfoldername, core::mem::transmute(lpszfoldercomment.unwrap_or(core::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CopyFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: Option<*const windows_core::GUID>, lpdestfolder: *const core::ffi::c_void, lpsznewfoldername: *const i8, uluiparam: usize, lpprogress: P0, ulflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), lpdestfolder, lpsznewfoldername, uluiparam, lpprogress.param().abi(), ulflags).ok() + (windows_core::Interface::vtable(self).CopyFolder)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), lpdestfolder, lpsznewfoldername, uluiparam, lpprogress.param().abi(), ulflags).ok() } pub unsafe fn DeleteFolder(&self, cbentryid: u32, lpentryid: *const ENTRYID, uluiparam: usize, lpprogress: P0, ulflags: u32) -> windows_core::Result<()> where @@ -1023,10 +1023,10 @@ impl IMessage { } pub unsafe fn OpenAttach(&self, ulattachmentnum: u32, lpinterface: Option<*const windows_core::GUID>, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenAttach)(windows_core::Interface::as_raw(self), ulattachmentnum, core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateAttach(&self, lpinterface: Option<*const windows_core::GUID>, ulflags: u32, lpulattachmentnum: *mut u32, lppattach: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), ulflags, lpulattachmentnum, core::mem::transmute(lppattach)).ok() + (windows_core::Interface::vtable(self).CreateAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), ulflags, lpulattachmentnum, core::mem::transmute(lppattach)).ok() } pub unsafe fn DeleteAttach(&self, ulattachmentnum: u32, uluiparam: usize, lpprogress: P0, ulflags: u32) -> windows_core::Result<()> where @@ -1078,7 +1078,7 @@ impl IMsgStore { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid.unwrap_or(std::ptr::null())), uleventmask, lpadvisesink.param().abi(), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).Advise)(windows_core::Interface::as_raw(self), cbentryid, core::mem::transmute(lpentryid.unwrap_or(core::ptr::null())), uleventmask, lpadvisesink.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Unadvise(&self, ulconnection: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Unadvise)(windows_core::Interface::as_raw(self), ulconnection).ok() @@ -1088,13 +1088,13 @@ impl IMsgStore { (windows_core::Interface::vtable(self).CompareEntryIDs)(windows_core::Interface::as_raw(self), cbentryid1, lpentryid1, cbentryid2, lpentryid2, ulflags, &mut result__).map(|| result__) } pub unsafe fn OpenEntry(&self, cbentryid: u32, lpentryid: *const ENTRYID, lpinterface: Option<*const windows_core::GUID>, ulflags: u32, lpulobjtype: *mut u32, ppunk: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), ulflags, lpulobjtype, core::mem::transmute(ppunk)).ok() + (windows_core::Interface::vtable(self).OpenEntry)(windows_core::Interface::as_raw(self), cbentryid, lpentryid, core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), ulflags, lpulobjtype, core::mem::transmute(ppunk)).ok() } pub unsafe fn SetReceiveFolder(&self, lpszmessageclass: Option<*const i8>, ulflags: u32, cbentryid: u32, lpentryid: *const ENTRYID) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(std::ptr::null())), ulflags, cbentryid, lpentryid).ok() + (windows_core::Interface::vtable(self).SetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::ptr::null())), ulflags, cbentryid, lpentryid).ok() } pub unsafe fn GetReceiveFolder(&self, lpszmessageclass: Option<*const i8>, ulflags: u32, lpcbentryid: *mut u32, lppentryid: *mut *mut ENTRYID, lppszexplicitclass: *mut *mut i8) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(std::ptr::null())), ulflags, lpcbentryid, lppentryid, lppszexplicitclass).ok() + (windows_core::Interface::vtable(self).GetReceiveFolder)(windows_core::Interface::as_raw(self), core::mem::transmute(lpszmessageclass.unwrap_or(core::ptr::null())), ulflags, lpcbentryid, lppentryid, lppszexplicitclass).ok() } pub unsafe fn GetReceiveFolderTable(&self, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1214,7 +1214,7 @@ impl IProviderAdmin { } pub unsafe fn OpenProfileSection(&self, lpuid: Option<*const MAPIUID>, lpinterface: Option<*const windows_core::GUID>, ulflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenProfileSection)(windows_core::Interface::as_raw(self), core::mem::transmute(lpuid.unwrap_or(std::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(std::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenProfileSection)(windows_core::Interface::as_raw(self), core::mem::transmute(lpuid.unwrap_or(core::ptr::null())), core::mem::transmute(lpinterface.unwrap_or(core::ptr::null())), ulflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] 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 5dba96eab0..3f7dc11b34 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ApplicationInstallationAndServicing/mod.rs @@ -26,7 +26,7 @@ pub unsafe fn ApplyDeltaB(applyflags: i64, source: DELTA_INPUT, delta: DELTA_INP #[inline] pub unsafe fn ApplyDeltaGetReverseB(applyflags: i64, source: DELTA_INPUT, delta: DELTA_INPUT, lpreversefiletime: Option<*const super::super::Foundation::FILETIME>, lptarget: *mut DELTA_OUTPUT, lptargetreverse: *mut DELTA_OUTPUT) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn ApplyDeltaGetReverseB(applyflags : i64, source : DELTA_INPUT, delta : DELTA_INPUT, lpreversefiletime : *const super::super::Foundation:: FILETIME, lptarget : *mut DELTA_OUTPUT, lptargetreverse : *mut DELTA_OUTPUT) -> super::super::Foundation:: BOOL); - ApplyDeltaGetReverseB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lpreversefiletime.unwrap_or(std::ptr::null())), lptarget, lptargetreverse) + ApplyDeltaGetReverseB(applyflags, core::mem::transmute(source), core::mem::transmute(delta), core::mem::transmute(lpreversefiletime.unwrap_or(core::ptr::null())), lptarget, lptargetreverse) } #[inline] pub unsafe fn ApplyDeltaProvidedB(applyflags: i64, source: DELTA_INPUT, delta: DELTA_INPUT, lptarget: *mut core::ffi::c_void, utargetsize: usize) -> super::super::Foundation::BOOL { @@ -63,11 +63,11 @@ pub unsafe fn ApplyPatchToFileByBuffers(patchfilemapped: &[u8], oldfilemapped: O oldfilemapped.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(newfilebuffer.as_ptr()), newfilebuffer.len().try_into().unwrap(), - core::mem::transmute(newfileactualsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(newfiletime.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(newfileactualsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(newfiletime.unwrap_or(core::ptr::null_mut())), applyoptionflags, progresscallback, - core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), + core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), ) } #[inline] @@ -88,7 +88,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileByHandlesEx(patchfilehandle : super::super::Foundation:: HANDLE, oldfilehandle : super::super::Foundation:: HANDLE, newfilehandle : super::super::Foundation:: HANDLE, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ApplyPatchToFileByHandlesEx(patchfilehandle.param().abi(), oldfilehandle.param().abi(), newfilehandle.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + ApplyPatchToFileByHandlesEx(patchfilehandle.param().abi(), oldfilehandle.param().abi(), newfilehandle.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ApplyPatchToFileExA(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -98,7 +98,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileExA(patchfilename : windows_core::PCSTR, oldfilename : windows_core::PCSTR, newfilename : windows_core::PCSTR, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ApplyPatchToFileExA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + ApplyPatchToFileExA(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ApplyPatchToFileExW(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -108,7 +108,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatcha.dll" "system" fn ApplyPatchToFileExW(patchfilename : windows_core::PCWSTR, oldfilename : windows_core::PCWSTR, newfilename : windows_core::PCWSTR, applyoptionflags : u32, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ApplyPatchToFileExW(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + ApplyPatchToFileExW(patchfilename.param().abi(), oldfilename.param().abi(), newfilename.param().abi(), applyoptionflags, progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ApplyPatchToFileW(patchfilename: P0, oldfilename: P1, newfilename: P2, applyoptionflags: u32) -> super::super::Foundation::BOOL @@ -143,13 +143,13 @@ where P4: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn CreateDeltaA(filetypeset : i64, setflags : i64, resetflags : i64, lpsourcename : windows_core::PCSTR, lptargetname : windows_core::PCSTR, lpsourceoptionsname : windows_core::PCSTR, lptargetoptionsname : windows_core::PCSTR, globaloptions : DELTA_INPUT, lptargetfiletime : *const super::super::Foundation:: FILETIME, hashalgid : super::super::Security::Cryptography:: ALG_ID, lpdeltaname : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - CreateDeltaA(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(std::ptr::null())), hashalgid, lpdeltaname.param().abi()) + CreateDeltaA(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::ptr::null())), hashalgid, lpdeltaname.param().abi()) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] pub unsafe fn CreateDeltaB(filetypeset: i64, setflags: i64, resetflags: i64, source: DELTA_INPUT, target: DELTA_INPUT, sourceoptions: DELTA_INPUT, targetoptions: DELTA_INPUT, globaloptions: DELTA_INPUT, lptargetfiletime: Option<*const super::super::Foundation::FILETIME>, hashalgid: super::super::Security::Cryptography::ALG_ID, lpdelta: *mut DELTA_OUTPUT) -> super::super::Foundation::BOOL { windows_targets::link!("msdelta.dll" "system" fn CreateDeltaB(filetypeset : i64, setflags : i64, resetflags : i64, source : DELTA_INPUT, target : DELTA_INPUT, sourceoptions : DELTA_INPUT, targetoptions : DELTA_INPUT, globaloptions : DELTA_INPUT, lptargetfiletime : *const super::super::Foundation:: FILETIME, hashalgid : super::super::Security::Cryptography:: ALG_ID, lpdelta : *mut DELTA_OUTPUT) -> super::super::Foundation:: BOOL); - CreateDeltaB(filetypeset, setflags, resetflags, core::mem::transmute(source), core::mem::transmute(target), core::mem::transmute(sourceoptions), core::mem::transmute(targetoptions), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(std::ptr::null())), hashalgid, lpdelta) + CreateDeltaB(filetypeset, setflags, resetflags, core::mem::transmute(source), core::mem::transmute(target), core::mem::transmute(sourceoptions), core::mem::transmute(targetoptions), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::ptr::null())), hashalgid, lpdelta) } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -162,7 +162,7 @@ where P4: windows_core::Param, { windows_targets::link!("msdelta.dll" "system" fn CreateDeltaW(filetypeset : i64, setflags : i64, resetflags : i64, lpsourcename : windows_core::PCWSTR, lptargetname : windows_core::PCWSTR, lpsourceoptionsname : windows_core::PCWSTR, lptargetoptionsname : windows_core::PCWSTR, globaloptions : DELTA_INPUT, lptargetfiletime : *const super::super::Foundation:: FILETIME, hashalgid : super::super::Security::Cryptography:: ALG_ID, lpdeltaname : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - CreateDeltaW(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(std::ptr::null())), hashalgid, lpdeltaname.param().abi()) + CreateDeltaW(filetypeset, setflags, resetflags, lpsourcename.param().abi(), lptargetname.param().abi(), lpsourceoptionsname.param().abi(), lptargetoptionsname.param().abi(), core::mem::transmute(globaloptions), core::mem::transmute(lptargetfiletime.unwrap_or(core::ptr::null())), hashalgid, lpdeltaname.param().abi()) } #[inline] pub unsafe fn CreatePatchFileA(oldfilename: P0, newfilename: P1, patchfilename: P2, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL @@ -172,7 +172,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileA(oldfilename : windows_core::PCSTR, newfilename : windows_core::PCSTR, patchfilename : windows_core::PCSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA) -> super::super::Foundation:: BOOL); - CreatePatchFileA(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null()))) + CreatePatchFileA(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreatePatchFileByHandles(oldfilehandle: P0, newfilehandle: P1, patchfilehandle: P2, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL @@ -182,7 +182,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileByHandles(oldfilehandle : super::super::Foundation:: HANDLE, newfilehandle : super::super::Foundation:: HANDLE, patchfilehandle : super::super::Foundation:: HANDLE, optionflags : u32, optiondata : *const PATCH_OPTION_DATA) -> super::super::Foundation:: BOOL); - CreatePatchFileByHandles(oldfilehandle.param().abi(), newfilehandle.param().abi(), patchfilehandle.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null()))) + CreatePatchFileByHandles(oldfilehandle.param().abi(), newfilehandle.param().abi(), patchfilehandle.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreatePatchFileByHandlesEx(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_H], newfilehandle: P0, patchfilehandle: P1, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -191,7 +191,7 @@ where P1: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileByHandlesEx(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_H, newfilehandle : super::super::Foundation:: HANDLE, patchfilehandle : super::super::Foundation:: HANDLE, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle.param().abi(), patchfilehandle.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + CreatePatchFileByHandlesEx(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilehandle.param().abi(), patchfilehandle.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreatePatchFileExA(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_A], newfilename: P0, patchfilename: P1, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -200,7 +200,7 @@ where P1: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileExA(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_A, newfilename : windows_core::PCSTR, patchfilename : windows_core::PCSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + CreatePatchFileExA(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreatePatchFileExW(oldfileinfoarray: &[PATCH_OLD_FILE_INFO_W], newfilename: P0, patchfilename: P1, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>, progresscallback: PPATCH_PROGRESS_CALLBACK, callbackcontext: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -209,7 +209,7 @@ where P1: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileExW(oldfilecount : u32, oldfileinfoarray : *const PATCH_OLD_FILE_INFO_W, newfilename : windows_core::PCWSTR, patchfilename : windows_core::PCWSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA, progresscallback : PPATCH_PROGRESS_CALLBACK, callbackcontext : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null()))) + CreatePatchFileExW(oldfileinfoarray.len().try_into().unwrap(), core::mem::transmute(oldfileinfoarray.as_ptr()), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), progresscallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreatePatchFileW(oldfilename: P0, newfilename: P1, patchfilename: P2, optionflags: u32, optiondata: Option<*const PATCH_OPTION_DATA>) -> super::super::Foundation::BOOL @@ -219,7 +219,7 @@ where P2: windows_core::Param, { windows_targets::link!("mspatchc.dll" "system" fn CreatePatchFileW(oldfilename : windows_core::PCWSTR, newfilename : windows_core::PCWSTR, patchfilename : windows_core::PCWSTR, optionflags : u32, optiondata : *const PATCH_OPTION_DATA) -> super::super::Foundation:: BOOL); - CreatePatchFileW(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(std::ptr::null()))) + CreatePatchFileW(oldfilename.param().abi(), newfilename.param().abi(), patchfilename.param().abi(), optionflags, core::mem::transmute(optiondata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DeactivateActCtx(dwflags: u32, ulcookie: usize) -> windows_core::Result<()> { @@ -267,7 +267,7 @@ where #[inline] pub unsafe fn FindActCtxSectionGuid(dwflags: u32, lpextensionguid: Option<*const windows_core::GUID>, ulsectionid: u32, lpguidtofind: 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).ok() + FindActCtxSectionGuid(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), ulsectionid, core::mem::transmute(lpguidtofind.unwrap_or(core::ptr::null())), returneddata).ok() } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -276,7 +276,7 @@ where P0: windows_core::Param, { 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.param().abi(), returneddata).ok() + FindActCtxSectionStringA(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), ulsectionid, lpstringtofind.param().abi(), returneddata).ok() } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] @@ -285,7 +285,7 @@ where P0: windows_core::Param, { 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.param().abi(), returneddata).ok() + FindActCtxSectionStringW(dwflags, core::mem::transmute(lpextensionguid.unwrap_or(core::ptr::null())), ulsectionid, lpstringtofind.param().abi(), returneddata).ok() } #[inline] pub unsafe fn GetCurrentActCtx(lphactctx: *mut super::super::Foundation::HANDLE) -> windows_core::Result<()> { @@ -349,7 +349,7 @@ where GetFilePatchSignatureA( filename.param().abi(), optionflags, - core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ignorerangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -365,7 +365,7 @@ pub unsafe fn GetFilePatchSignatureByBuffer(filebufferwritable: &mut [u8], optio core::mem::transmute(filebufferwritable.as_ptr()), filebufferwritable.len().try_into().unwrap(), optionflags, - core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ignorerangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -383,7 +383,7 @@ where GetFilePatchSignatureByHandle( filehandle.param().abi(), optionflags, - core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ignorerangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -401,7 +401,7 @@ where GetFilePatchSignatureW( filename.param().abi(), optionflags, - core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ignorerangearray.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), retainrangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -458,7 +458,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiAdvertiseScriptA(szscriptfile : windows_core::PCSTR, dwflags : u32, phregdata : *const super::Registry:: HKEY, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiAdvertiseScriptA(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(std::ptr::null())), fremoveitems.param().abi()) + MsiAdvertiseScriptA(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(core::ptr::null())), fremoveitems.param().abi()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -468,7 +468,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiAdvertiseScriptW(szscriptfile : windows_core::PCWSTR, dwflags : u32, phregdata : *const super::Registry:: HKEY, fremoveitems : super::super::Foundation:: BOOL) -> u32); - MsiAdvertiseScriptW(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(std::ptr::null())), fremoveitems.param().abi()) + MsiAdvertiseScriptW(szscriptfile.param().abi(), dwflags, core::mem::transmute(phregdata.unwrap_or(core::ptr::null())), fremoveitems.param().abi()) } #[inline] pub unsafe fn MsiApplyMultiplePatchesA(szpatchpackages: P0, szproductcode: P1, szpropertieslist: P2) -> u32 @@ -890,7 +890,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumClientsExA(szcomponent : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwproductindex : u32, szproductbuf : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - MsiEnumClientsExA(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumClientsExA(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumClientsExW(szcomponent: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwproductindex: u32, szproductbuf: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PWSTR, pcchsid: Option<*mut u32>) -> u32 @@ -899,7 +899,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumClientsExW(szcomponent : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwproductindex : u32, szproductbuf : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - MsiEnumClientsExW(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumClientsExW(szcomponent.param().abi(), szusersid.param().abi(), dwcontext.0 as _, dwproductindex, core::mem::transmute(szproductbuf.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumClientsW(szcomponent: P0, iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 @@ -933,7 +933,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentQualifiersA(szcomponent : windows_core::PCSTR, iindex : u32, lpqualifierbuf : windows_core::PSTR, pcchqualifierbuf : *mut u32, lpapplicationdatabuf : windows_core::PSTR, pcchapplicationdatabuf : *mut u32) -> u32); - MsiEnumComponentQualifiersA(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf, core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(std::ptr::null_mut()))) + MsiEnumComponentQualifiersA(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf, core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumComponentQualifiersW(szcomponent: P0, iindex: u32, lpqualifierbuf: windows_core::PWSTR, pcchqualifierbuf: *mut u32, lpapplicationdatabuf: windows_core::PWSTR, pcchapplicationdatabuf: Option<*mut u32>) -> u32 @@ -941,7 +941,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentQualifiersW(szcomponent : windows_core::PCWSTR, iindex : u32, lpqualifierbuf : windows_core::PWSTR, pcchqualifierbuf : *mut u32, lpapplicationdatabuf : windows_core::PWSTR, pcchapplicationdatabuf : *mut u32) -> u32); - MsiEnumComponentQualifiersW(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf, core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(std::ptr::null_mut()))) + MsiEnumComponentQualifiersW(szcomponent.param().abi(), iindex, core::mem::transmute(lpqualifierbuf), pcchqualifierbuf, core::mem::transmute(lpapplicationdatabuf), core::mem::transmute(pcchapplicationdatabuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumComponentsA(icomponentindex: u32, lpcomponentbuf: windows_core::PSTR) -> u32 { @@ -954,7 +954,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentsExA(szusersid : windows_core::PCSTR, dwcontext : u32, dwindex : u32, szinstalledcomponentcode : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - MsiEnumComponentsExA(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumComponentsExA(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumComponentsExW(szusersid: P0, dwcontext: u32, dwindex: u32, szinstalledcomponentcode: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PWSTR, pcchsid: Option<*mut u32>) -> u32 @@ -962,7 +962,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumComponentsExW(szusersid : windows_core::PCWSTR, dwcontext : u32, dwindex : u32, szinstalledcomponentcode : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - MsiEnumComponentsExW(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumComponentsExW(szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledcomponentcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumComponentsW(icomponentindex: u32, lpcomponentbuf: windows_core::PWSTR) -> u32 { @@ -1000,7 +1000,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwfilter : u32, dwindex : u32, szpatchcode : windows_core::PSTR, sztargetproductcode : windows_core::PSTR, pdwtargetproductcontext : *mut MSIINSTALLCONTEXT, sztargetusersid : windows_core::PSTR, pcchtargetusersid : *mut u32) -> u32); - MsiEnumPatchesExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwtargetproductcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sztargetusersid), core::mem::transmute(pcchtargetusersid.unwrap_or(std::ptr::null_mut()))) + MsiEnumPatchesExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sztargetusersid), core::mem::transmute(pcchtargetusersid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumPatchesExW(szproductcode: P0, szusersid: P1, dwcontext: u32, dwfilter: u32, dwindex: u32, szpatchcode: Option<&mut [u16; 39]>, sztargetproductcode: Option<&mut [u16; 39]>, pdwtargetproductcontext: Option<*mut MSIINSTALLCONTEXT>, sztargetusersid: windows_core::PWSTR, pcchtargetusersid: Option<*mut u32>) -> u32 @@ -1009,7 +1009,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumPatchesExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwfilter : u32, dwindex : u32, szpatchcode : windows_core::PWSTR, sztargetproductcode : windows_core::PWSTR, pdwtargetproductcontext : *mut MSIINSTALLCONTEXT, sztargetusersid : windows_core::PWSTR, pcchtargetusersid : *mut u32) -> u32); - MsiEnumPatchesExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwtargetproductcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sztargetusersid), core::mem::transmute(pcchtargetusersid.unwrap_or(std::ptr::null_mut()))) + MsiEnumPatchesExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwfilter, dwindex, core::mem::transmute(szpatchcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(sztargetproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwtargetproductcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sztargetusersid), core::mem::transmute(pcchtargetusersid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumPatchesW(szproduct: P0, ipatchindex: u32, lppatchbuf: windows_core::PWSTR, lptransformsbuf: windows_core::PWSTR, pcchtransformsbuf: *mut u32) -> u32 @@ -1031,7 +1031,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumProductsExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : u32, dwindex : u32, szinstalledproductcode : windows_core::PSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PSTR, pcchsid : *mut u32) -> u32); - MsiEnumProductsExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumProductsExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumProductsExW(szproductcode: P0, szusersid: P1, dwcontext: u32, dwindex: u32, szinstalledproductcode: Option<&mut [u16; 39]>, pdwinstalledcontext: Option<*mut MSIINSTALLCONTEXT>, szsid: windows_core::PWSTR, pcchsid: Option<*mut u32>) -> u32 @@ -1040,7 +1040,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiEnumProductsExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : u32, dwindex : u32, szinstalledproductcode : windows_core::PWSTR, pdwinstalledcontext : *mut MSIINSTALLCONTEXT, szsid : windows_core::PWSTR, pcchsid : *mut u32) -> u32); - MsiEnumProductsExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(std::ptr::null_mut()))) + MsiEnumProductsExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, dwindex, core::mem::transmute(szinstalledproductcode.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pdwinstalledcontext.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szsid), core::mem::transmute(pcchsid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiEnumProductsW(iproductindex: u32, lpproductbuf: windows_core::PWSTR) -> u32 { @@ -1087,7 +1087,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiExtractPatchXMLDataA(szpatchpath : windows_core::PCSTR, dwreserved : u32, szxmldata : windows_core::PSTR, pcchxmldata : *mut u32) -> u32); - MsiExtractPatchXMLDataA(szpatchpath.param().abi(), dwreserved, core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(std::ptr::null_mut()))) + MsiExtractPatchXMLDataA(szpatchpath.param().abi(), dwreserved, core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiExtractPatchXMLDataW(szpatchpath: P0, dwreserved: u32, szxmldata: windows_core::PWSTR, pcchxmldata: Option<*mut u32>) -> u32 @@ -1095,7 +1095,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiExtractPatchXMLDataW(szpatchpath : windows_core::PCWSTR, dwreserved : u32, szxmldata : windows_core::PWSTR, pcchxmldata : *mut u32) -> u32); - MsiExtractPatchXMLDataW(szpatchpath.param().abi(), dwreserved, core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(std::ptr::null_mut()))) + MsiExtractPatchXMLDataW(szpatchpath.param().abi(), dwreserved, core::mem::transmute(szxmldata), core::mem::transmute(pcchxmldata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiFormatRecordA(hinstall: P0, hrecord: P1, szresultbuf: windows_core::PSTR, pcchresultbuf: Option<*mut u32>) -> u32 @@ -1104,7 +1104,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiFormatRecordA(hinstall : MSIHANDLE, hrecord : MSIHANDLE, szresultbuf : windows_core::PSTR, pcchresultbuf : *mut u32) -> u32); - MsiFormatRecordA(hinstall.param().abi(), hrecord.param().abi(), core::mem::transmute(szresultbuf), core::mem::transmute(pcchresultbuf.unwrap_or(std::ptr::null_mut()))) + MsiFormatRecordA(hinstall.param().abi(), hrecord.param().abi(), core::mem::transmute(szresultbuf), core::mem::transmute(pcchresultbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiFormatRecordW(hinstall: P0, hrecord: P1, szresultbuf: windows_core::PWSTR, pcchresultbuf: Option<*mut u32>) -> u32 @@ -1113,7 +1113,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiFormatRecordW(hinstall : MSIHANDLE, hrecord : MSIHANDLE, szresultbuf : windows_core::PWSTR, pcchresultbuf : *mut u32) -> u32); - MsiFormatRecordW(hinstall.param().abi(), hrecord.param().abi(), core::mem::transmute(szresultbuf), core::mem::transmute(pcchresultbuf.unwrap_or(std::ptr::null_mut()))) + MsiFormatRecordW(hinstall.param().abi(), hrecord.param().abi(), core::mem::transmute(szresultbuf), core::mem::transmute(pcchresultbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetActiveDatabase(hinstall: P0) -> MSIHANDLE @@ -1130,7 +1130,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathA(szproduct : windows_core::PCSTR, szcomponent : windows_core::PCSTR, lppathbuf : windows_core::PSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - MsiGetComponentPathA(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetComponentPathA(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetComponentPathExA(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, lpoutpathbuffer: windows_core::PSTR, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE @@ -1140,7 +1140,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathExA(szproductcode : windows_core::PCSTR, szcomponentcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, lpoutpathbuffer : windows_core::PSTR, pcchoutpathbuffer : *mut u32) -> INSTALLSTATE); - MsiGetComponentPathExA(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext, core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(std::ptr::null_mut()))) + MsiGetComponentPathExA(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext, core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetComponentPathExW(szproductcode: P0, szcomponentcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, lpoutpathbuffer: windows_core::PWSTR, pcchoutpathbuffer: Option<*mut u32>) -> INSTALLSTATE @@ -1150,7 +1150,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathExW(szproductcode : windows_core::PCWSTR, szcomponentcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, lpoutpathbuffer : windows_core::PWSTR, pcchoutpathbuffer : *mut u32) -> INSTALLSTATE); - MsiGetComponentPathExW(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext, core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(std::ptr::null_mut()))) + MsiGetComponentPathExW(szproductcode.param().abi(), szcomponentcode.param().abi(), szusersid.param().abi(), dwcontext, core::mem::transmute(lpoutpathbuffer), core::mem::transmute(pcchoutpathbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetComponentPathW(szproduct: P0, szcomponent: P1, lppathbuf: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE @@ -1159,7 +1159,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetComponentPathW(szproduct : windows_core::PCWSTR, szcomponent : windows_core::PCWSTR, lppathbuf : windows_core::PWSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - MsiGetComponentPathW(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetComponentPathW(szproduct.param().abi(), szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetComponentStateA(hinstall: P0, szcomponent: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1212,7 +1212,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureInfoA(hproduct : MSIHANDLE, szfeature : windows_core::PCSTR, lpattributes : *mut u32, lptitlebuf : windows_core::PSTR, pcchtitlebuf : *mut u32, lphelpbuf : windows_core::PSTR, pcchhelpbuf : *mut u32) -> u32); - MsiGetFeatureInfoA(hproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lptitlebuf), core::mem::transmute(pcchtitlebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lphelpbuf), core::mem::transmute(pcchhelpbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetFeatureInfoA(hproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptitlebuf), core::mem::transmute(pcchtitlebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lphelpbuf), core::mem::transmute(pcchhelpbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetFeatureInfoW(hproduct: P0, szfeature: P1, lpattributes: Option<*mut u32>, lptitlebuf: windows_core::PWSTR, pcchtitlebuf: Option<*mut u32>, lphelpbuf: windows_core::PWSTR, pcchhelpbuf: Option<*mut u32>) -> u32 @@ -1221,7 +1221,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureInfoW(hproduct : MSIHANDLE, szfeature : windows_core::PCWSTR, lpattributes : *mut u32, lptitlebuf : windows_core::PWSTR, pcchtitlebuf : *mut u32, lphelpbuf : windows_core::PWSTR, pcchhelpbuf : *mut u32) -> u32); - MsiGetFeatureInfoW(hproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lptitlebuf), core::mem::transmute(pcchtitlebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lphelpbuf), core::mem::transmute(pcchhelpbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetFeatureInfoW(hproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(lpattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptitlebuf), core::mem::transmute(pcchtitlebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lphelpbuf), core::mem::transmute(pcchhelpbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetFeatureStateA(hinstall: P0, szfeature: P1, piinstalled: *mut INSTALLSTATE, piaction: *mut INSTALLSTATE) -> u32 @@ -1248,7 +1248,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureUsageA(szproduct : windows_core::PCSTR, szfeature : windows_core::PCSTR, pdwusecount : *mut u32, pwdateused : *mut u16) -> u32); - MsiGetFeatureUsageA(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(std::ptr::null_mut()))) + MsiGetFeatureUsageA(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetFeatureUsageW(szproduct: P0, szfeature: P1, pdwusecount: Option<*mut u32>, pwdateused: Option<*mut u16>) -> u32 @@ -1257,7 +1257,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFeatureUsageW(szproduct : windows_core::PCWSTR, szfeature : windows_core::PCWSTR, pdwusecount : *mut u32, pwdateused : *mut u16) -> u32); - MsiGetFeatureUsageW(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(std::ptr::null_mut()))) + MsiGetFeatureUsageW(szproduct.param().abi(), szfeature.param().abi(), core::mem::transmute(pdwusecount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pwdateused.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetFeatureValidStatesA(hinstall: P0, szfeature: P1, lpinstallstates: *mut u32) -> u32 @@ -1300,7 +1300,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileSignatureInformationA(szsignedobjectpath : windows_core::PCSTR, dwflags : u32, ppccertcontext : *mut *mut super::super::Security::Cryptography:: CERT_CONTEXT, pbhashdata : *mut u8, pcbhashdata : *mut u32) -> windows_core::HRESULT); - MsiGetFileSignatureInformationA(szsignedobjectpath.param().abi(), dwflags, ppccertcontext, core::mem::transmute(pbhashdata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(std::ptr::null_mut()))).ok() + MsiGetFileSignatureInformationA(szsignedobjectpath.param().abi(), dwflags, ppccertcontext, core::mem::transmute(pbhashdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Security_Cryptography")] #[inline] @@ -1309,7 +1309,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileSignatureInformationW(szsignedobjectpath : windows_core::PCWSTR, dwflags : u32, ppccertcontext : *mut *mut super::super::Security::Cryptography:: CERT_CONTEXT, pbhashdata : *mut u8, pcbhashdata : *mut u32) -> windows_core::HRESULT); - MsiGetFileSignatureInformationW(szsignedobjectpath.param().abi(), dwflags, ppccertcontext, core::mem::transmute(pbhashdata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(std::ptr::null_mut()))).ok() + MsiGetFileSignatureInformationW(szsignedobjectpath.param().abi(), dwflags, ppccertcontext, core::mem::transmute(pbhashdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbhashdata.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn MsiGetFileVersionA(szfilepath: P0, lpversionbuf: windows_core::PSTR, pcchversionbuf: Option<*mut u32>, lplangbuf: windows_core::PSTR, pcchlangbuf: Option<*mut u32>) -> u32 @@ -1317,7 +1317,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileVersionA(szfilepath : windows_core::PCSTR, lpversionbuf : windows_core::PSTR, pcchversionbuf : *mut u32, lplangbuf : windows_core::PSTR, pcchlangbuf : *mut u32) -> u32); - MsiGetFileVersionA(szfilepath.param().abi(), core::mem::transmute(lpversionbuf), core::mem::transmute(pcchversionbuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetFileVersionA(szfilepath.param().abi(), core::mem::transmute(lpversionbuf), core::mem::transmute(pcchversionbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetFileVersionW(szfilepath: P0, lpversionbuf: windows_core::PWSTR, pcchversionbuf: Option<*mut u32>, lplangbuf: windows_core::PWSTR, pcchlangbuf: Option<*mut u32>) -> u32 @@ -1325,7 +1325,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetFileVersionW(szfilepath : windows_core::PCWSTR, lpversionbuf : windows_core::PWSTR, pcchversionbuf : *mut u32, lplangbuf : windows_core::PWSTR, pcchlangbuf : *mut u32) -> u32); - MsiGetFileVersionW(szfilepath.param().abi(), core::mem::transmute(lpversionbuf), core::mem::transmute(pcchversionbuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetFileVersionW(szfilepath.param().abi(), core::mem::transmute(lpversionbuf), core::mem::transmute(pcchversionbuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplangbuf), core::mem::transmute(pcchlangbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetLanguage(hinstall: P0) -> u16 @@ -1373,7 +1373,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoA(szpatch : windows_core::PCSTR, szattribute : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetPatchInfoA(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetPatchInfoA(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetPatchInfoExA(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, lpvalue: windows_core::PSTR, pcchvalue: Option<*mut u32>) -> u32 @@ -1384,7 +1384,7 @@ where P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoExA(szpatchcode : windows_core::PCSTR, szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, szproperty : windows_core::PCSTR, lpvalue : windows_core::PSTR, pcchvalue : *mut u32) -> u32); - MsiGetPatchInfoExA(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiGetPatchInfoExA(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetPatchInfoExW(szpatchcode: P0, szproductcode: P1, szusersid: P2, dwcontext: MSIINSTALLCONTEXT, szproperty: P3, lpvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 @@ -1395,7 +1395,7 @@ where P3: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoExW(szpatchcode : windows_core::PCWSTR, szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, szproperty : windows_core::PCWSTR, lpvalue : windows_core::PWSTR, pcchvalue : *mut u32) -> u32); - MsiGetPatchInfoExW(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiGetPatchInfoExW(szpatchcode.param().abi(), szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(lpvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetPatchInfoW(szpatch: P0, szattribute: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1404,7 +1404,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPatchInfoW(szpatch : windows_core::PCWSTR, szattribute : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetPatchInfoW(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetPatchInfoW(szpatch.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductCodeA(szcomponent: P0, lpbuf39: windows_core::PSTR) -> u32 @@ -1429,7 +1429,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoA(szproduct : windows_core::PCSTR, szattribute : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetProductInfoA(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoA(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductInfoExA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P2, szvalue: windows_core::PSTR, pcchvalue: Option<*mut u32>) -> u32 @@ -1439,7 +1439,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, szproperty : windows_core::PCSTR, szvalue : windows_core::PSTR, pcchvalue : *mut u32) -> u32); - MsiGetProductInfoExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductInfoExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szproperty: P2, szvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 @@ -1449,7 +1449,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, szproperty : windows_core::PCWSTR, szvalue : windows_core::PWSTR, pcchvalue : *mut u32) -> u32); - MsiGetProductInfoExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductInfoFromScriptA(szscriptfile: P0, lpproductbuf39: windows_core::PSTR, plgidlanguage: Option<*mut u16>, pdwversion: Option<*mut u32>, lpnamebuf: windows_core::PSTR, pcchnamebuf: Option<*mut u32>, lppackagebuf: windows_core::PSTR, pcchpackagebuf: Option<*mut u32>) -> u32 @@ -1457,7 +1457,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoFromScriptA(szscriptfile : windows_core::PCSTR, lpproductbuf39 : windows_core::PSTR, plgidlanguage : *mut u16, pdwversion : *mut u32, lpnamebuf : windows_core::PSTR, pcchnamebuf : *mut u32, lppackagebuf : windows_core::PSTR, pcchpackagebuf : *mut u32) -> u32); - MsiGetProductInfoFromScriptA(szscriptfile.param().abi(), core::mem::transmute(lpproductbuf39), core::mem::transmute(plgidlanguage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpnamebuf), core::mem::transmute(pcchnamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lppackagebuf), core::mem::transmute(pcchpackagebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoFromScriptA(szscriptfile.param().abi(), core::mem::transmute(lpproductbuf39), core::mem::transmute(plgidlanguage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpnamebuf), core::mem::transmute(pcchnamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lppackagebuf), core::mem::transmute(pcchpackagebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductInfoFromScriptW(szscriptfile: P0, lpproductbuf39: windows_core::PWSTR, plgidlanguage: Option<*mut u16>, pdwversion: Option<*mut u32>, lpnamebuf: windows_core::PWSTR, pcchnamebuf: Option<*mut u32>, lppackagebuf: windows_core::PWSTR, pcchpackagebuf: Option<*mut u32>) -> u32 @@ -1465,7 +1465,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoFromScriptW(szscriptfile : windows_core::PCWSTR, lpproductbuf39 : windows_core::PWSTR, plgidlanguage : *mut u16, pdwversion : *mut u32, lpnamebuf : windows_core::PWSTR, pcchnamebuf : *mut u32, lppackagebuf : windows_core::PWSTR, pcchpackagebuf : *mut u32) -> u32); - MsiGetProductInfoFromScriptW(szscriptfile.param().abi(), core::mem::transmute(lpproductbuf39), core::mem::transmute(plgidlanguage.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpnamebuf), core::mem::transmute(pcchnamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lppackagebuf), core::mem::transmute(pcchpackagebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoFromScriptW(szscriptfile.param().abi(), core::mem::transmute(lpproductbuf39), core::mem::transmute(plgidlanguage.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpnamebuf), core::mem::transmute(pcchnamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lppackagebuf), core::mem::transmute(pcchpackagebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductInfoW(szproduct: P0, szattribute: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1474,7 +1474,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductInfoW(szproduct : windows_core::PCWSTR, szattribute : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetProductInfoW(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductInfoW(szproduct.param().abi(), szattribute.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductPropertyA(hproduct: P0, szproperty: P1, lpvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1483,7 +1483,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductPropertyA(hproduct : MSIHANDLE, szproperty : windows_core::PCSTR, lpvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetProductPropertyA(hproduct.param().abi(), szproperty.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductPropertyA(hproduct.param().abi(), szproperty.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetProductPropertyW(hproduct: P0, szproperty: P1, lpvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1492,7 +1492,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetProductPropertyW(hproduct : MSIHANDLE, szproperty : windows_core::PCWSTR, lpvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetProductPropertyW(hproduct.param().abi(), szproperty.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetProductPropertyW(hproduct.param().abi(), szproperty.param().abi(), core::mem::transmute(lpvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetPropertyA(hinstall: P0, szname: P1, szvaluebuf: windows_core::PSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1501,7 +1501,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPropertyA(hinstall : MSIHANDLE, szname : windows_core::PCSTR, szvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetPropertyA(hinstall.param().abi(), szname.param().abi(), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetPropertyA(hinstall.param().abi(), szname.param().abi(), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetPropertyW(hinstall: P0, szname: P1, szvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -1510,7 +1510,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetPropertyW(hinstall : MSIHANDLE, szname : windows_core::PCWSTR, szvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiGetPropertyW(hinstall.param().abi(), szname.param().abi(), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiGetPropertyW(hinstall.param().abi(), szname.param().abi(), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetShortcutTargetA(szshortcutpath: P0, szproductcode: windows_core::PSTR, szfeatureid: windows_core::PSTR, szcomponentcode: windows_core::PSTR) -> u32 @@ -1535,7 +1535,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSourcePathA(hinstall : MSIHANDLE, szfolder : windows_core::PCSTR, szpathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiGetSourcePathA(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetSourcePathA(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetSourcePathW(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1544,7 +1544,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetSourcePathW(hinstall : MSIHANDLE, szfolder : windows_core::PCWSTR, szpathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiGetSourcePathW(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetSourcePathW(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetSummaryInformationA(hdatabase: P0, szdatabasepath: P1, uiupdatecount: u32, phsummaryinfo: *mut MSIHANDLE) -> u32 @@ -1571,7 +1571,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetTargetPathA(hinstall : MSIHANDLE, szfolder : windows_core::PCSTR, szpathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiGetTargetPathA(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetTargetPathA(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetTargetPathW(hinstall: P0, szfolder: P1, szpathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1580,7 +1580,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetTargetPathW(hinstall : MSIHANDLE, szfolder : windows_core::PCWSTR, szpathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiGetTargetPathW(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetTargetPathW(hinstall.param().abi(), szfolder.param().abi(), core::mem::transmute(szpathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetUserInfoA(szproduct: P0, lpusernamebuf: windows_core::PSTR, pcchusernamebuf: Option<*mut u32>, lporgnamebuf: windows_core::PSTR, pcchorgnamebuf: Option<*mut u32>, lpserialbuf: windows_core::PSTR, pcchserialbuf: Option<*mut u32>) -> USERINFOSTATE @@ -1588,7 +1588,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetUserInfoA(szproduct : windows_core::PCSTR, lpusernamebuf : windows_core::PSTR, pcchusernamebuf : *mut u32, lporgnamebuf : windows_core::PSTR, pcchorgnamebuf : *mut u32, lpserialbuf : windows_core::PSTR, pcchserialbuf : *mut u32) -> USERINFOSTATE); - MsiGetUserInfoA(szproduct.param().abi(), core::mem::transmute(lpusernamebuf), core::mem::transmute(pcchusernamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lporgnamebuf), core::mem::transmute(pcchorgnamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpserialbuf), core::mem::transmute(pcchserialbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetUserInfoA(szproduct.param().abi(), core::mem::transmute(lpusernamebuf), core::mem::transmute(pcchusernamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lporgnamebuf), core::mem::transmute(pcchorgnamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpserialbuf), core::mem::transmute(pcchserialbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiGetUserInfoW(szproduct: P0, lpusernamebuf: windows_core::PWSTR, pcchusernamebuf: Option<*mut u32>, lporgnamebuf: windows_core::PWSTR, pcchorgnamebuf: Option<*mut u32>, lpserialbuf: windows_core::PWSTR, pcchserialbuf: Option<*mut u32>) -> USERINFOSTATE @@ -1596,7 +1596,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiGetUserInfoW(szproduct : windows_core::PCWSTR, lpusernamebuf : windows_core::PWSTR, pcchusernamebuf : *mut u32, lporgnamebuf : windows_core::PWSTR, pcchorgnamebuf : *mut u32, lpserialbuf : windows_core::PWSTR, pcchserialbuf : *mut u32) -> USERINFOSTATE); - MsiGetUserInfoW(szproduct.param().abi(), core::mem::transmute(lpusernamebuf), core::mem::transmute(pcchusernamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lporgnamebuf), core::mem::transmute(pcchorgnamebuf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpserialbuf), core::mem::transmute(pcchserialbuf.unwrap_or(std::ptr::null_mut()))) + MsiGetUserInfoW(szproduct.param().abi(), core::mem::transmute(lpusernamebuf), core::mem::transmute(pcchusernamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lporgnamebuf), core::mem::transmute(pcchorgnamebuf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpserialbuf), core::mem::transmute(pcchserialbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiInstallMissingComponentA(szproduct: P0, szcomponent: P1, einstallstate: INSTALLSTATE) -> u32 @@ -1682,7 +1682,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiLocateComponentA(szcomponent : windows_core::PCSTR, lppathbuf : windows_core::PSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - MsiLocateComponentA(szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiLocateComponentA(szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiLocateComponentW(szcomponent: P0, lppathbuf: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> INSTALLSTATE @@ -1690,7 +1690,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiLocateComponentW(szcomponent : windows_core::PCWSTR, lppathbuf : windows_core::PWSTR, pcchbuf : *mut u32) -> INSTALLSTATE); - MsiLocateComponentW(szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiLocateComponentW(szcomponent.param().abi(), core::mem::transmute(lppathbuf), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiNotifySidChangeA(poldsid: P0, pnewsid: P1) -> u32 @@ -1856,7 +1856,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideAssemblyA(szassemblyname : windows_core::PCSTR, szappcontext : windows_core::PCSTR, dwinstallmode : u32, dwassemblyinfo : MSIASSEMBLYINFO, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideAssemblyA(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideAssemblyA(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideAssemblyW(szassemblyname: P0, szappcontext: P1, dwinstallmode: INSTALLMODE, dwassemblyinfo: MSIASSEMBLYINFO, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1865,7 +1865,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideAssemblyW(szassemblyname : windows_core::PCWSTR, szappcontext : windows_core::PCWSTR, dwinstallmode : u32, dwassemblyinfo : MSIASSEMBLYINFO, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideAssemblyW(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideAssemblyW(szassemblyname.param().abi(), szappcontext.param().abi(), dwinstallmode.0 as _, dwassemblyinfo, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideComponentA(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1875,7 +1875,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideComponentA(szproduct : windows_core::PCSTR, szfeature : windows_core::PCSTR, szcomponent : windows_core::PCSTR, dwinstallmode : u32, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideComponentA(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideComponentA(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideComponentW(szproduct: P0, szfeature: P1, szcomponent: P2, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1885,7 +1885,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideComponentW(szproduct : windows_core::PCWSTR, szfeature : windows_core::PCWSTR, szcomponent : windows_core::PCWSTR, dwinstallmode : u32, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideComponentW(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideComponentW(szproduct.param().abi(), szfeature.param().abi(), szcomponent.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideQualifiedComponentA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1894,7 +1894,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentA(szcategory : windows_core::PCSTR, szqualifier : windows_core::PCSTR, dwinstallmode : u32, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideQualifiedComponentA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideQualifiedComponentA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideQualifiedComponentExA(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P2, dwunused1: u32, dwunused2: u32, lppathbuf: windows_core::PSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1904,7 +1904,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentExA(szcategory : windows_core::PCSTR, szqualifier : windows_core::PCSTR, dwinstallmode : u32, szproduct : windows_core::PCSTR, dwunused1 : u32, dwunused2 : u32, lppathbuf : windows_core::PSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideQualifiedComponentExA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1, dwunused2, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideQualifiedComponentExA(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1, dwunused2, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideQualifiedComponentExW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, szproduct: P2, dwunused1: u32, dwunused2: u32, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1914,7 +1914,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentExW(szcategory : windows_core::PCWSTR, szqualifier : windows_core::PCWSTR, dwinstallmode : u32, szproduct : windows_core::PCWSTR, dwunused1 : u32, dwunused2 : u32, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideQualifiedComponentExW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1, dwunused2, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideQualifiedComponentExW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, szproduct.param().abi(), dwunused1, dwunused2, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiProvideQualifiedComponentW(szcategory: P0, szqualifier: P1, dwinstallmode: INSTALLMODE, lppathbuf: windows_core::PWSTR, pcchpathbuf: Option<*mut u32>) -> u32 @@ -1923,7 +1923,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiProvideQualifiedComponentW(szcategory : windows_core::PCWSTR, szqualifier : windows_core::PCWSTR, dwinstallmode : u32, lppathbuf : windows_core::PWSTR, pcchpathbuf : *mut u32) -> u32); - MsiProvideQualifiedComponentW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(std::ptr::null_mut()))) + MsiProvideQualifiedComponentW(szcategory.param().abi(), szqualifier.param().abi(), dwinstallmode.0 as _, core::mem::transmute(lppathbuf), core::mem::transmute(pcchpathbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiQueryComponentStateA(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P2, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1933,7 +1933,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiQueryComponentStateA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, szcomponentcode : windows_core::PCSTR, pdwstate : *mut INSTALLSTATE) -> u32); - MsiQueryComponentStateA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut()))) + MsiQueryComponentStateA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiQueryComponentStateW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szcomponentcode: P2, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1943,7 +1943,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiQueryComponentStateW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, szcomponentcode : windows_core::PCWSTR, pdwstate : *mut INSTALLSTATE) -> u32); - MsiQueryComponentStateW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut()))) + MsiQueryComponentStateW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szcomponentcode.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiQueryFeatureStateA(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -1962,7 +1962,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiQueryFeatureStateExA(szproductcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, szfeature : windows_core::PCSTR, pdwstate : *mut INSTALLSTATE) -> u32); - MsiQueryFeatureStateExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut()))) + MsiQueryFeatureStateExA(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiQueryFeatureStateExW(szproductcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, szfeature: P2, pdwstate: Option<*mut INSTALLSTATE>) -> u32 @@ -1972,7 +1972,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiQueryFeatureStateExW(szproductcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, szfeature : windows_core::PCWSTR, pdwstate : *mut INSTALLSTATE) -> u32); - MsiQueryFeatureStateExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut()))) + MsiQueryFeatureStateExW(szproductcode.param().abi(), szusersid.param().abi(), dwcontext, szfeature.param().abi(), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiQueryFeatureStateW(szproduct: P0, szfeature: P1) -> INSTALLSTATE @@ -2037,7 +2037,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordGetStringA(hrecord : MSIHANDLE, ifield : u32, szvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiRecordGetStringA(hrecord.param().abi(), ifield, core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiRecordGetStringA(hrecord.param().abi(), ifield, core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiRecordGetStringW(hrecord: P0, ifield: u32, szvaluebuf: windows_core::PWSTR, pcchvaluebuf: Option<*mut u32>) -> u32 @@ -2045,7 +2045,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiRecordGetStringW(hrecord : MSIHANDLE, ifield : u32, szvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiRecordGetStringW(hrecord.param().abi(), ifield, core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiRecordGetStringW(hrecord.param().abi(), ifield, core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiRecordIsNull(hrecord: P0, ifield: u32) -> super::super::Foundation::BOOL @@ -2200,17 +2200,17 @@ where #[inline] pub unsafe fn MsiSetExternalUIA(puihandler: INSTALLUI_HANDLERA, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>) -> INSTALLUI_HANDLERA { windows_targets::link!("msi.dll" "system" fn MsiSetExternalUIA(puihandler : INSTALLUI_HANDLERA, dwmessagefilter : u32, pvcontext : *const core::ffi::c_void) -> INSTALLUI_HANDLERA); - MsiSetExternalUIA(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null()))) + MsiSetExternalUIA(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MsiSetExternalUIRecord(puihandler: PINSTALLUI_HANDLER_RECORD, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>, ppuiprevhandler: PINSTALLUI_HANDLER_RECORD) -> u32 { windows_targets::link!("msi.dll" "system" fn MsiSetExternalUIRecord(puihandler : PINSTALLUI_HANDLER_RECORD, dwmessagefilter : u32, pvcontext : *const core::ffi::c_void, ppuiprevhandler : PINSTALLUI_HANDLER_RECORD) -> u32); - MsiSetExternalUIRecord(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null())), ppuiprevhandler) + MsiSetExternalUIRecord(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null())), ppuiprevhandler) } #[inline] pub unsafe fn MsiSetExternalUIW(puihandler: INSTALLUI_HANDLERW, dwmessagefilter: u32, pvcontext: Option<*const core::ffi::c_void>) -> INSTALLUI_HANDLERW { windows_targets::link!("msi.dll" "system" fn MsiSetExternalUIW(puihandler : INSTALLUI_HANDLERW, dwmessagefilter : u32, pvcontext : *const core::ffi::c_void) -> INSTALLUI_HANDLERW); - MsiSetExternalUIW(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(std::ptr::null()))) + MsiSetExternalUIW(puihandler, dwmessagefilter, core::mem::transmute(pvcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MsiSetFeatureAttributesA(hinstall: P0, szfeature: P1, dwattributes: u32) -> u32 @@ -2259,7 +2259,7 @@ where #[inline] pub unsafe fn MsiSetInternalUI(dwuilevel: INSTALLUILEVEL, phwnd: Option<*mut super::super::Foundation::HWND>) -> INSTALLUILEVEL { windows_targets::link!("msi.dll" "system" fn MsiSetInternalUI(dwuilevel : INSTALLUILEVEL, phwnd : *mut super::super::Foundation:: HWND) -> INSTALLUILEVEL); - MsiSetInternalUI(dwuilevel, core::mem::transmute(phwnd.unwrap_or(std::ptr::null_mut()))) + MsiSetInternalUI(dwuilevel, core::mem::transmute(phwnd.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSetMode(hinstall: P0, erunmode: MSIRUNMODE, fstate: P1) -> u32 @@ -2453,7 +2453,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, pdwdiskid : *mut u32, szvolumelabel : windows_core::PSTR, pcchvolumelabel : *mut u32, szdiskprompt : windows_core::PSTR, pcchdiskprompt : *mut u32) -> u32); - MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(pdwdiskid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szvolumelabel), core::mem::transmute(pcchvolumelabel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szdiskprompt), core::mem::transmute(pcchdiskprompt.unwrap_or(std::ptr::null_mut()))) + MsiSourceListEnumMediaDisksA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(pdwdiskid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szvolumelabel), core::mem::transmute(pcchvolumelabel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdiskprompt), core::mem::transmute(pcchdiskprompt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, pdwdiskid: Option<*mut u32>, szvolumelabel: windows_core::PWSTR, pcchvolumelabel: Option<*mut u32>, szdiskprompt: windows_core::PWSTR, pcchdiskprompt: Option<*mut u32>) -> u32 @@ -2462,7 +2462,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, pdwdiskid : *mut u32, szvolumelabel : windows_core::PWSTR, pcchvolumelabel : *mut u32, szdiskprompt : windows_core::PWSTR, pcchdiskprompt : *mut u32) -> u32); - MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(pdwdiskid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szvolumelabel), core::mem::transmute(pcchvolumelabel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szdiskprompt), core::mem::transmute(pcchdiskprompt.unwrap_or(std::ptr::null_mut()))) + MsiSourceListEnumMediaDisksW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(pdwdiskid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szvolumelabel), core::mem::transmute(pcchvolumelabel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdiskprompt), core::mem::transmute(pcchdiskprompt.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: windows_core::PSTR, pcchsource: Option<*mut u32>) -> u32 @@ -2471,7 +2471,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumSourcesA(szproductcodeorpatchcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, szsource : windows_core::PSTR, pcchsource : *mut u32) -> u32); - MsiSourceListEnumSourcesA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(std::ptr::null_mut()))) + MsiSourceListEnumSourcesA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, dwindex: u32, szsource: windows_core::PWSTR, pcchsource: Option<*mut u32>) -> u32 @@ -2480,7 +2480,7 @@ where P1: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListEnumSourcesW(szproductcodeorpatchcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, dwindex : u32, szsource : windows_core::PWSTR, pcchsource : *mut u32) -> u32); - MsiSourceListEnumSourcesW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(std::ptr::null_mut()))) + MsiSourceListEnumSourcesW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, dwindex, core::mem::transmute(szsource), core::mem::transmute(pcchsource.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListForceResolutionA(szproduct: P0, szusername: P1, dwreserved: u32) -> u32 @@ -2526,7 +2526,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListGetInfoA(szproductcodeorpatchcode : windows_core::PCSTR, szusersid : windows_core::PCSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, szproperty : windows_core::PCSTR, szvalue : windows_core::PSTR, pcchvalue : *mut u32) -> u32); - MsiSourceListGetInfoA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiSourceListGetInfoA(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListGetInfoW(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P2, szvalue: windows_core::PWSTR, pcchvalue: Option<*mut u32>) -> u32 @@ -2536,7 +2536,7 @@ where P2: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSourceListGetInfoW(szproductcodeorpatchcode : windows_core::PCWSTR, szusersid : windows_core::PCWSTR, dwcontext : MSIINSTALLCONTEXT, dwoptions : u32, szproperty : windows_core::PCWSTR, szvalue : windows_core::PWSTR, pcchvalue : *mut u32) -> u32); - MsiSourceListGetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(std::ptr::null_mut()))) + MsiSourceListGetInfoW(szproductcodeorpatchcode.param().abi(), szusersid.param().abi(), dwcontext, dwoptions, szproperty.param().abi(), core::mem::transmute(szvalue), core::mem::transmute(pcchvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSourceListSetInfoA(szproductcodeorpatchcode: P0, szusersid: P1, dwcontext: MSIINSTALLCONTEXT, dwoptions: u32, szproperty: P2, szvalue: P3) -> u32 @@ -2566,7 +2566,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoGetPropertyA(hsummaryinfo : MSIHANDLE, uiproperty : u32, puidatatype : *mut u32, pivalue : *mut i32, pftvalue : *mut super::super::Foundation:: FILETIME, szvaluebuf : windows_core::PSTR, pcchvaluebuf : *mut u32) -> u32); - MsiSummaryInfoGetPropertyA(hsummaryinfo.param().abi(), uiproperty, puidatatype, pivalue, core::mem::transmute(pftvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiSummaryInfoGetPropertyA(hsummaryinfo.param().abi(), uiproperty, puidatatype, pivalue, core::mem::transmute(pftvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSummaryInfoGetPropertyCount(hsummaryinfo: P0, puipropertycount: *mut u32) -> u32 @@ -2582,7 +2582,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiSummaryInfoGetPropertyW(hsummaryinfo : MSIHANDLE, uiproperty : u32, puidatatype : *mut u32, pivalue : *mut i32, pftvalue : *mut super::super::Foundation:: FILETIME, szvaluebuf : windows_core::PWSTR, pcchvaluebuf : *mut u32) -> u32); - MsiSummaryInfoGetPropertyW(hsummaryinfo.param().abi(), uiproperty, puidatatype, pivalue, core::mem::transmute(pftvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(std::ptr::null_mut()))) + MsiSummaryInfoGetPropertyW(hsummaryinfo.param().abi(), uiproperty, puidatatype, pivalue, core::mem::transmute(pftvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szvaluebuf), core::mem::transmute(pcchvaluebuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiSummaryInfoPersist(hsummaryinfo: P0) -> u32 @@ -2709,7 +2709,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiViewGetErrorA(hview : MSIHANDLE, szcolumnnamebuffer : windows_core::PSTR, pcchbuf : *mut u32) -> MSIDBERROR); - MsiViewGetErrorA(hview.param().abi(), core::mem::transmute(szcolumnnamebuffer), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiViewGetErrorA(hview.param().abi(), core::mem::transmute(szcolumnnamebuffer), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiViewGetErrorW(hview: P0, szcolumnnamebuffer: windows_core::PWSTR, pcchbuf: Option<*mut u32>) -> MSIDBERROR @@ -2717,7 +2717,7 @@ where P0: windows_core::Param, { windows_targets::link!("msi.dll" "system" fn MsiViewGetErrorW(hview : MSIHANDLE, szcolumnnamebuffer : windows_core::PWSTR, pcchbuf : *mut u32) -> MSIDBERROR); - MsiViewGetErrorW(hview.param().abi(), core::mem::transmute(szcolumnnamebuffer), core::mem::transmute(pcchbuf.unwrap_or(std::ptr::null_mut()))) + MsiViewGetErrorW(hview.param().abi(), core::mem::transmute(szcolumnnamebuffer), core::mem::transmute(pcchbuf.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MsiViewModify(hview: P0, emodifymode: MSIMODIFY, hrecord: P1) -> u32 @@ -2735,7 +2735,7 @@ pub unsafe fn NormalizeFileForPatchSignature(filebuffer: *mut core::ffi::c_void, filebuffer, filesize, optionflags, - core::mem::transmute(optiondata.unwrap_or(std::ptr::null())), + core::mem::transmute(optiondata.unwrap_or(core::ptr::null())), newfilecoffbase, newfilecofftime, ignorerangearray.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), @@ -2752,7 +2752,7 @@ where P2: windows_core::Param, { 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.param().abi(), settingsnamespace.param().abi(), settingname.param().abi(), core::mem::transmute(pvbuffer), dwbuffer, core::mem::transmute(pdwwrittenorrequired.unwrap_or(std::ptr::null_mut()))).ok() + QueryActCtxSettingsW(dwflags, hactctx.param().abi(), settingsnamespace.param().abi(), settingname.param().abi(), core::mem::transmute(pvbuffer), dwbuffer, core::mem::transmute(pdwwrittenorrequired.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueryActCtxW(dwflags: u32, hactctx: P0, pvsubinstance: Option<*const core::ffi::c_void>, ulinfoclass: u32, pvbuffer: Option<*mut core::ffi::c_void>, cbbuffer: usize, pcbwrittenorrequired: Option<*mut usize>) -> windows_core::Result<()> @@ -2760,7 +2760,7 @@ where P0: windows_core::Param, { 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.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() + QueryActCtxW(dwflags, hactctx.param().abi(), core::mem::transmute(pvsubinstance.unwrap_or(core::ptr::null())), ulinfoclass, core::mem::transmute(pvbuffer.unwrap_or(core::ptr::null_mut())), cbbuffer, core::mem::transmute(pcbwrittenorrequired.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ReleaseActCtx(hactctx: super::super::Foundation::HANDLE) { @@ -2814,7 +2814,7 @@ where #[inline] pub unsafe fn TestApplyPatchToFileByBuffers(patchfilebuffer: &[u8], oldfilebuffer: Option<&[u8]>, newfilesize: Option<*mut u32>, applyoptionflags: u32) -> super::super::Foundation::BOOL { windows_targets::link!("mspatcha.dll" "system" fn TestApplyPatchToFileByBuffers(patchfilebuffer : *const u8, patchfilesize : u32, oldfilebuffer : *const u8, oldfilesize : u32, newfilesize : *mut u32, applyoptionflags : u32) -> super::super::Foundation:: BOOL); - TestApplyPatchToFileByBuffers(core::mem::transmute(patchfilebuffer.as_ptr()), patchfilebuffer.len().try_into().unwrap(), core::mem::transmute(oldfilebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), oldfilebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(newfilesize.unwrap_or(std::ptr::null_mut())), applyoptionflags) + TestApplyPatchToFileByBuffers(core::mem::transmute(patchfilebuffer.as_ptr()), patchfilebuffer.len().try_into().unwrap(), core::mem::transmute(oldfilebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), oldfilebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(newfilesize.unwrap_or(core::ptr::null_mut())), applyoptionflags) } #[inline] pub unsafe fn TestApplyPatchToFileByHandles(patchfilehandle: P0, oldfilehandle: P1, applyoptionflags: u32) -> super::super::Foundation::BOOL @@ -3935,14 +3935,14 @@ impl IPMDeploymentManager { packagepath.param().abi(), ppbchallenge, pcbchallenge, - core::mem::transmute(ppbkid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbkid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbdeviceid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbdeviceid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbsaltvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbsaltvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbkgvvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbkgvvalue.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppbkid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbkid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbdeviceid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbdeviceid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbsaltvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbsaltvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbkgvvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbkgvvalue.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3955,14 +3955,14 @@ impl IPMDeploymentManager { core::mem::transmute(productid), ppbchallenge, pcblicense, - core::mem::transmute(ppbkid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbkid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbdeviceid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbdeviceid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbsaltvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbsaltvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppbkgvvalue.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbkgvvalue.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(ppbkid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbkid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbdeviceid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbdeviceid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbsaltvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbsaltvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppbkgvvalue.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbkgvvalue.unwrap_or(core::ptr::null_mut())), ) .ok() } diff --git a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs index bfd113e163..876434647f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ClrHosting/mod.rs @@ -151,10 +151,10 @@ where runtimeinfoflags, core::mem::transmute(pdirectory.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdirectory.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dwdirectorylength.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dwdirectorylength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pversion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dwlength.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dwlength.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -169,7 +169,7 @@ where #[inline] pub unsafe fn GetRequestedRuntimeVersionForCLSID(rclsid: *const windows_core::GUID, pversion: Option<&mut [u16]>, dwlength: Option<*mut u32>, dwresolutionflags: CLSID_RESOLUTION_FLAGS) -> windows_core::Result<()> { windows_targets::link!("mscoree.dll" "system" fn GetRequestedRuntimeVersionForCLSID(rclsid : *const windows_core::GUID, pversion : windows_core::PWSTR, cchbuffer : u32, dwlength : *mut u32, dwresolutionflags : CLSID_RESOLUTION_FLAGS) -> windows_core::HRESULT); - GetRequestedRuntimeVersionForCLSID(rclsid, core::mem::transmute(pversion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwlength.unwrap_or(std::ptr::null_mut())), dwresolutionflags).ok() + GetRequestedRuntimeVersionForCLSID(rclsid, core::mem::transmute(pversion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pversion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(dwlength.unwrap_or(core::ptr::null_mut())), dwresolutionflags).ok() } #[inline] pub unsafe fn GetVersionFromProcess(hprocess: P0, pversion: &mut [u16], dwlength: *mut u32) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs index 6c3c7c9f85..48adfefc75 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/CallObj/mod.rs @@ -196,7 +196,7 @@ impl ICallIndirect { (windows_core::Interface::vtable(self).GetStackSize)(windows_core::Interface::as_raw(self), imethod, &mut result__).map(|| result__) } pub unsafe fn GetIID(&self, piid: Option<*mut windows_core::GUID>, pfderivesfromidispatch: Option<*mut super::super::super::Foundation::BOOL>, pcmethod: Option<*mut u32>, pwszinterface: *mut windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIID)(windows_core::Interface::as_raw(self), core::mem::transmute(piid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfderivesfromidispatch.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcmethod.unwrap_or(std::ptr::null_mut())), pwszinterface).ok() + (windows_core::Interface::vtable(self).GetIID)(windows_core::Interface::as_raw(self), core::mem::transmute(piid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfderivesfromidispatch.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcmethod.unwrap_or(core::ptr::null_mut())), pwszinterface).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs index 97099de9ad..39d85e372e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Marshal/mod.rs @@ -84,7 +84,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoGetMarshalSizeMax(pulsize : *mut u32, riid : *const windows_core::GUID, punk : * mut core::ffi::c_void, dwdestcontext : u32, pvdestcontext : *const core::ffi::c_void, mshlflags : u32) -> windows_core::HRESULT); - CoGetMarshalSizeMax(pulsize, riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags).ok() + CoGetMarshalSizeMax(pulsize, riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags).ok() } #[inline] pub unsafe fn CoGetStandardMarshal(riid: *const windows_core::GUID, punk: P0, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>, mshlflags: u32) -> windows_core::Result @@ -93,7 +93,7 @@ where { windows_targets::link!("ole32.dll" "system" fn CoGetStandardMarshal(riid : *const windows_core::GUID, punk : * mut core::ffi::c_void, dwdestcontext : u32, pvdestcontext : *const core::ffi::c_void, mshlflags : u32, ppmarshal : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CoGetStandardMarshal(riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CoGetStandardMarshal(riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoGetStdMarshalEx(punkouter: P0, smexflags: u32) -> windows_core::Result @@ -128,7 +128,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoMarshalInterface(pstm : * mut core::ffi::c_void, riid : *const windows_core::GUID, punk : * mut core::ffi::c_void, dwdestcontext : u32, pvdestcontext : *const core::ffi::c_void, mshlflags : u32) -> windows_core::HRESULT); - CoMarshalInterface(pstm.param().abi(), riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags).ok() + CoMarshalInterface(pstm.param().abi(), riid, punk.param().abi(), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags).ok() } #[inline] pub unsafe fn CoReleaseMarshalData(pstm: P0) -> windows_core::Result<()> @@ -664,17 +664,17 @@ windows_core::imp::interface_hierarchy!(IMarshal, windows_core::IUnknown); impl IMarshal { pub unsafe fn GetUnmarshalClass(&self, riid: *const windows_core::GUID, pv: Option<*const core::ffi::c_void>, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>, mshlflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetUnmarshalClass)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(std::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetUnmarshalClass)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(core::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags, &mut result__).map(|| result__) } pub unsafe fn GetMarshalSizeMax(&self, riid: *const windows_core::GUID, pv: Option<*const core::ffi::c_void>, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>, mshlflags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetMarshalSizeMax)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(std::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags, &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetMarshalSizeMax)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pv.unwrap_or(core::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags, &mut result__).map(|| result__) } pub unsafe fn MarshalInterface(&self, pstm: P0, riid: *const windows_core::GUID, pv: Option<*const core::ffi::c_void>, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>, mshlflags: u32) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).MarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, core::mem::transmute(pv.unwrap_or(std::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), mshlflags).ok() + (windows_core::Interface::vtable(self).MarshalInterface)(windows_core::Interface::as_raw(self), pstm.param().abi(), riid, core::mem::transmute(pv.unwrap_or(core::ptr::null())), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), mshlflags).ok() } pub unsafe fn UnmarshalInterface(&self, pstm: P0, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/impl.rs b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/impl.rs index f84fc940f8..8b049aa65c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/impl.rs @@ -328,7 +328,7 @@ impl IMemoryAllocator_Vtbl { } } #[doc(hidden)] -struct IMemoryAllocator_ImplVtbl(std::marker::PhantomData); +struct IMemoryAllocator_ImplVtbl(core::marker::PhantomData); impl IMemoryAllocator_ImplVtbl { const VTABLE: IMemoryAllocator_Vtbl = IMemoryAllocator_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs index 16a90d1a99..40015b5750 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/StructuredStorage/mod.rs @@ -11,7 +11,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoGetInstanceFromFile(pserverinfo : *const super:: COSERVERINFO, pclsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, dwclsctx : super:: CLSCTX, grfmode : u32, pwszname : windows_core::PCWSTR, dwcount : u32, presults : *mut super:: MULTI_QI) -> windows_core::HRESULT); - CoGetInstanceFromFile(core::mem::transmute(pserverinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pclsid.unwrap_or(std::ptr::null())), punkouter.param().abi(), dwclsctx, grfmode, pwszname.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromFile(core::mem::transmute(pserverinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), punkouter.param().abi(), dwclsctx, grfmode, pwszname.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoGetInstanceFromIStorage(pserverinfo: Option<*const super::COSERVERINFO>, pclsid: Option<*const windows_core::GUID>, punkouter: P0, dwclsctx: super::CLSCTX, pstg: P1, presults: &mut [super::MULTI_QI]) -> windows_core::Result<()> @@ -20,7 +20,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoGetInstanceFromIStorage(pserverinfo : *const super:: COSERVERINFO, pclsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, dwclsctx : super:: CLSCTX, pstg : * mut core::ffi::c_void, dwcount : u32, presults : *mut super:: MULTI_QI) -> windows_core::HRESULT); - CoGetInstanceFromIStorage(core::mem::transmute(pserverinfo.unwrap_or(std::ptr::null())), core::mem::transmute(pclsid.unwrap_or(std::ptr::null())), punkouter.param().abi(), dwclsctx, pstg.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoGetInstanceFromIStorage(core::mem::transmute(pserverinfo.unwrap_or(core::ptr::null())), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), punkouter.param().abi(), dwclsctx, pstg.param().abi(), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoGetInterfaceAndReleaseStream(pstm: P0) -> windows_core::Result @@ -683,7 +683,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn ReadFmtUserTypeStg(pstg : * mut core::ffi::c_void, pcf : *mut u16, lplpszusertype : *mut windows_core::PWSTR) -> windows_core::HRESULT); - ReadFmtUserTypeStg(pstg.param().abi(), pcf, core::mem::transmute(lplpszusertype.unwrap_or(std::ptr::null_mut()))).ok() + ReadFmtUserTypeStg(pstg.param().abi(), pcf, core::mem::transmute(lplpszusertype.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetConvertStg(pstg: P0, fconvert: P1) -> windows_core::Result<()> @@ -710,7 +710,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgConvertVariantToProperty(pvar : *const core::mem::MaybeUninit < PROPVARIANT >, codepage : u16, pprop : *mut SERIALIZEDPROPERTYVALUE, pcb : *mut u32, pid : u32, freserved : super::super::super::Foundation:: BOOLEAN, pcindirect : *mut u32) -> *mut SERIALIZEDPROPERTYVALUE); - StgConvertVariantToProperty(core::mem::transmute(pvar), codepage, core::mem::transmute(pprop.unwrap_or(std::ptr::null_mut())), pcb, pid, freserved.param().abi(), core::mem::transmute(pcindirect.unwrap_or(std::ptr::null_mut()))) + StgConvertVariantToProperty(core::mem::transmute(pvar), codepage, core::mem::transmute(pprop.unwrap_or(core::ptr::null_mut())), pcb, pid, freserved.param().abi(), core::mem::transmute(pcindirect.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn StgCreateDocfile(pwcsname: P0, grfmode: super::STGM, reserved: u32) -> windows_core::Result @@ -756,7 +756,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgCreateStorageEx(pwcsname : windows_core::PCWSTR, grfmode : super:: STGM, stgfmt : STGFMT, grfattrs : u32, pstgoptions : *mut STGOPTIONS, psecuritydescriptor : super::super::super::Security:: PSECURITY_DESCRIPTOR, riid : *const windows_core::GUID, ppobjectopen : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - StgCreateStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(std::ptr::null_mut())), psecuritydescriptor.param().abi(), riid, ppobjectopen).ok() + StgCreateStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(core::ptr::null_mut())), psecuritydescriptor.param().abi(), riid, ppobjectopen).ok() } #[cfg(feature = "Win32_System_Variant")] #[inline] @@ -834,7 +834,7 @@ where { windows_targets::link!("ole32.dll" "system" fn StgOpenStorage(pwcsname : windows_core::PCWSTR, pstgpriority : * mut core::ffi::c_void, grfmode : super:: STGM, snbexclude : *const *const u16, reserved : u32, ppstgopen : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgOpenStorage(pwcsname.param().abi(), pstgpriority.param().abi(), grfmode, core::mem::transmute(snbexclude.unwrap_or(std::ptr::null())), reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenStorage(pwcsname.param().abi(), pstgpriority.param().abi(), grfmode, core::mem::transmute(snbexclude.unwrap_or(core::ptr::null())), reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_Security")] #[inline] @@ -844,7 +844,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgOpenStorageEx(pwcsname : windows_core::PCWSTR, grfmode : super:: STGM, stgfmt : STGFMT, grfattrs : u32, pstgoptions : *mut STGOPTIONS, psecuritydescriptor : super::super::super::Security:: PSECURITY_DESCRIPTOR, riid : *const windows_core::GUID, ppobjectopen : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - StgOpenStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(std::ptr::null_mut())), psecuritydescriptor.param().abi(), riid, ppobjectopen).ok() + StgOpenStorageEx(pwcsname.param().abi(), grfmode, stgfmt, grfattrs, core::mem::transmute(pstgoptions.unwrap_or(core::ptr::null_mut())), psecuritydescriptor.param().abi(), riid, ppobjectopen).ok() } #[inline] pub unsafe fn StgOpenStorageOnILockBytes(plkbyt: P0, pstgpriority: P1, grfmode: super::STGM, snbexclude: Option<*const *const u16>, reserved: u32) -> windows_core::Result @@ -854,7 +854,7 @@ where { windows_targets::link!("ole32.dll" "system" fn StgOpenStorageOnILockBytes(plkbyt : * mut core::ffi::c_void, pstgpriority : * mut core::ffi::c_void, grfmode : super:: STGM, snbexclude : *const *const u16, reserved : u32, ppstgopen : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - StgOpenStorageOnILockBytes(plkbyt.param().abi(), pstgpriority.param().abi(), grfmode, core::mem::transmute(snbexclude.unwrap_or(std::ptr::null())), reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + StgOpenStorageOnILockBytes(plkbyt.param().abi(), pstgpriority.param().abi(), grfmode, core::mem::transmute(snbexclude.unwrap_or(core::ptr::null())), reserved, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn StgPropertyLengthAsVariant(pprop: *const SERIALIZEDPROPERTYVALUE, cbprop: u32, codepage: u16, breserved: u8) -> u32 { @@ -873,7 +873,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn StgSetTimes(lpszname : windows_core::PCWSTR, pctime : *const super::super::super::Foundation:: FILETIME, patime : *const super::super::super::Foundation:: FILETIME, pmtime : *const super::super::super::Foundation:: FILETIME) -> windows_core::HRESULT); - StgSetTimes(lpszname.param().abi(), core::mem::transmute(pctime.unwrap_or(std::ptr::null())), core::mem::transmute(patime.unwrap_or(std::ptr::null())), core::mem::transmute(pmtime.unwrap_or(std::ptr::null()))).ok() + StgSetTimes(lpszname.param().abi(), core::mem::transmute(pctime.unwrap_or(core::ptr::null())), core::mem::transmute(patime.unwrap_or(core::ptr::null())), core::mem::transmute(pmtime.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] #[inline] @@ -953,7 +953,7 @@ impl core::ops::Deref for IEnumSTATPROPSETSTG { windows_core::imp::interface_hierarchy!(IEnumSTATPROPSETSTG, windows_core::IUnknown); impl IEnumSTATPROPSETSTG { pub unsafe fn Next(&self, rgelt: &mut [STATPROPSETSTG], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -985,7 +985,7 @@ windows_core::imp::interface_hierarchy!(IEnumSTATPROPSTG, windows_core::IUnknown impl IEnumSTATPROPSTG { #[cfg(feature = "Win32_System_Variant")] pub unsafe fn Next(&self, rgelt: &mut [STATPROPSTG], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -1019,7 +1019,7 @@ impl core::ops::Deref for IEnumSTATSTG { windows_core::imp::interface_hierarchy!(IEnumSTATSTG, windows_core::IUnknown); impl IEnumSTATSTG { pub unsafe fn Next(&self, rgelt: &mut [super::STATSTG], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -1125,10 +1125,10 @@ impl core::ops::Deref for ILockBytes { windows_core::imp::interface_hierarchy!(ILockBytes, windows_core::IUnknown); impl ILockBytes { pub unsafe fn ReadAt(&self, uloffset: u64, pv: *mut core::ffi::c_void, cb: u32, pcbread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, core::mem::transmute(pcbread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteAt(&self, uloffset: u64, pv: *const core::ffi::c_void, cb: u32, pcbwritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, core::mem::transmute(pcbwritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteAt)(windows_core::Interface::as_raw(self), uloffset, pv, cb, core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Flush(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Flush)(windows_core::Interface::as_raw(self)).ok() @@ -1460,7 +1460,7 @@ impl IStorage { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).OpenStream)(windows_core::Interface::as_raw(self), pwcsname.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), grfmode, reserved2, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).OpenStream)(windows_core::Interface::as_raw(self), pwcsname.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), grfmode, reserved2, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn CreateStorage(&self, pwcsname: P0, grfmode: super::STGM, reserved1: u32, reserved2: u32) -> windows_core::Result where @@ -1481,7 +1481,7 @@ impl IStorage { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), rgiidexclude.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgiidexclude.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(snbexclude.unwrap_or(std::ptr::null())), pstgdest.param().abi()).ok() + (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), rgiidexclude.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgiidexclude.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(snbexclude.unwrap_or(core::ptr::null())), pstgdest.param().abi()).ok() } pub unsafe fn MoveElementTo(&self, pwcsname: P0, pstgdest: P1, pwcsnewname: P2, grfflags: STGMOVE) -> windows_core::Result<()> where @@ -1499,7 +1499,7 @@ impl IStorage { } pub unsafe fn EnumElements(&self, reserved1: u32, reserved2: Option<*const core::ffi::c_void>, reserved3: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumElements)(windows_core::Interface::as_raw(self), reserved1, core::mem::transmute(reserved2.unwrap_or(std::ptr::null())), reserved3, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumElements)(windows_core::Interface::as_raw(self), reserved1, core::mem::transmute(reserved2.unwrap_or(core::ptr::null())), reserved3, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn DestroyElement(&self, pwcsname: P0) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs index f0872bffcf..a47e3cd2ea 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/Urlmon/mod.rs @@ -6,7 +6,7 @@ where P2: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoGetClassObjectFromURL(rclassid : *const windows_core::GUID, szcode : windows_core::PCWSTR, dwfileversionms : u32, dwfileversionls : u32, sztype : windows_core::PCWSTR, pbindctx : * mut core::ffi::c_void, dwclscontext : super:: CLSCTX, pvreserved : *const core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - CoGetClassObjectFromURL(rclassid, szcode.param().abi(), dwfileversionms, dwfileversionls, sztype.param().abi(), pbindctx.param().abi(), dwclscontext, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), riid, ppv).ok() + CoGetClassObjectFromURL(rclassid, szcode.param().abi(), dwfileversionms, dwfileversionls, sztype.param().abi(), pbindctx.param().abi(), dwclscontext, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), riid, ppv).ok() } #[inline] pub unsafe fn CoInternetCombineIUri(pbaseuri: P0, prelativeuri: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: usize) -> windows_core::Result<()> @@ -24,7 +24,7 @@ where P1: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetCombineUrl(pwzbaseurl : windows_core::PCWSTR, pwzrelativeurl : windows_core::PCWSTR, dwcombineflags : u32, pszresult : windows_core::PWSTR, cchresult : u32, pcchresult : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - CoInternetCombineUrl(pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult.unwrap_or(std::ptr::null_mut())), dwreserved).ok() + CoInternetCombineUrl(pwzbaseurl.param().abi(), pwzrelativeurl.param().abi(), dwcombineflags, core::mem::transmute(pszresult.as_ptr()), pszresult.len().try_into().unwrap(), core::mem::transmute(pcchresult.unwrap_or(core::ptr::null_mut())), dwreserved).ok() } #[inline] pub unsafe fn CoInternetCombineUrlEx(pbaseuri: P0, pwzrelativeurl: P1, dwcombineflags: u32, ppcombineduri: *mut Option, dwreserved: usize) -> windows_core::Result<()> @@ -144,7 +144,7 @@ where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn CoInternetQueryInfo(pwzurl : windows_core::PCWSTR, queryoptions : QUERYOPTION, dwqueryflags : u32, pvbuffer : *mut core::ffi::c_void, cbbuffer : u32, pcbbuffer : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - CoInternetQueryInfo(pwzurl.param().abi(), queryoptions, dwqueryflags, pvbuffer, cbbuffer, core::mem::transmute(pcbbuffer.unwrap_or(std::ptr::null_mut())), dwreserved).ok() + CoInternetQueryInfo(pwzurl.param().abi(), queryoptions, dwqueryflags, pvbuffer, cbbuffer, core::mem::transmute(pcbbuffer.unwrap_or(core::ptr::null_mut())), dwreserved).ok() } #[inline] pub unsafe fn CoInternetSetFeatureEnabled(featureentry: INTERNETFEATURELIST, dwflags: u32, fenable: P0) -> windows_core::Result<()> @@ -237,7 +237,7 @@ where P0: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn FaultInIEFeature(hwnd : super::super::super::Foundation:: HWND, pclassspec : *const super:: uCLSSPEC, pquery : *mut super:: QUERYCONTEXT, dwflags : u32) -> windows_core::HRESULT); - FaultInIEFeature(hwnd.param().abi(), pclassspec, core::mem::transmute(pquery.unwrap_or(std::ptr::null_mut())), dwflags).ok() + FaultInIEFeature(hwnd.param().abi(), pclassspec, core::mem::transmute(pquery.unwrap_or(core::ptr::null_mut())), dwflags).ok() } #[inline] pub unsafe fn FindMediaType(rgsztypes: P0) -> windows_core::Result @@ -265,7 +265,7 @@ where P2: windows_core::Param, { windows_targets::link!("urlmon.dll" "system" fn FindMimeFromData(pbc : * mut core::ffi::c_void, pwzurl : windows_core::PCWSTR, pbuffer : *const core::ffi::c_void, cbsize : u32, pwzmimeproposed : windows_core::PCWSTR, dwmimeflags : u32, ppwzmimeout : *mut windows_core::PWSTR, dwreserved : u32) -> windows_core::HRESULT); - FindMimeFromData(pbc.param().abi(), pwzurl.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null())), cbsize, pwzmimeproposed.param().abi(), dwmimeflags, ppwzmimeout, dwreserved).ok() + FindMimeFromData(pbc.param().abi(), pwzurl.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), cbsize, pwzmimeproposed.param().abi(), dwmimeflags, ppwzmimeout, dwreserved).ok() } #[inline] pub unsafe fn GetClassFileOrMime(pbc: P0, szfilename: P1, pbuffer: Option<*const core::ffi::c_void>, cbsize: u32, szmime: P2, dwreserved: u32) -> windows_core::Result @@ -276,7 +276,7 @@ where { windows_targets::link!("urlmon.dll" "system" fn GetClassFileOrMime(pbc : * mut core::ffi::c_void, szfilename : windows_core::PCWSTR, pbuffer : *const core::ffi::c_void, cbsize : u32, szmime : windows_core::PCWSTR, dwreserved : u32, pclsid : *mut windows_core::GUID) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetClassFileOrMime(pbc.param().abi(), szfilename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null())), cbsize, szmime.param().abi(), dwreserved, &mut result__).map(|| result__) + GetClassFileOrMime(pbc.param().abi(), szfilename.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), cbsize, szmime.param().abi(), dwreserved, &mut result__).map(|| result__) } #[inline] pub unsafe fn GetClassURL(szurl: P0) -> windows_core::Result @@ -595,12 +595,12 @@ where #[inline] pub unsafe fn UrlMkGetSessionOption(dwoption: u32, pbuffer: Option<*mut core::ffi::c_void>, dwbufferlength: u32, pdwbufferlengthout: *mut u32, dwreserved: u32) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn UrlMkGetSessionOption(dwoption : u32, pbuffer : *mut core::ffi::c_void, dwbufferlength : u32, pdwbufferlengthout : *mut u32, dwreserved : u32) -> windows_core::HRESULT); - UrlMkGetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), dwbufferlength, pdwbufferlengthout, dwreserved).ok() + UrlMkGetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), dwbufferlength, pdwbufferlengthout, dwreserved).ok() } #[inline] pub unsafe fn UrlMkSetSessionOption(dwoption: u32, pbuffer: Option<*const core::ffi::c_void>, dwbufferlength: u32, dwreserved: u32) -> windows_core::Result<()> { windows_targets::link!("urlmon.dll" "system" fn UrlMkSetSessionOption(dwoption : u32, pbuffer : *const core::ffi::c_void, dwbufferlength : u32, dwreserved : u32) -> windows_core::HRESULT); - UrlMkSetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null())), dwbufferlength, dwreserved).ok() + UrlMkSetSessionOption(dwoption, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null())), dwbufferlength, dwreserved).ok() } #[inline] pub unsafe fn WriteHitLogging(lplogginginfo: *const HIT_LOGGING_INFO) -> super::super::super::Foundation::BOOL { @@ -1297,7 +1297,7 @@ impl IInternetSecurityManagerEx2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), pdwzone, dwflags, core::mem::transmute(ppwszmappedurl.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwoutflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapUrlToZoneEx2)(windows_core::Interface::as_raw(self), puri.param().abi(), pdwzone, dwflags, core::mem::transmute(ppwszmappedurl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwoutflags.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ProcessUrlActionEx2(&self, puri: P0, dwaction: u32, ppolicy: &mut [u8], pcontext: *const u8, cbcontext: u32, dwflags: u32, dwreserved: usize, pdwoutflags: *mut u32) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs index 5064c52428..2bb89d6237 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Com/mod.rs @@ -60,7 +60,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoAllowSetForegroundWindow(punk : * mut core::ffi::c_void, lpvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - CoAllowSetForegroundWindow(punk.param().abi(), core::mem::transmute(lpvreserved.unwrap_or(std::ptr::null()))).ok() + CoAllowSetForegroundWindow(punk.param().abi(), core::mem::transmute(lpvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CoAllowUnmarshalerCLSID(clsid: *const windows_core::GUID) -> windows_core::Result<()> { @@ -117,7 +117,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoCreateInstanceEx(clsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, dwclsctx : CLSCTX, pserverinfo : *const COSERVERINFO, dwcount : u32, presults : *mut MULTI_QI) -> windows_core::HRESULT); - CoCreateInstanceEx(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(pserverinfo.unwrap_or(std::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceEx(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(pserverinfo.unwrap_or(core::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoCreateInstanceFromApp(clsid: *const windows_core::GUID, punkouter: P0, dwclsctx: CLSCTX, reserved: Option<*const core::ffi::c_void>, presults: &mut [MULTI_QI]) -> windows_core::Result<()> @@ -125,7 +125,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoCreateInstanceFromApp(clsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, dwclsctx : CLSCTX, reserved : *const core::ffi::c_void, dwcount : u32, presults : *mut MULTI_QI) -> windows_core::HRESULT); - CoCreateInstanceFromApp(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(reserved.unwrap_or(std::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() + CoCreateInstanceFromApp(clsid, punkouter.param().abi(), dwclsctx, core::mem::transmute(reserved.unwrap_or(core::ptr::null())), presults.len().try_into().unwrap(), core::mem::transmute(presults.as_ptr())).ok() } #[inline] pub unsafe fn CoDecrementMTAUsage(cookie: P0) -> windows_core::Result<()> @@ -138,7 +138,7 @@ where #[inline] pub unsafe fn CoDisableCallCancellation(preserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoDisableCallCancellation(preserved : *const core::ffi::c_void) -> windows_core::HRESULT); - CoDisableCallCancellation(core::mem::transmute(preserved.unwrap_or(std::ptr::null()))).ok() + CoDisableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CoDisconnectContext(dwtimeout: u32) -> windows_core::Result<()> { @@ -161,7 +161,7 @@ pub unsafe fn CoDosDateTimeToFileTime(ndosdate: u16, ndostime: u16, lpfiletime: #[inline] pub unsafe fn CoEnableCallCancellation(preserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoEnableCallCancellation(preserved : *const core::ffi::c_void) -> windows_core::HRESULT); - CoEnableCallCancellation(core::mem::transmute(preserved.unwrap_or(std::ptr::null()))).ok() + CoEnableCallCancellation(core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CoFileTimeNow() -> windows_core::Result { @@ -233,7 +233,7 @@ where { windows_targets::link!("ole32.dll" "system" fn CoGetClassObject(rclsid : *const windows_core::GUID, dwclscontext : u32, pvreserved : *const core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - CoGetClassObject(rclsid, dwclscontext.0 as _, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CoGetClassObject(rclsid, dwclscontext.0 as _, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoGetContextToken() -> windows_core::Result { @@ -266,7 +266,7 @@ where { windows_targets::link!("ole32.dll" "system" fn CoGetObject(pszname : windows_core::PCWSTR, pbindoptions : *const BIND_OPTS, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - CoGetObject(pszname.param().abi(), core::mem::transmute(pbindoptions.unwrap_or(std::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CoGetObject(pszname.param().abi(), core::mem::transmute(pbindoptions.unwrap_or(core::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn CoGetObjectContext() -> windows_core::Result @@ -308,12 +308,12 @@ pub unsafe fn CoIncrementMTAUsage() -> windows_core::Result #[inline] pub unsafe fn CoInitialize(pvreserved: Option<*const core::ffi::c_void>) -> windows_core::HRESULT { windows_targets::link!("ole32.dll" "system" fn CoInitialize(pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - CoInitialize(core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))) + CoInitialize(core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CoInitializeEx(pvreserved: Option<*const core::ffi::c_void>, dwcoinit: COINIT) -> windows_core::HRESULT { windows_targets::link!("ole32.dll" "system" fn CoInitializeEx(pvreserved : *const core::ffi::c_void, dwcoinit : u32) -> windows_core::HRESULT); - CoInitializeEx(core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), dwcoinit.0 as _) + CoInitializeEx(core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), dwcoinit.0 as _) } #[cfg(feature = "Win32_Security")] #[inline] @@ -322,7 +322,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoInitializeSecurity(psecdesc : super::super::Security:: PSECURITY_DESCRIPTOR, cauthsvc : i32, asauthsvc : *const SOLE_AUTHENTICATION_SERVICE, preserved1 : *const core::ffi::c_void, dwauthnlevel : RPC_C_AUTHN_LEVEL, dwimplevel : RPC_C_IMP_LEVEL, pauthlist : *const core::ffi::c_void, dwcapabilities : u32, preserved3 : *const core::ffi::c_void) -> windows_core::HRESULT); - CoInitializeSecurity(psecdesc.param().abi(), cauthsvc, core::mem::transmute(asauthsvc.unwrap_or(std::ptr::null())), core::mem::transmute(preserved1.unwrap_or(std::ptr::null())), dwauthnlevel, dwimplevel, core::mem::transmute(pauthlist.unwrap_or(std::ptr::null())), dwcapabilities.0 as _, core::mem::transmute(preserved3.unwrap_or(std::ptr::null()))).ok() + CoInitializeSecurity(psecdesc.param().abi(), cauthsvc, core::mem::transmute(asauthsvc.unwrap_or(core::ptr::null())), core::mem::transmute(preserved1.unwrap_or(core::ptr::null())), dwauthnlevel, dwimplevel, core::mem::transmute(pauthlist.unwrap_or(core::ptr::null())), dwcapabilities.0 as _, core::mem::transmute(preserved3.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CoInstall(pbc: P0, dwflags: u32, pclassspec: *const uCLSSPEC, pquery: *const QUERYCONTEXT, pszcodebase: P1) -> windows_core::Result<()> @@ -381,7 +381,7 @@ pub unsafe fn CoQueryAuthenticationServices(pcauthsvc: *mut u32, asauthsvc: *mut #[inline] pub unsafe fn CoQueryClientBlanket(pauthnsvc: Option<*mut u32>, pauthzsvc: Option<*mut u32>, pserverprincname: Option<*mut windows_core::PWSTR>, pauthnlevel: Option<*mut u32>, pimplevel: Option<*mut u32>, pprivs: Option<*mut *mut core::ffi::c_void>, pcapabilities: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn CoQueryClientBlanket(pauthnsvc : *mut u32, pauthzsvc : *mut u32, pserverprincname : *mut windows_core::PWSTR, pauthnlevel : *mut u32, pimplevel : *mut u32, pprivs : *mut *mut core::ffi::c_void, pcapabilities : *mut u32) -> windows_core::HRESULT); - CoQueryClientBlanket(core::mem::transmute(pauthnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pauthzsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pserverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pauthnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pprivs.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcapabilities.unwrap_or(std::ptr::null_mut()))).ok() + CoQueryClientBlanket(core::mem::transmute(pauthnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pserverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprivs.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcapabilities.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CoQueryProxyBlanket(pproxy: P0, pwauthnsvc: Option<*mut u32>, pauthzsvc: Option<*mut u32>, pserverprincname: Option<*mut windows_core::PWSTR>, pauthnlevel: Option<*mut u32>, pimplevel: Option<*mut u32>, pauthinfo: Option<*mut *mut core::ffi::c_void>, pcapabilites: Option<*mut u32>) -> windows_core::Result<()> @@ -391,13 +391,13 @@ where windows_targets::link!("ole32.dll" "system" fn CoQueryProxyBlanket(pproxy : * mut core::ffi::c_void, pwauthnsvc : *mut u32, pauthzsvc : *mut u32, pserverprincname : *mut windows_core::PWSTR, pauthnlevel : *mut u32, pimplevel : *mut u32, pauthinfo : *mut *mut core::ffi::c_void, pcapabilites : *mut u32) -> windows_core::HRESULT); CoQueryProxyBlanket( pproxy.param().abi(), - core::mem::transmute(pwauthnsvc.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pauthzsvc.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pserverprincname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pauthnlevel.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pimplevel.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pauthinfo.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcapabilites.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pwauthnsvc.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pserverprincname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pauthinfo.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcapabilites.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -518,7 +518,7 @@ where P1: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn CoSetProxyBlanket(pproxy : * mut core::ffi::c_void, dwauthnsvc : u32, dwauthzsvc : u32, pserverprincname : windows_core::PCWSTR, dwauthnlevel : RPC_C_AUTHN_LEVEL, dwimplevel : RPC_C_IMP_LEVEL, pauthinfo : *const core::ffi::c_void, dwcapabilities : u32) -> windows_core::HRESULT); - CoSetProxyBlanket(pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(std::ptr::null())), dwcapabilities.0 as _).ok() + CoSetProxyBlanket(pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(core::ptr::null())), dwcapabilities.0 as _).ok() } #[inline] pub unsafe fn CoSuspendClassObjects() -> windows_core::Result<()> { @@ -542,12 +542,12 @@ pub unsafe fn CoTaskMemAlloc(cb: usize) -> *mut core::ffi::c_void { #[inline] pub unsafe fn CoTaskMemFree(pv: Option<*const core::ffi::c_void>) { windows_targets::link!("ole32.dll" "system" fn CoTaskMemFree(pv : *const core::ffi::c_void)); - CoTaskMemFree(core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + CoTaskMemFree(core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CoTaskMemRealloc(pv: Option<*const core::ffi::c_void>, cb: usize) -> *mut core::ffi::c_void { windows_targets::link!("ole32.dll" "system" fn CoTaskMemRealloc(pv : *const core::ffi::c_void, cb : usize) -> *mut core::ffi::c_void); - CoTaskMemRealloc(core::mem::transmute(pv.unwrap_or(std::ptr::null())), cb) + CoTaskMemRealloc(core::mem::transmute(pv.unwrap_or(core::ptr::null())), cb) } #[inline] pub unsafe fn CoTestCancel() -> windows_core::Result<()> { @@ -708,7 +708,7 @@ where #[inline] pub unsafe fn DcomChannelSetHResult(pvreserved: Option<*const core::ffi::c_void>, pulreserved: Option<*const u32>, appshr: windows_core::HRESULT) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn DcomChannelSetHResult(pvreserved : *const core::ffi::c_void, pulreserved : *const u32, appshr : windows_core::HRESULT) -> windows_core::HRESULT); - DcomChannelSetHResult(core::mem::transmute(pvreserved.unwrap_or(std::ptr::null())), core::mem::transmute(pulreserved.unwrap_or(std::ptr::null())), appshr).ok() + DcomChannelSetHResult(core::mem::transmute(pvreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pulreserved.unwrap_or(core::ptr::null())), appshr).ok() } #[inline] pub unsafe fn GetClassFile(szfilename: P0) -> windows_core::Result @@ -1223,7 +1223,7 @@ impl IAsyncRpcChannelBuffer { (windows_core::Interface::vtable(self).Receive)(windows_core::Interface::as_raw(self), pmsg, pulstatus).ok() } pub unsafe fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext, core::mem::transmute(ppvdestcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext, core::mem::transmute(ppvdestcontext.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1764,14 +1764,14 @@ impl IClientSecurity { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), pauthnsvc, core::mem::transmute(pauthzsvc.unwrap_or(std::ptr::null_mut())), pserverprincname, core::mem::transmute(pauthnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(std::ptr::null_mut())), pauthinfo, core::mem::transmute(pcapabilites.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), pauthnsvc, core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), pserverprincname, core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), pauthinfo, core::mem::transmute(pcapabilites.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetBlanket(&self, pproxy: P0, dwauthnsvc: u32, dwauthzsvc: u32, pserverprincname: P1, dwauthnlevel: RPC_C_AUTHN_LEVEL, dwimplevel: RPC_C_IMP_LEVEL, pauthinfo: Option<*const core::ffi::c_void>, dwcapabilities: EOLE_AUTHENTICATION_CAPABILITIES) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(std::ptr::null())), dwcapabilities.0 as _).ok() + (windows_core::Interface::vtable(self).SetBlanket)(windows_core::Interface::as_raw(self), pproxy.param().abi(), dwauthnsvc, dwauthzsvc, pserverprincname.param().abi(), dwauthnlevel, dwimplevel, core::mem::transmute(pauthinfo.unwrap_or(core::ptr::null())), dwcapabilities.0 as _).ok() } pub unsafe fn CopyProxy(&self, pproxy: P0) -> windows_core::Result where @@ -2074,7 +2074,7 @@ impl IDispatch { } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Invoke(&self, dispidmember: i32, riid: *const windows_core::GUID, lcid: u32, wflags: DISPATCH_FLAGS, pdispparams: *const DISPPARAMS, pvarresult: Option<*mut super::Variant::VARIANT>, pexcepinfo: Option<*mut EXCEPINFO>, puargerr: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pexcepinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(puargerr.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), dispidmember, riid, lcid, wflags, pdispparams, core::mem::transmute(pvarresult.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pexcepinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puargerr.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2227,7 +2227,7 @@ impl core::ops::Deref for IEnumFORMATETC { windows_core::imp::interface_hierarchy!(IEnumFORMATETC, windows_core::IUnknown); impl IEnumFORMATETC { pub unsafe fn Next(&self, rgelt: &mut [FORMATETC], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -2258,7 +2258,7 @@ impl core::ops::Deref for IEnumGUID { windows_core::imp::interface_hierarchy!(IEnumGUID, windows_core::IUnknown); impl IEnumGUID { pub unsafe fn Next(&self, rgelt: &mut [windows_core::GUID], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -2289,7 +2289,7 @@ impl core::ops::Deref for IEnumMoniker { windows_core::imp::interface_hierarchy!(IEnumMoniker, windows_core::IUnknown); impl IEnumMoniker { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -2320,7 +2320,7 @@ impl core::ops::Deref for IEnumSTATDATA { windows_core::imp::interface_hierarchy!(IEnumSTATDATA, windows_core::IUnknown); impl IEnumSTATDATA { pub unsafe fn Next(&self, rgelt: &mut [STATDATA], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -2351,7 +2351,7 @@ impl core::ops::Deref for IEnumString { windows_core::imp::interface_hierarchy!(IEnumString, windows_core::IUnknown); impl IEnumString { pub unsafe fn Next(&self, rgelt: &mut [windows_core::PWSTR], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -2382,7 +2382,7 @@ impl core::ops::Deref for IEnumUnknown { windows_core::imp::interface_hierarchy!(IEnumUnknown, windows_core::IUnknown); impl IEnumUnknown { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -2511,7 +2511,7 @@ impl core::ops::Deref for IForegroundTransfer { windows_core::imp::interface_hierarchy!(IForegroundTransfer, windows_core::IUnknown); impl IForegroundTransfer { pub unsafe fn AllowForegroundTransfer(&self, lpvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AllowForegroundTransfer)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvreserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AllowForegroundTransfer)(windows_core::Interface::as_raw(self), core::mem::transmute(lpvreserved.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -2672,16 +2672,16 @@ impl IMalloc { (windows_core::Interface::vtable(self).Alloc)(windows_core::Interface::as_raw(self), cb) } pub unsafe fn Realloc(&self, pv: Option<*const core::ffi::c_void>, cb: usize) -> *mut core::ffi::c_void { - (windows_core::Interface::vtable(self).Realloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(std::ptr::null())), cb) + (windows_core::Interface::vtable(self).Realloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::ptr::null())), cb) } pub unsafe fn Free(&self, pv: Option<*const core::ffi::c_void>) { - (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).Free)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } pub unsafe fn GetSize(&self, pv: Option<*const core::ffi::c_void>) -> usize { - (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).GetSize)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } pub unsafe fn DidAlloc(&self, pv: Option<*const core::ffi::c_void>) -> i32 { - (windows_core::Interface::vtable(self).DidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).DidAlloc)(windows_core::Interface::as_raw(self), core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } pub unsafe fn HeapMinimize(&self) { (windows_core::Interface::vtable(self).HeapMinimize)(windows_core::Interface::as_raw(self)) @@ -3369,7 +3369,7 @@ impl IRpcChannelBuffer { (windows_core::Interface::vtable(self).GetBuffer)(windows_core::Interface::as_raw(self), pmessage, riid).ok() } pub unsafe fn SendReceive(&self, pmessage: *mut RPCOLEMESSAGE, pstatus: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SendReceive)(windows_core::Interface::as_raw(self), pmessage, core::mem::transmute(pstatus.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SendReceive)(windows_core::Interface::as_raw(self), pmessage, core::mem::transmute(pstatus.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FreeBuffer(&self, pmessage: *mut RPCOLEMESSAGE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FreeBuffer)(windows_core::Interface::as_raw(self), pmessage).ok() @@ -3431,7 +3431,7 @@ impl IRpcChannelBuffer3 { (windows_core::Interface::vtable(self).GetCallContext)(windows_core::Interface::as_raw(self), pmsg, riid, pinterface).ok() } pub unsafe fn GetDestCtxEx(&self, pmsg: *const RPCOLEMESSAGE, pdwdestcontext: *mut u32, ppvdestcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext, core::mem::transmute(ppvdestcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDestCtxEx)(windows_core::Interface::as_raw(self), pmsg, pdwdestcontext, core::mem::transmute(ppvdestcontext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetState(&self, pmsg: *const RPCOLEMESSAGE) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3713,10 +3713,10 @@ impl core::ops::Deref for ISequentialStream { windows_core::imp::interface_hierarchy!(ISequentialStream, windows_core::IUnknown); impl ISequentialStream { pub unsafe fn Read(&self, pv: *mut core::ffi::c_void, cb: u32, pcbread: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbread.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Read)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Write(&self, pv: *const core::ffi::c_void, cb: u32, pcbwritten: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbwritten.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Write)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))) } } #[repr(C)] @@ -3735,7 +3735,7 @@ impl core::ops::Deref for IServerSecurity { windows_core::imp::interface_hierarchy!(IServerSecurity, windows_core::IUnknown); impl IServerSecurity { pub unsafe fn QueryBlanket(&self, pauthnsvc: Option<*mut u32>, pauthzsvc: Option<*mut u32>, pserverprincname: *mut *mut u16, pauthnlevel: Option<*mut u32>, pimplevel: Option<*mut u32>, pprivs: *mut *mut core::ffi::c_void, pcapabilities: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), core::mem::transmute(pauthnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pauthzsvc.unwrap_or(std::ptr::null_mut())), pserverprincname, core::mem::transmute(pauthnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(std::ptr::null_mut())), pprivs, core::mem::transmute(pcapabilities.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).QueryBlanket)(windows_core::Interface::as_raw(self), core::mem::transmute(pauthnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pauthzsvc.unwrap_or(core::ptr::null_mut())), pserverprincname, core::mem::transmute(pauthnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pimplevel.unwrap_or(core::ptr::null_mut())), pprivs, core::mem::transmute(pcapabilities.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ImpersonateClient(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ImpersonateClient)(windows_core::Interface::as_raw(self)).ok() @@ -3788,7 +3788,7 @@ windows_core::imp::interface_hierarchy!(IStdMarshalInfo, windows_core::IUnknown) impl IStdMarshalInfo { pub unsafe fn GetClassForHandler(&self, dwdestcontext: u32, pvdestcontext: Option<*const core::ffi::c_void>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).GetClassForHandler)(windows_core::Interface::as_raw(self), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).GetClassForHandler)(windows_core::Interface::as_raw(self), dwdestcontext, core::mem::transmute(pvdestcontext.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } } #[repr(C)] @@ -3806,7 +3806,7 @@ impl core::ops::Deref for IStream { windows_core::imp::interface_hierarchy!(IStream, windows_core::IUnknown, ISequentialStream); impl IStream { pub unsafe fn Seek(&self, dlibmove: i64, dworigin: STREAM_SEEK, plibnewposition: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Seek)(windows_core::Interface::as_raw(self), dlibmove, dworigin, core::mem::transmute(plibnewposition.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSize(&self, libnewsize: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetSize)(windows_core::Interface::as_raw(self), libnewsize).ok() @@ -3815,7 +3815,7 @@ impl IStream { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), cb, core::mem::transmute(pcbread.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbwritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CopyTo)(windows_core::Interface::as_raw(self), pstm.param().abi(), cb, core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Commit(&self, grfcommitflags: STGC) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Commit)(windows_core::Interface::as_raw(self), grfcommitflags.0 as _).ok() @@ -4145,10 +4145,10 @@ impl ITypeInfo { (windows_core::Interface::vtable(self).Invoke)(windows_core::Interface::as_raw(self), pvinstance, memid, wflags, pdispparams, core::mem::transmute(pvarresult), pexcepinfo, puargerr).ok() } pub unsafe fn GetDocumentation(&self, memid: i32, pbstrname: Option<*mut windows_core::BSTR>, pbstrdocstring: Option<*mut windows_core::BSTR>, pdwhelpcontext: *mut u32, pbstrhelpfile: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), memid, core::mem::transmute(pbstrname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(std::ptr::null_mut())), pdwhelpcontext, core::mem::transmute(pbstrhelpfile.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), memid, core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(core::ptr::null_mut())), pdwhelpcontext, core::mem::transmute(pbstrhelpfile.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetDllEntry(&self, memid: i32, invkind: INVOKEKIND, pbstrdllname: Option<*mut windows_core::BSTR>, pbstrname: Option<*mut windows_core::BSTR>, pwordinal: *mut u16) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDllEntry)(windows_core::Interface::as_raw(self), memid, invkind, core::mem::transmute(pbstrdllname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrname.unwrap_or(std::ptr::null_mut())), pwordinal).ok() + (windows_core::Interface::vtable(self).GetDllEntry)(windows_core::Interface::as_raw(self), memid, invkind, core::mem::transmute(pbstrdllname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), pwordinal).ok() } pub unsafe fn GetRefTypeInfo(&self, hreftype: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4280,7 +4280,7 @@ impl ITypeInfo2 { (windows_core::Interface::vtable(self).GetImplTypeCustData)(windows_core::Interface::as_raw(self), index, guid, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetDocumentation2(&self, memid: i32, lcid: u32, pbstrhelpstring: Option<*mut windows_core::BSTR>, pdwhelpstringcontext: *mut u32, pbstrhelpstringdll: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), memid, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(std::ptr::null_mut())), pdwhelpstringcontext, core::mem::transmute(pbstrhelpstringdll.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), memid, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(core::ptr::null_mut())), pdwhelpstringcontext, core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAllCustData(&self) -> windows_core::Result { @@ -4390,7 +4390,7 @@ impl ITypeLib { (windows_core::Interface::vtable(self).GetTypeComp)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetDocumentation(&self, index: i32, pbstrname: Option<*mut windows_core::BSTR>, pbstrdocstring: Option<*mut windows_core::BSTR>, pdwhelpcontext: *mut u32, pbstrhelpfile: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pbstrname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(std::ptr::null_mut())), pdwhelpcontext, core::mem::transmute(pbstrhelpfile.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation)(windows_core::Interface::as_raw(self), index, core::mem::transmute(pbstrname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdocstring.unwrap_or(core::ptr::null_mut())), pdwhelpcontext, core::mem::transmute(pbstrhelpfile.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsName(&self, sznamebuf: windows_core::PWSTR, lhashval: u32, pfname: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsName)(windows_core::Interface::as_raw(self), core::mem::transmute(sznamebuf), lhashval, pfname).ok() @@ -4434,7 +4434,7 @@ impl ITypeLib2 { (windows_core::Interface::vtable(self).GetLibStatistics)(windows_core::Interface::as_raw(self), pcuniquenames, pcchuniquenames).ok() } pub unsafe fn GetDocumentation2(&self, index: i32, lcid: u32, pbstrhelpstring: Option<*mut windows_core::BSTR>, pdwhelpstringcontext: *mut u32, pbstrhelpstringdll: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), index, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(std::ptr::null_mut())), pdwhelpstringcontext, core::mem::transmute(pbstrhelpstringdll.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDocumentation2)(windows_core::Interface::as_raw(self), index, lcid, core::mem::transmute(pbstrhelpstring.unwrap_or(core::ptr::null_mut())), pdwhelpstringcontext, core::mem::transmute(pbstrhelpstringdll.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetAllCustData(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs index 8cc5e66c78..36c21627a3 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ComponentServices/mod.rs @@ -2831,7 +2831,7 @@ impl IGetAppTrackerData { (windows_core::Interface::vtable(self).GetApplicationProcesses)(windows_core::Interface::as_raw(self), partitionid, applicationid, flags, numapplicationprocesses, applicationprocesses).ok() } pub unsafe fn GetApplicationProcessDetails(&self, applicationinstanceid: *const windows_core::GUID, processid: u32, flags: u32, summary: Option<*mut ApplicationProcessSummary>, statistics: Option<*mut ApplicationProcessStatistics>, recycleinfo: Option<*mut ApplicationProcessRecycleInfo>, anycomponentshangmonitored: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetApplicationProcessDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, flags, core::mem::transmute(summary.unwrap_or(std::ptr::null_mut())), core::mem::transmute(statistics.unwrap_or(std::ptr::null_mut())), core::mem::transmute(recycleinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(anycomponentshangmonitored.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetApplicationProcessDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, flags, core::mem::transmute(summary.unwrap_or(core::ptr::null_mut())), core::mem::transmute(statistics.unwrap_or(core::ptr::null_mut())), core::mem::transmute(recycleinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(anycomponentshangmonitored.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetApplicationsInProcess(&self, applicationinstanceid: *const windows_core::GUID, processid: u32, partitionid: *const windows_core::GUID, flags: u32, numapplicationsinprocess: *mut u32, applications: *mut *mut ApplicationSummary) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetApplicationsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, flags, numapplicationsinprocess, applications).ok() @@ -2840,7 +2840,7 @@ impl IGetAppTrackerData { (windows_core::Interface::vtable(self).GetComponentsInProcess)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, partitionid, applicationid, flags, numcomponentsinprocess, components).ok() } pub unsafe fn GetComponentDetails(&self, applicationinstanceid: *const windows_core::GUID, processid: u32, clsid: *const windows_core::GUID, flags: u32, summary: Option<*mut ComponentSummary>, statistics: Option<*mut ComponentStatistics>, hangmonitorinfo: Option<*mut ComponentHangMonitorInfo>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetComponentDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, clsid, flags, core::mem::transmute(summary.unwrap_or(std::ptr::null_mut())), core::mem::transmute(statistics.unwrap_or(std::ptr::null_mut())), core::mem::transmute(hangmonitorinfo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetComponentDetails)(windows_core::Interface::as_raw(self), applicationinstanceid, processid, clsid, flags, core::mem::transmute(summary.unwrap_or(core::ptr::null_mut())), core::mem::transmute(statistics.unwrap_or(core::ptr::null_mut())), core::mem::transmute(hangmonitorinfo.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTrackerDataAsCollectionObject(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 95a7b2e5a3..e5c5546ae6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Console/mod.rs @@ -45,7 +45,7 @@ pub unsafe fn ConsoleControl(command: CONSOLECONTROL, consoleinformation: *const #[inline] pub unsafe fn CreateConsoleScreenBuffer(dwdesiredaccess: u32, dwsharemode: u32, lpsecurityattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwflags: u32, lpscreenbufferdata: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateConsoleScreenBuffer(dwdesiredaccess : u32, dwsharemode : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwflags : u32, lpscreenbufferdata : *const core::ffi::c_void) -> super::super::Foundation:: HANDLE); - let result__ = CreateConsoleScreenBuffer(dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), dwflags, core::mem::transmute(lpscreenbufferdata.unwrap_or(std::ptr::null()))); + let result__ = CreateConsoleScreenBuffer(dwdesiredaccess, dwsharemode, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), dwflags, core::mem::transmute(lpscreenbufferdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -380,7 +380,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, core::mem::transmute(pinputcontrol.unwrap_or(std::ptr::null()))).ok() + ReadConsoleA(hconsoleinput.param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, core::mem::transmute(pinputcontrol.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ReadConsoleInputA(hconsoleinput: P0, lpbuffer: &mut [INPUT_RECORD], lpnumberofeventsread: *mut u32) -> windows_core::Result<()> @@ -444,7 +444,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, core::mem::transmute(pinputcontrol.unwrap_or(std::ptr::null()))).ok() + ReadConsoleW(hconsoleinput.param().abi(), lpbuffer, nnumberofcharstoread, lpnumberofcharsread, core::mem::transmute(pinputcontrol.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ResizePseudoConsole(hpc: P0, size: COORD) -> windows_core::Result<()> @@ -460,7 +460,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(std::ptr::null())), core::mem::transmute(dwdestinationorigin), lpfill).ok() + ScrollConsoleScreenBufferA(hconsoleoutput.param().abi(), lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestinationorigin), lpfill).ok() } #[inline] pub unsafe fn ScrollConsoleScreenBufferW(hconsoleoutput: P0, lpscrollrectangle: *const SMALL_RECT, lpcliprectangle: Option<*const SMALL_RECT>, dwdestinationorigin: COORD, lpfill: *const CHAR_INFO) -> windows_core::Result<()> @@ -468,7 +468,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(std::ptr::null())), core::mem::transmute(dwdestinationorigin), lpfill).ok() + ScrollConsoleScreenBufferW(hconsoleoutput.param().abi(), lpscrollrectangle, core::mem::transmute(lpcliprectangle.unwrap_or(core::ptr::null())), core::mem::transmute(dwdestinationorigin), lpfill).ok() } #[inline] pub unsafe fn SetConsoleActiveScreenBuffer(hconsoleoutput: P0) -> windows_core::Result<()> @@ -513,7 +513,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetConsoleDisplayMode(hconsoleoutput : super::super::Foundation:: HANDLE, dwflags : u32, lpnewscreenbufferdimensions : *mut COORD) -> super::super::Foundation:: BOOL); - SetConsoleDisplayMode(hconsoleoutput.param().abi(), dwflags, core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(std::ptr::null_mut()))).ok() + SetConsoleDisplayMode(hconsoleoutput.param().abi(), dwflags, core::mem::transmute(lpnewscreenbufferdimensions.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetConsoleHistoryInfo(lpconsolehistoryinfo: *const CONSOLE_HISTORY_INFO) -> windows_core::Result<()> { @@ -621,7 +621,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetStdHandleEx(nstdhandle : STD_HANDLE, hhandle : super::super::Foundation:: HANDLE, phprevvalue : *mut super::super::Foundation:: HANDLE) -> super::super::Foundation:: BOOL); - SetStdHandleEx(nstdhandle, hhandle.param().abi(), core::mem::transmute(phprevvalue.unwrap_or(std::ptr::null_mut()))) + SetStdHandleEx(nstdhandle, hhandle.param().abi(), core::mem::transmute(phprevvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WriteConsoleA(hconsoleoutput: P0, lpbuffer: &[u8], lpnumberofcharswritten: Option<*mut u32>, lpreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -629,7 +629,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleA(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : windows_core::PCSTR, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleA(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + WriteConsoleA(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WriteConsoleInputA(hconsoleinput: P0, lpbuffer: &[INPUT_RECORD], lpnumberofeventswritten: *mut u32) -> windows_core::Result<()> @@ -693,7 +693,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn WriteConsoleW(hconsoleoutput : super::super::Foundation:: HANDLE, lpbuffer : windows_core::PCWSTR, nnumberofcharstowrite : u32, lpnumberofcharswritten : *mut u32, lpreserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - WriteConsoleW(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))).ok() + WriteConsoleW(hconsoleoutput.param().abi(), core::mem::transmute(lpbuffer.as_ptr()), lpbuffer.len().try_into().unwrap(), core::mem::transmute(lpnumberofcharswritten.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))).ok() } pub const ALTNUMPAD_BIT: u32 = 67108864u32; pub const ATTACH_PARENT_PROCESS: u32 = 4294967295u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs b/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs index 84fe275b44..492bef7f03 100644 --- a/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/CorrelationVector/mod.rs @@ -11,7 +11,7 @@ pub unsafe fn RtlIncrementCorrelationVector(correlationvector: *mut CORRELATION_ #[inline] pub unsafe fn RtlInitializeCorrelationVector(correlationvector: *mut CORRELATION_VECTOR, version: i32, guid: Option<*const windows_core::GUID>) -> u32 { windows_targets::link!("ntdll.dll" "system" fn RtlInitializeCorrelationVector(correlationvector : *mut CORRELATION_VECTOR, version : i32, guid : *const windows_core::GUID) -> u32); - RtlInitializeCorrelationVector(correlationvector, version, core::mem::transmute(guid.unwrap_or(std::ptr::null()))) + RtlInitializeCorrelationVector(correlationvector, version, core::mem::transmute(guid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlValidateCorrelationVector(vector: *const CORRELATION_VECTOR) -> u32 { 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 7cc746750f..3569e2e13c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DataExchange/mod.rs @@ -55,7 +55,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DdeAccessData(hdata : HDDEDATA, pcbdatasize : *mut u32) -> *mut u8); - DdeAccessData(hdata.param().abi(), core::mem::transmute(pcbdatasize.unwrap_or(std::ptr::null_mut()))) + DdeAccessData(hdata.param().abi(), core::mem::transmute(pcbdatasize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DdeAddData(hdata: P0, psrc: &[u8], cboff: u32) -> HDDEDATA @@ -72,7 +72,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DdeClientTransaction(pdata : *const u8, cbdata : u32, hconv : HCONV, hszitem : HSZ, wfmt : u32, wtype : DDE_CLIENT_TRANSACTION_TYPE, dwtimeout : u32, pdwresult : *mut u32) -> HDDEDATA); - DdeClientTransaction(core::mem::transmute(pdata.unwrap_or(std::ptr::null())), cbdata, hconv.param().abi(), hszitem.param().abi(), wfmt, wtype, dwtimeout, core::mem::transmute(pdwresult.unwrap_or(std::ptr::null_mut()))) + DdeClientTransaction(core::mem::transmute(pdata.unwrap_or(core::ptr::null())), cbdata, hconv.param().abi(), hszitem.param().abi(), wfmt, wtype, dwtimeout, core::mem::transmute(pdwresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn DdeCmpStringHandles(hsz1: P0, hsz2: P1) -> i32 @@ -91,7 +91,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DdeConnect(idinst : u32, hszservice : HSZ, hsztopic : HSZ, pcc : *const CONVCONTEXT) -> HCONV); - DdeConnect(idinst, hszservice.param().abi(), hsztopic.param().abi(), core::mem::transmute(pcc.unwrap_or(std::ptr::null()))) + DdeConnect(idinst, hszservice.param().abi(), hsztopic.param().abi(), core::mem::transmute(pcc.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -102,7 +102,7 @@ where P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn DdeConnectList(idinst : u32, hszservice : HSZ, hsztopic : HSZ, hconvlist : HCONVLIST, pcc : *const CONVCONTEXT) -> HCONVLIST); - DdeConnectList(idinst, hszservice.param().abi(), hsztopic.param().abi(), hconvlist.param().abi(), core::mem::transmute(pcc.unwrap_or(std::ptr::null()))) + DdeConnectList(idinst, hszservice.param().abi(), hsztopic.param().abi(), hconvlist.param().abi(), core::mem::transmute(pcc.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DdeCreateDataHandle(idinst: u32, psrc: Option<&[u8]>, cboff: u32, hszitem: P0, wfmt: u32, afcmd: u32) -> HDDEDATA @@ -547,7 +547,7 @@ where P0: windows_core::Param, { windows_targets::link!("gdi32.dll" "system" fn SetWinMetaFileBits(nsize : u32, lpmeta16data : *const u8, hdcref : super::super::Graphics::Gdi:: HDC, lpmfp : *const METAFILEPICT) -> super::super::Graphics::Gdi:: HENHMETAFILE); - SetWinMetaFileBits(lpmeta16data.len().try_into().unwrap(), core::mem::transmute(lpmeta16data.as_ptr()), hdcref.param().abi(), core::mem::transmute(lpmfp.unwrap_or(std::ptr::null()))) + SetWinMetaFileBits(lpmeta16data.len().try_into().unwrap(), core::mem::transmute(lpmeta16data.as_ptr()), hdcref.param().abi(), core::mem::transmute(lpmfp.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn UnpackDDElParam(msg: u32, lparam: P0, puilo: *mut usize, puihi: *mut usize) -> super::super::Foundation::BOOL diff --git a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs index de572e787b..1e7920cb97 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DeploymentServices/mod.rs @@ -9,7 +9,7 @@ where #[inline] pub unsafe fn PxeDhcpAppendOption(preplypacket: *mut core::ffi::c_void, umaxreplypacketlen: u32, pureplypacketlen: *mut u32, boption: u8, boptionlen: u8, pvalue: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpAppendOption(preplypacket : *mut core::ffi::c_void, umaxreplypacketlen : u32, pureplypacketlen : *mut u32, boption : u8, boptionlen : u8, pvalue : *const core::ffi::c_void) -> u32); - PxeDhcpAppendOption(preplypacket, umaxreplypacketlen, pureplypacketlen, boption, boptionlen, core::mem::transmute(pvalue.unwrap_or(std::ptr::null()))) + PxeDhcpAppendOption(preplypacket, umaxreplypacketlen, pureplypacketlen, boption, boptionlen, core::mem::transmute(pvalue.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PxeDhcpAppendOptionRaw(preplypacket: *mut core::ffi::c_void, umaxreplypacketlen: u32, pureplypacketlen: *mut u32, ubufferlen: u16, pbuffer: *const core::ffi::c_void) -> u32 { @@ -19,12 +19,12 @@ pub unsafe fn PxeDhcpAppendOptionRaw(preplypacket: *mut core::ffi::c_void, umaxr #[inline] pub unsafe fn PxeDhcpGetOptionValue(ppacket: *const core::ffi::c_void, upacketlen: u32, uinstance: u32, boption: u8, pboptionlen: Option<*mut u8>, ppoptionvalue: Option<*mut *mut core::ffi::c_void>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpGetOptionValue(ppacket : *const core::ffi::c_void, upacketlen : u32, uinstance : u32, boption : u8, pboptionlen : *mut u8, ppoptionvalue : *mut *mut core::ffi::c_void) -> u32); - PxeDhcpGetOptionValue(ppacket, upacketlen, uinstance, boption, core::mem::transmute(pboptionlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(std::ptr::null_mut()))) + PxeDhcpGetOptionValue(ppacket, upacketlen, uinstance, boption, core::mem::transmute(pboptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpGetVendorOptionValue(ppacket: *const core::ffi::c_void, upacketlen: u32, boption: u8, uinstance: u32, pboptionlen: Option<*mut u8>, ppoptionvalue: Option<*mut *mut core::ffi::c_void>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpGetVendorOptionValue(ppacket : *const core::ffi::c_void, upacketlen : u32, boption : u8, uinstance : u32, pboptionlen : *mut u8, ppoptionvalue : *mut *mut core::ffi::c_void) -> u32); - PxeDhcpGetVendorOptionValue(ppacket, upacketlen, boption, uinstance, core::mem::transmute(pboptionlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(std::ptr::null_mut()))) + PxeDhcpGetVendorOptionValue(ppacket, upacketlen, boption, uinstance, core::mem::transmute(pboptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpInitialize(precvpacket: *const core::ffi::c_void, urecvpacketlen: u32, preplypacket: *mut core::ffi::c_void, umaxreplypacketlen: u32, pureplypacketlen: *mut u32) -> u32 { @@ -37,7 +37,7 @@ where P0: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpIsValid(ppacket : *const core::ffi::c_void, upacketlen : u32, brequestpacket : super::super::Foundation:: BOOL, pbpxeoptionpresent : *mut super::super::Foundation:: BOOL) -> u32); - PxeDhcpIsValid(ppacket, upacketlen, brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(std::ptr::null_mut()))) + PxeDhcpIsValid(ppacket, upacketlen, brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpv6AppendOption(preply: *mut core::ffi::c_void, cbreply: u32, pcbreplyused: *mut u32, woptiontype: u16, cboption: u16, poption: *const core::ffi::c_void) -> u32 { @@ -57,12 +57,12 @@ pub unsafe fn PxeDhcpv6CreateRelayRepl(prelaymessages: &[PXE_DHCPV6_NESTED_RELAY #[inline] pub unsafe fn PxeDhcpv6GetOptionValue(ppacket: *const core::ffi::c_void, upacketlen: u32, uinstance: u32, woption: u16, pwoptionlen: Option<*mut u16>, ppoptionvalue: Option<*mut *mut core::ffi::c_void>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6GetOptionValue(ppacket : *const core::ffi::c_void, upacketlen : u32, uinstance : u32, woption : u16, pwoptionlen : *mut u16, ppoptionvalue : *mut *mut core::ffi::c_void) -> u32); - PxeDhcpv6GetOptionValue(ppacket, upacketlen, uinstance, woption, core::mem::transmute(pwoptionlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(std::ptr::null_mut()))) + PxeDhcpv6GetOptionValue(ppacket, upacketlen, uinstance, woption, core::mem::transmute(pwoptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpv6GetVendorOptionValue(ppacket: *const core::ffi::c_void, upacketlen: u32, dwenterprisenumber: u32, woption: u16, uinstance: u32, pwoptionlen: Option<*mut u16>, ppoptionvalue: Option<*mut *mut core::ffi::c_void>) -> u32 { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6GetVendorOptionValue(ppacket : *const core::ffi::c_void, upacketlen : u32, dwenterprisenumber : u32, woption : u16, uinstance : u32, pwoptionlen : *mut u16, ppoptionvalue : *mut *mut core::ffi::c_void) -> u32); - PxeDhcpv6GetVendorOptionValue(ppacket, upacketlen, dwenterprisenumber, woption, uinstance, core::mem::transmute(pwoptionlen.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(std::ptr::null_mut()))) + PxeDhcpv6GetVendorOptionValue(ppacket, upacketlen, dwenterprisenumber, woption, uinstance, core::mem::transmute(pwoptionlen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoptionvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpv6Initialize(prequest: *const core::ffi::c_void, cbrequest: u32, preply: *mut core::ffi::c_void, cbreply: u32, pcbreplyused: *mut u32) -> u32 { @@ -75,7 +75,7 @@ where P0: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeDhcpv6IsValid(ppacket : *const core::ffi::c_void, upacketlen : u32, brequestpacket : super::super::Foundation:: BOOL, pbpxeoptionpresent : *mut super::super::Foundation:: BOOL) -> u32); - PxeDhcpv6IsValid(ppacket, upacketlen, brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(std::ptr::null_mut()))) + PxeDhcpv6IsValid(ppacket, upacketlen, brequestpacket.param().abi(), core::mem::transmute(pbpxeoptionpresent.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeDhcpv6ParseRelayForw(prelayforwpacket: *const core::ffi::c_void, urelayforwpacketlen: u32, prelaymessages: &mut [PXE_DHCPV6_NESTED_RELAY_MESSAGE], pnrelaymessages: *mut u32, ppinnerpacket: *mut *mut u8, pcbinnerpacket: *mut u32) -> u32 { @@ -153,7 +153,7 @@ where P2: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeProviderRegister(pszprovidername : windows_core::PCWSTR, pszmodulepath : windows_core::PCWSTR, index : u32, biscritical : super::super::Foundation:: BOOL, phproviderkey : *mut super::Registry:: HKEY) -> u32); - PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), index, biscritical.param().abi(), core::mem::transmute(phproviderkey.unwrap_or(std::ptr::null_mut()))) + PxeProviderRegister(pszprovidername.param().abi(), pszmodulepath.param().abi(), index, biscritical.param().abi(), core::mem::transmute(phproviderkey.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PxeProviderSetAttribute(hprovider: P0, attribute: u32, pparameterbuffer: *const core::ffi::c_void, uparamlen: u32) -> u32 @@ -177,7 +177,7 @@ where P0: windows_core::Param, { windows_targets::link!("wdspxe.dll" "system" fn PxeRegisterCallback(hprovider : super::super::Foundation:: HANDLE, callbacktype : u32, pcallbackfunction : *const core::ffi::c_void, pcontext : *const core::ffi::c_void) -> u32); - PxeRegisterCallback(hprovider.param().abi(), callbacktype, pcallbackfunction, core::mem::transmute(pcontext.unwrap_or(std::ptr::null()))) + PxeRegisterCallback(hprovider.param().abi(), callbacktype, pcallbackfunction, core::mem::transmute(pcontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PxeSendReply(hclientrequest: P0, ppacket: *const core::ffi::c_void, upacketlen: u32, paddress: *const PXE_ADDRESS) -> u32 @@ -237,12 +237,12 @@ pub unsafe fn WdsBpInitialize(bpackettype: u8, phhandle: *mut super::super::Foun #[inline] pub unsafe fn WdsBpParseInitialize(ppacket: *const core::ffi::c_void, upacketlen: u32, pbpackettype: Option<*mut u8>, phhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpParseInitialize(ppacket : *const core::ffi::c_void, upacketlen : u32, pbpackettype : *mut u8, phhandle : *mut super::super::Foundation:: HANDLE) -> u32); - WdsBpParseInitialize(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(std::ptr::null_mut())), phhandle) + WdsBpParseInitialize(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(core::ptr::null_mut())), phhandle) } #[inline] pub unsafe fn WdsBpParseInitializev6(ppacket: *const core::ffi::c_void, upacketlen: u32, pbpackettype: Option<*mut u8>, phhandle: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("wdsbp.dll" "system" fn WdsBpParseInitializev6(ppacket : *const core::ffi::c_void, upacketlen : u32, pbpackettype : *mut u8, phhandle : *mut super::super::Foundation:: HANDLE) -> u32); - WdsBpParseInitializev6(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(std::ptr::null_mut())), phhandle) + WdsBpParseInitializev6(ppacket, upacketlen, core::mem::transmute(pbpackettype.unwrap_or(core::ptr::null_mut())), phhandle) } #[inline] pub unsafe fn WdsBpQueryOption(hhandle: P0, uoption: u32, uvaluelen: u32, pvalue: *mut core::ffi::c_void, pubytes: Option<*mut u32>) -> u32 @@ -250,12 +250,12 @@ where P0: windows_core::Param, { windows_targets::link!("wdsbp.dll" "system" fn WdsBpQueryOption(hhandle : super::super::Foundation:: HANDLE, uoption : u32, uvaluelen : u32, pvalue : *mut core::ffi::c_void, pubytes : *mut u32) -> u32); - WdsBpQueryOption(hhandle.param().abi(), uoption, uvaluelen, pvalue, core::mem::transmute(pubytes.unwrap_or(std::ptr::null_mut()))) + WdsBpQueryOption(hhandle.param().abi(), uoption, uvaluelen, pvalue, core::mem::transmute(pubytes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WdsCliAuthorizeSession(hsession: super::super::Foundation::HANDLE, pcred: Option<*const WDS_CLI_CRED>) -> windows_core::Result<()> { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliAuthorizeSession(hsession : super::super::Foundation:: HANDLE, pcred : *const WDS_CLI_CRED) -> windows_core::HRESULT); - WdsCliAuthorizeSession(hsession, core::mem::transmute(pcred.unwrap_or(std::ptr::null()))).ok() + WdsCliAuthorizeSession(hsession, core::mem::transmute(pcred.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WdsCliCancelTransfer(htransfer: P0) -> windows_core::Result<()> @@ -280,7 +280,7 @@ where { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliCreateSession(pwszserver : windows_core::PCWSTR, pcred : *const WDS_CLI_CRED, phsession : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliCreateSession(pwszserver.param().abi(), core::mem::transmute(pcred.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WdsCliCreateSession(pwszserver.param().abi(), core::mem::transmute(pcred.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WdsCliFindFirstImage(hsession: P0) -> windows_core::Result @@ -545,7 +545,7 @@ where { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliTransferFile(pwszserver : windows_core::PCWSTR, pwsznamespace : windows_core::PCWSTR, pwszremotefilepath : windows_core::PCWSTR, pwszlocalfilepath : windows_core::PCWSTR, dwflags : u32, dwreserved : u32, pfnwdsclicallback : PFN_WdsCliCallback, pvuserdata : *const core::ffi::c_void, phtransfer : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliTransferFile(pwszserver.param().abi(), pwsznamespace.param().abi(), pwszremotefilepath.param().abi(), pwszlocalfilepath.param().abi(), dwflags, dwreserved, pfnwdsclicallback, core::mem::transmute(pvuserdata.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WdsCliTransferFile(pwszserver.param().abi(), pwsznamespace.param().abi(), pwszremotefilepath.param().abi(), pwszlocalfilepath.param().abi(), dwflags, dwreserved, pfnwdsclicallback, core::mem::transmute(pvuserdata.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WdsCliTransferImage(himage: P0, pwszlocalpath: P1, dwflags: u32, dwreserved: u32, pfnwdsclicallback: PFN_WdsCliCallback, pvuserdata: Option<*const core::ffi::c_void>) -> windows_core::Result @@ -555,7 +555,7 @@ where { windows_targets::link!("wdsclientapi.dll" "system" fn WdsCliTransferImage(himage : super::super::Foundation:: HANDLE, pwszlocalpath : windows_core::PCWSTR, dwflags : u32, dwreserved : u32, pfnwdsclicallback : PFN_WdsCliCallback, pvuserdata : *const core::ffi::c_void, phtransfer : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WdsCliTransferImage(himage.param().abi(), pwszlocalpath.param().abi(), dwflags, dwreserved, pfnwdsclicallback, core::mem::transmute(pvuserdata.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WdsCliTransferImage(himage.param().abi(), pwszlocalpath.param().abi(), dwflags, dwreserved, pfnwdsclicallback, core::mem::transmute(pvuserdata.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WdsCliWaitForTransfer(htransfer: P0) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs index 2b334978a5..fe0b3a2f3f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/ActiveScript/mod.rs @@ -2576,7 +2576,7 @@ impl IDebugDocumentText { (windows_core::Interface::vtable(self).GetLineOfPosition)(windows_core::Interface::as_raw(self), ccharacterposition, pclinenumber, pccharacteroffsetinline).ok() } pub unsafe fn GetText(&self, ccharacterposition: u32, pchartext: windows_core::PWSTR, pstatextattr: Option<*mut u16>, pcnumchars: *mut u32, cmaxchars: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ccharacterposition, core::mem::transmute(pchartext), core::mem::transmute(pstatextattr.unwrap_or(std::ptr::null_mut())), pcnumchars, cmaxchars).ok() + (windows_core::Interface::vtable(self).GetText)(windows_core::Interface::as_raw(self), ccharacterposition, core::mem::transmute(pchartext), core::mem::transmute(pstatextattr.unwrap_or(core::ptr::null_mut())), pcnumchars, cmaxchars).ok() } pub unsafe fn GetPositionOfContext(&self, psc: P0, pccharacterposition: *mut u32, cnumchars: *mut u32) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/impl.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/impl.rs index b4a3d18321..6f90e219f0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/impl.rs @@ -15291,7 +15291,7 @@ impl IDebugFAEntryTags_Vtbl { } } #[doc(hidden)] -struct IDebugFAEntryTags_ImplVtbl(std::marker::PhantomData); +struct IDebugFAEntryTags_ImplVtbl(core::marker::PhantomData); impl IDebugFAEntryTags_ImplVtbl { const VTABLE: IDebugFAEntryTags_Vtbl = IDebugFAEntryTags_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs index 50e755b900..b6521fdb64 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/Debug/Extensions/mod.rs @@ -217,7 +217,7 @@ impl IDataModelManager { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModelForType)(windows_core::Interface::as_raw(self), r#type.param().abi(), core::mem::transmute(datamodel), core::mem::transmute(typesignature.unwrap_or(std::ptr::null_mut())), core::mem::transmute(wildcardmatches.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModelForType)(windows_core::Interface::as_raw(self), r#type.param().abi(), core::mem::transmute(datamodel), core::mem::transmute(typesignature.unwrap_or(core::ptr::null_mut())), core::mem::transmute(wildcardmatches.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RegisterModelForTypeSignature(&self, typesignature: P0, datamodel: P1) -> windows_core::Result<()> where @@ -361,14 +361,14 @@ impl IDataModelNameBinder { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).BindValue)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(value), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BindValue)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(value), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn BindReference(&self, contextobject: P0, name: P1, reference: *mut Option, metadata: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).BindReference)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(reference), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BindReference)(windows_core::Interface::as_raw(self), contextobject.param().abi(), name.param().abi(), core::mem::transmute(reference), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EnumerateValues(&self, contextobject: P0) -> windows_core::Result where @@ -487,7 +487,7 @@ impl IDataModelScriptDebug { (windows_core::Interface::vtable(self).GetDebugState)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetCurrentPosition(&self, currentposition: *mut ScriptDebugPosition, positionspanend: Option<*mut ScriptDebugPosition>, linetext: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(positionspanend.unwrap_or(std::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentPosition)(windows_core::Interface::as_raw(self), currentposition, core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStack(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -586,7 +586,7 @@ impl IDataModelScriptDebugBreakpoint { (windows_core::Interface::vtable(self).Remove)(windows_core::Interface::as_raw(self)) } pub unsafe fn GetPosition(&self, position: *mut ScriptDebugPosition, positionspanend: Option<*mut ScriptDebugPosition>, linetext: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position, core::mem::transmute(positionspanend.unwrap_or(std::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position, core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -681,7 +681,7 @@ impl IDataModelScriptDebugStackFrame { (windows_core::Interface::vtable(self).GetName)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetPosition(&self, position: *mut ScriptDebugPosition, positionspanend: Option<*mut ScriptDebugPosition>, linetext: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position, core::mem::transmute(positionspanend.unwrap_or(std::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPosition)(windows_core::Interface::as_raw(self), position, core::mem::transmute(positionspanend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(linetext.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsTransitionPoint(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -730,7 +730,7 @@ impl IDataModelScriptDebugVariableSetEnumerator { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetNext(&self, variablename: *mut windows_core::BSTR, variablevalue: Option<*mut Option>, variablemetadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(variablename), core::mem::transmute(variablevalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(variablemetadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(variablename), core::mem::transmute(variablevalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(variablemetadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -975,25 +975,25 @@ impl IDebugAdvanced2 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P0, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P0, flags: u32, filetoken: Option<*const core::ffi::c_void>, filetokensize: u32, foundelement: Option<*mut u32>, buffer: Option<&mut [u8]>, foundsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(std::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1023,40 +1023,40 @@ impl IDebugAdvanced3 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P0, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P0, flags: u32, filetoken: Option<*const core::ffi::c_void>, filetokensize: u32, foundelement: Option<*mut u32>, buffer: Option<&mut [u8]>, foundsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(std::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileInformationWide(&self, which: u32, sourcefile: P0, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindSourceFileAndTokenWide(&self, startelement: u32, modaddr: u64, file: P0, flags: u32, filetoken: Option<*const core::ffi::c_void>, filetokensize: u32, foundelement: Option<*mut u32>, buffer: Option<&mut [u16]>, foundsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(std::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1089,40 +1089,40 @@ impl IDebugAdvanced4 { (windows_core::Interface::vtable(self).SetThreadContext)(windows_core::Interface::as_raw(self), context, contextsize).ok() } pub unsafe fn Request(&self, request: u32, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, outsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Request)(windows_core::Interface::as_raw(self), request, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, core::mem::transmute(outsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileInformation(&self, which: u32, sourcefile: P0, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformation)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindSourceFileAndToken(&self, startelement: u32, modaddr: u64, file: P0, flags: u32, filetoken: Option<*const core::ffi::c_void>, filetokensize: u32, foundelement: Option<*mut u32>, buffer: Option<&mut [u8]>, foundsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(std::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileAndToken)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemObjectInformation(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemObjectInformation)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileInformationWide(&self, which: u32, sourcefile: P0, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileInformationWide)(windows_core::Interface::as_raw(self), which, sourcefile.param().abi(), arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindSourceFileAndTokenWide(&self, startelement: u32, modaddr: u64, file: P0, flags: u32, filetoken: Option<*const core::ffi::c_void>, filetokensize: u32, foundelement: Option<*mut u32>, buffer: Option<&mut [u16]>, foundsize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(std::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileAndTokenWide)(windows_core::Interface::as_raw(self), startelement, modaddr, file.param().abi(), flags, core::mem::transmute(filetoken.unwrap_or(core::ptr::null())), filetokensize, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWide(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolInformationWide)(windows_core::Interface::as_raw(self), which, arg64, arg32, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolInformationWideEx(&self, which: u32, arg64: u64, arg32: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>, stringbuffer: Option<&mut [u16]>, stringsize: Option<*mut u32>, pinfoex: Option<*mut SYMBOL_INFO_EX>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolInformationWideEx)( @@ -1130,13 +1130,13 @@ impl IDebugAdvanced4 { which, arg64, arg32, - core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, - core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), stringbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pinfoex.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pinfoex.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -1221,7 +1221,7 @@ impl IDebugBreakpoint { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -1230,7 +1230,7 @@ impl IDebugBreakpoint { (windows_core::Interface::vtable(self).SetCommand)(windows_core::Interface::as_raw(self), command.param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: Option<&mut [u8]>, expressionsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -1332,7 +1332,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -1341,7 +1341,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).SetCommand)(windows_core::Interface::as_raw(self), command.param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: Option<&mut [u8]>, expressionsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -1353,7 +1353,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), params).ok() } pub unsafe fn GetCommandWide(&self, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -1362,7 +1362,7 @@ impl IDebugBreakpoint2 { (windows_core::Interface::vtable(self).SetCommandWide)(windows_core::Interface::as_raw(self), command.param().abi()).ok() } pub unsafe fn GetOffsetExpressionWide(&self, buffer: Option<&mut [u16]>, expressionsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetExpressionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetExpressionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -1465,7 +1465,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).SetMatchThreadId)(windows_core::Interface::as_raw(self), thread).ok() } pub unsafe fn GetCommand(&self, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCommand)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCommand(&self, command: P0) -> windows_core::Result<()> where @@ -1474,7 +1474,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).SetCommand)(windows_core::Interface::as_raw(self), command.param().abi()).ok() } pub unsafe fn GetOffsetExpression(&self, buffer: Option<&mut [u8]>, expressionsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetExpression)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpression(&self, expression: P0) -> windows_core::Result<()> where @@ -1486,7 +1486,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).GetParameters)(windows_core::Interface::as_raw(self), params).ok() } pub unsafe fn GetCommandWide(&self, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCommandWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetCommandWide(&self, command: P0) -> windows_core::Result<()> where @@ -1495,7 +1495,7 @@ impl IDebugBreakpoint3 { (windows_core::Interface::vtable(self).SetCommandWide)(windows_core::Interface::as_raw(self), command.param().abi()).ok() } pub unsafe fn GetOffsetExpressionWide(&self, buffer: Option<&mut [u16]>, expressionsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetExpressionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetExpressionWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(expressionsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOffsetExpressionWide(&self, expression: P0) -> windows_core::Result<()> where @@ -1554,7 +1554,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -1566,7 +1566,7 @@ impl IDebugClient { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -1579,7 +1579,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -1596,10 +1596,10 @@ impl IDebugClient { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -1732,7 +1732,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -1741,7 +1741,7 @@ impl IDebugClient { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -1828,7 +1828,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -1840,7 +1840,7 @@ impl IDebugClient2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -1853,7 +1853,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -1870,10 +1870,10 @@ impl IDebugClient2 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2006,7 +2006,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -2015,7 +2015,7 @@ impl IDebugClient2 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -2141,7 +2141,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -2153,7 +2153,7 @@ impl IDebugClient3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -2166,7 +2166,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -2183,10 +2183,10 @@ impl IDebugClient3 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2319,7 +2319,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -2328,7 +2328,7 @@ impl IDebugClient3 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -2395,10 +2395,10 @@ impl IDebugClient3 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2492,7 +2492,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -2504,7 +2504,7 @@ impl IDebugClient4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -2517,7 +2517,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -2534,10 +2534,10 @@ impl IDebugClient4 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2670,7 +2670,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -2679,7 +2679,7 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -2746,10 +2746,10 @@ impl IDebugClient4 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -2789,10 +2789,10 @@ impl IDebugClient4 { (windows_core::Interface::vtable(self).GetNumberDumpFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } } #[repr(C)] @@ -2878,7 +2878,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -2890,7 +2890,7 @@ impl IDebugClient5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -2903,7 +2903,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -2920,10 +2920,10 @@ impl IDebugClient5 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3056,7 +3056,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -3065,7 +3065,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -3132,10 +3132,10 @@ impl IDebugClient5 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3175,10 +3175,10 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).GetNumberDumpFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> windows_core::Result<()> where @@ -3187,7 +3187,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -3199,7 +3199,7 @@ impl IDebugClient5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -3231,7 +3231,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetOutputCallbacksWide)(windows_core::Interface::as_raw(self), callbacks.param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: Option<&mut [u16]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -3240,7 +3240,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: Option<&mut [u16]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -3320,7 +3320,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), eventflags, &mut result__).map(|| result__) } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -3329,7 +3329,7 @@ impl IDebugClient5 { (windows_core::Interface::vtable(self).SetQuitLockString)(windows_core::Interface::as_raw(self), string.param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -3450,7 +3450,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -3462,7 +3462,7 @@ impl IDebugClient6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -3475,7 +3475,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -3492,10 +3492,10 @@ impl IDebugClient6 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3628,7 +3628,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -3637,7 +3637,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -3704,10 +3704,10 @@ impl IDebugClient6 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -3747,10 +3747,10 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).GetNumberDumpFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> windows_core::Result<()> where @@ -3759,7 +3759,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -3771,7 +3771,7 @@ impl IDebugClient6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -3803,7 +3803,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetOutputCallbacksWide)(windows_core::Interface::as_raw(self), callbacks.param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: Option<&mut [u16]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -3812,7 +3812,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: Option<&mut [u16]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -3892,7 +3892,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), eventflags, &mut result__).map(|| result__) } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -3901,7 +3901,7 @@ impl IDebugClient6 { (windows_core::Interface::vtable(self).SetQuitLockString)(windows_core::Interface::as_raw(self), string.param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -4029,7 +4029,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -4041,7 +4041,7 @@ impl IDebugClient7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -4054,7 +4054,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -4071,10 +4071,10 @@ impl IDebugClient7 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -4207,7 +4207,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -4216,7 +4216,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -4283,10 +4283,10 @@ impl IDebugClient7 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -4326,10 +4326,10 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).GetNumberDumpFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> windows_core::Result<()> where @@ -4338,7 +4338,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -4350,7 +4350,7 @@ impl IDebugClient7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -4382,7 +4382,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetOutputCallbacksWide)(windows_core::Interface::as_raw(self), callbacks.param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: Option<&mut [u16]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -4391,7 +4391,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: Option<&mut [u16]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -4471,7 +4471,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), eventflags, &mut result__).map(|| result__) } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -4480,7 +4480,7 @@ impl IDebugClient7 { (windows_core::Interface::vtable(self).SetQuitLockString)(windows_core::Interface::as_raw(self), string.param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -4612,7 +4612,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).AttachKernel)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptions(&self, buffer: Option<&mut [u8]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptions)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptions(&self, options: P0) -> windows_core::Result<()> where @@ -4624,7 +4624,7 @@ impl IDebugClient8 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServer)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServer(&self, remoteoptions: P0) -> windows_core::Result where @@ -4637,7 +4637,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).DisconnectProcessServer)(windows_core::Interface::as_raw(self), server).ok() } pub unsafe fn GetRunningProcessSystemIds(&self, server: u64, ids: Option<&mut [u32]>, actualcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRunningProcessSystemIds)(windows_core::Interface::as_raw(self), server, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(actualcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRunningProcessSystemIdByExecutableName(&self, server: u64, exename: P0, flags: u32) -> windows_core::Result where @@ -4654,10 +4654,10 @@ impl IDebugClient8 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -4790,7 +4790,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetOutputWidth)(windows_core::Interface::as_raw(self), columns).ok() } pub unsafe fn GetOutputLinePrefix(&self, buffer: Option<&mut [u8]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefix)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefix(&self, prefix: P0) -> windows_core::Result<()> where @@ -4799,7 +4799,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetOutputLinePrefix)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentity(&self, buffer: Option<&mut [u8]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentity)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentity(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -4866,10 +4866,10 @@ impl IDebugClient8 { flags, core::mem::transmute(exename.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), exename.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualexenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualexenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(actualdescriptionsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(actualdescriptionsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -4909,10 +4909,10 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).GetNumberDumpFiles)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDumpFile(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFile)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn GetDumpFileWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>, handle: Option<*mut u64>, r#type: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(std::ptr::null_mut())), r#type).ok() + (windows_core::Interface::vtable(self).GetDumpFileWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(handle.unwrap_or(core::ptr::null_mut())), r#type).ok() } pub unsafe fn AttachKernelWide(&self, flags: u32, connectoptions: P0) -> windows_core::Result<()> where @@ -4921,7 +4921,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).AttachKernelWide)(windows_core::Interface::as_raw(self), flags, connectoptions.param().abi()).ok() } pub unsafe fn GetKernelConnectionOptionsWide(&self, buffer: Option<&mut [u16]>, optionssize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKernelConnectionOptionsWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(optionssize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKernelConnectionOptionsWide(&self, options: P0) -> windows_core::Result<()> where @@ -4933,7 +4933,7 @@ impl IDebugClient8 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProcessServerWide)(windows_core::Interface::as_raw(self), flags, options.param().abi(), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn ConnectProcessServerWide(&self, remoteoptions: P0) -> windows_core::Result where @@ -4965,7 +4965,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetOutputCallbacksWide)(windows_core::Interface::as_raw(self), callbacks.param().abi()).ok() } pub unsafe fn GetOutputLinePrefixWide(&self, buffer: Option<&mut [u16]>, prefixsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(prefixsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetOutputLinePrefixWide(&self, prefix: P0) -> windows_core::Result<()> where @@ -4974,7 +4974,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetOutputLinePrefixWide)(windows_core::Interface::as_raw(self), prefix.param().abi()).ok() } pub unsafe fn GetIdentityWide(&self, buffer: Option<&mut [u16]>, identitysize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIdentityWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(identitysize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputIdentityWide(&self, outputcontrol: u32, flags: u32, format: P0) -> windows_core::Result<()> where @@ -5054,7 +5054,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).GetNumberEventCallbacks)(windows_core::Interface::as_raw(self), eventflags, &mut result__).map(|| result__) } pub unsafe fn GetQuitLockString(&self, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockString)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockString(&self, string: P0) -> windows_core::Result<()> where @@ -5063,7 +5063,7 @@ impl IDebugClient8 { (windows_core::Interface::vtable(self).SetQuitLockString)(windows_core::Interface::as_raw(self), string.param().abi()).ok() } pub unsafe fn GetQuitLockStringWide(&self, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuitLockStringWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetQuitLockStringWide(&self, string: P0) -> windows_core::Result<()> where @@ -5209,7 +5209,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -5229,7 +5229,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -5274,7 +5274,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -5297,7 +5297,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5308,14 +5308,14 @@ impl IDebugControl { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5354,11 +5354,11 @@ impl IDebugControl { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -5385,10 +5385,10 @@ impl IDebugControl { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -5433,7 +5433,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -5452,7 +5452,7 @@ impl IDebugControl { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -5485,7 +5485,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5540,10 +5540,10 @@ impl IDebugControl { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -5558,7 +5558,7 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -5567,13 +5567,13 @@ impl IDebugControl { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -5585,7 +5585,19 @@ impl IDebugControl { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } } #[repr(C)] @@ -5713,7 +5725,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -5733,7 +5745,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -5778,7 +5790,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -5801,7 +5813,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5812,14 +5824,14 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5858,11 +5870,11 @@ impl IDebugControl2 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -5889,10 +5901,10 @@ impl IDebugControl2 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -5937,7 +5949,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -5956,7 +5968,7 @@ impl IDebugControl2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -5989,7 +6001,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6044,10 +6056,10 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -6062,7 +6074,7 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -6071,13 +6083,13 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -6089,7 +6101,19 @@ impl IDebugControl2 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6117,10 +6141,10 @@ impl IDebugControl2 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -6271,7 +6295,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -6291,7 +6315,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -6336,7 +6360,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -6359,7 +6383,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6370,14 +6394,14 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6416,11 +6440,11 @@ impl IDebugControl3 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -6447,10 +6471,10 @@ impl IDebugControl3 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -6495,7 +6519,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -6514,7 +6538,7 @@ impl IDebugControl3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -6547,7 +6571,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6602,10 +6626,10 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -6620,7 +6644,7 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -6629,13 +6653,13 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -6647,7 +6671,19 @@ impl IDebugControl3 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6675,10 +6711,10 @@ impl IDebugControl3 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -6731,10 +6767,10 @@ impl IDebugControl3 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -6746,7 +6782,7 @@ impl IDebugControl3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -6903,7 +6939,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -6923,7 +6959,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -6968,7 +7004,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -6991,7 +7027,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7002,14 +7038,14 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7048,11 +7084,11 @@ impl IDebugControl4 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7079,10 +7115,10 @@ impl IDebugControl4 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7127,7 +7163,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -7146,7 +7182,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -7179,7 +7215,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7234,10 +7270,10 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -7252,7 +7288,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -7261,13 +7297,13 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -7279,7 +7315,19 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7307,10 +7355,10 @@ impl IDebugControl4 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7363,10 +7411,10 @@ impl IDebugControl4 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7378,7 +7426,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7389,7 +7437,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), relation, value, &mut result__).map(|| result__) } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -7399,7 +7447,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -7444,7 +7492,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> windows_core::Result where @@ -7454,7 +7502,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: Option<&mut [u16]>, fullnamesize: Option<*mut u32>, abbrevnamebuffer: Option<&mut [u16]>, abbrevnamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( @@ -7462,15 +7510,15 @@ impl IDebugControl4 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -7482,7 +7530,7 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P0, flags: u32) -> windows_core::Result<()> where @@ -7543,10 +7591,10 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), handle, funcname.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -7555,7 +7603,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -7564,7 +7612,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -7573,7 +7621,19 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformationWide)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -7585,10 +7645,10 @@ impl IDebugControl4 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7611,10 +7671,10 @@ impl IDebugControl4 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7622,10 +7682,10 @@ impl IDebugControl4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -7634,7 +7694,7 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -7643,28 +7703,28 @@ impl IDebugControl4 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetContextStackTrace(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() @@ -7869,7 +7929,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -7889,7 +7949,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -7934,7 +7994,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -7957,7 +8017,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -7968,14 +8028,14 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8014,11 +8074,11 @@ impl IDebugControl5 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8045,10 +8105,10 @@ impl IDebugControl5 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8093,7 +8153,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -8112,7 +8172,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -8145,7 +8205,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8200,10 +8260,10 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -8218,7 +8278,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -8227,13 +8287,13 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -8245,7 +8305,19 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8273,10 +8345,10 @@ impl IDebugControl5 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8329,10 +8401,10 @@ impl IDebugControl5 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8344,7 +8416,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8355,7 +8427,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), relation, value, &mut result__).map(|| result__) } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -8365,7 +8437,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -8410,7 +8482,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> windows_core::Result where @@ -8420,7 +8492,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: Option<&mut [u16]>, fullnamesize: Option<*mut u32>, abbrevnamebuffer: Option<&mut [u16]>, abbrevnamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( @@ -8428,15 +8500,15 @@ impl IDebugControl5 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -8448,7 +8520,7 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P0, flags: u32) -> windows_core::Result<()> where @@ -8509,10 +8581,10 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), handle, funcname.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -8521,7 +8593,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -8530,7 +8602,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -8539,7 +8611,19 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformationWide)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -8551,10 +8635,10 @@ impl IDebugControl5 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8577,10 +8661,10 @@ impl IDebugControl5 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -8588,10 +8672,10 @@ impl IDebugControl5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -8600,7 +8684,7 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -8609,40 +8693,40 @@ impl IDebugControl5 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetContextStackTrace(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() @@ -8856,7 +8940,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -8876,7 +8960,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -8921,7 +9005,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -8944,7 +9028,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -8955,14 +9039,14 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9001,11 +9085,11 @@ impl IDebugControl6 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9032,10 +9116,10 @@ impl IDebugControl6 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9080,7 +9164,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -9099,7 +9183,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -9132,7 +9216,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9187,10 +9271,10 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -9205,7 +9289,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -9214,13 +9298,13 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -9232,7 +9316,19 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9260,10 +9356,10 @@ impl IDebugControl6 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9316,10 +9412,10 @@ impl IDebugControl6 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9331,7 +9427,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9342,7 +9438,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), relation, value, &mut result__).map(|| result__) } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -9352,7 +9448,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -9397,7 +9493,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> windows_core::Result where @@ -9407,7 +9503,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: Option<&mut [u16]>, fullnamesize: Option<*mut u32>, abbrevnamebuffer: Option<&mut [u16]>, abbrevnamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( @@ -9415,15 +9511,15 @@ impl IDebugControl6 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -9435,7 +9531,7 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P0, flags: u32) -> windows_core::Result<()> where @@ -9496,10 +9592,10 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), handle, funcname.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -9508,7 +9604,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -9517,7 +9613,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -9526,7 +9622,19 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformationWide)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -9538,10 +9646,10 @@ impl IDebugControl6 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9564,10 +9672,10 @@ impl IDebugControl6 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -9575,10 +9683,10 @@ impl IDebugControl6 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -9587,7 +9695,7 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -9596,40 +9704,40 @@ impl IDebugControl6 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetContextStackTrace(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() @@ -9852,7 +9960,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetInterruptTimeout)(windows_core::Interface::as_raw(self), seconds).ok() } pub unsafe fn GetLogFile(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFile)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFile(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -9872,7 +9980,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetLogMask)(windows_core::Interface::as_raw(self), mask).ok() } pub unsafe fn Input(&self, buffer: &mut [u8], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Input)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInput(&self, buffer: P0) -> windows_core::Result<()> where @@ -9917,7 +10025,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OutputPromptVaList)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptText(&self, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptText)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputCurrentState(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputCurrentState)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -9940,7 +10048,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).Assemble)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn Disassemble(&self, offset: u64, flags: u32, buffer: Option<&mut [u8]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).Disassemble)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetDisassembleEffectiveOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9951,14 +10059,14 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OutputDisassembly)(windows_core::Interface::as_raw(self), outputcontrol, offset, flags, &mut result__).map(|| result__) } pub unsafe fn OutputDisassemblyLines(&self, outputcontrol: u32, previouslines: u32, offset: u64, flags: u32, offsetline: Option<*mut u32>, startoffset: Option<*mut u64>, endoffset: Option<*mut u64>, lineoffsets: Option<&mut [u64]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() + (windows_core::Interface::vtable(self).OutputDisassemblyLines)(windows_core::Interface::as_raw(self), outputcontrol, previouslines, lineoffsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), offset, flags, core::mem::transmute(offsetline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(startoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lineoffsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))).ok() } pub unsafe fn GetNearInstruction(&self, offset: u64, delta: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetNearInstruction)(windows_core::Interface::as_raw(self), offset, delta, &mut result__).map(|| result__) } pub unsafe fn GetStackTrace(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTrace)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetReturnOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -9997,11 +10105,11 @@ impl IDebugControl7 { minor, core::mem::transmute(servicepackstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servicepackstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(servicepackstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(servicepackstringused.unwrap_or(core::ptr::null_mut())), servicepacknumber, core::mem::transmute(buildstring.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buildstring.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(buildstringused.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(buildstringused.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10028,10 +10136,10 @@ impl IDebugControl7 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10076,7 +10184,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSystemErrorControl)(windows_core::Interface::as_raw(self), outputlevel, breaklevel).ok() } pub unsafe fn GetTextMacro(&self, slot: u32, buffer: Option<&mut [u8]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacro)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacro(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -10095,7 +10203,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Evaluate)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CoerceValue(&self, r#in: *const DEBUG_VALUE, outtype: u32, out: *mut DEBUG_VALUE) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CoerceValue)(windows_core::Interface::as_raw(self), r#in, outtype, out).ok() @@ -10128,7 +10236,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetBreakpointById)(windows_core::Interface::as_raw(self), id, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetBreakpointParameters(&self, count: u32, ids: Option<*const u32>, start: u32, params: *mut DEBUG_BREAKPOINT_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetBreakpointParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(ids.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn AddBreakpoint(&self, r#type: u32, desiredid: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10183,10 +10291,10 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetNumberEventFilters)(windows_core::Interface::as_raw(self), specificevents, specificexceptions, arbitraryexceptions).ok() } pub unsafe fn GetEventFilterText(&self, index: u32, buffer: Option<&mut [u8]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -10201,7 +10309,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetSpecificFilterArgument(&self, index: u32, buffer: Option<&mut [u8]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgument)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgument(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -10210,13 +10318,13 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterArgument)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterParameters(&self, count: u32, codes: Option<*const u32>, start: u32, params: *mut DEBUG_EXCEPTION_FILTER_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(codes.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn SetExceptionFilterParameters(&self, params: &[DEBUG_EXCEPTION_FILTER_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetExceptionFilterParameters)(windows_core::Interface::as_raw(self), params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() } pub unsafe fn GetExceptionFilterSecondCommand(&self, index: u32, buffer: Option<&mut [u8]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommand)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommand(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -10228,7 +10336,19 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).WaitForEvent)(windows_core::Interface::as_raw(self), flags, timeout).ok() } pub unsafe fn GetLastEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u8]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformation)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetCurrentTimeDate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10256,10 +10376,10 @@ impl IDebugControl7 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10312,10 +10432,10 @@ impl IDebugControl7 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10327,7 +10447,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescription)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentEventIndex(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10338,7 +10458,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetNextEventIndex)(windows_core::Interface::as_raw(self), relation, value, &mut result__).map(|| result__) } pub unsafe fn GetLogFileWide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, append: *mut super::super::super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), append).ok() + (windows_core::Interface::vtable(self).GetLogFileWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), append).ok() } pub unsafe fn OpenLogFileWide(&self, file: P0, append: P1) -> windows_core::Result<()> where @@ -10348,7 +10468,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OpenLogFileWide)(windows_core::Interface::as_raw(self), file.param().abi(), append.param().abi()).ok() } pub unsafe fn InputWide(&self, buffer: &mut [u16], inputsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).InputWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap(), core::mem::transmute(inputsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReturnInputWide(&self, buffer: P0) -> windows_core::Result<()> where @@ -10393,7 +10513,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OutputPromptVaListWide)(windows_core::Interface::as_raw(self), outputcontrol, format.param().abi(), args).ok() } pub unsafe fn GetPromptTextWide(&self, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPromptTextWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AssembleWide(&self, offset: u64, instr: P0) -> windows_core::Result where @@ -10403,7 +10523,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).AssembleWide)(windows_core::Interface::as_raw(self), offset, instr.param().abi(), &mut result__).map(|| result__) } pub unsafe fn DisassembleWide(&self, offset: u64, flags: u32, buffer: Option<&mut [u16]>, disassemblysize: Option<*mut u32>, endoffset: *mut u64) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(std::ptr::null_mut())), endoffset).ok() + (windows_core::Interface::vtable(self).DisassembleWide)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(disassemblysize.unwrap_or(core::ptr::null_mut())), endoffset).ok() } pub unsafe fn GetProcessorTypeNamesWide(&self, r#type: u32, fullnamebuffer: Option<&mut [u16]>, fullnamesize: Option<*mut u32>, abbrevnamebuffer: Option<&mut [u16]>, abbrevnamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetProcessorTypeNamesWide)( @@ -10411,15 +10531,15 @@ impl IDebugControl7 { r#type, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetTextMacroWide(&self, slot: u32, buffer: Option<&mut [u16]>, macrosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTextMacroWide)(windows_core::Interface::as_raw(self), slot, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(macrosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetTextMacroWide(&self, slot: u32, r#macro: P0) -> windows_core::Result<()> where @@ -10431,7 +10551,7 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateWide)(windows_core::Interface::as_raw(self), expression.param().abi(), desiredtype, value, core::mem::transmute(remainderindex.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ExecuteWide(&self, outputcontrol: u32, command: P0, flags: u32) -> windows_core::Result<()> where @@ -10492,10 +10612,10 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).GetExtensionFunctionWide)(windows_core::Interface::as_raw(self), handle, funcname.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetEventFilterTextWide(&self, index: u32, buffer: Option<&mut [u16]>, textsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(textsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEventFilterCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventFilterCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetEventFilterCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -10504,7 +10624,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetEventFilterCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetSpecificFilterArgumentWide(&self, index: u32, buffer: Option<&mut [u16]>, argumentsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(argumentsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSpecificFilterArgumentWide(&self, index: u32, argument: P0) -> windows_core::Result<()> where @@ -10513,7 +10633,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetSpecificFilterArgumentWide)(windows_core::Interface::as_raw(self), index, argument.param().abi()).ok() } pub unsafe fn GetExceptionFilterSecondCommandWide(&self, index: u32, buffer: Option<&mut [u16]>, commandsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(commandsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetExceptionFilterSecondCommandWide(&self, index: u32, command: P0) -> windows_core::Result<()> where @@ -10522,7 +10642,19 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).SetExceptionFilterSecondCommandWide)(windows_core::Interface::as_raw(self), index, command.param().abi()).ok() } pub unsafe fn GetLastEventInformationWide(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>, description: Option<&mut [u16]>, descriptionused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLastEventInformationWide)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(descriptionused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLastEventInformationWide)( + windows_core::Interface::as_raw(self), + r#type, + processid, + threadid, + core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), + extrainformationsize, + core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + core::mem::transmute(descriptionused.unwrap_or(core::ptr::null_mut())), + ) + .ok() } pub unsafe fn GetTextReplacementWide(&self, srctext: P0, index: u32, srcbuffer: Option<&mut [u16]>, srcsize: Option<*mut u32>, dstbuffer: Option<&mut [u16]>, dstsize: Option<*mut u32>) -> windows_core::Result<()> where @@ -10534,10 +10666,10 @@ impl IDebugControl7 { index, core::mem::transmute(srcbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), srcbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(srcsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(srcsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(dstbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), dstbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(dstsize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(dstsize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10560,10 +10692,10 @@ impl IDebugControl7 { index, core::mem::transmute(fullnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), fullnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(fullnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(fullnamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(abbrevnamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), abbrevnamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(abbrevnamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(abbrevnamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -10571,10 +10703,10 @@ impl IDebugControl7 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetEventIndexDescriptionWide)(windows_core::Interface::as_raw(self), index, which, buffer.param().abi(), buffersize, core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLogFile2(&self, buffer: Option<&mut [u8]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -10583,7 +10715,7 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OpenLogFile2)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetLogFile2Wide(&self, buffer: Option<&mut [u16]>, filesize: Option<*mut u32>, flags: *mut u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), flags).ok() + (windows_core::Interface::vtable(self).GetLogFile2Wide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), flags).ok() } pub unsafe fn OpenLogFile2Wide(&self, file: P0, flags: u32) -> windows_core::Result<()> where @@ -10592,40 +10724,40 @@ impl IDebugControl7 { (windows_core::Interface::vtable(self).OpenLogFile2Wide)(windows_core::Interface::as_raw(self), file.param().abi(), flags).ok() } pub unsafe fn GetSystemVersionValues(&self, platformid: *mut u32, win32major: *mut u32, win32minor: *mut u32, kdmajor: Option<*mut u32>, kdminor: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionValues)(windows_core::Interface::as_raw(self), platformid, win32major, win32minor, core::mem::transmute(kdmajor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kdminor.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionString(&self, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionString)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSystemVersionStringWide(&self, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSystemVersionStringWide)(windows_core::Interface::as_raw(self), which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetContextStackTrace(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTrace)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTrace(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTrace)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() } pub unsafe fn GetStoredEventInformation(&self, r#type: *mut u32, processid: *mut u32, threadid: *mut u32, context: Option<*mut core::ffi::c_void>, contextsize: u32, contextused: Option<*mut u32>, extrainformation: Option<*mut core::ffi::c_void>, extrainformationsize: u32, extrainformationused: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(std::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(std::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(std::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStoredEventInformation)(windows_core::Interface::as_raw(self), r#type, processid, threadid, core::mem::transmute(context.unwrap_or(core::ptr::null_mut())), contextsize, core::mem::transmute(contextused.unwrap_or(core::ptr::null_mut())), core::mem::transmute(extrainformation.unwrap_or(core::ptr::null_mut())), extrainformationsize, core::mem::transmute(extrainformationused.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatus(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u8]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatus)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetManagedStatusWide(&self, flags: Option<*mut u32>, whichstring: u32, string: Option<&mut [u16]>, stringneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetManagedStatusWide)(windows_core::Interface::as_raw(self), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut())), whichstring, core::mem::transmute(string.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), string.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ResetManagedStatus(&self, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetManagedStatus)(windows_core::Interface::as_raw(self), flags).ok() } pub unsafe fn GetStackTraceEx(&self, frameoffset: u64, stackoffset: u64, instructionoffset: u64, frames: &mut [DEBUG_STACK_FRAME_EX], framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStackTraceEx)(windows_core::Interface::as_raw(self), frameoffset, stackoffset, instructionoffset, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputStackTraceEx(&self, outputcontrol: u32, frames: Option<&[DEBUG_STACK_FRAME_EX]>, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags).ok() } pub unsafe fn GetContextStackTraceEx(&self, startcontext: Option<*const core::ffi::c_void>, startcontextsize: u32, frames: Option<&mut [DEBUG_STACK_FRAME_EX]>, framecontexts: Option<*mut core::ffi::c_void>, framecontextssize: u32, framecontextsentrysize: u32, framesfilled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(std::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(std::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetContextStackTraceEx)(windows_core::Interface::as_raw(self), core::mem::transmute(startcontext.unwrap_or(core::ptr::null())), startcontextsize, core::mem::transmute(frames.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), frames.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(framecontexts.unwrap_or(core::ptr::null_mut())), framecontextssize, framecontextsentrysize, core::mem::transmute(framesfilled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputContextStackTraceEx(&self, outputcontrol: u32, frames: &[DEBUG_STACK_FRAME_EX], framecontexts: *const core::ffi::c_void, framecontextssize: u32, framecontextsentrysize: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputContextStackTraceEx)(windows_core::Interface::as_raw(self), outputcontrol, core::mem::transmute(frames.as_ptr()), frames.len().try_into().unwrap(), framecontexts, framecontextssize, framecontextsentrysize, flags).ok() @@ -10839,20 +10971,20 @@ impl core::ops::Deref for IDebugDataSpaces { windows_core::imp::interface_hierarchy!(IDebugDataSpaces, windows_core::IUnknown); impl IDebugDataSpaces { pub unsafe fn ReadVirtual(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SearchVirtual)(windows_core::Interface::as_raw(self), offset, length, pattern, patternsize, patterngranularity, &mut result__).map(|| result__) } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() @@ -10861,22 +10993,22 @@ impl IDebugDataSpaces { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadControl(&self, processor: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteControl(&self, processor: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10886,19 +11018,19 @@ impl IDebugDataSpaces { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckLowMemory)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ReadDebuggerData(&self, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadProcessorSystemData(&self, processor: u32, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -10935,20 +11067,20 @@ impl core::ops::Deref for IDebugDataSpaces2 { windows_core::imp::interface_hierarchy!(IDebugDataSpaces2, windows_core::IUnknown); impl IDebugDataSpaces2 { pub unsafe fn ReadVirtual(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SearchVirtual)(windows_core::Interface::as_raw(self), offset, length, pattern, patternsize, patterngranularity, &mut result__).map(|| result__) } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() @@ -10957,22 +11089,22 @@ impl IDebugDataSpaces2 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadControl(&self, processor: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteControl(&self, processor: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -10982,35 +11114,35 @@ impl IDebugDataSpaces2 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckLowMemory)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ReadDebuggerData(&self, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadProcessorSystemData(&self, processor: u32, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).VirtualToPhysical)(windows_core::Interface::as_raw(self), r#virtual, &mut result__).map(|| result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillVirtual(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillPhysical(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Memory")] pub unsafe fn QueryVirtual(&self, offset: u64, info: *mut super::super::super::Memory::MEMORY_BASIC_INFORMATION64) -> windows_core::Result<()> { @@ -11060,20 +11192,20 @@ impl core::ops::Deref for IDebugDataSpaces3 { windows_core::imp::interface_hierarchy!(IDebugDataSpaces3, windows_core::IUnknown); impl IDebugDataSpaces3 { pub unsafe fn ReadVirtual(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SearchVirtual)(windows_core::Interface::as_raw(self), offset, length, pattern, patternsize, patterngranularity, &mut result__).map(|| result__) } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() @@ -11082,22 +11214,22 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadControl(&self, processor: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteControl(&self, processor: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11107,35 +11239,35 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckLowMemory)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ReadDebuggerData(&self, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadProcessorSystemData(&self, processor: u32, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).VirtualToPhysical)(windows_core::Interface::as_raw(self), r#virtual, &mut result__).map(|| result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillVirtual(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillPhysical(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Memory")] pub unsafe fn QueryVirtual(&self, offset: u64, info: *mut super::super::super::Memory::MEMORY_BASIC_INFORMATION64) -> windows_core::Result<()> { @@ -11146,7 +11278,7 @@ impl IDebugDataSpaces3 { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, headers).ok() } pub unsafe fn ReadTagged(&self, tag: *const windows_core::GUID, offset: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, totalsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(totalsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(totalsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11210,20 +11342,20 @@ impl core::ops::Deref for IDebugDataSpaces4 { windows_core::imp::interface_hierarchy!(IDebugDataSpaces4, windows_core::IUnknown); impl IDebugDataSpaces4 { pub unsafe fn ReadVirtual(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtual(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtual)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SearchVirtual(&self, offset: u64, length: u64, pattern: *const core::ffi::c_void, patternsize: u32, patterngranularity: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).SearchVirtual)(windows_core::Interface::as_raw(self), offset, length, pattern, patternsize, patterngranularity, &mut result__).map(|| result__) } pub unsafe fn ReadVirtualUncached(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteVirtualUncached(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteVirtualUncached)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPointersVirtual(&self, offset: u64, ptrs: &mut [u64]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ReadPointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() @@ -11232,22 +11364,22 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).WritePointersVirtual)(windows_core::Interface::as_raw(self), ptrs.len().try_into().unwrap(), offset, core::mem::transmute(ptrs.as_ptr())).ok() } pub unsafe fn ReadPhysical(&self, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WritePhysical(&self, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical)(windows_core::Interface::as_raw(self), offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadControl(&self, processor: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteControl(&self, processor: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteControl)(windows_core::Interface::as_raw(self), processor, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteIo(&self, interfacetype: u32, busnumber: u32, addressspace: u32, offset: u64, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteIo)(windows_core::Interface::as_raw(self), interfacetype, busnumber, addressspace, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadMsr(&self, msr: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11257,35 +11389,35 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).WriteMsr)(windows_core::Interface::as_raw(self), msr, value).ok() } pub unsafe fn ReadBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteBusData(&self, busdatatype: u32, busnumber: u32, slotnumber: u32, offset: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBusData)(windows_core::Interface::as_raw(self), busdatatype, busnumber, slotnumber, offset, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CheckLowMemory(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CheckLowMemory)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn ReadDebuggerData(&self, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadDebuggerData)(windows_core::Interface::as_raw(self), index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadProcessorSystemData(&self, processor: u32, index: u32, buffer: *mut core::ffi::c_void, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadProcessorSystemData)(windows_core::Interface::as_raw(self), processor, index, buffer, buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn VirtualToPhysical(&self, r#virtual: u64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).VirtualToPhysical)(windows_core::Interface::as_raw(self), r#virtual, &mut result__).map(|| result__) } pub unsafe fn GetVirtualTranslationPhysicalOffsets(&self, r#virtual: u64, offsets: Option<&mut [u64]>, levels: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVirtualTranslationPhysicalOffsets)(windows_core::Interface::as_raw(self), r#virtual, core::mem::transmute(offsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), offsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(levels.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadHandleData(&self, handle: u64, datatype: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, datasize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadHandleData)(windows_core::Interface::as_raw(self), handle, datatype, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(datasize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillVirtual(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillVirtual)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FillPhysical(&self, start: u64, size: u32, pattern: *const core::ffi::c_void, patternsize: u32, filled: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FillPhysical)(windows_core::Interface::as_raw(self), start, size, pattern, patternsize, core::mem::transmute(filled.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Memory")] pub unsafe fn QueryVirtual(&self, offset: u64, info: *mut super::super::super::Memory::MEMORY_BASIC_INFORMATION64) -> windows_core::Result<()> { @@ -11296,7 +11428,7 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).ReadImageNtHeaders)(windows_core::Interface::as_raw(self), imagebase, headers).ok() } pub unsafe fn ReadTagged(&self, tag: *const windows_core::GUID, offset: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, totalsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(totalsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTagged)(windows_core::Interface::as_raw(self), tag, offset, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(totalsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn StartEnumTagged(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11309,7 +11441,7 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).EndEnumTagged)(windows_core::Interface::as_raw(self), handle).ok() } pub unsafe fn GetOffsetInformation(&self, space: u32, which: u32, offset: u64, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, infosize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetInformation)(windows_core::Interface::as_raw(self), space, which, offset, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetInformation)(windows_core::Interface::as_raw(self), space, which, offset, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(infosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetNextDifferentlyValidOffsetVirtual(&self, offset: u64) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -11323,22 +11455,22 @@ impl IDebugDataSpaces4 { (windows_core::Interface::vtable(self).SearchVirtual2)(windows_core::Interface::as_raw(self), offset, length, flags, pattern, patternsize, patterngranularity, &mut result__).map(|| result__) } pub unsafe fn ReadMultiByteStringVirtual(&self, offset: u64, maxbytes: u32, buffer: Option<&mut [u8]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadMultiByteStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadMultiByteStringVirtualWide(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: Option<&mut [u16]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadMultiByteStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadUnicodeStringVirtual(&self, offset: u64, maxbytes: u32, codepage: u32, buffer: Option<&mut [u8]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadUnicodeStringVirtual)(windows_core::Interface::as_raw(self), offset, maxbytes, codepage, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadUnicodeStringVirtualWide(&self, offset: u64, maxbytes: u32, buffer: Option<&mut [u16]>, stringbytes: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadUnicodeStringVirtualWide)(windows_core::Interface::as_raw(self), offset, maxbytes, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringbytes.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPhysical2(&self, offset: u64, flags: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadPhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadPhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WritePhysical2(&self, offset: u64, flags: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WritePhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WritePhysical2)(windows_core::Interface::as_raw(self), offset, flags, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -11656,7 +11788,7 @@ impl IDebugFAEntryTags { (windows_core::Interface::vtable(self).SetType)(windows_core::Interface::as_raw(self), tag, entrytype).ok() } pub unsafe fn GetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: windows_core::PSTR, namesize: Option<*mut u32>, description: windows_core::PSTR, descsize: Option<*mut u32>, flags: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(name), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(description), core::mem::transmute(descsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(flags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProperties)(windows_core::Interface::as_raw(self), tag, core::mem::transmute(name), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description), core::mem::transmute(descsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(flags.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetProperties(&self, tag: DEBUG_FLR_PARAM_TYPE, name: P0, description: P1, flags: u32) -> windows_core::Result<()> where @@ -11723,7 +11855,7 @@ impl IDebugFailureAnalysis { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value) } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::ptr::null()))) } } #[repr(C)] @@ -11777,7 +11909,7 @@ impl IDebugFailureAnalysis2 { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value) } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::ptr::null()))) } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P0) -> *mut FA_ENTRY where @@ -11904,7 +12036,7 @@ impl IDebugFailureAnalysis3 { (windows_core::Interface::vtable(self).GetUlong64)(windows_core::Interface::as_raw(self), tag, value) } pub unsafe fn NextEntry(&self, entry: Option<*const FA_ENTRY>) -> *mut FA_ENTRY { - (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(std::ptr::null()))) + (windows_core::Interface::vtable(self).NextEntry)(windows_core::Interface::as_raw(self), core::mem::transmute(entry.unwrap_or(core::ptr::null()))) } pub unsafe fn SetString(&self, tag: DEBUG_FLR_PARAM_TYPE, str: P0) -> *mut FA_ENTRY where @@ -12268,7 +12400,7 @@ impl IDebugHostEvaluator { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateExpression)(windows_core::Interface::as_raw(self), context.param().abi(), expression.param().abi(), bindingcontext.param().abi(), core::mem::transmute(result), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateExpression)(windows_core::Interface::as_raw(self), context.param().abi(), expression.param().abi(), bindingcontext.param().abi(), core::mem::transmute(result), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EvaluateExtendedExpression(&self, context: P0, expression: P1, bindingcontext: P2, result: *mut Option, metadata: Option<*mut Option>) -> windows_core::Result<()> where @@ -12276,7 +12408,7 @@ impl IDebugHostEvaluator { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).EvaluateExtendedExpression)(windows_core::Interface::as_raw(self), context.param().abi(), expression.param().abi(), bindingcontext.param().abi(), core::mem::transmute(result), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).EvaluateExtendedExpression)(windows_core::Interface::as_raw(self), context.param().abi(), expression.param().abi(), bindingcontext.param().abi(), core::mem::transmute(result), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -12299,7 +12431,7 @@ impl IDebugHostEvaluator2 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AssignTo)(windows_core::Interface::as_raw(self), assignmentreference.param().abi(), assignmentvalue.param().abi(), core::mem::transmute(assignmentresult), core::mem::transmute(assignmentmetadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AssignTo)(windows_core::Interface::as_raw(self), assignmentreference.param().abi(), assignmentvalue.param().abi(), core::mem::transmute(assignmentresult), core::mem::transmute(assignmentmetadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -12387,13 +12519,13 @@ impl IDebugHostMemory { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteBytes(&self, context: P0, location: Location, buffer: *const core::ffi::c_void, buffersize: u64, byteswritten: Option<*mut u64>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).WriteBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteBytes)(windows_core::Interface::as_raw(self), context.param().abi(), core::mem::transmute(location), buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadPointers(&self, context: P0, location: Location, pointers: &mut [u64]) -> windows_core::Result<()> where @@ -12464,7 +12596,7 @@ impl IDebugHostModule { (windows_core::Interface::vtable(self).GetBaseLocation)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetVersion(&self, fileversion: Option<*mut u64>, productversion: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(fileversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(productversion.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetVersion)(windows_core::Interface::as_raw(self), core::mem::transmute(fileversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(productversion.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn FindTypeByName(&self, typename: P0) -> windows_core::Result where @@ -12800,7 +12932,7 @@ impl IDebugHostType { (windows_core::Interface::vtable(self).GetHashCode)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetIntrinsicType(&self, intrinsickind: Option<*mut IntrinsicKind>, carriertype: Option<*mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetIntrinsicType)(windows_core::Interface::as_raw(self), core::mem::transmute(intrinsickind.unwrap_or(std::ptr::null_mut())), core::mem::transmute(carriertype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetIntrinsicType)(windows_core::Interface::as_raw(self), core::mem::transmute(intrinsickind.unwrap_or(core::ptr::null_mut())), core::mem::transmute(carriertype.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetBitField(&self, lsboffield: *mut u32, lengthoffield: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetBitField)(windows_core::Interface::as_raw(self), lsboffield, lengthoffield).ok() @@ -12936,7 +13068,7 @@ impl IDebugHostTypeSignature { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).IsMatch)(windows_core::Interface::as_raw(self), r#type.param().abi(), ismatch, core::mem::transmute(wildcardmatches.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).IsMatch)(windows_core::Interface::as_raw(self), r#type.param().abi(), ismatch, core::mem::transmute(wildcardmatches.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CompareAgainst(&self, typesignature: P0) -> windows_core::Result where @@ -13237,7 +13369,7 @@ impl IDebugRegisters { (windows_core::Interface::vtable(self).GetNumberRegisters)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDescription(&self, register: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -13253,10 +13385,10 @@ impl IDebugRegisters { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), register, value).ok() } pub unsafe fn GetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn SetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn OutputRegisters(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputRegisters)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -13303,7 +13435,7 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).GetNumberRegisters)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDescription(&self, register: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByName(&self, name: P0) -> windows_core::Result where @@ -13319,10 +13451,10 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).SetValue)(windows_core::Interface::as_raw(self), register, value).ok() } pub unsafe fn GetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).GetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn SetValues(&self, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).SetValues)(windows_core::Interface::as_raw(self), count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn OutputRegisters(&self, outputcontrol: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputRegisters)(windows_core::Interface::as_raw(self), outputcontrol, flags).ok() @@ -13340,7 +13472,7 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).GetFrameOffset)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetDescriptionWide(&self, register: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, desc: Option<*mut DEBUG_REGISTER_DESCRIPTION>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(desc.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetIndexByNameWide(&self, name: P0) -> windows_core::Result where @@ -13354,10 +13486,10 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).GetNumberPseudoRegisters)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetPseudoDescription(&self, register: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, typemodule: Option<*mut u64>, typeid: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPseudoDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(typemodule.unwrap_or(std::ptr::null_mut())), core::mem::transmute(typeid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPseudoDescription)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(typemodule.unwrap_or(core::ptr::null_mut())), core::mem::transmute(typeid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetPseudoDescriptionWide(&self, register: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, typemodule: Option<*mut u64>, typeid: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(typemodule.unwrap_or(std::ptr::null_mut())), core::mem::transmute(typeid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPseudoDescriptionWide)(windows_core::Interface::as_raw(self), register, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(typemodule.unwrap_or(core::ptr::null_mut())), core::mem::transmute(typeid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetPseudoIndexByName(&self, name: P0) -> windows_core::Result where @@ -13374,16 +13506,16 @@ impl IDebugRegisters2 { (windows_core::Interface::vtable(self).GetPseudoIndexByNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetPseudoValues(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).GetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn SetPseudoValues(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).SetPseudoValues)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn GetValues2(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *mut DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).GetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn SetValues2(&self, source: u32, count: u32, indices: Option<*const u32>, start: u32, values: *const DEBUG_VALUE) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(std::ptr::null())), start, values).ok() + (windows_core::Interface::vtable(self).SetValues2)(windows_core::Interface::as_raw(self), source, count, core::mem::transmute(indices.unwrap_or(core::ptr::null())), start, values).ok() } pub unsafe fn OutputRegisters2(&self, outputcontrol: u32, source: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputRegisters2)(windows_core::Interface::as_raw(self), outputcontrol, source, flags).ok() @@ -13460,7 +13592,7 @@ impl IDebugSymbolGroup { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), index).ok() } pub unsafe fn GetSymbolName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() @@ -13530,7 +13662,7 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).RemoveSymbolByIndex)(windows_core::Interface::as_raw(self), index).ok() } pub unsafe fn GetSymbolName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolParameters(&self, start: u32, params: &mut [DEBUG_SYMBOL_PARAMETERS]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolParameters)(windows_core::Interface::as_raw(self), start, params.len().try_into().unwrap(), core::mem::transmute(params.as_ptr())).ok() @@ -13569,7 +13701,7 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).RemoveSymbolByNameWide)(windows_core::Interface::as_raw(self), name.param().abi()).ok() } pub unsafe fn GetSymbolNameWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolNameWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolNameWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteSymbolWide(&self, index: u32, value: P0) -> windows_core::Result<()> where @@ -13584,10 +13716,10 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).OutputAsTypeWide)(windows_core::Interface::as_raw(self), index, r#type.param().abi()).ok() } pub unsafe fn GetSymbolTypeName(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolTypeName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeName)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolTypeNameWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeNameWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolSize(&self, index: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -13602,10 +13734,10 @@ impl IDebugSymbolGroup2 { (windows_core::Interface::vtable(self).GetSymbolRegister)(windows_core::Interface::as_raw(self), index, &mut result__).map(|| result__) } pub unsafe fn GetSymbolValueText(&self, index: u32, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolValueText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolValueText)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolValueTextWide(&self, index: u32, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolValueTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolValueTextWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryInformation(&self, index: u32, entry: *mut DEBUG_SYMBOL_ENTRY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), index, entry).ok() @@ -13661,7 +13793,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -13671,10 +13803,10 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).GetOffsetByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> windows_core::Result where @@ -13694,10 +13826,10 @@ impl IDebugSymbols { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNames(&self, index: u32, base: u64, imagenamebuffer: Option<&mut [u8]>, imagenamesize: Option<*mut u32>, modulenamebuffer: Option<&mut [u8]>, modulenamesize: Option<*mut u32>, loadedimagenamebuffer: Option<&mut [u8]>, loadedimagenamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModuleNames)( @@ -13706,18 +13838,18 @@ impl IDebugSymbols { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modulenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(modulenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(loadedimagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -13727,7 +13859,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).GetSymbolModule)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> windows_core::Result where @@ -13751,34 +13883,34 @@ impl IDebugSymbols { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScope(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -13802,7 +13934,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).StartSymbolMatch)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() @@ -13814,7 +13946,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -13829,7 +13961,7 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).AppendSymbolPath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -13844,10 +13976,10 @@ impl IDebugSymbols { (windows_core::Interface::vtable(self).AppendImagePath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -13865,13 +13997,13 @@ impl IDebugSymbols { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -13950,7 +14082,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -13960,10 +14092,10 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).GetOffsetByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> windows_core::Result where @@ -13983,10 +14115,10 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNames(&self, index: u32, base: u64, imagenamebuffer: Option<&mut [u8]>, imagenamesize: Option<*mut u32>, modulenamebuffer: Option<&mut [u8]>, modulenamesize: Option<*mut u32>, loadedimagenamebuffer: Option<&mut [u8]>, loadedimagenamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModuleNames)( @@ -13995,18 +14127,18 @@ impl IDebugSymbols2 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modulenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(modulenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(loadedimagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -14016,7 +14148,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).GetSymbolModule)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> windows_core::Result where @@ -14040,34 +14172,34 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScope(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -14091,7 +14223,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).StartSymbolMatch)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() @@ -14103,7 +14235,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -14118,7 +14250,7 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).AppendSymbolPath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -14133,10 +14265,10 @@ impl IDebugSymbols2 { (windows_core::Interface::vtable(self).AppendImagePath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -14154,28 +14286,28 @@ impl IDebugSymbols2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14275,7 +14407,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -14285,10 +14417,10 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetOffsetByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> windows_core::Result where @@ -14308,10 +14440,10 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNames(&self, index: u32, base: u64, imagenamebuffer: Option<&mut [u8]>, imagenamesize: Option<*mut u32>, modulenamebuffer: Option<&mut [u8]>, modulenamesize: Option<*mut u32>, loadedimagenamebuffer: Option<&mut [u8]>, loadedimagenamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModuleNames)( @@ -14320,18 +14452,18 @@ impl IDebugSymbols3 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modulenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(modulenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(loadedimagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -14341,7 +14473,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetSymbolModule)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> windows_core::Result where @@ -14365,34 +14497,34 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScope(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -14416,7 +14548,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).StartSymbolMatch)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() @@ -14428,7 +14560,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -14443,7 +14575,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).AppendSymbolPath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -14458,10 +14590,10 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).AppendImagePath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -14479,28 +14611,28 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14516,7 +14648,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -14526,10 +14658,10 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetOffsetByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u16]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> windows_core::Result where @@ -14542,7 +14674,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -14552,7 +14684,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetSymbolModuleWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> windows_core::Result where @@ -14572,7 +14704,7 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P0) -> windows_core::Result where @@ -14593,7 +14725,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).StartSymbolMatchWide)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -14602,7 +14734,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).ReloadWide)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -14617,7 +14749,7 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).AppendSymbolPathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -14632,10 +14764,10 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).AppendImagePathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -14653,28 +14785,28 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() @@ -14683,16 +14815,16 @@ impl IDebugSymbols3 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByModuleName2Wide(&self, name: P0, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P0, modulename: P1, flags: u32) -> windows_core::Result<()> where @@ -14728,49 +14860,49 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(std::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByName(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -14780,41 +14912,41 @@ impl IDebugSymbols3 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(windows_core::Interface::as_raw(self), fromid, flags, &mut result__).map(|| result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() @@ -14970,7 +15102,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -14980,10 +15112,10 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetOffsetByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> windows_core::Result where @@ -15003,10 +15135,10 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNames(&self, index: u32, base: u64, imagenamebuffer: Option<&mut [u8]>, imagenamesize: Option<*mut u32>, modulenamebuffer: Option<&mut [u8]>, modulenamesize: Option<*mut u32>, loadedimagenamebuffer: Option<&mut [u8]>, loadedimagenamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModuleNames)( @@ -15015,18 +15147,18 @@ impl IDebugSymbols4 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modulenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(modulenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(loadedimagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -15036,7 +15168,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetSymbolModule)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> windows_core::Result where @@ -15060,34 +15192,34 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScope(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -15111,7 +15243,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).StartSymbolMatch)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() @@ -15123,7 +15255,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -15138,7 +15270,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).AppendSymbolPath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -15153,10 +15285,10 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).AppendImagePath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -15174,28 +15306,28 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15211,7 +15343,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -15221,10 +15353,10 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetOffsetByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u16]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> windows_core::Result where @@ -15237,7 +15369,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -15247,7 +15379,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetSymbolModuleWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> windows_core::Result where @@ -15267,7 +15399,7 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P0) -> windows_core::Result where @@ -15288,7 +15420,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).StartSymbolMatchWide)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -15297,7 +15429,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).ReloadWide)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -15312,7 +15444,7 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).AppendSymbolPathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -15327,10 +15459,10 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).AppendImagePathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -15348,28 +15480,28 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() @@ -15378,16 +15510,16 @@ impl IDebugSymbols4 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByModuleName2Wide(&self, name: P0, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P0, modulename: P1, flags: u32) -> windows_core::Result<()> where @@ -15423,49 +15555,49 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(std::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByName(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15475,62 +15607,62 @@ impl IDebugSymbols4 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(windows_core::Interface::as_raw(self), fromid, flags, &mut result__).map(|| result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() } pub unsafe fn GetScopeEx(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME_EX>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScopeEx(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME_EX>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn GetNameByInlineContext(&self, offset: u64, inlinecontext: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetNameByInlineContextWide(&self, offset: u64, inlinecontext: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContext(&self, offset: u64, inlinecontext: u32, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContextWide(&self, offset: u64, inlinecontext: u32, line: Option<*mut u32>, filebuffer: Option<&mut [u16]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() @@ -15693,7 +15825,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).SetSymbolOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffset(&self, offset: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByName(&self, symbol: P0) -> windows_core::Result where @@ -15703,10 +15835,10 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetOffsetByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffset(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffset)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffset(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffset)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLine(&self, line: u32, file: P0) -> windows_core::Result where @@ -15726,10 +15858,10 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset(&self, offset: u64, startindex: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset)(windows_core::Interface::as_raw(self), offset, startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNames(&self, index: u32, base: u64, imagenamebuffer: Option<&mut [u8]>, imagenamesize: Option<*mut u32>, modulenamebuffer: Option<&mut [u8]>, modulenamesize: Option<*mut u32>, loadedimagenamebuffer: Option<&mut [u8]>, loadedimagenamesize: Option<*mut u32>) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetModuleNames)( @@ -15738,18 +15870,18 @@ impl IDebugSymbols5 { base, core::mem::transmute(imagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), imagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(imagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(imagenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modulenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), modulenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(modulenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(modulenamesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(loadedimagenamebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), loadedimagenamebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(loadedimagenamesize.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(loadedimagenamesize.unwrap_or(core::ptr::null_mut())), ) .ok() } pub unsafe fn GetModuleParameters(&self, count: u32, bases: Option<*const u64>, start: u32, params: *mut DEBUG_MODULE_PARAMETERS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(std::ptr::null())), start, params).ok() + (windows_core::Interface::vtable(self).GetModuleParameters)(windows_core::Interface::as_raw(self), count, core::mem::transmute(bases.unwrap_or(core::ptr::null())), start, params).ok() } pub unsafe fn GetSymbolModule(&self, symbol: P0) -> windows_core::Result where @@ -15759,7 +15891,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetSymbolModule)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeName(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeName)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeId(&self, module: u64, name: P0) -> windows_core::Result where @@ -15783,34 +15915,34 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeId)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetTypeId(&self, offset: u64, typeid: *mut u32, module: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetOffsetTypeId)(windows_core::Interface::as_raw(self), offset, typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReadTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataVirtual(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataVirtual)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataVirtual(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataVirtual)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn ReadTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReadTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn WriteTypedDataPhysical(&self, offset: u64, module: u64, typeid: u32, buffer: *const core::ffi::c_void, buffersize: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).WriteTypedDataPhysical)(windows_core::Interface::as_raw(self), offset, module, typeid, buffer, buffersize, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputTypedDataPhysical(&self, outputcontrol: u32, offset: u64, module: u64, typeid: u32, flags: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputTypedDataPhysical)(windows_core::Interface::as_raw(self), outputcontrol, offset, module, typeid, flags).ok() } pub unsafe fn GetScope(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScope)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScope(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScope)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn ResetScope(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResetScope)(windows_core::Interface::as_raw(self)).ok() @@ -15834,7 +15966,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).StartSymbolMatch)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatch(&self, handle: u64, buffer: Option<&mut [u8]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatch)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn EndSymbolMatch(&self, handle: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndSymbolMatch)(windows_core::Interface::as_raw(self), handle).ok() @@ -15846,7 +15978,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPath(&self, path: P0) -> windows_core::Result<()> where @@ -15861,7 +15993,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).AppendSymbolPath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePath(&self, path: P0) -> windows_core::Result<()> where @@ -15876,10 +16008,10 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).AppendImagePath)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePath(&self, buffer: Option<&mut [u8]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePath)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElement(&self, index: u32, buffer: Option<&mut [u8]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElement)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePath(&self, path: P0) -> windows_core::Result<()> where @@ -15897,28 +16029,28 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFile)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsets(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsets)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformation(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformation)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameString(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameString)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantName(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantName)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldName(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldName)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeOptions(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -15934,7 +16066,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).SetTypeOptions)(windows_core::Interface::as_raw(self), options).ok() } pub unsafe fn GetNameByOffsetWide(&self, offset: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByNameWide(&self, symbol: P0) -> windows_core::Result where @@ -15944,10 +16076,10 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetOffsetByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNearNameByOffsetWide(&self, offset: u64, delta: i32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNearNameByOffsetWide)(windows_core::Interface::as_raw(self), offset, delta, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByOffsetWide(&self, offset: u64, line: Option<*mut u32>, filebuffer: Option<&mut [u16]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByOffsetWide)(windows_core::Interface::as_raw(self), offset, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetOffsetByLineWide(&self, line: u32, file: P0) -> windows_core::Result where @@ -15960,7 +16092,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleNameWide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolModuleWide(&self, symbol: P0) -> windows_core::Result where @@ -15970,7 +16102,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetSymbolModuleWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetTypeNameWide(&self, module: u64, typeid: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTypeNameWide)(windows_core::Interface::as_raw(self), module, typeid, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetTypeIdWide(&self, module: u64, name: P0) -> windows_core::Result where @@ -15990,7 +16122,7 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolTypeIdWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), typeid, core::mem::transmute(module.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetScopeSymbolGroup2(&self, flags: u32, update: P0) -> windows_core::Result where @@ -16011,7 +16143,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).StartSymbolMatchWide)(windows_core::Interface::as_raw(self), pattern.param().abi(), &mut result__).map(|| result__) } pub unsafe fn GetNextSymbolMatchWide(&self, handle: u64, buffer: Option<&mut [u16]>, matchsize: Option<*mut u32>, offset: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNextSymbolMatchWide)(windows_core::Interface::as_raw(self), handle, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(matchsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReloadWide(&self, module: P0) -> windows_core::Result<()> where @@ -16020,7 +16152,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).ReloadWide)(windows_core::Interface::as_raw(self), module.param().abi()).ok() } pub unsafe fn GetSymbolPathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolPathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSymbolPathWide(&self, path: P0) -> windows_core::Result<()> where @@ -16035,7 +16167,7 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).AppendSymbolPathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetImagePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetImagePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetImagePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -16050,10 +16182,10 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).AppendImagePathWide)(windows_core::Interface::as_raw(self), addition.param().abi()).ok() } pub unsafe fn GetSourcePathWide(&self, buffer: Option<&mut [u16]>, pathsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pathsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourcePathElementWide(&self, index: u32, buffer: Option<&mut [u16]>, elementsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourcePathElementWide)(windows_core::Interface::as_raw(self), 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().try_into().unwrap()), core::mem::transmute(elementsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetSourcePathWide(&self, path: P0) -> windows_core::Result<()> where @@ -16071,28 +16203,28 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(std::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).FindSourceFileWide)(windows_core::Interface::as_raw(self), startelement, file.param().abi(), flags, core::mem::transmute(foundelement.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(foundsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceFileLineOffsetsWide(&self, file: P0, buffer: Option<&mut [u64]>, filelines: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceFileLineOffsetsWide)(windows_core::Interface::as_raw(self), file.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().try_into().unwrap()), core::mem::transmute(filelines.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleVersionInformationWide(&self, index: u32, base: u64, item: P0, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, verinfosize: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleVersionInformationWide)(windows_core::Interface::as_raw(self), index, base, item.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(verinfosize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleNameStringWide(&self, which: u32, index: u32, base: u64, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleNameStringWide)(windows_core::Interface::as_raw(self), which, index, base, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConstantNameWide(&self, module: u64, typeid: u32, value: u64, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConstantNameWide)(windows_core::Interface::as_raw(self), module, typeid, value, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldNameWide(&self, module: u64, typeid: u32, fieldindex: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldNameWide)(windows_core::Interface::as_raw(self), module, typeid, fieldindex, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsManagedModule(&self, index: u32, base: u64) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).IsManagedModule)(windows_core::Interface::as_raw(self), index, base).ok() @@ -16101,16 +16233,16 @@ impl IDebugSymbols5 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByModuleName2Wide(&self, name: P0, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByModuleName2Wide)(windows_core::Interface::as_raw(self), name.param().abi(), startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetModuleByOffset2(&self, offset: u64, startindex: u32, flags: u32, index: Option<*mut u32>, base: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(std::ptr::null_mut())), core::mem::transmute(base.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetModuleByOffset2)(windows_core::Interface::as_raw(self), offset, startindex, flags, core::mem::transmute(index.unwrap_or(core::ptr::null_mut())), core::mem::transmute(base.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticModule(&self, base: u64, size: u32, imagepath: P0, modulename: P1, flags: u32) -> windows_core::Result<()> where @@ -16146,49 +16278,49 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).OutputSymbolByOffset)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset).ok() } pub unsafe fn GetFunctionEntryByOffset(&self, offset: u64, flags: u32, buffer: Option<*mut core::ffi::c_void>, buffersize: u32, bufferneeded: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFunctionEntryByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, core::mem::transmute(bufferneeded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffset(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffset)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetFieldTypeAndOffsetWide(&self, module: u64, containertypeid: u32, field: P0, fieldtypeid: Option<*mut u32>, offset: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetFieldTypeAndOffsetWide)(windows_core::Interface::as_raw(self), module, containertypeid, field.param().abi(), core::mem::transmute(fieldtypeid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(offset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbol(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbol)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AddSyntheticSymbolWide(&self, offset: u64, size: u32, name: P0, flags: u32, id: Option<*mut DEBUG_MODULE_AND_ID>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddSyntheticSymbolWide)(windows_core::Interface::as_raw(self), offset, size, name.param().abi(), flags, core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveSyntheticSymbol(&self, id: *const DEBUG_MODULE_AND_ID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).RemoveSyntheticSymbol)(windows_core::Interface::as_raw(self), id).ok() } pub unsafe fn GetSymbolEntriesByOffset(&self, offset: u64, flags: u32, ids: Option<*mut DEBUG_MODULE_AND_ID>, displacements: Option<*mut u64>, idscount: u32, entries: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(std::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacements.unwrap_or(core::ptr::null_mut())), idscount, core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByName(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByName)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntriesByNameWide(&self, symbol: P0, flags: u32, ids: Option<&mut [DEBUG_MODULE_AND_ID]>, entries: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntriesByNameWide)(windows_core::Interface::as_raw(self), symbol.param().abi(), flags, core::mem::transmute(ids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entries.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryByToken(&self, modulebase: u64, token: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16198,62 +16330,62 @@ impl IDebugSymbols5 { (windows_core::Interface::vtable(self).GetSymbolEntryInformation)(windows_core::Interface::as_raw(self), id, info).ok() } pub unsafe fn GetSymbolEntryString(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryString)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryStringWide(&self, id: *const DEBUG_MODULE_AND_ID, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryStringWide)(windows_core::Interface::as_raw(self), id, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryOffsetRegions(&self, id: *const DEBUG_MODULE_AND_ID, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSymbolEntryOffsetRegions)(windows_core::Interface::as_raw(self), id, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSymbolEntryBySymbolEntry(&self, fromid: *const DEBUG_MODULE_AND_ID, flags: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); (windows_core::Interface::vtable(self).GetSymbolEntryBySymbolEntry)(windows_core::Interface::as_raw(self), fromid, flags, &mut result__).map(|| result__) } pub unsafe fn GetSourceEntriesByOffset(&self, offset: u64, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByOffset)(windows_core::Interface::as_raw(self), offset, flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLine(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLine)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntriesByLineWide(&self, line: u32, file: P0, flags: u32, entries: Option<&mut [DEBUG_SYMBOL_SOURCE_ENTRY]>, entriesavail: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntriesByLineWide)(windows_core::Interface::as_raw(self), line, file.param().abi(), flags, core::mem::transmute(entries.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), entries.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(entriesavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryString(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u8]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryString)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryStringWide(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, which: u32, buffer: Option<&mut [u16]>, stringsize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryStringWide)(windows_core::Interface::as_raw(self), entry, which, core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(stringsize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryOffsetRegions(&self, entry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, regions: Option<&mut [DEBUG_OFFSET_REGION]>, regionsavail: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceEntryOffsetRegions)(windows_core::Interface::as_raw(self), entry, flags, core::mem::transmute(regions.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), regions.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(regionsavail.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetSourceEntryBySourceEntry(&self, fromentry: *const DEBUG_SYMBOL_SOURCE_ENTRY, flags: u32, toentry: *mut DEBUG_SYMBOL_SOURCE_ENTRY) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetSourceEntryBySourceEntry)(windows_core::Interface::as_raw(self), fromentry, flags, toentry).ok() } pub unsafe fn GetScopeEx(&self, instructionoffset: Option<*mut u64>, scopeframe: Option<*mut DEBUG_STACK_FRAME_EX>, scopecontext: Option<*mut core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(std::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null_mut())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).GetScopeEx)(windows_core::Interface::as_raw(self), core::mem::transmute(instructionoffset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopeframe.unwrap_or(core::ptr::null_mut())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null_mut())), scopecontextsize).ok() } pub unsafe fn SetScopeEx(&self, instructionoffset: u64, scopeframe: Option<*const DEBUG_STACK_FRAME_EX>, scopecontext: Option<*const core::ffi::c_void>, scopecontextsize: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(std::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(std::ptr::null())), scopecontextsize).ok() + (windows_core::Interface::vtable(self).SetScopeEx)(windows_core::Interface::as_raw(self), instructionoffset, core::mem::transmute(scopeframe.unwrap_or(core::ptr::null())), core::mem::transmute(scopecontext.unwrap_or(core::ptr::null())), scopecontextsize).ok() } pub unsafe fn GetNameByInlineContext(&self, offset: u64, inlinecontext: u32, namebuffer: Option<&mut [u8]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetNameByInlineContextWide(&self, offset: u64, inlinecontext: u32, namebuffer: Option<&mut [u16]>, namesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNameByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(namebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), namebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContext(&self, offset: u64, inlinecontext: u32, line: Option<*mut u32>, filebuffer: Option<&mut [u8]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByInlineContext)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLineByInlineContextWide(&self, offset: u64, inlinecontext: u32, line: Option<*mut u32>, filebuffer: Option<&mut [u16]>, filesize: Option<*mut u32>, displacement: Option<*mut u64>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(std::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(std::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLineByInlineContextWide)(windows_core::Interface::as_raw(self), offset, inlinecontext, core::mem::transmute(line.unwrap_or(core::ptr::null_mut())), core::mem::transmute(filebuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filebuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(filesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn OutputSymbolByInlineContext(&self, outputcontrol: u32, flags: u32, offset: u64, inlinecontext: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OutputSymbolByInlineContext)(windows_core::Interface::as_raw(self), outputcontrol, flags, offset, inlinecontext).ok() @@ -16441,7 +16573,7 @@ impl IDebugSystemObjects { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total, largestprocess).ok() } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16484,7 +16616,7 @@ impl IDebugSystemObjects { (windows_core::Interface::vtable(self).GetNumberProcesses)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16519,7 +16651,7 @@ impl IDebugSystemObjects { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), handle, &mut result__).map(|| result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -16594,7 +16726,7 @@ impl IDebugSystemObjects2 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total, largestprocess).ok() } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16637,7 +16769,7 @@ impl IDebugSystemObjects2 { (windows_core::Interface::vtable(self).GetNumberProcesses)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16672,7 +16804,7 @@ impl IDebugSystemObjects2 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), handle, &mut result__).map(|| result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16770,7 +16902,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total, largestprocess).ok() } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16813,7 +16945,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetNumberProcesses)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16848,7 +16980,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), handle, &mut result__).map(|| result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -16898,7 +17030,7 @@ impl IDebugSystemObjects3 { (windows_core::Interface::vtable(self).GetSystemByServer)(windows_core::Interface::as_raw(self), server, &mut result__).map(|| result__) } pub unsafe fn GetCurrentSystemServerName(&self, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentSystemServerName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentSystemServerName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -16987,7 +17119,7 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetTotalNumberThreads)(windows_core::Interface::as_raw(self), total, largestprocess).ok() } pub unsafe fn GetThreadIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThreadIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetThreadIdByProcessor(&self, processor: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17030,7 +17162,7 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetNumberProcesses)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetProcessIdsByIndex(&self, start: u32, count: u32, ids: Option<*mut u32>, sysids: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(std::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetProcessIdsByIndex)(windows_core::Interface::as_raw(self), start, count, core::mem::transmute(ids.unwrap_or(core::ptr::null_mut())), core::mem::transmute(sysids.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessDataOffset(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17065,7 +17197,7 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetProcessIdByHandle)(windows_core::Interface::as_raw(self), handle, &mut result__).map(|| result__) } pub unsafe fn GetCurrentProcessExecutableName(&self, buffer: Option<&mut [u8]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentProcessExecutableName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessUpTime(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17115,13 +17247,13 @@ impl IDebugSystemObjects4 { (windows_core::Interface::vtable(self).GetSystemByServer)(windows_core::Interface::as_raw(self), server, &mut result__).map(|| result__) } pub unsafe fn GetCurrentSystemServerName(&self, buffer: Option<&mut [u8]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentSystemServerName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentSystemServerName)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentProcessExecutableNameWide(&self, buffer: Option<&mut [u16]>, exesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentProcessExecutableNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentProcessExecutableNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(exesize.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetCurrentSystemServerNameWide(&self, buffer: Option<&mut [u16]>, namesize: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCurrentSystemServerNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCurrentSystemServerNameWide)(windows_core::Interface::as_raw(self), core::mem::transmute(buffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), buffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namesize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -17186,7 +17318,7 @@ impl IDynamicConceptProviderConcept { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(std::ptr::null_mut())), hasconcept).ok() + (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), contextobject.param().abi(), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::ptr::null_mut())), hasconcept).ok() } pub unsafe fn SetConcept(&self, contextobject: P0, conceptid: *const windows_core::GUID, conceptinterface: P1, conceptmetadata: P2) -> windows_core::Result<()> where @@ -17235,7 +17367,7 @@ impl IDynamicKeyProviderConcept { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), contextobject.param().abi(), key.param().abi(), core::mem::transmute(keyvalue.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut())), core::mem::transmute(haskey.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), contextobject.param().abi(), key.param().abi(), core::mem::transmute(keyvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(haskey.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKey(&self, contextobject: P0, key: P1, keyvalue: P2, metadata: P3) -> windows_core::Result<()> where @@ -17322,7 +17454,7 @@ impl IIndexableConcept { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), contextobject.param().abi(), indexers.len().try_into().unwrap(), core::mem::transmute(indexers.as_ptr()), core::mem::transmute(object), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetAt)(windows_core::Interface::as_raw(self), contextobject.param().abi(), indexers.len().try_into().unwrap(), core::mem::transmute(indexers.as_ptr()), core::mem::transmute(object), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetAt(&self, contextobject: P0, indexers: &[Option], value: P1) -> windows_core::Result<()> where @@ -17382,7 +17514,7 @@ impl IKeyEnumerator { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetNext(&self, key: *mut windows_core::BSTR, value: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(key), core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(key), core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -17404,7 +17536,7 @@ impl IKeyStore { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -17418,7 +17550,7 @@ impl IKeyStore { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -17453,7 +17585,7 @@ impl IModelIterator { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetNext(&self, object: *mut Option, indexers: Option<&mut [Option]>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(object), indexers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(indexers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(object), indexers.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(indexers.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -17484,10 +17616,10 @@ impl IModelKeyReference { (windows_core::Interface::vtable(self).GetContextObject)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetKey(&self, object: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetKeyValue(&self, object: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKey(&self, object: P0, metadata: P1) -> windows_core::Result<()> where @@ -17548,7 +17680,7 @@ impl IModelMethod { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Call)(windows_core::Interface::as_raw(self), pcontextobject.param().abi(), pparguments.len().try_into().unwrap(), core::mem::transmute(pparguments.as_ptr()), core::mem::transmute(ppresult), core::mem::transmute(ppmetadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Call)(windows_core::Interface::as_raw(self), pcontextobject.param().abi(), pparguments.len().try_into().unwrap(), core::mem::transmute(pparguments.as_ptr()), core::mem::transmute(ppresult), core::mem::transmute(ppmetadata.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -17587,7 +17719,7 @@ impl IModelObject { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKeyValue)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKeyValue(&self, key: P0, object: P1) -> windows_core::Result<()> where @@ -17620,7 +17752,7 @@ impl IModelObject { (windows_core::Interface::vtable(self).TryCastToRuntimeType)(windows_core::Interface::as_raw(self), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetConcept(&self, conceptid: *const windows_core::GUID, conceptinterface: *mut Option, conceptmetadata: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConcept)(windows_core::Interface::as_raw(self), conceptid, core::mem::transmute(conceptinterface), core::mem::transmute(conceptmetadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetLocation(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -17657,13 +17789,13 @@ impl IModelObject { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKey)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetKeyReference(&self, key: P0, objectreference: Option<*mut Option>, metadata: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetKeyReference)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(objectreference.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetKeyReference)(windows_core::Interface::as_raw(self), key.param().abi(), core::mem::transmute(objectreference.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadata.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetKey(&self, key: P0, object: P1, metadata: P2) -> windows_core::Result<()> where @@ -17723,7 +17855,7 @@ impl IModelObject { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), other.param().abi(), core::mem::transmute(ppresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Compare)(windows_core::Interface::as_raw(self), other.param().abi(), core::mem::transmute(ppresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsEqualTo(&self, other: P0) -> windows_core::Result where @@ -17843,7 +17975,7 @@ impl IRawEnumerator { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetNext(&self, name: Option<*mut windows_core::BSTR>, kind: Option<*mut SymbolKind>, value: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(name.unwrap_or(std::ptr::null_mut())), core::mem::transmute(kind.unwrap_or(std::ptr::null_mut())), core::mem::transmute(value.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetNext)(windows_core::Interface::as_raw(self), core::mem::transmute(name.unwrap_or(core::ptr::null_mut())), core::mem::transmute(kind.unwrap_or(core::ptr::null_mut())), core::mem::transmute(value.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] 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 9e90c292c3..cbca75f865 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 @@ -86,7 +86,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn DbgHelpCreateUserDump(filename : windows_core::PCSTR, callback : PDBGHELP_CREATE_USER_DUMP_CALLBACK, userdata : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - DbgHelpCreateUserDump(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(std::ptr::null()))) + DbgHelpCreateUserDump(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DbgHelpCreateUserDumpW(filename: P0, callback: PDBGHELP_CREATE_USER_DUMP_CALLBACK, userdata: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::BOOL @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn DbgHelpCreateUserDumpW(filename : windows_core::PCWSTR, callback : PDBGHELP_CREATE_USER_DUMP_CALLBACK, userdata : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - DbgHelpCreateUserDumpW(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(std::ptr::null()))) + DbgHelpCreateUserDumpW(filename.param().abi(), callback, core::mem::transmute(userdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DebugActiveProcess(dwprocessid: u32) -> windows_core::Result<()> { @@ -130,7 +130,7 @@ where #[inline] pub unsafe fn DecodePointer(ptr: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn DecodePointer(ptr : *const core::ffi::c_void) -> *mut core::ffi::c_void); - DecodePointer(core::mem::transmute(ptr.unwrap_or(std::ptr::null()))) + DecodePointer(core::mem::transmute(ptr.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DecodeRemotePointer(processhandle: P0, ptr: Option<*const core::ffi::c_void>, decodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -138,17 +138,17 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-util-l1-1-1.dll" "system" fn DecodeRemotePointer(processhandle : super::super::super::Foundation:: HANDLE, ptr : *const core::ffi::c_void, decodedptr : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DecodeRemotePointer(processhandle.param().abi(), core::mem::transmute(ptr.unwrap_or(std::ptr::null())), decodedptr).ok() + DecodeRemotePointer(processhandle.param().abi(), core::mem::transmute(ptr.unwrap_or(core::ptr::null())), decodedptr).ok() } #[inline] pub unsafe fn DecodeSystemPointer(ptr: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn DecodeSystemPointer(ptr : *const core::ffi::c_void) -> *mut core::ffi::c_void); - DecodeSystemPointer(core::mem::transmute(ptr.unwrap_or(std::ptr::null()))) + DecodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EncodePointer(ptr: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn EncodePointer(ptr : *const core::ffi::c_void) -> *mut core::ffi::c_void); - EncodePointer(core::mem::transmute(ptr.unwrap_or(std::ptr::null()))) + EncodePointer(core::mem::transmute(ptr.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EncodeRemotePointer(processhandle: P0, ptr: Option<*const core::ffi::c_void>, encodedptr: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -156,12 +156,12 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-util-l1-1-1.dll" "system" fn EncodeRemotePointer(processhandle : super::super::super::Foundation:: HANDLE, ptr : *const core::ffi::c_void, encodedptr : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - EncodeRemotePointer(processhandle.param().abi(), core::mem::transmute(ptr.unwrap_or(std::ptr::null())), encodedptr).ok() + EncodeRemotePointer(processhandle.param().abi(), core::mem::transmute(ptr.unwrap_or(core::ptr::null())), encodedptr).ok() } #[inline] pub unsafe fn EncodeSystemPointer(ptr: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn EncodeSystemPointer(ptr : *const core::ffi::c_void) -> *mut core::ffi::c_void); - EncodeSystemPointer(core::mem::transmute(ptr.unwrap_or(std::ptr::null()))) + EncodeSystemPointer(core::mem::transmute(ptr.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EnumDirTree(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: windows_core::PSTR, cb: PENUMDIRTREE_CALLBACK, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -171,7 +171,7 @@ where P2: windows_core::Param, { 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.param().abi(), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer), cb, core::mem::transmute(data.unwrap_or(std::ptr::null()))).ok() + EnumDirTree(hprocess.param().abi(), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer), cb, core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumDirTreeW(hprocess: P0, rootpath: P1, inputpathname: P2, outputpathbuffer: windows_core::PWSTR, cb: PENUMDIRTREE_CALLBACKW, data: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -181,7 +181,7 @@ where P2: windows_core::Param, { 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.param().abi(), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer), cb, core::mem::transmute(data.unwrap_or(std::ptr::null()))).ok() + EnumDirTreeW(hprocess.param().abi(), rootpath.param().abi(), inputpathname.param().abi(), core::mem::transmute(outputpathbuffer), cb, core::mem::transmute(data.unwrap_or(core::ptr::null()))).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -190,7 +190,7 @@ where P0: windows_core::Param, { 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.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + EnumerateLoadedModules(hprocess.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumerateLoadedModules64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -198,7 +198,7 @@ where P0: windows_core::Param, { 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.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + EnumerateLoadedModules64(hprocess.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumerateLoadedModulesEx(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -206,7 +206,7 @@ where P0: windows_core::Param, { 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.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + EnumerateLoadedModulesEx(hprocess.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumerateLoadedModulesExW(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -214,7 +214,7 @@ where P0: windows_core::Param, { 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.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + EnumerateLoadedModulesExW(hprocess.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnumerateLoadedModulesW64(hprocess: P0, enumloadedmodulescallback: PENUMLOADED_MODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -222,7 +222,7 @@ where P0: windows_core::Param, { 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.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + EnumerateLoadedModulesW64(hprocess.param().abi(), enumloadedmodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn FatalAppExitA(uaction: u32, lpmessagetext: P0) @@ -262,7 +262,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindDebugInfoFileEx(filename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, debugfilepath : windows_core::PSTR, callback : PFIND_DEBUG_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = FindDebugInfoFileEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(std::ptr::null()))); + let result__ = FindDebugInfoFileEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -272,7 +272,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindDebugInfoFileExW(filename : windows_core::PCWSTR, symbolpath : windows_core::PCWSTR, debugfilepath : windows_core::PWSTR, callback : PFIND_DEBUG_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = FindDebugInfoFileExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(std::ptr::null()))); + let result__ = FindDebugInfoFileExW(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -292,7 +292,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn FindExecutableImageEx(filename : windows_core::PCSTR, symbolpath : windows_core::PCSTR, imagefilepath : windows_core::PSTR, callback : PFIND_EXE_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = FindExecutableImageEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), callback, core::mem::transmute(callerdata.unwrap_or(std::ptr::null()))); + let result__ = FindExecutableImageEx(filename.param().abi(), symbolpath.param().abi(), core::mem::transmute(imagefilepath), callback, core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -331,17 +331,17 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpbaseaddress.unwrap_or(std::ptr::null())), dwsize).ok() + FlushInstructionCache(hprocess.param().abi(), core::mem::transmute(lpbaseaddress.unwrap_or(core::ptr::null())), dwsize).ok() } #[inline] pub unsafe fn FormatMessageA(dwflags: FORMAT_MESSAGE_OPTIONS, lpsource: Option<*const core::ffi::c_void>, dwmessageid: u32, dwlanguageid: u32, lpbuffer: windows_core::PSTR, nsize: u32, arguments: Option<*const *const i8>) -> u32 { windows_targets::link!("kernel32.dll" "system" fn FormatMessageA(dwflags : FORMAT_MESSAGE_OPTIONS, lpsource : *const core::ffi::c_void, dwmessageid : u32, dwlanguageid : u32, lpbuffer : windows_core::PSTR, nsize : u32, arguments : *const *const i8) -> u32); - FormatMessageA(dwflags, core::mem::transmute(lpsource.unwrap_or(std::ptr::null())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(std::ptr::null()))) + FormatMessageA(dwflags, core::mem::transmute(lpsource.unwrap_or(core::ptr::null())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn FormatMessageW(dwflags: FORMAT_MESSAGE_OPTIONS, lpsource: Option<*const core::ffi::c_void>, dwmessageid: u32, dwlanguageid: u32, lpbuffer: windows_core::PWSTR, nsize: u32, arguments: Option<*const *const i8>) -> u32 { windows_targets::link!("kernel32.dll" "system" fn FormatMessageW(dwflags : FORMAT_MESSAGE_OPTIONS, lpsource : *const core::ffi::c_void, dwmessageid : u32, dwlanguageid : u32, lpbuffer : windows_core::PWSTR, nsize : u32, arguments : *const *const i8) -> u32); - FormatMessageW(dwflags, core::mem::transmute(lpsource.unwrap_or(std::ptr::null())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(std::ptr::null()))) + FormatMessageW(dwflags, core::mem::transmute(lpsource.unwrap_or(core::ptr::null())), dwmessageid, dwlanguageid, core::mem::transmute(lpbuffer), nsize, core::mem::transmute(arguments.unwrap_or(core::ptr::null()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -444,7 +444,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn ImageDirectoryEntryToDataEx(base : *const core::ffi::c_void, mappedasimage : super::super::super::Foundation:: BOOLEAN, directoryentry : IMAGE_DIRECTORY_ENTRY, size : *mut u32, foundheader : *mut *mut IMAGE_SECTION_HEADER) -> *mut core::ffi::c_void); - ImageDirectoryEntryToDataEx(base, mappedasimage.param().abi(), directoryentry, size, core::mem::transmute(foundheader.unwrap_or(std::ptr::null_mut()))) + ImageDirectoryEntryToDataEx(base, mappedasimage.param().abi(), directoryentry, size, core::mem::transmute(foundheader.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ImageEnumerateCertificates(filehandle: P0, typefilter: u16, certificatecount: *mut u32, indices: Option<&mut [u32]>) -> windows_core::Result<()> @@ -531,14 +531,14 @@ pub unsafe fn ImageRvaToSection(ntheaders: *const IMAGE_NT_HEADERS32, base: *con #[inline] pub unsafe fn ImageRvaToVa(ntheaders: *const IMAGE_NT_HEADERS64, base: *const core::ffi::c_void, rva: u32, lastrvasection: Option<*const *const IMAGE_SECTION_HEADER>) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageRvaToVa(ntheaders : *const IMAGE_NT_HEADERS64, base : *const core::ffi::c_void, rva : u32, lastrvasection : *const *const IMAGE_SECTION_HEADER) -> *mut core::ffi::c_void); - ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(std::ptr::null()))) + ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(core::ptr::null()))) } #[cfg(target_arch = "x86")] #[cfg(feature = "Win32_System_SystemInformation")] #[inline] pub unsafe fn ImageRvaToVa(ntheaders: *const IMAGE_NT_HEADERS32, base: *const core::ffi::c_void, rva: u32, lastrvasection: Option<*const *const IMAGE_SECTION_HEADER>) -> *mut core::ffi::c_void { windows_targets::link!("dbghelp.dll" "system" fn ImageRvaToVa(ntheaders : *const IMAGE_NT_HEADERS32, base : *const core::ffi::c_void, rva : u32, lastrvasection : *const *const IMAGE_SECTION_HEADER) -> *mut core::ffi::c_void); - ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(std::ptr::null()))) + ImageRvaToVa(ntheaders, base, rva, core::mem::transmute(lastrvasection.unwrap_or(core::ptr::null()))) } #[cfg(all(feature = "Win32_System_Kernel", feature = "Win32_System_SystemInformation"))] #[inline] @@ -560,13 +560,13 @@ pub unsafe fn ImagehlpApiVersionEx(appversion: *const API_VERSION) -> *mut API_V #[inline] pub unsafe fn InitializeContext(buffer: Option<*mut core::ffi::c_void>, contextflags: CONTEXT_FLAGS, 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 : CONTEXT_FLAGS, 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).ok() + InitializeContext(core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), contextflags, context, contextlength).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn InitializeContext2(buffer: Option<*mut core::ffi::c_void>, contextflags: CONTEXT_FLAGS, 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 : CONTEXT_FLAGS, 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).ok() + InitializeContext2(core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), contextflags, context, contextlength, xstatecompactionmask).ok() } #[inline] pub unsafe fn IsDebuggerPresent() -> super::super::super::Foundation::BOOL { @@ -578,7 +578,7 @@ pub unsafe fn IsDebuggerPresent() -> super::super::super::Foundation::BOOL { #[inline] pub unsafe fn LocateXStateFeature(context: *const CONTEXT, featureid: u32, length: Option<*mut u32>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn LocateXStateFeature(context : *const CONTEXT, featureid : u32, length : *mut u32) -> *mut core::ffi::c_void); - LocateXStateFeature(context, featureid, core::mem::transmute(length.unwrap_or(std::ptr::null_mut()))) + LocateXStateFeature(context, featureid, core::mem::transmute(length.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MakeSureDirectoryPathExists(dirpath: P0) -> windows_core::Result<()> @@ -625,7 +625,7 @@ pub unsafe fn MessageBeep(utype: super::super::super::UI::WindowsAndMessaging::M #[inline] pub unsafe fn MiniDumpReadDumpStream(baseofdump: *const core::ffi::c_void, streamnumber: u32, dir: *mut *mut MINIDUMP_DIRECTORY, streampointer: *mut *mut core::ffi::c_void, streamsize: Option<*mut u32>) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn MiniDumpReadDumpStream(baseofdump : *const core::ffi::c_void, streamnumber : u32, dir : *mut *mut MINIDUMP_DIRECTORY, streampointer : *mut *mut core::ffi::c_void, streamsize : *mut u32) -> super::super::super::Foundation:: BOOL); - MiniDumpReadDumpStream(baseofdump, streamnumber, dir, streampointer, core::mem::transmute(streamsize.unwrap_or(std::ptr::null_mut()))) + MiniDumpReadDumpStream(baseofdump, streamnumber, dir, streampointer, core::mem::transmute(streamsize.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_System_Kernel", feature = "Win32_System_Memory"))] #[inline] @@ -635,7 +635,7 @@ where P1: windows_core::Param, { 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.param().abi(), processid, hfile.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() + MiniDumpWriteDump(hprocess.param().abi(), processid, hfile.param().abi(), dumptype, core::mem::transmute(exceptionparam.unwrap_or(core::ptr::null())), core::mem::transmute(userstreamparam.unwrap_or(core::ptr::null())), core::mem::transmute(callbackparam.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn OpenThreadWaitChainSession(flags: OPEN_THREAD_WAIT_CHAIN_SESSION_FLAGS, callback: PWAITCHAINCALLBACK) -> *mut core::ffi::c_void { @@ -667,7 +667,7 @@ pub unsafe fn RaiseException(dwexceptioncode: u32, dwexceptionflags: u32, lpargu #[inline] pub unsafe fn RaiseFailFastException(pexceptionrecord: Option<*const EXCEPTION_RECORD>, pcontextrecord: Option<*const CONTEXT>, dwflags: u32) { windows_targets::link!("kernel32.dll" "system" fn RaiseFailFastException(pexceptionrecord : *const EXCEPTION_RECORD, pcontextrecord : *const CONTEXT, dwflags : u32)); - RaiseFailFastException(core::mem::transmute(pexceptionrecord.unwrap_or(std::ptr::null())), core::mem::transmute(pcontextrecord.unwrap_or(std::ptr::null())), dwflags) + RaiseFailFastException(core::mem::transmute(pexceptionrecord.unwrap_or(core::ptr::null())), core::mem::transmute(pcontextrecord.unwrap_or(core::ptr::null())), dwflags) } #[inline] pub unsafe fn RangeMapAddPeImageSections(rmaphandle: *const core::ffi::c_void, imagename: P0, mappedimage: *const core::ffi::c_void, mappingbytes: u32, imagebase: u64, usertag: u64, mappingflags: u32) -> super::super::super::Foundation::BOOL @@ -685,12 +685,12 @@ pub unsafe fn RangeMapCreate() -> *mut core::ffi::c_void { #[inline] pub unsafe fn RangeMapFree(rmaphandle: Option<*const core::ffi::c_void>) { windows_targets::link!("dbghelp.dll" "system" fn RangeMapFree(rmaphandle : *const core::ffi::c_void)); - RangeMapFree(core::mem::transmute(rmaphandle.unwrap_or(std::ptr::null()))) + RangeMapFree(core::mem::transmute(rmaphandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RangeMapRead(rmaphandle: *const core::ffi::c_void, offset: u64, buffer: *mut core::ffi::c_void, requestbytes: u32, flags: u32, donebytes: Option<*mut u32>) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn RangeMapRead(rmaphandle : *const core::ffi::c_void, offset : u64, buffer : *mut core::ffi::c_void, requestbytes : u32, flags : u32, donebytes : *mut u32) -> super::super::super::Foundation:: BOOL); - RangeMapRead(rmaphandle, offset, buffer, requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(std::ptr::null_mut()))) + RangeMapRead(rmaphandle, offset, buffer, requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RangeMapRemove(rmaphandle: *const core::ffi::c_void, usertag: u64) -> super::super::super::Foundation::BOOL { @@ -700,7 +700,7 @@ pub unsafe fn RangeMapRemove(rmaphandle: *const core::ffi::c_void, usertag: u64) #[inline] pub unsafe fn RangeMapWrite(rmaphandle: *const core::ffi::c_void, offset: u64, buffer: *const core::ffi::c_void, requestbytes: u32, flags: u32, donebytes: Option<*mut u32>) -> super::super::super::Foundation::BOOL { windows_targets::link!("dbghelp.dll" "system" fn RangeMapWrite(rmaphandle : *const core::ffi::c_void, offset : u64, buffer : *const core::ffi::c_void, requestbytes : u32, flags : u32, donebytes : *mut u32) -> super::super::super::Foundation:: BOOL); - RangeMapWrite(rmaphandle, offset, buffer, requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(std::ptr::null_mut()))) + RangeMapWrite(rmaphandle, offset, buffer, requestbytes, flags, core::mem::transmute(donebytes.unwrap_or(core::ptr::null_mut()))) } #[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) -> windows_core::Result<()> @@ -732,7 +732,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpbaseaddress, lpbuffer, nsize, core::mem::transmute(lpnumberofbytesread.unwrap_or(std::ptr::null_mut()))).ok() + ReadProcessMemory(hprocess.param().abi(), lpbaseaddress, lpbuffer, nsize, core::mem::transmute(lpnumberofbytesread.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RegisterWaitChainCOMCallback(callstatecallback: PCOGETCALLSTATE, activationstatecallback: PCOGETACTIVATIONSTATE) { @@ -806,7 +806,7 @@ pub unsafe fn RtlCaptureContext2(contextrecord: *mut CONTEXT) { #[inline] pub unsafe fn RtlCaptureStackBackTrace(framestoskip: u32, backtrace: &mut [*mut core::ffi::c_void], backtracehash: Option<*mut u32>) -> u16 { windows_targets::link!("kernel32.dll" "system" fn RtlCaptureStackBackTrace(framestoskip : u32, framestocapture : u32, backtrace : *mut *mut core::ffi::c_void, backtracehash : *mut u32) -> u16); - RtlCaptureStackBackTrace(framestoskip, backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), core::mem::transmute(backtracehash.unwrap_or(std::ptr::null_mut()))) + RtlCaptureStackBackTrace(framestoskip, backtrace.len().try_into().unwrap(), core::mem::transmute(backtrace.as_ptr()), core::mem::transmute(backtracehash.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "aarch64")] #[inline] @@ -839,7 +839,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn RtlInstallFunctionTableCallback(tableidentifier : u64, baseaddress : u64, length : u32, callback : PGET_RUNTIME_FUNCTION_CALLBACK, context : *const core::ffi::c_void, outofprocesscallbackdll : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOLEAN); - RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), outofprocesscallbackdll.param().abi()) + RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), outofprocesscallbackdll.param().abi()) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -848,19 +848,19 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn RtlInstallFunctionTableCallback(tableidentifier : u64, baseaddress : u64, length : u32, callback : PGET_RUNTIME_FUNCTION_CALLBACK, context : *const core::ffi::c_void, outofprocesscallbackdll : windows_core::PCWSTR) -> super::super::super::Foundation:: BOOLEAN); - RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), outofprocesscallbackdll.param().abi()) + RtlInstallFunctionTableCallback(tableidentifier, baseaddress, length, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), outofprocesscallbackdll.param().abi()) } #[cfg(target_arch = "aarch64")] #[inline] pub unsafe fn RtlLookupFunctionEntry(controlpc: usize, imagebase: *mut usize, historytable: Option<*mut UNWIND_HISTORY_TABLE>) -> *mut IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY { windows_targets::link!("kernel32.dll" "system" fn RtlLookupFunctionEntry(controlpc : usize, imagebase : *mut usize, historytable : *mut UNWIND_HISTORY_TABLE) -> *mut IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY); - RtlLookupFunctionEntry(controlpc, imagebase, core::mem::transmute(historytable.unwrap_or(std::ptr::null_mut()))) + RtlLookupFunctionEntry(controlpc, imagebase, core::mem::transmute(historytable.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn RtlLookupFunctionEntry(controlpc: u64, imagebase: *mut u64, historytable: Option<*mut UNWIND_HISTORY_TABLE>) -> *mut IMAGE_RUNTIME_FUNCTION_ENTRY { windows_targets::link!("kernel32.dll" "system" fn RtlLookupFunctionEntry(controlpc : u64, imagebase : *mut u64, historytable : *mut UNWIND_HISTORY_TABLE) -> *mut IMAGE_RUNTIME_FUNCTION_ENTRY); - RtlLookupFunctionEntry(controlpc, imagebase, core::mem::transmute(historytable.unwrap_or(std::ptr::null_mut()))) + RtlLookupFunctionEntry(controlpc, imagebase, core::mem::transmute(historytable.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlPcToFileHeader(pcvalue: *const core::ffi::c_void, baseofimage: *mut *mut core::ffi::c_void) -> *mut core::ffi::c_void { @@ -876,33 +876,33 @@ pub unsafe fn RtlRaiseException(exceptionrecord: *const EXCEPTION_RECORD) { #[inline] pub unsafe fn RtlRestoreContext(contextrecord: *const CONTEXT, exceptionrecord: Option<*const EXCEPTION_RECORD>) { windows_targets::link!("kernel32.dll" "cdecl" fn RtlRestoreContext(contextrecord : *const CONTEXT, exceptionrecord : *const EXCEPTION_RECORD)); - RtlRestoreContext(contextrecord, core::mem::transmute(exceptionrecord.unwrap_or(std::ptr::null()))) + RtlRestoreContext(contextrecord, core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RtlUnwind(targetframe: Option<*const core::ffi::c_void>, targetip: Option<*const core::ffi::c_void>, exceptionrecord: Option<*const EXCEPTION_RECORD>, returnvalue: *const core::ffi::c_void) { windows_targets::link!("kernel32.dll" "system" fn RtlUnwind(targetframe : *const core::ffi::c_void, targetip : *const core::ffi::c_void, exceptionrecord : *const EXCEPTION_RECORD, returnvalue : *const core::ffi::c_void)); - RtlUnwind(core::mem::transmute(targetframe.unwrap_or(std::ptr::null())), core::mem::transmute(targetip.unwrap_or(std::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(std::ptr::null())), returnvalue) + RtlUnwind(core::mem::transmute(targetframe.unwrap_or(core::ptr::null())), core::mem::transmute(targetip.unwrap_or(core::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null())), returnvalue) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlUnwindEx(targetframe: Option<*const core::ffi::c_void>, targetip: Option<*const core::ffi::c_void>, exceptionrecord: Option<*const EXCEPTION_RECORD>, returnvalue: *const core::ffi::c_void, contextrecord: *const CONTEXT, historytable: Option<*const UNWIND_HISTORY_TABLE>) { windows_targets::link!("kernel32.dll" "system" fn RtlUnwindEx(targetframe : *const core::ffi::c_void, targetip : *const core::ffi::c_void, exceptionrecord : *const EXCEPTION_RECORD, returnvalue : *const core::ffi::c_void, contextrecord : *const CONTEXT, historytable : *const UNWIND_HISTORY_TABLE)); - RtlUnwindEx(core::mem::transmute(targetframe.unwrap_or(std::ptr::null())), core::mem::transmute(targetip.unwrap_or(std::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(std::ptr::null())), returnvalue, contextrecord, core::mem::transmute(historytable.unwrap_or(std::ptr::null()))) + RtlUnwindEx(core::mem::transmute(targetframe.unwrap_or(core::ptr::null())), core::mem::transmute(targetip.unwrap_or(core::ptr::null())), core::mem::transmute(exceptionrecord.unwrap_or(core::ptr::null())), returnvalue, contextrecord, core::mem::transmute(historytable.unwrap_or(core::ptr::null()))) } #[cfg(target_arch = "aarch64")] #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlVirtualUnwind(handlertype: RTL_VIRTUAL_UNWIND_HANDLER_TYPE, imagebase: usize, controlpc: usize, functionentry: *const IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, contextrecord: *mut CONTEXT, handlerdata: *mut *mut core::ffi::c_void, establisherframe: *mut usize, contextpointers: Option<*mut KNONVOLATILE_CONTEXT_POINTERS>) -> super::super::Kernel::EXCEPTION_ROUTINE { windows_targets::link!("kernel32.dll" "system" fn RtlVirtualUnwind(handlertype : RTL_VIRTUAL_UNWIND_HANDLER_TYPE, imagebase : usize, controlpc : usize, functionentry : *const IMAGE_ARM64_RUNTIME_FUNCTION_ENTRY, contextrecord : *mut CONTEXT, handlerdata : *mut *mut core::ffi::c_void, establisherframe : *mut usize, contextpointers : *mut KNONVOLATILE_CONTEXT_POINTERS) -> super::super::Kernel:: EXCEPTION_ROUTINE); - RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord, handlerdata, establisherframe, core::mem::transmute(contextpointers.unwrap_or(std::ptr::null_mut()))) + RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord, handlerdata, establisherframe, core::mem::transmute(contextpointers.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "arm64ec", target_arch = "x86_64"))] #[cfg(feature = "Win32_System_Kernel")] #[inline] pub unsafe fn RtlVirtualUnwind(handlertype: RTL_VIRTUAL_UNWIND_HANDLER_TYPE, imagebase: u64, controlpc: u64, functionentry: *const IMAGE_RUNTIME_FUNCTION_ENTRY, contextrecord: *mut CONTEXT, handlerdata: *mut *mut core::ffi::c_void, establisherframe: *mut u64, contextpointers: Option<*mut KNONVOLATILE_CONTEXT_POINTERS>) -> super::super::Kernel::EXCEPTION_ROUTINE { windows_targets::link!("kernel32.dll" "system" fn RtlVirtualUnwind(handlertype : RTL_VIRTUAL_UNWIND_HANDLER_TYPE, imagebase : u64, controlpc : u64, functionentry : *const IMAGE_RUNTIME_FUNCTION_ENTRY, contextrecord : *mut CONTEXT, handlerdata : *mut *mut core::ffi::c_void, establisherframe : *mut u64, contextpointers : *mut KNONVOLATILE_CONTEXT_POINTERS) -> super::super::Kernel:: EXCEPTION_ROUTINE); - RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord, handlerdata, establisherframe, core::mem::transmute(contextpointers.unwrap_or(std::ptr::null_mut()))) + RtlVirtualUnwind(handlertype, imagebase, controlpc, functionentry, contextrecord, handlerdata, establisherframe, core::mem::transmute(contextpointers.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SearchTreeForFile(rootpath: P0, inputpathname: P1, outputpathbuffer: windows_core::PSTR) -> windows_core::Result<()> @@ -963,7 +963,7 @@ where #[inline] pub unsafe fn SetThreadErrorMode(dwnewmode: THREAD_ERROR_MODE, lpoldmode: 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()))).ok() + SetThreadErrorMode(dwnewmode, core::mem::transmute(lpoldmode.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1110,7 +1110,7 @@ where P2: windows_core::Param, { 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.param().abi(), base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumLines(hprocess.param().abi(), base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumLinesW(hprocess: P0, base: u64, obj: P1, file: P2, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1120,7 +1120,7 @@ where P2: windows_core::Param, { 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.param().abi(), base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumLinesW(hprocess.param().abi(), base, obj.param().abi(), file.param().abi(), enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumProcesses(enumprocessescallback: PSYM_ENUMPROCESSES_CALLBACK, usercontext: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -1142,7 +1142,7 @@ where P1: windows_core::Param, { 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.param().abi(), modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSourceFiles(hprocess.param().abi(), modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSourceFilesW(hprocess: P0, modbase: u64, mask: P1, cbsrcfiles: PSYM_ENUMSOURCEFILES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1151,7 +1151,7 @@ where P1: windows_core::Param, { 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.param().abi(), modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSourceFilesW(hprocess.param().abi(), modbase, mask.param().abi(), cbsrcfiles, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSourceLines(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1161,7 +1161,7 @@ where P2: windows_core::Param, { 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.param().abi(), base, obj.param().abi(), file.param().abi(), line, flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSourceLines(hprocess.param().abi(), base, obj.param().abi(), file.param().abi(), line, flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSourceLinesW(hprocess: P0, base: u64, obj: P1, file: P2, line: u32, flags: u32, enumlinescallback: PSYM_ENUMLINES_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1171,7 +1171,7 @@ where P2: windows_core::Param, { 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.param().abi(), base, obj.param().abi(), file.param().abi(), line, flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSourceLinesW(hprocess.param().abi(), base, obj.param().abi(), file.param().abi(), line, flags, enumlinescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSym(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> super::super::super::Foundation::BOOL @@ -1179,7 +1179,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymEnumSym(hprocess : super::super::super::Foundation:: HANDLE, baseofdll : u64, enumsymbolscallback : PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext : *const core::ffi::c_void) -> super::super::super::Foundation:: BOOL); - SymEnumSym(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))) + SymEnumSym(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SymEnumSymbols(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1188,7 +1188,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSymbols(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSymbolsEx(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> @@ -1197,7 +1197,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null())), options).ok() + SymEnumSymbolsEx(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), options).ok() } #[inline] pub unsafe fn SymEnumSymbolsExW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> @@ -1206,7 +1206,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null())), options).ok() + SymEnumSymbolsExW(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), options).ok() } #[inline] pub unsafe fn SymEnumSymbolsForAddr(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1214,7 +1214,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSymbolsForAddr(hprocess.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSymbolsForAddrW(hprocess: P0, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1222,7 +1222,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSymbolsForAddrW(hprocess.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumSymbolsW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1231,7 +1231,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumSymbolsW(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumTypes(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1239,7 +1239,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumTypes(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumTypesByName(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACK, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1248,7 +1248,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumTypesByName(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumTypesByNameW(hprocess: P0, baseofdll: u64, mask: P1, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1257,7 +1257,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumTypesByNameW(hprocess.param().abi(), baseofdll, mask.param().abi(), enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumTypesW(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1265,7 +1265,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumTypesW(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -1274,7 +1274,7 @@ where P0: windows_core::Param, { 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.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateModules(hprocess.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumerateModules64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1282,7 +1282,7 @@ where P0: windows_core::Param, { 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.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateModules64(hprocess.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumerateModulesW64(hprocess: P0, enummodulescallback: PSYM_ENUMMODULES_CALLBACKW64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1290,7 +1290,7 @@ where P0: windows_core::Param, { 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.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateModulesW64(hprocess.param().abi(), enummodulescallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -1299,7 +1299,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateSymbols(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumerateSymbols64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1307,7 +1307,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateSymbols64(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -1316,7 +1316,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateSymbolsW(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymEnumerateSymbolsW64(hprocess: P0, baseofdll: u64, enumsymbolscallback: PSYM_ENUMSYMBOLS_CALLBACK64W, usercontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1324,7 +1324,7 @@ where P0: windows_core::Param, { 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.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymEnumerateSymbolsW64(hprocess.param().abi(), baseofdll, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymFindDebugInfoFile(hprocess: P0, filename: P1, debugfilepath: windows_core::PSTR, callback: PFIND_DEBUG_FILE_CALLBACK, callerdata: Option<*const core::ffi::c_void>) -> windows_core::Result @@ -1333,7 +1333,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindDebugInfoFile(hprocess : super::super::super::Foundation:: HANDLE, filename : windows_core::PCSTR, debugfilepath : windows_core::PSTR, callback : PFIND_DEBUG_FILE_CALLBACK, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = SymFindDebugInfoFile(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(std::ptr::null()))); + let result__ = SymFindDebugInfoFile(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1343,7 +1343,7 @@ where P1: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymFindDebugInfoFileW(hprocess : super::super::super::Foundation:: HANDLE, filename : windows_core::PCWSTR, debugfilepath : windows_core::PWSTR, callback : PFIND_DEBUG_FILE_CALLBACKW, callerdata : *const core::ffi::c_void) -> super::super::super::Foundation:: HANDLE); - let result__ = SymFindDebugInfoFileW(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(std::ptr::null()))); + let result__ = SymFindDebugInfoFileW(hprocess.param().abi(), filename.param().abi(), core::mem::transmute(debugfilepath), callback, core::mem::transmute(callerdata.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -1374,7 +1374,7 @@ where P2: windows_core::Param, { 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.param().abi(), searchpatha.param().abi(), filename.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() + SymFindFileInPath(hprocess.param().abi(), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null())), two, three, flags, core::mem::transmute(foundfile), callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymFindFileInPathW(hprocess: P0, searchpatha: P1, filename: P2, id: Option<*const core::ffi::c_void>, two: u32, three: u32, flags: SYM_FIND_ID_OPTION, foundfile: windows_core::PWSTR, callback: PFINDFILEINPATHCALLBACKW, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1384,7 +1384,7 @@ where P2: windows_core::Param, { 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.param().abi(), searchpatha.param().abi(), filename.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() + SymFindFileInPathW(hprocess.param().abi(), searchpatha.param().abi(), filename.param().abi(), core::mem::transmute(id.unwrap_or(core::ptr::null())), two, three, flags, core::mem::transmute(foundfile), callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymFromAddr(hprocess: P0, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> @@ -1392,7 +1392,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymFromAddr(hprocess.param().abi(), address, core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[inline] pub unsafe fn SymFromAddrW(hprocess: P0, address: u64, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> @@ -1400,7 +1400,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymFromAddrW(hprocess.param().abi(), address, core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[inline] pub unsafe fn SymFromIndex(hprocess: P0, baseofdll: u64, index: u32, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> @@ -1424,7 +1424,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, inlinecontext, core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymFromInlineContext(hprocess.param().abi(), address, inlinecontext, core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[inline] pub unsafe fn SymFromInlineContextW(hprocess: P0, address: u64, inlinecontext: u32, displacement: Option<*mut u64>, symbol: *mut SYMBOL_INFOW) -> windows_core::Result<()> @@ -1432,7 +1432,7 @@ where P0: windows_core::Param, { 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.param().abi(), address, inlinecontext, core::mem::transmute(displacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymFromInlineContextW(hprocess.param().abi(), address, inlinecontext, core::mem::transmute(displacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[inline] pub unsafe fn SymFromName(hprocess: P0, name: P1, symbol: *mut SYMBOL_INFO) -> windows_core::Result<()> @@ -1879,7 +1879,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymGetSymFromAddr(hprocess.param().abi(), dwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[inline] pub unsafe fn SymGetSymFromAddr64(hprocess: P0, qwaddr: u64, pdwdisplacement: Option<*mut u64>, symbol: *mut IMAGEHLP_SYMBOL64) -> windows_core::Result<()> @@ -1887,7 +1887,7 @@ where P0: windows_core::Param, { 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.param().abi(), qwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(std::ptr::null_mut())), symbol).ok() + SymGetSymFromAddr64(hprocess.param().abi(), qwaddr, core::mem::transmute(pdwdisplacement.unwrap_or(core::ptr::null_mut())), symbol).ok() } #[cfg(target_arch = "x86")] #[inline] @@ -2002,7 +2002,7 @@ where P0: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymGetUnwindInfo(hprocess : super::super::super::Foundation:: HANDLE, address : u64, buffer : *mut core::ffi::c_void, size : *mut u32) -> super::super::super::Foundation:: BOOL); - SymGetUnwindInfo(hprocess.param().abi(), address, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), size) + SymGetUnwindInfo(hprocess.param().abi(), address, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), size) } #[inline] pub unsafe fn SymInitialize(hprocess: P0, usersearchpath: P1, finvadeprocess: P2) -> windows_core::Result<()> @@ -2056,7 +2056,7 @@ where P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModuleEx(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCSTR, modulename : windows_core::PCSTR, baseofdll : u64, dllsize : u32, data : *const MODLOAD_DATA, flags : SYM_LOAD_FLAGS) -> u64); - SymLoadModuleEx(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(std::ptr::null())), flags) + SymLoadModuleEx(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn SymLoadModuleExW(hprocess: P0, hfile: P1, imagename: P2, modulename: P3, baseofdll: u64, dllsize: u32, data: Option<*const MODLOAD_DATA>, flags: SYM_LOAD_FLAGS) -> u64 @@ -2067,7 +2067,7 @@ where P3: windows_core::Param, { windows_targets::link!("dbghelp.dll" "system" fn SymLoadModuleExW(hprocess : super::super::super::Foundation:: HANDLE, hfile : super::super::super::Foundation:: HANDLE, imagename : windows_core::PCWSTR, modulename : windows_core::PCWSTR, baseofdll : u64, dllsize : u32, data : *const MODLOAD_DATA, flags : SYM_LOAD_FLAGS) -> u64); - SymLoadModuleExW(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(std::ptr::null())), flags) + SymLoadModuleExW(hprocess.param().abi(), hfile.param().abi(), imagename.param().abi(), modulename.param().abi(), baseofdll, dllsize, core::mem::transmute(data.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn SymMatchFileName(filename: P0, r#match: P1, filenamestop: Option<*mut windows_core::PSTR>, matchstop: Option<*mut windows_core::PSTR>) -> windows_core::Result<()> @@ -2076,7 +2076,7 @@ where P1: windows_core::Param, { 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.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(std::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(std::ptr::null_mut()))).ok() + SymMatchFileName(filename.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SymMatchFileNameW(filename: P0, r#match: P1, filenamestop: Option<*mut windows_core::PWSTR>, matchstop: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -2085,7 +2085,7 @@ where P1: windows_core::Param, { 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.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(std::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(std::ptr::null_mut()))).ok() + SymMatchFileNameW(filename.param().abi(), r#match.param().abi(), core::mem::transmute(filenamestop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(matchstop.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SymMatchString(string: P0, expression: P1, fcase: P2) -> windows_core::Result<()> @@ -2172,7 +2172,7 @@ where P0: windows_core::Param, { 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.param().abi(), callbackfunction, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymRegisterCallback(hprocess.param().abi(), callbackfunction, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymRegisterCallback64(hprocess: P0, callbackfunction: PSYMBOL_REGISTERED_CALLBACK64, usercontext: u64) -> windows_core::Result<()> @@ -2197,7 +2197,7 @@ where P0: windows_core::Param, { 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.param().abi(), callbackfunction, core::mem::transmute(usercontext.unwrap_or(std::ptr::null()))).ok() + SymRegisterFunctionEntryCallback(hprocess.param().abi(), callbackfunction, core::mem::transmute(usercontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymRegisterFunctionEntryCallback64(hprocess: P0, callbackfunction: PSYMBOL_FUNCENTRY_CALLBACK64, usercontext: u64) -> windows_core::Result<()> @@ -2214,7 +2214,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, index, symtag, mask.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null())), options).ok() + SymSearch(hprocess.param().abi(), baseofdll, index, symtag, mask.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), options).ok() } #[inline] pub unsafe fn SymSearchW(hprocess: P0, baseofdll: u64, index: u32, symtag: u32, mask: P1, address: u64, enumsymbolscallback: PSYM_ENUMERATESYMBOLS_CALLBACKW, usercontext: Option<*const core::ffi::c_void>, options: u32) -> windows_core::Result<()> @@ -2223,7 +2223,7 @@ where P1: windows_core::Param, { 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.param().abi(), baseofdll, index, symtag, mask.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(std::ptr::null())), options).ok() + SymSearchW(hprocess.param().abi(), baseofdll, index, symtag, mask.param().abi(), address, enumsymbolscallback, core::mem::transmute(usercontext.unwrap_or(core::ptr::null())), options).ok() } #[inline] pub unsafe fn SymSetContext(hprocess: P0, stackframe: *const IMAGEHLP_STACK_FRAME, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -2231,7 +2231,7 @@ where P0: windows_core::Param, { 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.param().abi(), stackframe, core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + SymSetContext(hprocess.param().abi(), stackframe, core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SymSetExtendedOption(option: IMAGEHLP_EXTENDED_OPTIONS, value: P0) -> super::super::super::Foundation::BOOL @@ -2380,7 +2380,7 @@ where P0: windows_core::Param, { 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.param().abi(), id, val1, core::mem::transmute(val2.unwrap_or(std::ptr::null_mut())), flags).ok() + SymSrvGetFileIndexes(file.param().abi(), id, val1, core::mem::transmute(val2.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn SymSrvGetFileIndexesW(file: P0, id: *mut windows_core::GUID, val1: *mut u32, val2: Option<*mut u32>, flags: u32) -> windows_core::Result<()> @@ -2388,7 +2388,7 @@ where P0: windows_core::Param, { 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.param().abi(), id, val1, core::mem::transmute(val2.unwrap_or(std::ptr::null_mut())), flags).ok() + SymSrvGetFileIndexesW(file.param().abi(), id, val1, core::mem::transmute(val2.unwrap_or(core::ptr::null_mut())), flags).ok() } #[inline] pub unsafe fn SymSrvGetSupplement(hprocess: P0, sympath: P1, node: P2, file: P3) -> windows_core::PCSTR @@ -2511,7 +2511,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(psystemtime.unwrap_or(std::ptr::null()))).ok() + TouchFileTimes(filehandle.param().abi(), core::mem::transmute(psystemtime.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn UnDecorateSymbolName(name: P0, outputstring: &mut [u8], flags: u32) -> u32 @@ -2603,7 +2603,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpbaseaddress, lpbuffer, nsize, core::mem::transmute(lpnumberofbyteswritten.unwrap_or(std::ptr::null_mut()))).ok() + WriteProcessMemory(hprocess.param().abi(), lpbaseaddress, lpbuffer, nsize, core::mem::transmute(lpnumberofbyteswritten.unwrap_or(core::ptr::null_mut()))).ok() } windows_core::imp::define_interface!(IDebugExtendedProperty, IDebugExtendedProperty_Vtbl, 0x51973c52_cb0c_11d0_b5c9_00a0244a0e7a); impl core::ops::Deref for IDebugExtendedProperty { 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 3d4c072baf..94171c3e95 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 @@ -44,12 +44,12 @@ pub unsafe fn EnableTrace(enable: u32, enableflag: u32, enablelevel: u32, contro #[inline] pub unsafe fn EnableTraceEx(providerid: *const windows_core::GUID, sourceid: Option<*const windows_core::GUID>, tracehandle: CONTROLTRACE_HANDLE, isenabled: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, enableproperty: u32, enablefilterdesc: Option<*const EVENT_FILTER_DESCRIPTOR>) -> super::super::super::Foundation::WIN32_ERROR { 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())), core::mem::transmute(tracehandle), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, core::mem::transmute(enablefilterdesc.unwrap_or(std::ptr::null()))) + EnableTraceEx(providerid, core::mem::transmute(sourceid.unwrap_or(core::ptr::null())), core::mem::transmute(tracehandle), isenabled, level, matchanykeyword, matchallkeyword, enableproperty, core::mem::transmute(enablefilterdesc.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EnableTraceEx2(tracehandle: CONTROLTRACE_HANDLE, providerid: *const windows_core::GUID, controlcode: u32, level: u8, matchanykeyword: u64, matchallkeyword: u64, timeout: u32, enableparameters: Option<*const ENABLE_TRACE_PARAMETERS>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::mem::transmute(tracehandle), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, core::mem::transmute(enableparameters.unwrap_or(std::ptr::null()))) + EnableTraceEx2(core::mem::transmute(tracehandle), providerid, controlcode, level, matchanykeyword, matchallkeyword, timeout, core::mem::transmute(enableparameters.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PROPERTIES], guidcount: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { @@ -59,7 +59,7 @@ pub unsafe fn EnumerateTraceGuids(guidpropertiesarray: &mut [*mut TRACE_GUID_PRO #[inline] pub unsafe fn EnumerateTraceGuidsEx(tracequeryinfoclass: TRACE_QUERY_INFO_CLASS, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, returnlength) } #[cfg(feature = "Win32_Security")] #[inline] @@ -106,7 +106,7 @@ where #[inline] pub unsafe fn EventRegister(providerid: *const windows_core::GUID, enablecallback: PENABLECALLBACK, callbackcontext: Option<*const core::ffi::c_void>, reghandle: *mut u64) -> u32 { windows_targets::link!("advapi32.dll" "system" fn EventRegister(providerid : *const windows_core::GUID, enablecallback : PENABLECALLBACK, callbackcontext : *const core::ffi::c_void, reghandle : *mut u64) -> u32); - EventRegister(providerid, enablecallback, core::mem::transmute(callbackcontext.unwrap_or(std::ptr::null())), reghandle) + EventRegister(providerid, enablecallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), reghandle) } #[inline] pub unsafe fn EventSetInformation(reghandle: P0, informationclass: EVENT_INFO_CLASS, eventinformation: *const core::ffi::c_void, informationlength: u32) -> u32 @@ -138,7 +138,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EventWriteEx(reghandle : REGHANDLE, eventdescriptor : *const EVENT_DESCRIPTOR, filter : u64, flags : u32, activityid : *const windows_core::GUID, relatedactivityid : *const windows_core::GUID, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWriteEx(reghandle.param().abi(), eventdescriptor, filter, flags, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + EventWriteEx(reghandle.param().abi(), eventdescriptor, filter, flags, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(core::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn EventWriteString(reghandle: P0, level: u8, keyword: u64, string: P1) -> u32 @@ -155,7 +155,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EventWriteTransfer(reghandle : REGHANDLE, eventdescriptor : *const EVENT_DESCRIPTOR, activityid : *const windows_core::GUID, relatedactivityid : *const windows_core::GUID, userdatacount : u32, userdata : *const EVENT_DATA_DESCRIPTOR) -> u32); - EventWriteTransfer(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(std::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(std::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + EventWriteTransfer(reghandle.param().abi(), eventdescriptor, core::mem::transmute(activityid.unwrap_or(core::ptr::null())), core::mem::transmute(relatedactivityid.unwrap_or(core::ptr::null())), userdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(userdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn FlushTraceA(tracehandle: CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -198,7 +198,7 @@ pub unsafe fn OpenTraceA(logfile: *mut EVENT_TRACE_LOGFILEA) -> PROCESSTRACE_HAN #[inline] pub unsafe fn OpenTraceFromBufferStream(options: *const ETW_OPEN_TRACE_OPTIONS, buffercompletioncallback: PETW_BUFFER_COMPLETION_CALLBACK, buffercompletioncontext: Option<*const core::ffi::c_void>) -> u64 { windows_targets::link!("advapi32.dll" "system" fn OpenTraceFromBufferStream(options : *const ETW_OPEN_TRACE_OPTIONS, buffercompletioncallback : PETW_BUFFER_COMPLETION_CALLBACK, buffercompletioncontext : *const core::ffi::c_void) -> u64); - OpenTraceFromBufferStream(options, buffercompletioncallback, core::mem::transmute(buffercompletioncontext.unwrap_or(std::ptr::null()))) + OpenTraceFromBufferStream(options, buffercompletioncallback, core::mem::transmute(buffercompletioncontext.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -207,7 +207,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenTraceFromFile(logfilename : windows_core::PCWSTR, options : *const ETW_OPEN_TRACE_OPTIONS, logfileheader : *mut TRACE_LOGFILE_HEADER) -> u64); - OpenTraceFromFile(logfilename.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(std::ptr::null_mut()))) + OpenTraceFromFile(logfilename.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -216,7 +216,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenTraceFromRealTimeLogger(loggername : windows_core::PCWSTR, options : *const ETW_OPEN_TRACE_OPTIONS, logfileheader : *mut TRACE_LOGFILE_HEADER) -> u64); - OpenTraceFromRealTimeLogger(loggername.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(std::ptr::null_mut()))) + OpenTraceFromRealTimeLogger(loggername.param().abi(), options, core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -226,7 +226,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername : windows_core::PCWSTR, options : *const ETW_OPEN_TRACE_OPTIONS, allocationsize : usize, memorypartitionhandle : super::super::super::Foundation:: HANDLE, logfileheader : *mut TRACE_LOGFILE_HEADER) -> u64); - OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername.param().abi(), options, allocationsize, memorypartitionhandle.param().abi(), core::mem::transmute(logfileheader.unwrap_or(std::ptr::null_mut()))) + OpenTraceFromRealTimeLoggerWithAllocationOptions(loggername.param().abi(), options, allocationsize, memorypartitionhandle.param().abi(), core::mem::transmute(logfileheader.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Time")] #[inline] @@ -237,7 +237,7 @@ pub unsafe fn OpenTraceW(logfile: *mut EVENT_TRACE_LOGFILEW) -> PROCESSTRACE_HAN #[inline] pub unsafe fn ProcessTrace(handlearray: &[PROCESSTRACE_HANDLE], starttime: Option<*const super::super::super::Foundation::FILETIME>, endtime: Option<*const super::super::super::Foundation::FILETIME>) -> super::super::super::Foundation::WIN32_ERROR { 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().try_into().unwrap(), 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().try_into().unwrap(), core::mem::transmute(starttime.unwrap_or(core::ptr::null())), core::mem::transmute(endtime.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ProcessTraceAddBufferToBufferStream(tracehandle: u64, buffer: *const ETW_BUFFER_HEADER, buffersize: u32) -> u32 { @@ -275,7 +275,7 @@ where #[inline] pub unsafe fn QueryTraceProcessingHandle(processinghandle: PROCESSTRACE_HANDLE, informationclass: ETW_PROCESS_HANDLE_INFO_TYPE, inbuffer: Option<*const core::ffi::c_void>, inbuffersize: u32, outbuffer: Option<*mut core::ffi::c_void>, outbuffersize: u32, returnlength: *mut u32) -> super::super::super::Foundation::WIN32_ERROR { 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(core::mem::transmute(processinghandle), informationclass, core::mem::transmute(inbuffer.unwrap_or(std::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(std::ptr::null_mut())), outbuffersize, returnlength) + QueryTraceProcessingHandle(core::mem::transmute(processinghandle), informationclass, core::mem::transmute(inbuffer.unwrap_or(core::ptr::null())), inbuffersize, core::mem::transmute(outbuffer.unwrap_or(core::ptr::null_mut())), outbuffersize, returnlength) } #[inline] pub unsafe fn QueryTraceW(tracehandle: CONTROLTRACE_HANDLE, instancename: P0, properties: *mut EVENT_TRACE_PROPERTIES) -> super::super::super::Foundation::WIN32_ERROR @@ -292,7 +292,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegisterTraceGuidsA(requestaddress : WMIDPREQUEST, requestcontext : *const core::ffi::c_void, controlguid : *const windows_core::GUID, guidcount : u32, traceguidreg : *const TRACE_GUID_REGISTRATION, mofimagepath : windows_core::PCSTR, mofresourcename : windows_core::PCSTR, registrationhandle : *mut u64) -> u32); - RegisterTraceGuidsA(requestaddress, core::mem::transmute(requestcontext.unwrap_or(std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle) + RegisterTraceGuidsA(requestaddress, core::mem::transmute(requestcontext.unwrap_or(core::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle) } #[inline] pub unsafe fn RegisterTraceGuidsW(requestaddress: WMIDPREQUEST, requestcontext: Option<*const core::ffi::c_void>, controlguid: *const windows_core::GUID, traceguidreg: Option<&[TRACE_GUID_REGISTRATION]>, mofimagepath: P0, mofresourcename: P1, registrationhandle: *mut u64) -> u32 @@ -301,7 +301,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegisterTraceGuidsW(requestaddress : WMIDPREQUEST, requestcontext : *const core::ffi::c_void, controlguid : *const windows_core::GUID, guidcount : u32, traceguidreg : *const TRACE_GUID_REGISTRATION, mofimagepath : windows_core::PCWSTR, mofresourcename : windows_core::PCWSTR, registrationhandle : *mut u64) -> u32); - RegisterTraceGuidsW(requestaddress, core::mem::transmute(requestcontext.unwrap_or(std::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle) + RegisterTraceGuidsW(requestaddress, core::mem::transmute(requestcontext.unwrap_or(core::ptr::null())), controlguid, traceguidreg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(traceguidreg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), mofimagepath.param().abi(), mofresourcename.param().abi(), registrationhandle) } #[inline] pub unsafe fn RemoveTraceCallback(pguid: *const windows_core::GUID) -> super::super::super::Foundation::WIN32_ERROR { @@ -348,7 +348,7 @@ where #[inline] pub unsafe fn TdhAggregatePayloadFilters(payloadfiltercount: u32, payloadfilterptrs: *const *const core::ffi::c_void, eventmatchallflags: Option<*const super::super::super::Foundation::BOOLEAN>, eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhAggregatePayloadFilters(payloadfiltercount : u32, payloadfilterptrs : *const *const core::ffi::c_void, eventmatchallflags : *const super::super::super::Foundation:: BOOLEAN, eventfilterdescriptor : *mut EVENT_FILTER_DESCRIPTOR) -> u32); - TdhAggregatePayloadFilters(payloadfiltercount, payloadfilterptrs, core::mem::transmute(eventmatchallflags.unwrap_or(std::ptr::null())), eventfilterdescriptor) + TdhAggregatePayloadFilters(payloadfiltercount, payloadfilterptrs, core::mem::transmute(eventmatchallflags.unwrap_or(core::ptr::null())), eventfilterdescriptor) } #[inline] pub unsafe fn TdhCleanupPayloadEventFilterDescriptor(eventfilterdescriptor: *mut EVENT_FILTER_DESCRIPTOR) -> u32 { @@ -379,32 +379,32 @@ pub unsafe fn TdhDeletePayloadFilter(payloadfilter: *mut *mut core::ffi::c_void) #[inline] pub unsafe fn TdhEnumerateManifestProviderEvents(providerguid: *const windows_core::GUID, buffer: Option<*mut PROVIDER_EVENT_INFO>, buffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhEnumerateManifestProviderEvents(providerguid : *const windows_core::GUID, buffer : *mut PROVIDER_EVENT_INFO, buffersize : *mut u32) -> u32); - TdhEnumerateManifestProviderEvents(providerguid, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize) + TdhEnumerateManifestProviderEvents(providerguid, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhEnumerateProviderFieldInformation(pguid: *const windows_core::GUID, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: Option<*mut PROVIDER_FIELD_INFOARRAY>, pbuffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhEnumerateProviderFieldInformation(pguid : *const windows_core::GUID, eventfieldtype : EVENT_FIELD_TYPE, pbuffer : *mut PROVIDER_FIELD_INFOARRAY, pbuffersize : *mut u32) -> u32); - TdhEnumerateProviderFieldInformation(pguid, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pbuffersize) + TdhEnumerateProviderFieldInformation(pguid, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pbuffersize) } #[inline] pub unsafe fn TdhEnumerateProviderFilters(guid: *const windows_core::GUID, tdhcontext: Option<&[TDH_CONTEXT]>, filtercount: *mut u32, buffer: Option<*mut *mut PROVIDER_FILTER_INFO>, buffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhEnumerateProviderFilters(guid : *const windows_core::GUID, tdhcontextcount : u32, tdhcontext : *const TDH_CONTEXT, filtercount : *mut u32, buffer : *mut *mut PROVIDER_FILTER_INFO, buffersize : *mut u32) -> u32); - TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filtercount, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize) + TdhEnumerateProviderFilters(guid, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), filtercount, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhEnumerateProviders(pbuffer: Option<*mut PROVIDER_ENUMERATION_INFO>, pbuffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhEnumerateProviders(pbuffer : *mut PROVIDER_ENUMERATION_INFO, pbuffersize : *mut u32) -> u32); - TdhEnumerateProviders(core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pbuffersize) + TdhEnumerateProviders(core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pbuffersize) } #[inline] pub unsafe fn TdhEnumerateProvidersForDecodingSource(filter: DECODING_SOURCE, buffer: Option<*mut PROVIDER_ENUMERATION_INFO>, buffersize: u32, bufferrequired: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhEnumerateProvidersForDecodingSource(filter : DECODING_SOURCE, buffer : *mut PROVIDER_ENUMERATION_INFO, buffersize : u32, bufferrequired : *mut u32) -> u32); - TdhEnumerateProvidersForDecodingSource(filter, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize, bufferrequired) + TdhEnumerateProvidersForDecodingSource(filter, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize, bufferrequired) } #[inline] pub unsafe fn TdhFormatProperty(eventinfo: *const TRACE_EVENT_INFO, mapinfo: Option<*const EVENT_MAP_INFO>, pointersize: u32, propertyintype: u16, propertyouttype: u16, propertylength: u16, userdata: &[u8], buffersize: *mut u32, buffer: windows_core::PWSTR, userdataconsumed: *mut u16) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhFormatProperty(eventinfo : *const TRACE_EVENT_INFO, mapinfo : *const EVENT_MAP_INFO, pointersize : u32, propertyintype : u16, propertyouttype : u16, propertylength : u16, userdatalength : u16, userdata : *const u8, buffersize : *mut u32, buffer : windows_core::PWSTR, userdataconsumed : *mut u16) -> u32); - TdhFormatProperty(eventinfo, core::mem::transmute(mapinfo.unwrap_or(std::ptr::null())), pointersize, propertyintype, propertyouttype, propertylength, userdata.len().try_into().unwrap(), core::mem::transmute(userdata.as_ptr()), buffersize, core::mem::transmute(buffer), userdataconsumed) + TdhFormatProperty(eventinfo, core::mem::transmute(mapinfo.unwrap_or(core::ptr::null())), pointersize, propertyintype, propertyouttype, propertylength, userdata.len().try_into().unwrap(), core::mem::transmute(userdata.as_ptr()), buffersize, core::mem::transmute(buffer), userdataconsumed) } #[inline] pub unsafe fn TdhGetDecodingParameter(handle: P0, tdhcontext: *mut TDH_CONTEXT) -> u32 @@ -417,7 +417,7 @@ where #[inline] pub unsafe fn TdhGetEventInformation(event: *const EVENT_RECORD, tdhcontext: Option<&[TDH_CONTEXT]>, buffer: Option<*mut TRACE_EVENT_INFO>, buffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhGetEventInformation(event : *const EVENT_RECORD, tdhcontextcount : u32, tdhcontext : *const TDH_CONTEXT, buffer : *mut TRACE_EVENT_INFO, buffersize : *mut u32) -> u32); - TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize) + TdhGetEventInformation(event, tdhcontext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(tdhcontext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhGetEventMapInformation(pevent: *const EVENT_RECORD, pmapname: P0, pbuffer: Option<*mut EVENT_MAP_INFO>, pbuffersize: *mut u32) -> u32 @@ -425,12 +425,12 @@ where P0: windows_core::Param, { windows_targets::link!("tdh.dll" "system" fn TdhGetEventMapInformation(pevent : *const EVENT_RECORD, pmapname : windows_core::PCWSTR, pbuffer : *mut EVENT_MAP_INFO, pbuffersize : *mut u32) -> u32); - TdhGetEventMapInformation(pevent, pmapname.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pbuffersize) + TdhGetEventMapInformation(pevent, pmapname.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pbuffersize) } #[inline] pub unsafe fn TdhGetManifestEventInformation(providerguid: *const windows_core::GUID, eventdescriptor: *const EVENT_DESCRIPTOR, buffer: Option<*mut TRACE_EVENT_INFO>, buffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhGetManifestEventInformation(providerguid : *const windows_core::GUID, eventdescriptor : *const EVENT_DESCRIPTOR, buffer : *mut TRACE_EVENT_INFO, buffersize : *mut u32) -> u32); - TdhGetManifestEventInformation(providerguid, eventdescriptor, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize) + TdhGetManifestEventInformation(providerguid, eventdescriptor, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn TdhGetProperty(pevent: *const EVENT_RECORD, ptdhcontext: Option<&[TDH_CONTEXT]>, ppropertydata: &[PROPERTY_DATA_DESCRIPTOR], pbuffer: &mut [u8]) -> u32 { @@ -488,7 +488,7 @@ pub unsafe fn TdhOpenDecodingHandle(handle: *mut TDH_HANDLE) -> u32 { #[inline] pub unsafe fn TdhQueryProviderFieldInformation(pguid: *const windows_core::GUID, eventfieldvalue: u64, eventfieldtype: EVENT_FIELD_TYPE, pbuffer: Option<*mut PROVIDER_FIELD_INFOARRAY>, pbuffersize: *mut u32) -> u32 { windows_targets::link!("tdh.dll" "system" fn TdhQueryProviderFieldInformation(pguid : *const windows_core::GUID, eventfieldvalue : u64, eventfieldtype : EVENT_FIELD_TYPE, pbuffer : *mut PROVIDER_FIELD_INFOARRAY, pbuffersize : *mut u32) -> u32); - TdhQueryProviderFieldInformation(pguid, eventfieldvalue, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pbuffersize) + TdhQueryProviderFieldInformation(pguid, eventfieldvalue, eventfieldtype, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pbuffersize) } #[inline] pub unsafe fn TdhSetDecodingParameter(handle: P0, tdhcontext: *const TDH_CONTEXT) -> u32 @@ -519,7 +519,7 @@ pub unsafe fn TraceEvent(tracehandle: u64, eventtrace: *const EVENT_TRACE_HEADER #[inline] pub unsafe fn TraceEventInstance(tracehandle: u64, eventtrace: *const EVENT_INSTANCE_HEADER, instinfo: *const EVENT_INSTANCE_INFO, parentinstinfo: Option<*const EVENT_INSTANCE_INFO>) -> u32 { windows_targets::link!("advapi32.dll" "system" fn TraceEventInstance(tracehandle : u64, eventtrace : *const EVENT_INSTANCE_HEADER, instinfo : *const EVENT_INSTANCE_INFO, parentinstinfo : *const EVENT_INSTANCE_INFO) -> u32); - TraceEventInstance(tracehandle, eventtrace, instinfo, core::mem::transmute(parentinstinfo.unwrap_or(std::ptr::null()))) + TraceEventInstance(tracehandle, eventtrace, instinfo, core::mem::transmute(parentinstinfo.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TraceMessage(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAGS, messageguid: *const windows_core::GUID, messagenumber: u16) -> super::super::super::Foundation::WIN32_ERROR { @@ -534,7 +534,7 @@ pub unsafe fn TraceMessageVa(loggerhandle: u64, messageflags: TRACE_MESSAGE_FLAG #[inline] pub unsafe fn TraceQueryInformation(sessionhandle: CONTROLTRACE_HANDLE, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *mut core::ffi::c_void, informationlength: u32, returnlength: Option<*mut u32>) -> super::super::super::Foundation::WIN32_ERROR { 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(core::mem::transmute(sessionhandle), informationclass, traceinformation, informationlength, core::mem::transmute(returnlength.unwrap_or(std::ptr::null_mut()))) + TraceQueryInformation(core::mem::transmute(sessionhandle), informationclass, traceinformation, informationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn TraceSetInformation(sessionhandle: CONTROLTRACE_HANDLE, informationclass: TRACE_QUERY_INFO_CLASS, traceinformation: *const core::ffi::c_void, informationlength: u32) -> super::super::super::Foundation::WIN32_ERROR { diff --git a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs index b345b6f9c9..c74c261a3b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Diagnostics/ProcessSnapshotting/mod.rs @@ -36,7 +36,7 @@ where #[inline] pub unsafe fn PssWalkMarkerCreate(allocator: Option<*const PSS_ALLOCATOR>, walkmarkerhandle: *mut HPSSWALK) -> u32 { windows_targets::link!("kernel32.dll" "system" fn PssWalkMarkerCreate(allocator : *const PSS_ALLOCATOR, walkmarkerhandle : *mut HPSSWALK) -> u32); - PssWalkMarkerCreate(core::mem::transmute(allocator.unwrap_or(std::ptr::null())), walkmarkerhandle) + PssWalkMarkerCreate(core::mem::transmute(allocator.unwrap_or(core::ptr::null())), walkmarkerhandle) } #[inline] pub unsafe fn PssWalkMarkerFree(walkmarkerhandle: P0) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs index fd7df0e2d7..3b3068699b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/DistributedTransactionCoordinator/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("xolehlp.dll" "cdecl" fn DtcGetTransactionManager(i_pszhost : windows_core::PCSTR, i_psztmname : windows_core::PCSTR, i_riid : *const windows_core::GUID, i_dwreserved1 : u32, i_wcbreserved2 : u16, i_pvreserved2 : *const core::ffi::c_void, o_ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DtcGetTransactionManager(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(std::ptr::null())), o_ppvobject).ok() + DtcGetTransactionManager(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(core::ptr::null())), o_ppvobject).ok() } #[inline] pub unsafe fn DtcGetTransactionManagerC(i_pszhost: P0, i_psztmname: P1, i_riid: *const windows_core::GUID, i_dwreserved1: u32, i_wcbreserved2: u16, i_pvreserved2: Option<*const core::ffi::c_void>, o_ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("xolehlp.dll" "cdecl" fn DtcGetTransactionManagerC(i_pszhost : windows_core::PCSTR, i_psztmname : windows_core::PCSTR, i_riid : *const windows_core::GUID, i_dwreserved1 : u32, i_wcbreserved2 : u16, i_pvreserved2 : *const core::ffi::c_void, o_ppvobject : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - DtcGetTransactionManagerC(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(std::ptr::null())), o_ppvobject).ok() + DtcGetTransactionManagerC(i_pszhost.param().abi(), i_psztmname.param().abi(), i_riid, i_dwreserved1, i_wcbreserved2, core::mem::transmute(i_pvreserved2.unwrap_or(core::ptr::null())), o_ppvobject).ok() } #[inline] pub unsafe fn DtcGetTransactionManagerExA(i_pszhost: P0, i_psztmname: P1, i_riid: *const windows_core::GUID, i_grfoptions: u32, i_pvconfigparams: *mut core::ffi::c_void, o_ppvobject: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -1746,7 +1746,7 @@ impl core::ops::Deref for ITransactionVoterBallotAsync2 { windows_core::imp::interface_hierarchy!(ITransactionVoterBallotAsync2, windows_core::IUnknown); impl ITransactionVoterBallotAsync2 { pub unsafe fn VoteRequestDone(&self, hr: windows_core::HRESULT, pboidreason: Option<*const BOID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).VoteRequestDone)(windows_core::Interface::as_raw(self), hr, core::mem::transmute(pboidreason.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).VoteRequestDone)(windows_core::Interface::as_raw(self), hr, core::mem::transmute(pboidreason.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] 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 8b166debcc..f6345b4175 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Environment/mod.rs @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEnclave(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const core::ffi::c_void, dwsize : usize, dwinitialcommitment : usize, flenclavetype : u32, lpenclaveinformation : *const core::ffi::c_void, dwinfolength : u32, lpenclaveerror : *mut u32) -> *mut core::ffi::c_void); - CreateEnclave(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), dwsize, dwinitialcommitment, flenclavetype, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(std::ptr::null_mut()))) + CreateEnclave(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), dwsize, dwinitialcommitment, flenclavetype, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CreateEnvironmentBlock(lpenvironment: *mut *mut core::ffi::c_void, htoken: P0, binherit: P1) -> windows_core::Result<()> @@ -36,7 +36,7 @@ pub unsafe fn DestroyEnvironmentBlock(lpenvironment: *const core::ffi::c_void) - #[inline] pub unsafe fn EnclaveGetAttestationReport(enclavedata: Option<&[u8; 64]>, report: Option<*mut core::ffi::c_void>, buffersize: u32, outputsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn EnclaveGetAttestationReport(enclavedata : *const u8, report : *mut core::ffi::c_void, buffersize : u32, outputsize : *mut u32) -> windows_core::HRESULT); - EnclaveGetAttestationReport(core::mem::transmute(enclavedata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(report.unwrap_or(std::ptr::null_mut())), buffersize, outputsize).ok() + EnclaveGetAttestationReport(core::mem::transmute(enclavedata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(report.unwrap_or(core::ptr::null_mut())), buffersize, outputsize).ok() } #[inline] pub unsafe fn EnclaveGetEnclaveInformation(informationsize: u32, enclaveinformation: *mut ENCLAVE_INFORMATION) -> windows_core::Result<()> { @@ -46,12 +46,12 @@ pub unsafe fn EnclaveGetEnclaveInformation(informationsize: u32, enclaveinformat #[inline] pub unsafe fn EnclaveSealData(datatoencrypt: *const core::ffi::c_void, datatoencryptsize: u32, identitypolicy: ENCLAVE_SEALING_IDENTITY_POLICY, runtimepolicy: u32, protectedblob: Option<*mut core::ffi::c_void>, buffersize: u32, protectedblobsize: *mut u32) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn EnclaveSealData(datatoencrypt : *const core::ffi::c_void, datatoencryptsize : u32, identitypolicy : ENCLAVE_SEALING_IDENTITY_POLICY, runtimepolicy : u32, protectedblob : *mut core::ffi::c_void, buffersize : u32, protectedblobsize : *mut u32) -> windows_core::HRESULT); - EnclaveSealData(datatoencrypt, datatoencryptsize, identitypolicy, runtimepolicy, core::mem::transmute(protectedblob.unwrap_or(std::ptr::null_mut())), buffersize, protectedblobsize).ok() + EnclaveSealData(datatoencrypt, datatoencryptsize, identitypolicy, runtimepolicy, core::mem::transmute(protectedblob.unwrap_or(core::ptr::null_mut())), buffersize, protectedblobsize).ok() } #[inline] pub unsafe fn EnclaveUnsealData(protectedblob: *const core::ffi::c_void, protectedblobsize: u32, decrypteddata: Option<*mut core::ffi::c_void>, buffersize: u32, decrypteddatasize: *mut u32, sealingidentity: Option<*mut ENCLAVE_IDENTITY>, unsealingflags: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("vertdll.dll" "system" fn EnclaveUnsealData(protectedblob : *const core::ffi::c_void, protectedblobsize : u32, decrypteddata : *mut core::ffi::c_void, buffersize : u32, decrypteddatasize : *mut u32, sealingidentity : *mut ENCLAVE_IDENTITY, unsealingflags : *mut u32) -> windows_core::HRESULT); - EnclaveUnsealData(protectedblob, protectedblobsize, core::mem::transmute(decrypteddata.unwrap_or(std::ptr::null_mut())), buffersize, decrypteddatasize, core::mem::transmute(sealingidentity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(unsealingflags.unwrap_or(std::ptr::null_mut()))).ok() + EnclaveUnsealData(protectedblob, protectedblobsize, core::mem::transmute(decrypteddata.unwrap_or(core::ptr::null_mut())), buffersize, decrypteddatasize, core::mem::transmute(sealingidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(unsealingflags.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn EnclaveVerifyAttestationReport(enclavetype: u32, report: *const core::ffi::c_void, reportsize: u32) -> windows_core::Result<()> { @@ -160,7 +160,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpaddress, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(std::ptr::null_mut()))).ok() + InitializeEnclave(hprocess.param().abi(), lpaddress, lpenclaveinformation, dwinfolength, core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn IsEnclaveTypeSupported(flenclavetype: u32) -> windows_core::Result<()> { @@ -173,7 +173,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, lpnumberofbyteswritten, core::mem::transmute(lpenclaveerror.unwrap_or(std::ptr::null_mut()))).ok() + LoadEnclaveData(hprocess.param().abi(), lpaddress, lpbuffer, nsize, flprotect, lppageinformation, dwinfolength, lpnumberofbyteswritten, core::mem::transmute(lpenclaveerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn LoadEnclaveImageA(lpenclaveaddress: *const core::ffi::c_void, lpimagename: P0) -> super::super::Foundation::BOOL 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 c9881c37e8..39bc907156 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ErrorReporting/mod.rs @@ -112,7 +112,7 @@ where P2: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerReportAddDump(hreporthandle : HREPORT, hprocess : super::super::Foundation:: HANDLE, hthread : super::super::Foundation:: HANDLE, dumptype : WER_DUMP_TYPE, pexceptionparam : *const WER_EXCEPTION_INFORMATION, pdumpcustomoptions : *const WER_DUMP_CUSTOM_OPTIONS, dwflags : u32) -> windows_core::HRESULT); - WerReportAddDump(hreporthandle.param().abi(), hprocess.param().abi(), hthread.param().abi(), dumptype, core::mem::transmute(pexceptionparam.unwrap_or(std::ptr::null())), core::mem::transmute(pdumpcustomoptions.unwrap_or(std::ptr::null())), dwflags).ok() + WerReportAddDump(hreporthandle.param().abi(), hprocess.param().abi(), hthread.param().abi(), dumptype, core::mem::transmute(pexceptionparam.unwrap_or(core::ptr::null())), core::mem::transmute(pdumpcustomoptions.unwrap_or(core::ptr::null())), dwflags).ok() } #[inline] pub unsafe fn WerReportAddFile(hreporthandle: P0, pwzpath: P1, repfiletype: WER_FILE_TYPE, dwfileflags: WER_FILE) -> windows_core::Result<()> @@ -138,7 +138,7 @@ where { windows_targets::link!("wer.dll" "system" fn WerReportCreate(pwzeventtype : windows_core::PCWSTR, reptype : WER_REPORT_TYPE, preportinformation : *const WER_REPORT_INFORMATION, phreporthandle : *mut HREPORT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WerReportCreate(pwzeventtype.param().abi(), reptype, core::mem::transmute(preportinformation.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + WerReportCreate(pwzeventtype.param().abi(), reptype, core::mem::transmute(preportinformation.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn WerReportHang(hwndhungapp: P0, pwzhungapplicationname: P1) -> windows_core::Result<()> @@ -174,7 +174,7 @@ where P0: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerReportSubmit(hreporthandle : HREPORT, consent : WER_CONSENT, dwflags : WER_SUBMIT_FLAGS, psubmitresult : *mut WER_SUBMIT_RESULT) -> windows_core::HRESULT); - WerReportSubmit(hreporthandle.param().abi(), consent, dwflags, core::mem::transmute(psubmitresult.unwrap_or(std::ptr::null_mut()))).ok() + WerReportSubmit(hreporthandle.param().abi(), consent, dwflags, core::mem::transmute(psubmitresult.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WerSetFlags(dwflags: WER_FAULT_REPORTING) -> windows_core::Result<()> { @@ -195,7 +195,7 @@ where P0: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreGetFirstReportKey(hreportstore : HREPORTSTORE, ppszreportkey : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - WerStoreGetFirstReportKey(hreportstore.param().abi(), core::mem::transmute(ppszreportkey.unwrap_or(std::ptr::null_mut()))).ok() + WerStoreGetFirstReportKey(hreportstore.param().abi(), core::mem::transmute(ppszreportkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WerStoreGetNextReportKey(hreportstore: P0, ppszreportkey: Option<*mut windows_core::PCWSTR>) -> windows_core::Result<()> @@ -203,7 +203,7 @@ where P0: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreGetNextReportKey(hreportstore : HREPORTSTORE, ppszreportkey : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - WerStoreGetNextReportKey(hreportstore.param().abi(), core::mem::transmute(ppszreportkey.unwrap_or(std::ptr::null_mut()))).ok() + WerStoreGetNextReportKey(hreportstore.param().abi(), core::mem::transmute(ppszreportkey.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WerStoreGetReportCount(hreportstore: P0) -> windows_core::Result @@ -268,7 +268,7 @@ where P1: windows_core::Param, { windows_targets::link!("wer.dll" "system" fn WerStoreUploadReport(hreportstore : HREPORTSTORE, pszreportkey : windows_core::PCWSTR, dwflags : u32, psubmitresult : *mut WER_SUBMIT_RESULT) -> windows_core::HRESULT); - WerStoreUploadReport(hreportstore.param().abi(), pszreportkey.param().abi(), dwflags, core::mem::transmute(psubmitresult.unwrap_or(std::ptr::null_mut()))).ok() + WerStoreUploadReport(hreportstore.param().abi(), pszreportkey.param().abi(), dwflags, core::mem::transmute(psubmitresult.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WerUnregisterAdditionalProcess(processid: u32) -> windows_core::Result<()> { 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 95720a3f60..4971a44f05 100644 --- a/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/EventLog/mod.rs @@ -128,7 +128,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(std::ptr::null_mut())), propertyvaluebufferused).ok() + EvtGetChannelConfigProperty(channelconfig.param().abi(), propertyid, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), propertyvaluebufferused).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -137,7 +137,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(std::ptr::null_mut())), propertyvaluebufferused).ok() + EvtGetEventInfo(event.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), propertyvaluebufferused).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -146,7 +146,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, flags, eventmetadatapropertybuffersize, core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(std::ptr::null_mut())), eventmetadatapropertybufferused).ok() + EvtGetEventMetadataProperty(eventmetadata.param().abi(), propertyid, flags, eventmetadatapropertybuffersize, core::mem::transmute(eventmetadatapropertybuffer.unwrap_or(core::ptr::null_mut())), eventmetadatapropertybufferused).ok() } #[inline] pub unsafe fn EvtGetExtendedStatus(buffer: Option<&mut [u16]>, bufferused: *mut u32) -> u32 { @@ -160,13 +160,13 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(std::ptr::null_mut())), propertyvaluebufferused).ok() + EvtGetLogInfo(log.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), propertyvaluebufferused).ok() } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn EvtGetObjectArrayProperty(objectarray: isize, propertyid: u32, arrayindex: u32, flags: u32, propertyvaluebuffersize: u32, propertyvaluebuffer: 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).ok() + EvtGetObjectArrayProperty(objectarray, propertyid, arrayindex, flags, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), propertyvaluebufferused).ok() } #[inline] pub unsafe fn EvtGetObjectArraySize(objectarray: isize, objectarraysize: *mut u32) -> windows_core::Result<()> { @@ -180,7 +180,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, flags, publishermetadatapropertybuffersize, core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(std::ptr::null_mut())), publishermetadatapropertybufferused).ok() + EvtGetPublisherMetadataProperty(publishermetadata.param().abi(), propertyid, flags, publishermetadatapropertybuffersize, core::mem::transmute(publishermetadatapropertybuffer.unwrap_or(core::ptr::null_mut())), publishermetadatapropertybufferused).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -189,7 +189,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(std::ptr::null_mut())), propertyvaluebufferused).ok() + EvtGetQueryInfo(queryorsubscription.param().abi(), propertyid, propertyvaluebuffersize, core::mem::transmute(propertyvaluebuffer.unwrap_or(core::ptr::null_mut())), propertyvaluebufferused).ok() } #[inline] pub unsafe fn EvtNext(resultset: P0, events: &mut [isize], timeout: u32, flags: u32, returned: *mut u32) -> windows_core::Result<()> @@ -306,7 +306,7 @@ where P1: windows_core::Param, { 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.param().abi(), fragment.param().abi(), flags, buffersize, core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), bufferused, propertycount).ok() + EvtRender(context.param().abi(), fragment.param().abi(), flags, buffersize, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), bufferused, propertycount).ok() } #[inline] pub unsafe fn EvtSaveChannelConfig(channelconfig: P0, flags: u32) -> windows_core::Result<()> @@ -344,7 +344,7 @@ where P4: windows_core::Param, { windows_targets::link!("wevtapi.dll" "system" fn EvtSubscribe(session : EVT_HANDLE, signalevent : super::super::Foundation:: HANDLE, channelpath : windows_core::PCWSTR, query : windows_core::PCWSTR, bookmark : EVT_HANDLE, context : *const core::ffi::c_void, callback : EVT_SUBSCRIBE_CALLBACK, flags : u32) -> EVT_HANDLE); - let result__ = EvtSubscribe(session.param().abi(), signalevent.param().abi(), channelpath.param().abi(), query.param().abi(), bookmark.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null())), callback, flags); + let result__ = EvtSubscribe(session.param().abi(), signalevent.param().abi(), channelpath.param().abi(), query.param().abi(), bookmark.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null())), callback, flags); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -473,7 +473,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ReportEventA(heventlog : super::super::Foundation:: HANDLE, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Security:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const windows_core::PCSTR, lprawdata : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventA(heventlog.param().abi(), wtype, wcategory, dweventid, lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), 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() + ReportEventA(heventlog.param().abi(), wtype, wcategory, dweventid, lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -483,7 +483,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ReportEventW(heventlog : super::super::Foundation:: HANDLE, wtype : REPORT_EVENT_TYPE, wcategory : u16, dweventid : u32, lpusersid : super::super::Security:: PSID, wnumstrings : u16, dwdatasize : u32, lpstrings : *const windows_core::PCWSTR, lprawdata : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ReportEventW(heventlog.param().abi(), wtype, wcategory, dweventid, lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), 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() + ReportEventW(heventlog.param().abi(), wtype, wcategory, dweventid, lpusersid.param().abi(), lpstrings.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), dwdatasize, core::mem::transmute(lpstrings.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(lprawdata.unwrap_or(core::ptr::null()))).ok() } pub const EVENTLOG_AUDIT_FAILURE: REPORT_EVENT_TYPE = REPORT_EVENT_TYPE(16u16); pub const EVENTLOG_AUDIT_SUCCESS: REPORT_EVENT_TYPE = REPORT_EVENT_TYPE(8u16); 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 645034a7ea..aab6853a2d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/GroupPolicy/mod.rs @@ -209,7 +209,7 @@ where P1: windows_core::Param, { windows_targets::link!("userenv.dll" "system" fn RsopAccessCheckByType(psecuritydescriptor : super::super::Security:: PSECURITY_DESCRIPTOR, pprincipalselfsid : super::super::Security:: PSID, prsoptoken : *const core::ffi::c_void, dwdesiredaccessmask : u32, pobjecttypelist : *const super::super::Security:: OBJECT_TYPE_LIST, objecttypelistlength : u32, pgenericmapping : *const super::super::Security:: GENERIC_MAPPING, pprivilegeset : *const super::super::Security:: PRIVILEGE_SET, pdwprivilegesetlength : *const u32, pdwgrantedaccessmask : *mut u32, pbaccessstatus : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - RsopAccessCheckByType(psecuritydescriptor.param().abi(), pprincipalselfsid.param().abi(), prsoptoken, dwdesiredaccessmask, core::mem::transmute(pobjecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pgenericmapping, core::mem::transmute(pprivilegeset.unwrap_or(std::ptr::null())), core::mem::transmute(pdwprivilegesetlength.unwrap_or(std::ptr::null())), pdwgrantedaccessmask, pbaccessstatus).ok() + RsopAccessCheckByType(psecuritydescriptor.param().abi(), pprincipalselfsid.param().abi(), prsoptoken, dwdesiredaccessmask, core::mem::transmute(pobjecttypelist.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pobjecttypelist.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pgenericmapping, core::mem::transmute(pprivilegeset.unwrap_or(core::ptr::null())), core::mem::transmute(pdwprivilegesetlength.unwrap_or(core::ptr::null())), pdwgrantedaccessmask, pbaccessstatus).ok() } #[inline] pub unsafe fn RsopFileAccessCheck(pszfilename: P0, prsoptoken: *const core::ffi::c_void, dwdesiredaccessmask: u32, pdwgrantedaccessmask: *mut u32, pbaccessstatus: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/System/HostComputeNetwork/mod.rs b/crates/libs/windows/src/Windows/Win32/System/HostComputeNetwork/mod.rs index 68f1583ffb..75651d7971 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostComputeNetwork/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostComputeNetwork/mod.rs @@ -29,7 +29,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnCreateEndpoint(network : *const core::ffi::c_void, id : *const windows_core::GUID, settings : windows_core::PCWSTR, endpoint : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnCreateEndpoint(network, id, settings.param().abi(), endpoint, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnCreateEndpoint(network, id, settings.param().abi(), endpoint, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnCreateGuestNetworkService(id: *const windows_core::GUID, settings: P0, guestnetworkservice: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -37,7 +37,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnCreateGuestNetworkService(id : *const windows_core::GUID, settings : windows_core::PCWSTR, guestnetworkservice : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnCreateGuestNetworkService(id, settings.param().abi(), guestnetworkservice, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnCreateGuestNetworkService(id, settings.param().abi(), guestnetworkservice, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnCreateLoadBalancer(id: *const windows_core::GUID, settings: P0, loadbalancer: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -45,7 +45,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnCreateLoadBalancer(id : *const windows_core::GUID, settings : windows_core::PCWSTR, loadbalancer : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnCreateLoadBalancer(id, settings.param().abi(), loadbalancer, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnCreateLoadBalancer(id, settings.param().abi(), loadbalancer, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnCreateNamespace(id: *const windows_core::GUID, settings: P0, namespace: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -53,7 +53,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnCreateNamespace(id : *const windows_core::GUID, settings : windows_core::PCWSTR, namespace : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnCreateNamespace(id, settings.param().abi(), namespace, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnCreateNamespace(id, settings.param().abi(), namespace, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnCreateNetwork(id: *const windows_core::GUID, settings: P0, network: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -61,32 +61,32 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnCreateNetwork(id : *const windows_core::GUID, settings : windows_core::PCWSTR, network : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnCreateNetwork(id, settings.param().abi(), network, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnCreateNetwork(id, settings.param().abi(), network, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnDeleteEndpoint(id: *const windows_core::GUID, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnDeleteEndpoint(id : *const windows_core::GUID, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnDeleteEndpoint(id, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnDeleteEndpoint(id, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnDeleteGuestNetworkService(id: *const windows_core::GUID, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnDeleteGuestNetworkService(id : *const windows_core::GUID, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnDeleteGuestNetworkService(id, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnDeleteGuestNetworkService(id, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnDeleteLoadBalancer(id: *const windows_core::GUID, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnDeleteLoadBalancer(id : *const windows_core::GUID, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnDeleteLoadBalancer(id, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnDeleteLoadBalancer(id, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnDeleteNamespace(id: *const windows_core::GUID, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnDeleteNamespace(id : *const windows_core::GUID, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnDeleteNamespace(id, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnDeleteNamespace(id, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnDeleteNetwork(id: *const windows_core::GUID, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnDeleteNetwork(id : *const windows_core::GUID, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnDeleteNetwork(id, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnDeleteNetwork(id, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnEnumerateEndpoints(query: P0, endpoints: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -94,7 +94,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnEnumerateEndpoints(query : windows_core::PCWSTR, endpoints : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnEnumerateEndpoints(query.param().abi(), endpoints, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnEnumerateEndpoints(query.param().abi(), endpoints, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnEnumerateGuestNetworkPortReservations(returncount: *mut u32, portentries: *mut *mut HCN_PORT_RANGE_ENTRY) -> windows_core::Result<()> { @@ -107,7 +107,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnEnumerateLoadBalancers(query : windows_core::PCWSTR, loadbalancer : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnEnumerateLoadBalancers(query.param().abi(), loadbalancer, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnEnumerateLoadBalancers(query.param().abi(), loadbalancer, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnEnumerateNamespaces(query: P0, namespaces: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -115,7 +115,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnEnumerateNamespaces(query : windows_core::PCWSTR, namespaces : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnEnumerateNamespaces(query.param().abi(), namespaces, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnEnumerateNamespaces(query.param().abi(), namespaces, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnEnumerateNetworks(query: P0, networks: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -123,12 +123,12 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnEnumerateNetworks(query : windows_core::PCWSTR, networks : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnEnumerateNetworks(query.param().abi(), networks, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnEnumerateNetworks(query.param().abi(), networks, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnFreeGuestNetworkPortReservations(portentries: Option<*mut HCN_PORT_RANGE_ENTRY>) { windows_targets::link!("computenetwork.dll" "system" fn HcnFreeGuestNetworkPortReservations(portentries : *mut HCN_PORT_RANGE_ENTRY)); - HcnFreeGuestNetworkPortReservations(core::mem::transmute(portentries.unwrap_or(std::ptr::null_mut()))) + HcnFreeGuestNetworkPortReservations(core::mem::transmute(portentries.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn HcnModifyEndpoint(endpoint: *const core::ffi::c_void, settings: P0, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -136,7 +136,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnModifyEndpoint(endpoint : *const core::ffi::c_void, settings : windows_core::PCWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnModifyEndpoint(endpoint, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnModifyEndpoint(endpoint, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnModifyGuestNetworkService(guestnetworkservice: *const core::ffi::c_void, settings: P0, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -144,7 +144,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnModifyGuestNetworkService(guestnetworkservice : *const core::ffi::c_void, settings : windows_core::PCWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnModifyGuestNetworkService(guestnetworkservice, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnModifyGuestNetworkService(guestnetworkservice, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnModifyLoadBalancer(loadbalancer: *const core::ffi::c_void, settings: P0, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -152,7 +152,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnModifyLoadBalancer(loadbalancer : *const core::ffi::c_void, settings : windows_core::PCWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnModifyLoadBalancer(loadbalancer, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnModifyLoadBalancer(loadbalancer, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnModifyNamespace(namespace: *const core::ffi::c_void, settings: P0, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -160,7 +160,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnModifyNamespace(namespace : *const core::ffi::c_void, settings : windows_core::PCWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnModifyNamespace(namespace, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnModifyNamespace(namespace, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnModifyNetwork(network: *const core::ffi::c_void, settings: P0, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -168,27 +168,27 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnModifyNetwork(network : *const core::ffi::c_void, settings : windows_core::PCWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnModifyNetwork(network, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnModifyNetwork(network, settings.param().abi(), core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnOpenEndpoint(id: *const windows_core::GUID, endpoint: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnOpenEndpoint(id : *const windows_core::GUID, endpoint : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnOpenEndpoint(id, endpoint, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnOpenEndpoint(id, endpoint, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnOpenLoadBalancer(id: *const windows_core::GUID, loadbalancer: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnOpenLoadBalancer(id : *const windows_core::GUID, loadbalancer : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnOpenLoadBalancer(id, loadbalancer, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnOpenLoadBalancer(id, loadbalancer, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnOpenNamespace(id: *const windows_core::GUID, namespace: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnOpenNamespace(id : *const windows_core::GUID, namespace : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnOpenNamespace(id, namespace, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnOpenNamespace(id, namespace, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnOpenNetwork(id: *const windows_core::GUID, network: *mut *mut core::ffi::c_void, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { windows_targets::link!("computenetwork.dll" "system" fn HcnOpenNetwork(id : *const windows_core::GUID, network : *mut *mut core::ffi::c_void, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnOpenNetwork(id, network, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnOpenNetwork(id, network, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointAddresses(endpoint: *const core::ffi::c_void, query: P0, addresses: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -196,7 +196,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryEndpointAddresses(endpoint : *const core::ffi::c_void, query : windows_core::PCWSTR, addresses : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryEndpointAddresses(endpoint, query.param().abi(), addresses, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryEndpointAddresses(endpoint, query.param().abi(), addresses, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointProperties(endpoint: *const core::ffi::c_void, query: P0, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -204,7 +204,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryEndpointProperties(endpoint : *const core::ffi::c_void, query : windows_core::PCWSTR, properties : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryEndpointProperties(endpoint, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryEndpointProperties(endpoint, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryEndpointStats(endpoint: *const core::ffi::c_void, query: P0, stats: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -212,7 +212,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryEndpointStats(endpoint : *const core::ffi::c_void, query : windows_core::PCWSTR, stats : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryEndpointStats(endpoint, query.param().abi(), stats, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryEndpointStats(endpoint, query.param().abi(), stats, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryLoadBalancerProperties(loadbalancer: *const core::ffi::c_void, query: P0, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -220,7 +220,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryLoadBalancerProperties(loadbalancer : *const core::ffi::c_void, query : windows_core::PCWSTR, properties : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryLoadBalancerProperties(loadbalancer, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryLoadBalancerProperties(loadbalancer, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryNamespaceProperties(namespace: *const core::ffi::c_void, query: P0, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -228,7 +228,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryNamespaceProperties(namespace : *const core::ffi::c_void, query : windows_core::PCWSTR, properties : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryNamespaceProperties(namespace, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryNamespaceProperties(namespace, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnQueryNetworkProperties(network: *const core::ffi::c_void, query: P0, properties: *mut windows_core::PWSTR, errorrecord: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -236,7 +236,7 @@ where P0: windows_core::Param, { windows_targets::link!("computenetwork.dll" "system" fn HcnQueryNetworkProperties(network : *const core::ffi::c_void, query : windows_core::PCWSTR, properties : *mut windows_core::PWSTR, errorrecord : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcnQueryNetworkProperties(network, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(std::ptr::null_mut()))).ok() + HcnQueryNetworkProperties(network, query.param().abi(), properties, core::mem::transmute(errorrecord.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcnRegisterGuestNetworkServiceCallback(guestnetworkservice: *const core::ffi::c_void, callback: HCN_NOTIFICATION_CALLBACK, context: *const core::ffi::c_void, callbackhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs index 37400914e7..bccc186f41 100644 --- a/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/HostComputeSystem/mod.rs @@ -69,7 +69,7 @@ where { windows_targets::link!("computecore.dll" "system" fn HcsCreateComputeSystem(id : windows_core::PCWSTR, configuration : windows_core::PCWSTR, operation : HCS_OPERATION, securitydescriptor : *const super::super::Security:: SECURITY_DESCRIPTOR, computesystem : *mut HCS_SYSTEM) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HcsCreateComputeSystem(id.param().abi(), configuration.param().abi(), operation.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + HcsCreateComputeSystem(id.param().abi(), configuration.param().abi(), operation.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn HcsCreateComputeSystemInNamespace(idnamespace: P0, id: P1, configuration: P2, operation: P3, options: Option<*const HCS_CREATE_OPTIONS>) -> windows_core::Result @@ -81,7 +81,7 @@ where { windows_targets::link!("computecore.dll" "system" fn HcsCreateComputeSystemInNamespace(idnamespace : windows_core::PCWSTR, id : windows_core::PCWSTR, configuration : windows_core::PCWSTR, operation : HCS_OPERATION, options : *const HCS_CREATE_OPTIONS, computesystem : *mut HCS_SYSTEM) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HcsCreateComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), configuration.param().abi(), operation.param().abi(), core::mem::transmute(options.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + HcsCreateComputeSystemInNamespace(idnamespace.param().abi(), id.param().abi(), configuration.param().abi(), operation.param().abi(), core::mem::transmute(options.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn HcsCreateEmptyGuestStateFile(gueststatefilepath: P0) -> windows_core::Result<()> @@ -102,12 +102,12 @@ where #[inline] pub unsafe fn HcsCreateOperation(context: Option<*const core::ffi::c_void>, callback: HCS_OPERATION_COMPLETION) -> HCS_OPERATION { windows_targets::link!("computecore.dll" "system" fn HcsCreateOperation(context : *const core::ffi::c_void, callback : HCS_OPERATION_COMPLETION) -> HCS_OPERATION); - HcsCreateOperation(core::mem::transmute(context.unwrap_or(std::ptr::null())), callback) + HcsCreateOperation(core::mem::transmute(context.unwrap_or(core::ptr::null())), callback) } #[inline] pub unsafe fn HcsCreateOperationWithNotifications(eventtypes: HCS_OPERATION_OPTIONS, context: Option<*const core::ffi::c_void>, callback: HCS_EVENT_CALLBACK) -> HCS_OPERATION { windows_targets::link!("computecore.dll" "system" fn HcsCreateOperationWithNotifications(eventtypes : HCS_OPERATION_OPTIONS, context : *const core::ffi::c_void, callback : HCS_EVENT_CALLBACK) -> HCS_OPERATION); - HcsCreateOperationWithNotifications(eventtypes, core::mem::transmute(context.unwrap_or(std::ptr::null())), callback) + HcsCreateOperationWithNotifications(eventtypes, core::mem::transmute(context.unwrap_or(core::ptr::null())), callback) } #[cfg(feature = "Win32_Security")] #[inline] @@ -119,7 +119,7 @@ where { windows_targets::link!("computecore.dll" "system" fn HcsCreateProcess(computesystem : HCS_SYSTEM, processparameters : windows_core::PCWSTR, operation : HCS_OPERATION, securitydescriptor : *const super::super::Security:: SECURITY_DESCRIPTOR, process : *mut HCS_PROCESS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - HcsCreateProcess(computesystem.param().abi(), processparameters.param().abi(), operation.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + HcsCreateProcess(computesystem.param().abi(), processparameters.param().abi(), operation.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn HcsDestroyLayer(layerpath: P0) -> windows_core::Result<()> @@ -235,7 +235,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsGetOperationResult(operation : HCS_OPERATION, resultdocument : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsGetOperationResult(operation.param().abi(), core::mem::transmute(resultdocument.unwrap_or(std::ptr::null_mut()))).ok() + HcsGetOperationResult(operation.param().abi(), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsGetOperationResultAndProcessInfo(operation: P0, processinformation: Option<*mut HCS_PROCESS_INFORMATION>, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -243,7 +243,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsGetOperationResultAndProcessInfo(operation : HCS_OPERATION, processinformation : *mut HCS_PROCESS_INFORMATION, resultdocument : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsGetOperationResultAndProcessInfo(operation.param().abi(), core::mem::transmute(processinformation.unwrap_or(std::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(std::ptr::null_mut()))).ok() + HcsGetOperationResultAndProcessInfo(operation.param().abi(), core::mem::transmute(processinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsGetOperationType(operation: P0) -> HCS_OPERATION_TYPE @@ -286,7 +286,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsGetProcessorCompatibilityFromSavedState(runtimefilename : windows_core::PCWSTR, processorfeaturesstring : *mut windows_core::PCWSTR) -> windows_core::HRESULT); - HcsGetProcessorCompatibilityFromSavedState(runtimefilename.param().abi(), core::mem::transmute(processorfeaturesstring.unwrap_or(std::ptr::null_mut()))).ok() + HcsGetProcessorCompatibilityFromSavedState(runtimefilename.param().abi(), core::mem::transmute(processorfeaturesstring.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsGetServiceProperties(propertyquery: P0) -> windows_core::Result @@ -372,7 +372,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsModifyServiceSettings(settings : windows_core::PCWSTR, result : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsModifyServiceSettings(settings.param().abi(), core::mem::transmute(result.unwrap_or(std::ptr::null_mut()))).ok() + HcsModifyServiceSettings(settings.param().abi(), core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsOpenComputeSystem(id: P0, requestedaccess: u32) -> windows_core::Result @@ -455,7 +455,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsSetComputeSystemCallback(computesystem : HCS_SYSTEM, callbackoptions : HCS_EVENT_OPTIONS, context : *const core::ffi::c_void, callback : HCS_EVENT_CALLBACK) -> windows_core::HRESULT); - HcsSetComputeSystemCallback(computesystem.param().abi(), callbackoptions, core::mem::transmute(context.unwrap_or(std::ptr::null())), callback).ok() + HcsSetComputeSystemCallback(computesystem.param().abi(), callbackoptions, core::mem::transmute(context.unwrap_or(core::ptr::null())), callback).ok() } #[inline] pub unsafe fn HcsSetOperationCallback(operation: P0, context: Option<*const core::ffi::c_void>, callback: HCS_OPERATION_COMPLETION) -> windows_core::Result<()> @@ -463,7 +463,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsSetOperationCallback(operation : HCS_OPERATION, context : *const core::ffi::c_void, callback : HCS_OPERATION_COMPLETION) -> windows_core::HRESULT); - HcsSetOperationCallback(operation.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null())), callback).ok() + HcsSetOperationCallback(operation.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null())), callback).ok() } #[inline] pub unsafe fn HcsSetOperationContext(operation: P0, context: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -471,7 +471,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsSetOperationContext(operation : HCS_OPERATION, context : *const core::ffi::c_void) -> windows_core::HRESULT); - HcsSetOperationContext(operation.param().abi(), core::mem::transmute(context.unwrap_or(std::ptr::null()))).ok() + HcsSetOperationContext(operation.param().abi(), core::mem::transmute(context.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn HcsSetProcessCallback(process: P0, callbackoptions: HCS_EVENT_OPTIONS, context: *const core::ffi::c_void, callback: HCS_EVENT_CALLBACK) -> windows_core::Result<()> @@ -565,7 +565,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsWaitForComputeSystemExit(computesystem : HCS_SYSTEM, timeoutms : u32, result : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsWaitForComputeSystemExit(computesystem.param().abi(), timeoutms, core::mem::transmute(result.unwrap_or(std::ptr::null_mut()))).ok() + HcsWaitForComputeSystemExit(computesystem.param().abi(), timeoutms, core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsWaitForOperationResult(operation: P0, timeoutms: u32, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -573,7 +573,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsWaitForOperationResult(operation : HCS_OPERATION, timeoutms : u32, resultdocument : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsWaitForOperationResult(operation.param().abi(), timeoutms, core::mem::transmute(resultdocument.unwrap_or(std::ptr::null_mut()))).ok() + HcsWaitForOperationResult(operation.param().abi(), timeoutms, core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsWaitForOperationResultAndProcessInfo(operation: P0, timeoutms: u32, processinformation: Option<*mut HCS_PROCESS_INFORMATION>, resultdocument: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -581,7 +581,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsWaitForOperationResultAndProcessInfo(operation : HCS_OPERATION, timeoutms : u32, processinformation : *mut HCS_PROCESS_INFORMATION, resultdocument : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsWaitForOperationResultAndProcessInfo(operation.param().abi(), timeoutms, core::mem::transmute(processinformation.unwrap_or(std::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(std::ptr::null_mut()))).ok() + HcsWaitForOperationResultAndProcessInfo(operation.param().abi(), timeoutms, core::mem::transmute(processinformation.unwrap_or(core::ptr::null_mut())), core::mem::transmute(resultdocument.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HcsWaitForProcessExit(computesystem: P0, timeoutms: u32, result: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> @@ -589,7 +589,7 @@ where P0: windows_core::Param, { windows_targets::link!("computecore.dll" "system" fn HcsWaitForProcessExit(computesystem : HCS_PROCESS, timeoutms : u32, result : *mut windows_core::PWSTR) -> windows_core::HRESULT); - HcsWaitForProcessExit(computesystem.param().abi(), timeoutms, core::mem::transmute(result.unwrap_or(std::ptr::null_mut()))).ok() + HcsWaitForProcessExit(computesystem.param().abi(), timeoutms, core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))).ok() } pub const HcsCreateOptions_1: HCS_CREATE_OPTIONS = HCS_CREATE_OPTIONS(65536i32); pub const HcsEventGroupOperationInfo: HCS_EVENT_TYPE = HCS_EVENT_TYPE(-1073741823i32); diff --git a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs index f2c701292e..35d1bde3a0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Hypervisor/mod.rs @@ -41,7 +41,7 @@ where P0: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ForceNestedHostMode(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, hostmode : super::super::Foundation:: BOOL, oldmode : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - ForceNestedHostMode(vmsavedstatedumphandle, vpid, hostmode.param().abi(), core::mem::transmute(oldmode.unwrap_or(std::ptr::null_mut()))).ok() + ForceNestedHostMode(vmsavedstatedumphandle, vpid, hostmode.param().abi(), core::mem::transmute(oldmode.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ForcePagingMode(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, pagingmode: PAGING_MODE) -> windows_core::Result<()> { @@ -137,12 +137,12 @@ pub unsafe fn GuestPhysicalAddressToRawSavedMemoryOffset(vmsavedstatedumphandle: #[inline] pub unsafe fn GuestVirtualAddressToPhysicalAddress(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, virtualaddress: u64, physicaladdress: *mut u64, unmappedregionsize: Option<*mut u64>) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn GuestVirtualAddressToPhysicalAddress(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, virtualaddress : u64, physicaladdress : *mut u64, unmappedregionsize : *mut u64) -> windows_core::HRESULT); - GuestVirtualAddressToPhysicalAddress(vmsavedstatedumphandle, vpid, virtualaddress, physicaladdress, core::mem::transmute(unmappedregionsize.unwrap_or(std::ptr::null_mut()))).ok() + GuestVirtualAddressToPhysicalAddress(vmsavedstatedumphandle, vpid, virtualaddress, physicaladdress, core::mem::transmute(unmappedregionsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HdvCreateDeviceInstance(devicehosthandle: *const core::ffi::c_void, devicetype: HDV_DEVICE_TYPE, deviceclassid: *const windows_core::GUID, deviceinstanceid: *const windows_core::GUID, deviceinterface: *const core::ffi::c_void, devicecontext: Option<*const core::ffi::c_void>, devicehandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("vmdevicehost.dll" "system" fn HdvCreateDeviceInstance(devicehosthandle : *const core::ffi::c_void, devicetype : HDV_DEVICE_TYPE, deviceclassid : *const windows_core::GUID, deviceinstanceid : *const windows_core::GUID, deviceinterface : *const core::ffi::c_void, devicecontext : *const core::ffi::c_void, devicehandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - HdvCreateDeviceInstance(devicehosthandle, devicetype, deviceclassid, deviceinstanceid, deviceinterface, core::mem::transmute(devicecontext.unwrap_or(std::ptr::null())), devicehandle).ok() + HdvCreateDeviceInstance(devicehosthandle, devicetype, deviceclassid, deviceinstanceid, deviceinterface, core::mem::transmute(devicecontext.unwrap_or(core::ptr::null())), devicehandle).ok() } #[inline] pub unsafe fn HdvCreateGuestMemoryAperture(requestor: *const core::ffi::c_void, guestphysicaladdress: u64, bytecount: u32, writeprotected: P0, mappedaddress: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -292,12 +292,12 @@ where #[inline] pub unsafe fn ReadGuestPhysicalAddress(vmsavedstatedumphandle: *mut core::ffi::c_void, physicaladdress: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ReadGuestPhysicalAddress(vmsavedstatedumphandle : *mut core::ffi::c_void, physicaladdress : u64, buffer : *mut core::ffi::c_void, buffersize : u32, bytesread : *mut u32) -> windows_core::HRESULT); - ReadGuestPhysicalAddress(vmsavedstatedumphandle, physicaladdress, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + ReadGuestPhysicalAddress(vmsavedstatedumphandle, physicaladdress, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ReadGuestRawSavedMemory(vmsavedstatedumphandle: *mut core::ffi::c_void, rawsavedmemoryoffset: u64, buffer: *mut core::ffi::c_void, buffersize: u32, bytesread: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ReadGuestRawSavedMemory(vmsavedstatedumphandle : *mut core::ffi::c_void, rawsavedmemoryoffset : u64, buffer : *mut core::ffi::c_void, buffersize : u32, bytesread : *mut u32) -> windows_core::HRESULT); - ReadGuestRawSavedMemory(vmsavedstatedumphandle, rawsavedmemoryoffset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(std::ptr::null_mut()))).ok() + ReadGuestRawSavedMemory(vmsavedstatedumphandle, rawsavedmemoryoffset, buffer, buffersize, core::mem::transmute(bytesread.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ReadSavedStateGlobalVariable(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, globalname: P0, buffer: *mut core::ffi::c_void, buffersize: u32) -> windows_core::Result<()> @@ -323,7 +323,7 @@ where P0: windows_core::Param, { windows_targets::link!("vmsavedstatedumpprovider.dll" "system" fn ResolveSavedStateGlobalVariableAddress(vmsavedstatedumphandle : *mut core::ffi::c_void, vpid : u32, globalname : windows_core::PCSTR, virtualaddress : *mut u64, size : *mut u32) -> windows_core::HRESULT); - ResolveSavedStateGlobalVariableAddress(vmsavedstatedumphandle, vpid, globalname.param().abi(), virtualaddress, core::mem::transmute(size.unwrap_or(std::ptr::null_mut()))).ok() + ResolveSavedStateGlobalVariableAddress(vmsavedstatedumphandle, vpid, globalname.param().abi(), virtualaddress, core::mem::transmute(size.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ScanMemoryForDosImages(vmsavedstatedumphandle: *mut core::ffi::c_void, vpid: u32, startaddress: u64, endaddress: u64, callbackcontext: *mut core::ffi::c_void, foundimagecallback: FOUND_IMAGE_CALLBACK, standaloneaddress: *const u64, standaloneaddresscount: u32) -> windows_core::Result<()> { @@ -361,7 +361,7 @@ where pub unsafe fn WHvAllocateVpciResource(providerid: Option<*const windows_core::GUID>, flags: WHV_ALLOCATE_VPCI_RESOURCE_FLAGS, resourcedescriptor: Option<&[u8]>) -> windows_core::Result { windows_targets::link!("winhvplatform.dll" "system" fn WHvAllocateVpciResource(providerid : *const windows_core::GUID, flags : WHV_ALLOCATE_VPCI_RESOURCE_FLAGS, resourcedescriptor : *const core::ffi::c_void, resourcedescriptorsizeinbytes : u32, vpciresource : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - WHvAllocateVpciResource(core::mem::transmute(providerid.unwrap_or(std::ptr::null())), flags, core::mem::transmute(resourcedescriptor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), resourcedescriptor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).map(|| result__) + WHvAllocateVpciResource(core::mem::transmute(providerid.unwrap_or(core::ptr::null())), flags, core::mem::transmute(resourcedescriptor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), resourcedescriptor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), &mut result__).map(|| result__) } #[inline] pub unsafe fn WHvCancelPartitionMigration(partition: P0) -> windows_core::Result<()> @@ -501,7 +501,7 @@ pub unsafe fn WHvEmulatorTryMmioEmulation(emulator: *const core::ffi::c_void, co #[inline] pub unsafe fn WHvGetCapability(capabilitycode: WHV_CAPABILITY_CODE, capabilitybuffer: *mut core::ffi::c_void, capabilitybuffersizeinbytes: u32, writtensizeinbytes: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetCapability(capabilitycode : WHV_CAPABILITY_CODE, capabilitybuffer : *mut core::ffi::c_void, capabilitybuffersizeinbytes : u32, writtensizeinbytes : *mut u32) -> windows_core::HRESULT); - WHvGetCapability(capabilitycode, capabilitybuffer, capabilitybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetCapability(capabilitycode, capabilitybuffer, capabilitybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetInterruptTargetVpSet(partition: P0, destination: u64, destinationmode: WHV_INTERRUPT_DESTINATION_MODE, targetvps: &mut [u32], targetvpcount: *mut u32) -> windows_core::Result<()> @@ -517,7 +517,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetPartitionCounters(partition : WHV_PARTITION_HANDLE, counterset : WHV_PARTITION_COUNTER_SET, buffer : *mut core::ffi::c_void, buffersizeinbytes : u32, byteswritten : *mut u32) -> windows_core::HRESULT); - WHvGetPartitionCounters(partition.param().abi(), counterset, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetPartitionCounters(partition.param().abi(), counterset, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetPartitionProperty(partition: P0, propertycode: WHV_PARTITION_PROPERTY_CODE, propertybuffer: *mut core::ffi::c_void, propertybuffersizeinbytes: u32, writtensizeinbytes: Option<*mut u32>) -> windows_core::Result<()> @@ -525,7 +525,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetPartitionProperty(partition : WHV_PARTITION_HANDLE, propertycode : WHV_PARTITION_PROPERTY_CODE, propertybuffer : *mut core::ffi::c_void, propertybuffersizeinbytes : u32, writtensizeinbytes : *mut u32) -> windows_core::HRESULT); - WHvGetPartitionProperty(partition.param().abi(), propertycode, propertybuffer, propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetPartitionProperty(partition.param().abi(), propertycode, propertybuffer, propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVirtualProcessorCounters(partition: P0, vpindex: u32, counterset: WHV_PROCESSOR_COUNTER_SET, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: Option<*mut u32>) -> windows_core::Result<()> @@ -533,7 +533,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorCounters(partition : WHV_PARTITION_HANDLE, vpindex : u32, counterset : WHV_PROCESSOR_COUNTER_SET, buffer : *mut core::ffi::c_void, buffersizeinbytes : u32, byteswritten : *mut u32) -> windows_core::HRESULT); - WHvGetVirtualProcessorCounters(partition.param().abi(), vpindex, counterset, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVirtualProcessorCounters(partition.param().abi(), vpindex, counterset, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVirtualProcessorCpuidOutput(partition: P0, vpindex: u32, eax: u32, ecx: u32) -> windows_core::Result @@ -550,7 +550,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorInterruptControllerState(partition : WHV_PARTITION_HANDLE, vpindex : u32, state : *mut core::ffi::c_void, statesize : u32, writtensize : *mut u32) -> windows_core::HRESULT); - WHvGetVirtualProcessorInterruptControllerState(partition.param().abi(), vpindex, state, statesize, core::mem::transmute(writtensize.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVirtualProcessorInterruptControllerState(partition.param().abi(), vpindex, state, statesize, core::mem::transmute(writtensize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVirtualProcessorInterruptControllerState2(partition: P0, vpindex: u32, state: *mut core::ffi::c_void, statesize: u32, writtensize: Option<*mut u32>) -> windows_core::Result<()> @@ -558,7 +558,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorInterruptControllerState2(partition : WHV_PARTITION_HANDLE, vpindex : u32, state : *mut core::ffi::c_void, statesize : u32, writtensize : *mut u32) -> windows_core::HRESULT); - WHvGetVirtualProcessorInterruptControllerState2(partition.param().abi(), vpindex, state, statesize, core::mem::transmute(writtensize.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVirtualProcessorInterruptControllerState2(partition.param().abi(), vpindex, state, statesize, core::mem::transmute(writtensize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVirtualProcessorRegisters(partition: P0, vpindex: u32, registernames: *const WHV_REGISTER_NAME, registercount: u32, registervalues: *mut WHV_REGISTER_VALUE) -> windows_core::Result<()> @@ -574,7 +574,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVirtualProcessorState(partition : WHV_PARTITION_HANDLE, vpindex : u32, statetype : WHV_VIRTUAL_PROCESSOR_STATE_TYPE, buffer : *mut core::ffi::c_void, buffersizeinbytes : u32, byteswritten : *mut u32) -> windows_core::HRESULT); - WHvGetVirtualProcessorState(partition.param().abi(), vpindex, statetype, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVirtualProcessorState(partition.param().abi(), vpindex, statetype, buffer, buffersizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVirtualProcessorXsaveState(partition: P0, vpindex: u32, buffer: *mut core::ffi::c_void, buffersizeinbytes: u32, byteswritten: *mut u32) -> windows_core::Result<()> @@ -590,7 +590,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVpciDeviceInterruptTarget(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, index : u32, multimessagenumber : u32, target : *mut WHV_VPCI_INTERRUPT_TARGET, targetsizeinbytes : u32, byteswritten : *mut u32) -> windows_core::HRESULT); - WHvGetVpciDeviceInterruptTarget(partition.param().abi(), logicaldeviceid, index, multimessagenumber, target, targetsizeinbytes, core::mem::transmute(byteswritten.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVpciDeviceInterruptTarget(partition.param().abi(), logicaldeviceid, index, multimessagenumber, target, targetsizeinbytes, core::mem::transmute(byteswritten.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvGetVpciDeviceNotification(partition: P0, logicaldeviceid: u64, notification: *mut WHV_VPCI_DEVICE_NOTIFICATION, notificationsizeinbytes: u32) -> windows_core::Result<()> @@ -606,7 +606,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvGetVpciDeviceProperty(partition : WHV_PARTITION_HANDLE, logicaldeviceid : u64, propertycode : WHV_VPCI_DEVICE_PROPERTY_CODE, propertybuffer : *mut core::ffi::c_void, propertybuffersizeinbytes : u32, writtensizeinbytes : *mut u32) -> windows_core::HRESULT); - WHvGetVpciDeviceProperty(partition.param().abi(), logicaldeviceid, propertycode, propertybuffer, propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(std::ptr::null_mut()))).ok() + WHvGetVpciDeviceProperty(partition.param().abi(), logicaldeviceid, propertycode, propertybuffer, propertybuffersizeinbytes, core::mem::transmute(writtensizeinbytes.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvMapGpaRange(partition: P0, sourceaddress: *const core::ffi::c_void, guestaddress: u64, sizeinbytes: u64, flags: WHV_MAP_GPA_RANGE_FLAGS) -> windows_core::Result<()> @@ -655,7 +655,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvQueryGpaRangeDirtyBitmap(partition : WHV_PARTITION_HANDLE, guestaddress : u64, rangesizeinbytes : u64, bitmap : *mut u64, bitmapsizeinbytes : u32) -> windows_core::HRESULT); - WHvQueryGpaRangeDirtyBitmap(partition.param().abi(), guestaddress, rangesizeinbytes, core::mem::transmute(bitmap.unwrap_or(std::ptr::null_mut())), bitmapsizeinbytes).ok() + WHvQueryGpaRangeDirtyBitmap(partition.param().abi(), guestaddress, rangesizeinbytes, core::mem::transmute(bitmap.unwrap_or(core::ptr::null_mut())), bitmapsizeinbytes).ok() } #[inline] pub unsafe fn WHvReadGpaRange(partition: P0, vpindex: u32, guestaddress: u64, controls: WHV_ACCESS_GPA_CONTROLS, data: *mut core::ffi::c_void, datasizeinbytes: u32) -> windows_core::Result<()> @@ -809,7 +809,7 @@ where P0: windows_core::Param, { windows_targets::link!("winhvplatform.dll" "system" fn WHvSignalVirtualProcessorSynicEvent(partition : WHV_PARTITION_HANDLE, synicevent : WHV_SYNIC_EVENT_PARAMETERS, newlysignaled : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - WHvSignalVirtualProcessorSynicEvent(partition.param().abi(), core::mem::transmute(synicevent), core::mem::transmute(newlysignaled.unwrap_or(std::ptr::null_mut()))).ok() + WHvSignalVirtualProcessorSynicEvent(partition.param().abi(), core::mem::transmute(synicevent), core::mem::transmute(newlysignaled.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WHvStartPartitionMigration(partition: P0) -> windows_core::Result 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 810f577a83..60840aa01a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/IO/mod.rs @@ -20,7 +20,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CancelIoEx(hfile : super::super::Foundation:: HANDLE, lpoverlapped : *const OVERLAPPED) -> super::super::Foundation:: BOOL); - CancelIoEx(hfile.param().abi(), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + CancelIoEx(hfile.param().abi(), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CancelSynchronousIo(hthread: P0) -> windows_core::Result<()> @@ -46,7 +46,7 @@ where P0: windows_core::Param, { 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.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() + DeviceIoControl(hdevice.param().abi(), dwiocontrolcode, core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, core::mem::transmute(lpbytesreturned.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetOverlappedResult(hfile: P0, lpoverlapped: *const OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P1) -> windows_core::Result<()> @@ -89,7 +89,7 @@ where P0: windows_core::Param, { 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.param().abi(), dwnumberofbytestransferred, dwcompletionkey, core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null()))).ok() + PostQueuedCompletionStatus(completionport.param().abi(), dwnumberofbytestransferred, dwcompletionkey, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null()))).ok() } #[repr(C)] #[derive(Clone, Copy)] diff --git a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs index 45da5bbe07..092eab5720 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Iis/mod.rs @@ -505,7 +505,7 @@ impl IMSAdminBase3W { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchmdrequiredbuffersize.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetChildPaths)(windows_core::Interface::as_raw(self), hmdhandle, pszmdpath.param().abi(), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pcchmdrequiredbuffersize.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] 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 436a77cfe0..1ae93e353d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/JobObjects/mod.rs @@ -14,7 +14,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateJobObjectA(lpjobattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateJobObjectA(core::mem::transmute(lpjobattributes.unwrap_or(std::ptr::null())), lpname.param().abi()); + let result__ = CreateJobObjectA(core::mem::transmute(lpjobattributes.unwrap_or(core::ptr::null())), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -24,7 +24,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateJobObjectW(lpjobattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateJobObjectW(core::mem::transmute(lpjobattributes.unwrap_or(std::ptr::null())), lpname.param().abi()); + let result__ = CreateJobObjectW(core::mem::transmute(lpjobattributes.unwrap_or(core::ptr::null())), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -72,7 +72,7 @@ where P0: windows_core::Param, { 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.param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength, core::mem::transmute(lpreturnlength.unwrap_or(std::ptr::null_mut()))).ok() + QueryInformationJobObject(hjob.param().abi(), jobobjectinformationclass, lpjobobjectinformation, cbjobobjectinformationlength, core::mem::transmute(lpreturnlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueryIoRateControlInformationJobObject(hjob: P0, volumename: P1, infoblocks: *mut *mut JOBOBJECT_IO_RATE_CONTROL_INFORMATION, infoblockcount: *mut u32) -> u32 diff --git a/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs index 3ebaace233..e30b616839 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Js/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn JsAddRef(r#ref: *const core::ffi::c_void, count: Option<*mut u32>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsAddRef(r#ref : *const core::ffi::c_void, count : *mut u32) -> JsErrorCode); - JsAddRef(r#ref, core::mem::transmute(count.unwrap_or(std::ptr::null_mut()))) + JsAddRef(r#ref, core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JsBoolToBoolean(value: u8, booleanvalue: *mut *mut core::ffi::c_void) -> JsErrorCode { @@ -16,7 +16,7 @@ pub unsafe fn JsBooleanToBool(value: *const core::ffi::c_void, boolvalue: *mut b #[inline] pub unsafe fn JsCallFunction(function: *const core::ffi::c_void, arguments: &[*const core::ffi::c_void], result: Option<*mut *mut core::ffi::c_void>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCallFunction(function : *const core::ffi::c_void, arguments : *const *const core::ffi::c_void, argumentcount : u16, result : *mut *mut core::ffi::c_void) -> JsErrorCode); - JsCallFunction(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result.unwrap_or(std::ptr::null_mut()))) + JsCallFunction(function, core::mem::transmute(arguments.as_ptr()), arguments.len().try_into().unwrap(), core::mem::transmute(result.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JsCollectGarbage(runtime: *const core::ffi::c_void) -> JsErrorCode { @@ -81,12 +81,12 @@ pub unsafe fn JsCreateError(message: *const core::ffi::c_void, error: *mut *mut #[inline] pub unsafe fn JsCreateExternalObject(data: Option<*const core::ffi::c_void>, finalizecallback: JsFinalizeCallback, object: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateExternalObject(data : *const core::ffi::c_void, finalizecallback : JsFinalizeCallback, object : *mut *mut core::ffi::c_void) -> JsErrorCode); - JsCreateExternalObject(core::mem::transmute(data.unwrap_or(std::ptr::null())), finalizecallback, object) + JsCreateExternalObject(core::mem::transmute(data.unwrap_or(core::ptr::null())), finalizecallback, object) } #[inline] pub unsafe fn JsCreateFunction(nativefunction: JsNativeFunction, callbackstate: Option<*const core::ffi::c_void>, function: *mut *mut core::ffi::c_void) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsCreateFunction(nativefunction : JsNativeFunction, callbackstate : *const core::ffi::c_void, function : *mut *mut core::ffi::c_void) -> JsErrorCode); - JsCreateFunction(nativefunction, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), function) + JsCreateFunction(nativefunction, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), function) } #[inline] pub unsafe fn JsCreateObject(object: *mut *mut core::ffi::c_void) -> JsErrorCode { @@ -300,7 +300,7 @@ pub unsafe fn JsHasProperty(object: *const core::ffi::c_void, propertyid: *const #[inline] pub unsafe fn JsIdle(nextidletick: Option<*mut u32>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsIdle(nextidletick : *mut u32) -> JsErrorCode); - JsIdle(core::mem::transmute(nextidletick.unwrap_or(std::ptr::null_mut()))) + JsIdle(core::mem::transmute(nextidletick.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JsIntToNumber(intvalue: i32, value: *mut *mut core::ffi::c_void) -> JsErrorCode { @@ -353,7 +353,7 @@ pub unsafe fn JsPreventExtension(object: *const core::ffi::c_void) -> JsErrorCod #[inline] pub unsafe fn JsRelease(r#ref: *const core::ffi::c_void, count: Option<*mut u32>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsRelease(r#ref : *const core::ffi::c_void, count : *mut u32) -> JsErrorCode); - JsRelease(r#ref, core::mem::transmute(count.unwrap_or(std::ptr::null_mut()))) + JsRelease(r#ref, core::mem::transmute(count.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn JsRunScript(script: P0, sourcecontext: usize, sourceurl: P1, result: *mut *mut core::ffi::c_void) -> JsErrorCode @@ -379,7 +379,7 @@ where P0: windows_core::Param, { windows_targets::link!("chakra.dll" "system" fn JsSerializeScript(script : windows_core::PCWSTR, buffer : *mut u8, buffersize : *mut u32) -> JsErrorCode); - JsSerializeScript(script.param().abi(), core::mem::transmute(buffer.unwrap_or(std::ptr::null_mut())), buffersize) + JsSerializeScript(script.param().abi(), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn JsSetCurrentContext(context: *const core::ffi::c_void) -> JsErrorCode { @@ -394,7 +394,7 @@ pub unsafe fn JsSetException(exception: *const core::ffi::c_void) -> JsErrorCode #[inline] pub unsafe fn JsSetExternalData(object: *const core::ffi::c_void, externaldata: Option<*const core::ffi::c_void>) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsSetExternalData(object : *const core::ffi::c_void, externaldata : *const core::ffi::c_void) -> JsErrorCode); - JsSetExternalData(object, core::mem::transmute(externaldata.unwrap_or(std::ptr::null()))) + JsSetExternalData(object, core::mem::transmute(externaldata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn JsSetIndexedProperty(object: *const core::ffi::c_void, index: *const core::ffi::c_void, value: *const core::ffi::c_void) -> JsErrorCode { @@ -414,12 +414,12 @@ pub unsafe fn JsSetPrototype(object: *const core::ffi::c_void, prototypeobject: #[inline] pub unsafe fn JsSetRuntimeBeforeCollectCallback(runtime: *const core::ffi::c_void, callbackstate: Option<*const core::ffi::c_void>, beforecollectcallback: JsBeforeCollectCallback) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsSetRuntimeBeforeCollectCallback(runtime : *const core::ffi::c_void, callbackstate : *const core::ffi::c_void, beforecollectcallback : JsBeforeCollectCallback) -> JsErrorCode); - JsSetRuntimeBeforeCollectCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), beforecollectcallback) + JsSetRuntimeBeforeCollectCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), beforecollectcallback) } #[inline] pub unsafe fn JsSetRuntimeMemoryAllocationCallback(runtime: *const core::ffi::c_void, callbackstate: Option<*const core::ffi::c_void>, allocationcallback: JsMemoryAllocationCallback) -> JsErrorCode { windows_targets::link!("chakra.dll" "system" fn JsSetRuntimeMemoryAllocationCallback(runtime : *const core::ffi::c_void, callbackstate : *const core::ffi::c_void, allocationcallback : JsMemoryAllocationCallback) -> JsErrorCode); - JsSetRuntimeMemoryAllocationCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(std::ptr::null())), allocationcallback) + JsSetRuntimeMemoryAllocationCallback(runtime, core::mem::transmute(callbackstate.unwrap_or(core::ptr::null())), allocationcallback) } #[inline] pub unsafe fn JsSetRuntimeMemoryLimit(runtime: *const core::ffi::c_void, memorylimit: usize) -> JsErrorCode { 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 b6e2354ebd..5fbdbf39f9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/LibraryLoader/mod.rs @@ -403,7 +403,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn UpdateResourceA(hupdate : super::super::Foundation:: 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.param().abi(), lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cb).ok() + UpdateResourceA(hupdate.param().abi(), lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cb).ok() } #[inline] pub unsafe fn UpdateResourceW(hupdate: P0, lptype: P1, lpname: P2, wlanguage: u16, lpdata: Option<*const core::ffi::c_void>, cb: u32) -> windows_core::Result<()> @@ -413,7 +413,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn UpdateResourceW(hupdate : super::super::Foundation:: 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.param().abi(), lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cb).ok() + UpdateResourceW(hupdate.param().abi(), lptype.param().abi(), lpname.param().abi(), wlanguage, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cb).ok() } pub const CURRENT_IMPORT_REDIRECTION_VERSION: u32 = 1u32; pub const DONT_RESOLVE_DLL_REFERENCES: LOAD_LIBRARY_FLAGS = LOAD_LIBRARY_FLAGS(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 113bfe7a68..5fb87d76c0 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Mailslots/mod.rs @@ -5,7 +5,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMailslotA(lpname : windows_core::PCSTR, nmaxmessagesize : u32, lreadtimeout : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = CreateMailslotA(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))); + let result__ = CreateMailslotA(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -15,7 +15,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMailslotW(lpname : windows_core::PCWSTR, nmaxmessagesize : u32, lreadtimeout : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = CreateMailslotW(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))); + let result__ = CreateMailslotW(lpname.param().abi(), nmaxmessagesize, lreadtimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -24,7 +24,7 @@ where P0: windows_core::Param, { 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.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() + GetMailslotInfo(hmailslot.param().abi(), core::mem::transmute(lpmaxmessagesize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpnextsize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpmessagecount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpreadtimeout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetMailslotInfo(hmailslot: P0, lreadtimeout: u32) -> windows_core::Result<()> 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 ab988d3890..3f6457240f 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Memory/mod.rs @@ -37,7 +37,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-7.dll" "system" fn CreateFileMapping2(file : super::super::Foundation:: HANDLE, securityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, desiredaccess : u32, pageprotection : PAGE_PROTECTION_FLAGS, allocationattributes : u32, maximumsize : u64, name : windows_core::PCWSTR, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMapping2(file.param().abi(), core::mem::transmute(securityattributes.unwrap_or(std::ptr::null())), desiredaccess, pageprotection, allocationattributes, maximumsize, name.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())); + let result__ = CreateFileMapping2(file.param().abi(), core::mem::transmute(securityattributes.unwrap_or(core::ptr::null())), desiredaccess, pageprotection, allocationattributes, maximumsize, name.param().abi(), core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -48,7 +48,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileMappingA(hfile : super::super::Foundation:: HANDLE, lpfilemappingattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flprotect : PAGE_PROTECTION_FLAGS, dwmaximumsizehigh : u32, dwmaximumsizelow : u32, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMappingA(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(std::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()); + let result__ = CreateFileMappingA(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -59,7 +59,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileMappingFromApp(hfile : super::super::Foundation:: HANDLE, securityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, pageprotection : PAGE_PROTECTION_FLAGS, maximumsize : u64, name : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMappingFromApp(hfile.param().abi(), core::mem::transmute(securityattributes.unwrap_or(std::ptr::null())), pageprotection, maximumsize, name.param().abi()); + let result__ = CreateFileMappingFromApp(hfile.param().abi(), core::mem::transmute(securityattributes.unwrap_or(core::ptr::null())), pageprotection, maximumsize, name.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -70,7 +70,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileMappingNumaA(hfile : super::super::Foundation:: HANDLE, lpfilemappingattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flprotect : PAGE_PROTECTION_FLAGS, dwmaximumsizehigh : u32, dwmaximumsizelow : u32, lpname : windows_core::PCSTR, nndpreferred : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMappingNumaA(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(std::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred); + let result__ = CreateFileMappingNumaA(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -81,7 +81,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileMappingNumaW(hfile : super::super::Foundation:: HANDLE, lpfilemappingattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flprotect : PAGE_PROTECTION_FLAGS, dwmaximumsizehigh : u32, dwmaximumsizelow : u32, lpname : windows_core::PCWSTR, nndpreferred : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMappingNumaW(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(std::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred); + let result__ = CreateFileMappingNumaW(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi(), nndpreferred); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -92,7 +92,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateFileMappingW(hfile : super::super::Foundation:: HANDLE, lpfilemappingattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, flprotect : PAGE_PROTECTION_FLAGS, dwmaximumsizehigh : u32, dwmaximumsizelow : u32, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateFileMappingW(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(std::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()); + let result__ = CreateFileMappingW(hfile.param().abi(), core::mem::transmute(lpfilemappingattributes.unwrap_or(core::ptr::null())), flprotect, dwmaximumsizehigh, dwmaximumsizelow, lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -156,7 +156,7 @@ pub unsafe fn GetSystemFileCacheSize(lpminimumfilecachesize: *mut usize, lpmaxim #[inline] pub unsafe fn GetWriteWatch(dwflags: u32, lpbaseaddress: *const core::ffi::c_void, dwregionsize: usize, lpaddresses: Option<*mut *mut core::ffi::c_void>, lpdwcount: Option<*mut usize>, lpdwgranularity: Option<*mut u32>) -> u32 { windows_targets::link!("kernel32.dll" "system" fn GetWriteWatch(dwflags : u32, lpbaseaddress : *const core::ffi::c_void, dwregionsize : usize, lpaddresses : *mut *mut core::ffi::c_void, lpdwcount : *mut usize, lpdwgranularity : *mut u32) -> u32); - GetWriteWatch(dwflags, lpbaseaddress, dwregionsize, core::mem::transmute(lpaddresses.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwcount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpdwgranularity.unwrap_or(std::ptr::null_mut()))) + GetWriteWatch(dwflags, lpbaseaddress, dwregionsize, core::mem::transmute(lpaddresses.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwcount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdwgranularity.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GlobalAlloc(uflags: GLOBAL_ALLOC_FLAGS, dwbytes: usize) -> windows_core::Result { @@ -244,7 +244,7 @@ where #[inline] pub unsafe fn HeapFree(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, lpmem: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn HeapFree(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS, lpmem : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - HeapFree(hheap, dwflags, core::mem::transmute(lpmem.unwrap_or(std::ptr::null()))).ok() + HeapFree(hheap, dwflags, core::mem::transmute(lpmem.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn HeapLock(hheap: P0) -> windows_core::Result<()> @@ -260,12 +260,12 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn HeapQueryInformation(heaphandle : super::super::Foundation:: HANDLE, heapinformationclass : HEAP_INFORMATION_CLASS, heapinformation : *mut core::ffi::c_void, heapinformationlength : usize, returnlength : *mut usize) -> super::super::Foundation:: BOOL); - HeapQueryInformation(heaphandle.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() + HeapQueryInformation(heaphandle.param().abi(), heapinformationclass, core::mem::transmute(heapinformation.unwrap_or(core::ptr::null_mut())), heapinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn HeapReAlloc(hheap: super::super::Foundation::HANDLE, dwflags: HEAP_FLAGS, lpmem: Option<*const core::ffi::c_void>, dwbytes: usize) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn HeapReAlloc(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS, lpmem : *const core::ffi::c_void, dwbytes : usize) -> *mut core::ffi::c_void); - HeapReAlloc(hheap, dwflags, core::mem::transmute(lpmem.unwrap_or(std::ptr::null())), dwbytes) + HeapReAlloc(hheap, dwflags, core::mem::transmute(lpmem.unwrap_or(core::ptr::null())), dwbytes) } #[inline] pub unsafe fn HeapSetInformation(heaphandle: P0, heapinformationclass: HEAP_INFORMATION_CLASS, heapinformation: Option<*const core::ffi::c_void>, heapinformationlength: usize) -> windows_core::Result<()> @@ -273,7 +273,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn HeapSetInformation(heaphandle : super::super::Foundation:: HANDLE, heapinformationclass : HEAP_INFORMATION_CLASS, heapinformation : *const core::ffi::c_void, heapinformationlength : usize) -> super::super::Foundation:: BOOL); - HeapSetInformation(heaphandle.param().abi(), heapinformationclass, core::mem::transmute(heapinformation.unwrap_or(std::ptr::null())), heapinformationlength).ok() + HeapSetInformation(heaphandle.param().abi(), heapinformationclass, core::mem::transmute(heapinformation.unwrap_or(core::ptr::null())), heapinformationlength).ok() } #[inline] pub unsafe fn HeapSize(hheap: P0, dwflags: HEAP_FLAGS, lpmem: *const core::ffi::c_void) -> usize @@ -305,7 +305,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn HeapValidate(hheap : super::super::Foundation:: HANDLE, dwflags : HEAP_FLAGS, lpmem : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - HeapValidate(hheap.param().abi(), dwflags, core::mem::transmute(lpmem.unwrap_or(std::ptr::null()))) + HeapValidate(hheap.param().abi(), dwflags, core::mem::transmute(lpmem.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn HeapWalk(hheap: P0, lpentry: *mut PROCESS_HEAP_ENTRY) -> windows_core::Result<()> @@ -323,7 +323,7 @@ pub unsafe fn IsBadCodePtr(lpfn: super::super::Foundation::FARPROC) -> windows_c #[inline] pub unsafe fn IsBadReadPtr(lp: Option<*const core::ffi::c_void>, ucb: usize) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn IsBadReadPtr(lp : *const core::ffi::c_void, ucb : usize) -> super::super::Foundation:: BOOL); - IsBadReadPtr(core::mem::transmute(lp.unwrap_or(std::ptr::null())), ucb) + IsBadReadPtr(core::mem::transmute(lp.unwrap_or(core::ptr::null())), ucb) } #[inline] pub unsafe fn IsBadStringPtrA(lpsz: P0, ucchmax: usize) -> super::super::Foundation::BOOL @@ -344,7 +344,7 @@ where #[inline] pub unsafe fn IsBadWritePtr(lp: Option<*const core::ffi::c_void>, ucb: usize) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn IsBadWritePtr(lp : *const core::ffi::c_void, ucb : usize) -> super::super::Foundation:: BOOL); - IsBadWritePtr(core::mem::transmute(lp.unwrap_or(std::ptr::null())), ucb) + IsBadWritePtr(core::mem::transmute(lp.unwrap_or(core::ptr::null())), ucb) } #[inline] pub unsafe fn LocalAlloc(uflags: LOCAL_ALLOC_FLAGS, ubytes: usize) -> windows_core::Result { @@ -407,7 +407,7 @@ pub unsafe fn MapUserPhysicalPages(virtualaddress: *const core::ffi::c_void, pag #[inline] pub unsafe fn MapUserPhysicalPagesScatter(virtualaddresses: *const *const core::ffi::c_void, numberofpages: usize, pagearray: 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()))).ok() + MapUserPhysicalPagesScatter(virtualaddresses, numberofpages, core::mem::transmute(pagearray.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn MapViewOfFile(hfilemappingobject: P0, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS @@ -424,7 +424,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn MapViewOfFile3(filemapping : super::super::Foundation:: HANDLE, process : super::super::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, offset : u64, viewsize : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFile3(filemapping.param().abi(), process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + MapViewOfFile3(filemapping.param().abi(), process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn MapViewOfFile3FromApp(filemapping: P0, process: P1, baseaddress: Option<*const core::ffi::c_void>, offset: u64, viewsize: usize, allocationtype: VIRTUAL_ALLOCATION_TYPE, pageprotection: u32, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> MEMORY_MAPPED_VIEW_ADDRESS @@ -433,7 +433,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn MapViewOfFile3FromApp(filemapping : super::super::Foundation:: HANDLE, process : super::super::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, offset : u64, viewsize : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFile3FromApp(filemapping.param().abi(), process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + MapViewOfFile3FromApp(filemapping.param().abi(), process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), offset, viewsize, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn MapViewOfFileEx(hfilemappingobject: P0, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize, lpbaseaddress: Option<*const core::ffi::c_void>) -> MEMORY_MAPPED_VIEW_ADDRESS @@ -441,7 +441,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn MapViewOfFileEx(hfilemappingobject : super::super::Foundation:: HANDLE, dwdesiredaccess : FILE_MAP, dwfileoffsethigh : u32, dwfileoffsetlow : u32, dwnumberofbytestomap : usize, lpbaseaddress : *const core::ffi::c_void) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFileEx(hfilemappingobject.param().abi(), dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(std::ptr::null()))) + MapViewOfFileEx(hfilemappingobject.param().abi(), dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn MapViewOfFileExNuma(hfilemappingobject: P0, dwdesiredaccess: FILE_MAP, dwfileoffsethigh: u32, dwfileoffsetlow: u32, dwnumberofbytestomap: usize, lpbaseaddress: Option<*const core::ffi::c_void>, nndpreferred: u32) -> MEMORY_MAPPED_VIEW_ADDRESS @@ -449,7 +449,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn MapViewOfFileExNuma(hfilemappingobject : super::super::Foundation:: HANDLE, dwdesiredaccess : FILE_MAP, dwfileoffsethigh : u32, dwfileoffsetlow : u32, dwnumberofbytestomap : usize, lpbaseaddress : *const core::ffi::c_void, nndpreferred : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFileExNuma(hfilemappingobject.param().abi(), dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(std::ptr::null())), nndpreferred) + MapViewOfFileExNuma(hfilemappingobject.param().abi(), dwdesiredaccess, dwfileoffsethigh, dwfileoffsetlow, dwnumberofbytestomap, core::mem::transmute(lpbaseaddress.unwrap_or(core::ptr::null())), nndpreferred) } #[inline] pub unsafe fn MapViewOfFileFromApp(hfilemappingobject: P0, desiredaccess: FILE_MAP, fileoffset: u64, numberofbytestomap: usize) -> MEMORY_MAPPED_VIEW_ADDRESS @@ -466,7 +466,7 @@ where P1: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-5.dll" "system" fn MapViewOfFileNuma2(filemappinghandle : super::super::Foundation:: HANDLE, processhandle : super::super::Foundation:: HANDLE, offset : u64, baseaddress : *const core::ffi::c_void, viewsize : usize, allocationtype : u32, pageprotection : u32, preferrednode : u32) -> MEMORY_MAPPED_VIEW_ADDRESS); - MapViewOfFileNuma2(filemappinghandle.param().abi(), processhandle.param().abi(), offset, core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), viewsize, allocationtype, pageprotection, preferrednode) + MapViewOfFileNuma2(filemappinghandle.param().abi(), processhandle.param().abi(), offset, core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), viewsize, allocationtype, pageprotection, preferrednode) } #[inline] pub unsafe fn OfferVirtualMemory(virtualaddress: &mut [u8], priority: OFFER_PRIORITY) -> u32 { @@ -542,7 +542,7 @@ where P0: windows_core::Param, { 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.param().abi(), virtualaddress, memoryinformationclass, memoryinformation, memoryinformationsize, core::mem::transmute(returnsize.unwrap_or(std::ptr::null_mut()))).ok() + QueryVirtualMemoryInformation(process.param().abi(), virtualaddress, memoryinformationclass, memoryinformation, memoryinformationsize, core::mem::transmute(returnsize.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ReclaimVirtualMemory(virtualaddress: &[u8]) -> u32 { @@ -640,7 +640,7 @@ pub unsafe fn UnregisterBadMemoryNotification(registrationhandle: *const core::f #[inline] pub unsafe fn VirtualAlloc(lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, flallocationtype: VIRTUAL_ALLOCATION_TYPE, flprotect: PAGE_PROTECTION_FLAGS) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn VirtualAlloc(lpaddress : *const core::ffi::c_void, dwsize : usize, flallocationtype : VIRTUAL_ALLOCATION_TYPE, flprotect : PAGE_PROTECTION_FLAGS) -> *mut core::ffi::c_void); - VirtualAlloc(core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), dwsize, flallocationtype, flprotect) + VirtualAlloc(core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), dwsize, flallocationtype, flprotect) } #[inline] pub unsafe fn VirtualAlloc2(process: P0, baseaddress: Option<*const core::ffi::c_void>, size: usize, allocationtype: VIRTUAL_ALLOCATION_TYPE, pageprotection: u32, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> *mut core::ffi::c_void @@ -648,7 +648,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn VirtualAlloc2(process : super::super::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> *mut core::ffi::c_void); - VirtualAlloc2(process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + VirtualAlloc2(process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn VirtualAlloc2FromApp(process: P0, baseaddress: Option<*const core::ffi::c_void>, size: usize, allocationtype: VIRTUAL_ALLOCATION_TYPE, pageprotection: u32, extendedparameters: Option<&mut [MEM_EXTENDED_PARAMETER]>) -> *mut core::ffi::c_void @@ -656,7 +656,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-memory-l1-1-6.dll" "system" fn VirtualAlloc2FromApp(process : super::super::Foundation:: HANDLE, baseaddress : *const core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, pageprotection : u32, extendedparameters : *mut MEM_EXTENDED_PARAMETER, parametercount : u32) -> *mut core::ffi::c_void); - VirtualAlloc2FromApp(process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + VirtualAlloc2FromApp(process.param().abi(), core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), size, allocationtype, pageprotection, core::mem::transmute(extendedparameters.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), extendedparameters.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) } #[inline] pub unsafe fn VirtualAllocEx(hprocess: P0, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, flallocationtype: VIRTUAL_ALLOCATION_TYPE, flprotect: PAGE_PROTECTION_FLAGS) -> *mut core::ffi::c_void @@ -664,7 +664,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn VirtualAllocEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const core::ffi::c_void, dwsize : usize, flallocationtype : VIRTUAL_ALLOCATION_TYPE, flprotect : PAGE_PROTECTION_FLAGS) -> *mut core::ffi::c_void); - VirtualAllocEx(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), dwsize, flallocationtype, flprotect) + VirtualAllocEx(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), dwsize, flallocationtype, flprotect) } #[inline] pub unsafe fn VirtualAllocExNuma(hprocess: P0, lpaddress: Option<*const core::ffi::c_void>, dwsize: usize, flallocationtype: VIRTUAL_ALLOCATION_TYPE, flprotect: u32, nndpreferred: u32) -> *mut core::ffi::c_void @@ -672,12 +672,12 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn VirtualAllocExNuma(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const core::ffi::c_void, dwsize : usize, flallocationtype : VIRTUAL_ALLOCATION_TYPE, flprotect : u32, nndpreferred : u32) -> *mut core::ffi::c_void); - VirtualAllocExNuma(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), dwsize, flallocationtype, flprotect, nndpreferred) + VirtualAllocExNuma(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), dwsize, flallocationtype, flprotect, nndpreferred) } #[inline] pub unsafe fn VirtualAllocFromApp(baseaddress: Option<*const core::ffi::c_void>, size: usize, allocationtype: VIRTUAL_ALLOCATION_TYPE, protection: u32) -> *mut core::ffi::c_void { windows_targets::link!("api-ms-win-core-memory-l1-1-3.dll" "system" fn VirtualAllocFromApp(baseaddress : *const core::ffi::c_void, size : usize, allocationtype : VIRTUAL_ALLOCATION_TYPE, protection : u32) -> *mut core::ffi::c_void); - VirtualAllocFromApp(core::mem::transmute(baseaddress.unwrap_or(std::ptr::null())), size, allocationtype, protection) + VirtualAllocFromApp(core::mem::transmute(baseaddress.unwrap_or(core::ptr::null())), size, allocationtype, protection) } #[inline] pub unsafe fn VirtualFree(lpaddress: *mut core::ffi::c_void, dwsize: usize, dwfreetype: VIRTUAL_FREE_TYPE) -> windows_core::Result<()> { @@ -718,7 +718,7 @@ pub unsafe fn VirtualProtectFromApp(address: *const core::ffi::c_void, size: usi #[inline] pub unsafe fn VirtualQuery(lpaddress: Option<*const core::ffi::c_void>, lpbuffer: *mut MEMORY_BASIC_INFORMATION, dwlength: usize) -> usize { windows_targets::link!("kernel32.dll" "system" fn VirtualQuery(lpaddress : *const core::ffi::c_void, lpbuffer : *mut MEMORY_BASIC_INFORMATION, dwlength : usize) -> usize); - VirtualQuery(core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), lpbuffer, dwlength) + VirtualQuery(core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), lpbuffer, dwlength) } #[inline] pub unsafe fn VirtualQueryEx(hprocess: P0, lpaddress: Option<*const core::ffi::c_void>, lpbuffer: *mut MEMORY_BASIC_INFORMATION, dwlength: usize) -> usize @@ -726,7 +726,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn VirtualQueryEx(hprocess : super::super::Foundation:: HANDLE, lpaddress : *const core::ffi::c_void, lpbuffer : *mut MEMORY_BASIC_INFORMATION, dwlength : usize) -> usize); - VirtualQueryEx(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(std::ptr::null())), lpbuffer, dwlength) + VirtualQueryEx(hprocess.param().abi(), core::mem::transmute(lpaddress.unwrap_or(core::ptr::null())), lpbuffer, dwlength) } #[inline] pub unsafe fn VirtualUnlock(lpaddress: *const core::ffi::c_void, dwsize: usize) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs index 0284d50721..b4f600fbd7 100644 --- a/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/MessageQueuing/mod.rs @@ -69,7 +69,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQGetMachineProperties(lpwcsmachinename : windows_core::PCWSTR, pguidmachineid : *const windows_core::GUID, pqmprops : *mut MQQMPROPS) -> windows_core::HRESULT); - MQGetMachineProperties(lpwcsmachinename.param().abi(), core::mem::transmute(pguidmachineid.unwrap_or(std::ptr::null())), pqmprops).ok() + MQGetMachineProperties(lpwcsmachinename.param().abi(), core::mem::transmute(pguidmachineid.unwrap_or(core::ptr::null())), pqmprops).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -108,13 +108,13 @@ where pub unsafe fn MQGetSecurityContext(lpcertbuffer: Option<*const core::ffi::c_void>, dwcertbufferlength: u32) -> windows_core::Result { windows_targets::link!("mqrt.dll" "system" fn MQGetSecurityContext(lpcertbuffer : *const core::ffi::c_void, dwcertbufferlength : u32, phsecuritycontext : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MQGetSecurityContext(core::mem::transmute(lpcertbuffer.unwrap_or(std::ptr::null())), dwcertbufferlength, &mut result__).map(|| result__) + MQGetSecurityContext(core::mem::transmute(lpcertbuffer.unwrap_or(core::ptr::null())), dwcertbufferlength, &mut result__).map(|| result__) } #[inline] pub unsafe fn MQGetSecurityContextEx(lpcertbuffer: Option<*const core::ffi::c_void>, dwcertbufferlength: u32) -> windows_core::Result { windows_targets::link!("mqrt.dll" "system" fn MQGetSecurityContextEx(lpcertbuffer : *const core::ffi::c_void, dwcertbufferlength : u32, phsecuritycontext : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MQGetSecurityContextEx(core::mem::transmute(lpcertbuffer.unwrap_or(std::ptr::null())), dwcertbufferlength, &mut result__).map(|| result__) + MQGetSecurityContextEx(core::mem::transmute(lpcertbuffer.unwrap_or(core::ptr::null())), dwcertbufferlength, &mut result__).map(|| result__) } #[inline] pub unsafe fn MQHandleToFormatName(hqueue: isize, lpwcsformatname: windows_core::PWSTR, lpdwformatnamelength: *mut u32) -> windows_core::Result<()> { @@ -134,7 +134,7 @@ where { windows_targets::link!("mqrt.dll" "system" fn MQLocateBegin(lpwcscontext : windows_core::PCWSTR, prestriction : *const MQRESTRICTION, pcolumns : *const MQCOLUMNSET, psort : *const MQSORTSET, phenum : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - MQLocateBegin(lpwcscontext.param().abi(), core::mem::transmute(prestriction.unwrap_or(std::ptr::null())), pcolumns, psort, &mut result__).map(|| result__) + MQLocateBegin(lpwcscontext.param().abi(), core::mem::transmute(prestriction.unwrap_or(core::ptr::null())), pcolumns, psort, &mut result__).map(|| result__) } #[inline] pub unsafe fn MQLocateEnd(henum: P0) -> windows_core::Result<()> @@ -220,7 +220,7 @@ where P1: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQReceiveMessage(hsource : isize, dwtimeout : u32, dwaction : u32, pmessageprops : *mut MQMSGPROPS, lpoverlapped : *mut super::IO:: OVERLAPPED, fnreceivecallback : PMQRECEIVECALLBACK, hcursor : super::super::Foundation:: HANDLE, ptransaction : * mut core::ffi::c_void) -> windows_core::HRESULT); - MQReceiveMessage(hsource, dwtimeout, dwaction, core::mem::transmute(pmessageprops.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), fnreceivecallback, hcursor.param().abi(), ptransaction.param().abi()).ok() + MQReceiveMessage(hsource, dwtimeout, dwaction, core::mem::transmute(pmessageprops.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), fnreceivecallback, hcursor.param().abi(), ptransaction.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_DistributedTransactionCoordinator", feature = "Win32_System_IO", feature = "Win32_System_Variant"))] #[inline] @@ -229,7 +229,7 @@ where P0: windows_core::Param, { windows_targets::link!("mqrt.dll" "system" fn MQReceiveMessageByLookupId(hsource : isize, ulllookupid : u64, dwlookupaction : u32, pmessageprops : *mut MQMSGPROPS, lpoverlapped : *mut super::IO:: OVERLAPPED, fnreceivecallback : PMQRECEIVECALLBACK, ptransaction : * mut core::ffi::c_void) -> windows_core::HRESULT); - MQReceiveMessageByLookupId(hsource, ulllookupid, dwlookupaction, core::mem::transmute(pmessageprops.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut())), fnreceivecallback, ptransaction.param().abi()).ok() + MQReceiveMessageByLookupId(hsource, ulllookupid, dwlookupaction, core::mem::transmute(pmessageprops.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut())), fnreceivecallback, ptransaction.param().abi()).ok() } #[inline] pub unsafe fn MQRegisterCertificate(dwflags: u32, lpcertbuffer: *const core::ffi::c_void, dwcertbufferlength: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs index ceae09b657..4a89c1f30e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Ole/mod.rs @@ -64,7 +64,7 @@ where pub unsafe fn DispCallFunc(pvinstance: Option<*const core::ffi::c_void>, ovft: usize, cc: super::Com::CALLCONV, vtreturn: super::Variant::VARENUM, cactuals: u32, prgvt: *const u16, prgpvarg: *const *const super::Variant::VARIANT) -> windows_core::Result { windows_targets::link!("oleaut32.dll" "system" fn DispCallFunc(pvinstance : *const core::ffi::c_void, ovft : usize, cc : super::Com:: CALLCONV, vtreturn : super::Variant:: VARENUM, cactuals : u32, prgvt : *const u16, prgpvarg : *const *const super::Variant:: VARIANT, pvargresult : *mut core::mem::MaybeUninit < super::Variant:: VARIANT >) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - DispCallFunc(core::mem::transmute(pvinstance.unwrap_or(std::ptr::null())), ovft, cc, vtreturn, cactuals, prgvt, prgpvarg, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + DispCallFunc(core::mem::transmute(pvinstance.unwrap_or(core::ptr::null())), ovft, cc, vtreturn, cactuals, prgvt, prgpvarg, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -79,7 +79,7 @@ where #[inline] pub unsafe fn DispGetParam(pdispparams: *const super::Com::DISPPARAMS, position: u32, vttarg: super::Variant::VARENUM, pvarresult: *mut super::Variant::VARIANT, puargerr: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn DispGetParam(pdispparams : *const super::Com:: DISPPARAMS, position : u32, vttarg : super::Variant:: VARENUM, pvarresult : *mut core::mem::MaybeUninit < super::Variant:: VARIANT >, puargerr : *mut u32) -> windows_core::HRESULT); - DispGetParam(pdispparams, position, vttarg, core::mem::transmute(pvarresult), core::mem::transmute(puargerr.unwrap_or(std::ptr::null_mut()))).ok() + DispGetParam(pdispparams, position, vttarg, core::mem::transmute(pvarresult), core::mem::transmute(puargerr.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Variant"))] #[inline] @@ -103,7 +103,7 @@ where #[inline] pub unsafe fn GetActiveObject(rclsid: *const windows_core::GUID, pvreserved: Option<*mut core::ffi::c_void>, ppunk: *mut Option) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn GetActiveObject(rclsid : *const windows_core::GUID, pvreserved : *mut core::ffi::c_void, ppunk : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - GetActiveObject(rclsid, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppunk)).ok() + GetActiveObject(rclsid, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppunk)).ok() } #[inline] pub unsafe fn GetAltMonthNames(lcid: u32) -> windows_core::Result<*mut windows_core::PWSTR> { @@ -251,7 +251,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleConvertOLESTREAMToIStorage2(lpolestream : *const super::Com::StructuredStorage:: OLESTREAM, pstg : * mut core::ffi::c_void, ptd : *const super::Com:: DVTARGETDEVICE, opt : u32, pvcallbackcontext : *const core::ffi::c_void, pqueryconvertolelinkcallback : OLESTREAMQUERYCONVERTOLELINKCALLBACK) -> windows_core::HRESULT); - OleConvertOLESTREAMToIStorage2(lpolestream, pstg.param().abi(), core::mem::transmute(ptd.unwrap_or(std::ptr::null())), opt, core::mem::transmute(pvcallbackcontext.unwrap_or(std::ptr::null())), pqueryconvertolelinkcallback).ok() + OleConvertOLESTREAMToIStorage2(lpolestream, pstg.param().abi(), core::mem::transmute(ptd.unwrap_or(core::ptr::null())), opt, core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), pqueryconvertolelinkcallback).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com_StructuredStorage"))] #[inline] @@ -260,7 +260,7 @@ where P0: windows_core::Param, { windows_targets::link!("ole32.dll" "system" fn OleConvertOLESTREAMToIStorageEx2(polestm : *const super::Com::StructuredStorage:: OLESTREAM, pstg : * mut core::ffi::c_void, pcfformat : *mut u16, plwwidth : *mut i32, plheight : *mut i32, pdwsize : *mut u32, pmedium : *mut super::Com:: STGMEDIUM, opt : u32, pvcallbackcontext : *const core::ffi::c_void, pqueryconvertolelinkcallback : OLESTREAMQUERYCONVERTOLELINKCALLBACK) -> windows_core::HRESULT); - OleConvertOLESTREAMToIStorageEx2(polestm, pstg.param().abi(), pcfformat, plwwidth, plheight, pdwsize, pmedium, opt, core::mem::transmute(pvcallbackcontext.unwrap_or(std::ptr::null())), pqueryconvertolelinkcallback).ok() + OleConvertOLESTREAMToIStorageEx2(polestm, pstg.param().abi(), pcfformat, plwwidth, plheight, pdwsize, pmedium, opt, core::mem::transmute(pvcallbackcontext.unwrap_or(core::ptr::null())), pqueryconvertolelinkcallback).ok() } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -449,7 +449,7 @@ where P1: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn OleCreatePropertyFrame(hwndowner : super::super::Foundation:: HWND, x : u32, y : u32, lpszcaption : windows_core::PCWSTR, cobjects : u32, ppunk : *const * mut core::ffi::c_void, cpages : u32, ppageclsid : *const windows_core::GUID, lcid : u32, dwreserved : u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - OleCreatePropertyFrame(hwndowner.param().abi(), x, y, lpszcaption.param().abi(), cobjects, core::mem::transmute(ppunk), cpages, ppageclsid, lcid, dwreserved, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + OleCreatePropertyFrame(hwndowner.param().abi(), x, y, lpszcaption.param().abi(), cobjects, core::mem::transmute(ppunk), cpages, ppageclsid, lcid, dwreserved, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn OleCreatePropertyFrameIndirect(lpparams: *const OCPFIPARAMS) -> windows_core::Result<()> { @@ -556,7 +556,7 @@ where #[inline] pub unsafe fn OleInitialize(pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("ole32.dll" "system" fn OleInitialize(pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - OleInitialize(core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + OleInitialize(core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1026,7 +1026,7 @@ pub unsafe fn ReleaseStgMedium(param0: *mut super::Com::STGMEDIUM) { #[inline] pub unsafe fn RevokeActiveObject(dwregister: u32, pvreserved: Option<*mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("oleaut32.dll" "system" fn RevokeActiveObject(dwregister : u32, pvreserved : *mut core::ffi::c_void) -> windows_core::HRESULT); - RevokeActiveObject(dwregister, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null_mut()))).ok() + RevokeActiveObject(dwregister, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RevokeDragDrop(hwnd: P0) -> windows_core::Result<()> @@ -2743,7 +2743,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleaut32.dll" "system" fn VarTokenizeFormatString(pstrformat : windows_core::PCWSTR, rgbtok : *mut u8, cbtok : i32, ifirstday : VARFORMAT_FIRST_DAY, ifirstweek : VARFORMAT_FIRST_WEEK, lcid : u32, pcbactual : *const i32) -> windows_core::HRESULT); - VarTokenizeFormatString(pstrformat.param().abi(), core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), ifirstday, ifirstweek, lcid, core::mem::transmute(pcbactual.unwrap_or(std::ptr::null()))).ok() + VarTokenizeFormatString(pstrformat.param().abi(), core::mem::transmute(rgbtok.as_ptr()), rgbtok.len().try_into().unwrap(), ifirstday, ifirstweek, lcid, core::mem::transmute(pcbactual.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn VarUI1FromBool(boolin: P0) -> windows_core::Result @@ -3775,7 +3775,7 @@ impl IDispatchEx { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), id, lcid, wflags, pdp, core::mem::transmute(pvarres.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pei.unwrap_or(std::ptr::null_mut())), pspcaller.param().abi()).ok() + (windows_core::Interface::vtable(self).InvokeEx)(windows_core::Interface::as_raw(self), id, lcid, wflags, pdp, core::mem::transmute(pvarres.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pei.unwrap_or(core::ptr::null_mut())), pspcaller.param().abi()).ok() } pub unsafe fn DeleteMemberByName(&self, bstrname: P0, grfdex: u32) -> windows_core::Result<()> where @@ -3958,7 +3958,7 @@ windows_core::imp::interface_hierarchy!(IEnumOLEVERB, windows_core::IUnknown); impl IEnumOLEVERB { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn Next(&self, rgelt: &mut [OLEVERB], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -4506,7 +4506,7 @@ impl IOleCache2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), grfupdf, core::mem::transmute(preserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).UpdateCache)(windows_core::Interface::as_raw(self), pdataobject.param().abi(), grfupdf, core::mem::transmute(preserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn DiscardCache(&self, dwdiscardoptions: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DiscardCache)(windows_core::Interface::as_raw(self), dwdiscardoptions).ok() @@ -4915,7 +4915,7 @@ windows_core::imp::interface_hierarchy!(IOleInPlaceActiveObject, windows_core::I impl IOleInPlaceActiveObject { #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn TranslateAccelerator(&self, lpmsg: Option<*const super::super::UI::WindowsAndMessaging::MSG>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).TranslateAccelerator)(windows_core::Interface::as_raw(self), core::mem::transmute(lpmsg.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn OnFrameWindowActivate(&self, factivate: P0) -> windows_core::Result<()> where @@ -5691,7 +5691,7 @@ impl IOleUILinkContainerA { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, pcheaten, fvalidatesource.param().abi()).ok() } pub unsafe fn GetLinkSource(&self, dwlink: u32, lplpszdisplayname: Option<*mut windows_core::PSTR>, lplenfilename: *mut u32, lplpszfulllinktype: Option<*mut windows_core::PSTR>, lplpszshortlinktype: Option<*mut windows_core::PSTR>, lpfsourceavailable: *mut super::super::Foundation::BOOL, lpfisselected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, core::mem::transmute(lplpszdisplayname.unwrap_or(std::ptr::null_mut())), lplenfilename, core::mem::transmute(lplpszfulllinktype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(std::ptr::null_mut())), lpfsourceavailable, lpfisselected).ok() + (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, core::mem::transmute(lplpszdisplayname.unwrap_or(core::ptr::null_mut())), lplenfilename, core::mem::transmute(lplpszfulllinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::ptr::null_mut())), lpfsourceavailable, lpfisselected).ok() } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), dwlink).ok() @@ -5746,7 +5746,7 @@ impl IOleUILinkContainerW { (windows_core::Interface::vtable(self).SetLinkSource)(windows_core::Interface::as_raw(self), dwlink, lpszdisplayname.param().abi(), lenfilename, pcheaten, fvalidatesource.param().abi()).ok() } pub unsafe fn GetLinkSource(&self, dwlink: u32, lplpszdisplayname: Option<*mut windows_core::PWSTR>, lplenfilename: *mut u32, lplpszfulllinktype: Option<*mut windows_core::PWSTR>, lplpszshortlinktype: Option<*mut windows_core::PWSTR>, lpfsourceavailable: *mut super::super::Foundation::BOOL, lpfisselected: *mut super::super::Foundation::BOOL) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, core::mem::transmute(lplpszdisplayname.unwrap_or(std::ptr::null_mut())), lplenfilename, core::mem::transmute(lplpszfulllinktype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(std::ptr::null_mut())), lpfsourceavailable, lpfisselected).ok() + (windows_core::Interface::vtable(self).GetLinkSource)(windows_core::Interface::as_raw(self), dwlink, core::mem::transmute(lplpszdisplayname.unwrap_or(core::ptr::null_mut())), lplenfilename, core::mem::transmute(lplpszfulllinktype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshortlinktype.unwrap_or(core::ptr::null_mut())), lpfsourceavailable, lpfisselected).ok() } pub unsafe fn OpenLinkSource(&self, dwlink: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OpenLinkSource)(windows_core::Interface::as_raw(self), dwlink).ok() @@ -5822,16 +5822,16 @@ impl core::ops::Deref for IOleUIObjInfoA { windows_core::imp::interface_hierarchy!(IOleUIObjInfoA, windows_core::IUnknown); impl IOleUIObjInfoA { pub unsafe fn GetObjectInfo(&self, dwobject: u32, lpdwobjsize: *mut u32, lplpszlabel: Option<*mut windows_core::PSTR>, lplpsztype: Option<*mut windows_core::PSTR>, lplpszshorttype: Option<*mut windows_core::PSTR>, lplpszlocation: Option<*mut windows_core::PSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize, core::mem::transmute(lplpszlabel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpsztype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszshorttype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszlocation.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize, core::mem::transmute(lplpszlabel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpsztype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshorttype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszlocation.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConvertInfo(&self, dwobject: u32, lpclassid: *mut windows_core::GUID, lpwformat: *mut u16, lpconvertdefaultclassid: *mut windows_core::GUID, lplpclsidexclude: *mut *mut windows_core::GUID, lpcclsidexclude: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid, lpwformat, lpconvertdefaultclassid, lplpclsidexclude, core::mem::transmute(lpcclsidexclude.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid, lpwformat, lpconvertdefaultclassid, lplpclsidexclude, core::mem::transmute(lpcclsidexclude.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertObject(&self, dwobject: u32, clsidnew: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertObject)(windows_core::Interface::as_raw(self), dwobject, clsidnew).ok() } pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, core::mem::transmute(phmetapict.unwrap_or(std::ptr::null())), core::mem::transmute(pdvaspect.unwrap_or(std::ptr::null())), core::mem::transmute(pncurrentscale.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, core::mem::transmute(phmetapict.unwrap_or(core::ptr::null())), core::mem::transmute(pdvaspect.unwrap_or(core::ptr::null())), core::mem::transmute(pncurrentscale.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: P0, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P1) -> windows_core::Result<()> where @@ -5860,16 +5860,16 @@ impl core::ops::Deref for IOleUIObjInfoW { windows_core::imp::interface_hierarchy!(IOleUIObjInfoW, windows_core::IUnknown); impl IOleUIObjInfoW { pub unsafe fn GetObjectInfo(&self, dwobject: u32, lpdwobjsize: *mut u32, lplpszlabel: Option<*mut windows_core::PWSTR>, lplpsztype: Option<*mut windows_core::PWSTR>, lplpszshorttype: Option<*mut windows_core::PWSTR>, lplpszlocation: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize, core::mem::transmute(lplpszlabel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpsztype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszshorttype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lplpszlocation.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObjectInfo)(windows_core::Interface::as_raw(self), dwobject, lpdwobjsize, core::mem::transmute(lplpszlabel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpsztype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszshorttype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lplpszlocation.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetConvertInfo(&self, dwobject: u32, lpclassid: *mut windows_core::GUID, lpwformat: *mut u16, lpconvertdefaultclassid: *mut windows_core::GUID, lplpclsidexclude: *mut *mut windows_core::GUID, lpcclsidexclude: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid, lpwformat, lpconvertdefaultclassid, lplpclsidexclude, core::mem::transmute(lpcclsidexclude.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetConvertInfo)(windows_core::Interface::as_raw(self), dwobject, lpclassid, lpwformat, lpconvertdefaultclassid, lplpclsidexclude, core::mem::transmute(lpcclsidexclude.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ConvertObject(&self, dwobject: u32, clsidnew: *const windows_core::GUID) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ConvertObject)(windows_core::Interface::as_raw(self), dwobject, clsidnew).ok() } pub unsafe fn GetViewInfo(&self, dwobject: u32, phmetapict: Option<*const super::super::Foundation::HGLOBAL>, pdvaspect: Option<*const u32>, pncurrentscale: Option<*const i32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, core::mem::transmute(phmetapict.unwrap_or(std::ptr::null())), core::mem::transmute(pdvaspect.unwrap_or(std::ptr::null())), core::mem::transmute(pncurrentscale.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetViewInfo)(windows_core::Interface::as_raw(self), dwobject, core::mem::transmute(phmetapict.unwrap_or(core::ptr::null())), core::mem::transmute(pdvaspect.unwrap_or(core::ptr::null())), core::mem::transmute(pncurrentscale.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetViewInfo(&self, dwobject: u32, hmetapict: P0, dvaspect: u32, ncurrentscale: i32, brelativetoorig: P1) -> windows_core::Result<()> where @@ -7183,14 +7183,14 @@ impl IViewObject { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect, core::mem::transmute(ptd.unwrap_or(std::ptr::null())), hdctargetdev.param().abi(), hdcdraw.param().abi(), core::mem::transmute(lprcbounds.unwrap_or(std::ptr::null())), core::mem::transmute(lprcwbounds.unwrap_or(std::ptr::null())), pfncontinue, dwcontinue).ok() + (windows_core::Interface::vtable(self).Draw)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect, core::mem::transmute(ptd.unwrap_or(core::ptr::null())), hdctargetdev.param().abi(), hdcdraw.param().abi(), core::mem::transmute(lprcbounds.unwrap_or(core::ptr::null())), core::mem::transmute(lprcwbounds.unwrap_or(core::ptr::null())), pfncontinue, dwcontinue).ok() } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_System_Com"))] pub unsafe fn GetColorSet(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, ptd: Option<*const super::Com::DVTARGETDEVICE>, hictargetdev: P0, ppcolorset: *mut *mut super::super::Graphics::Gdi::LOGPALETTE) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect, core::mem::transmute(ptd.unwrap_or(std::ptr::null())), hictargetdev.param().abi(), ppcolorset).ok() + (windows_core::Interface::vtable(self).GetColorSet)(windows_core::Interface::as_raw(self), dwdrawaspect, lindex, pvaspect, core::mem::transmute(ptd.unwrap_or(core::ptr::null())), hictargetdev.param().abi(), ppcolorset).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Freeze(&self, dwdrawaspect: super::Com::DVASPECT, lindex: i32, pvaspect: *mut core::ffi::c_void, pdwfreeze: *mut u32) -> windows_core::Result<()> { @@ -7208,7 +7208,7 @@ impl IViewObject { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetAdvise(&self, paspects: Option<*mut u32>, padvf: Option<*mut u32>, ppadvsink: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetAdvise)(windows_core::Interface::as_raw(self), core::mem::transmute(paspects.unwrap_or(std::ptr::null_mut())), core::mem::transmute(padvf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppadvsink)).ok() + (windows_core::Interface::vtable(self).GetAdvise)(windows_core::Interface::as_raw(self), core::mem::transmute(paspects.unwrap_or(core::ptr::null_mut())), core::mem::transmute(padvf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppadvsink)).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs index f148788f1e..9b47dd25e8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/ParentalControls/mod.rs @@ -203,7 +203,7 @@ impl IWindowsParentalControlsCore { (windows_core::Interface::vtable(self).GetWebSettings)(windows_core::Interface::as_raw(self), pcszsid.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetWebFilterInfo(&self, pguidid: *mut windows_core::GUID, ppszname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetWebFilterInfo)(windows_core::Interface::as_raw(self), pguidid, core::mem::transmute(ppszname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetWebFilterInfo)(windows_core::Interface::as_raw(self), pguidid, core::mem::transmute(ppszname.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] 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 b1ad12d2c6..9736122b4a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Performance/mod.rs @@ -354,7 +354,7 @@ where #[inline] pub unsafe fn PdhFormatFromRawValue(dwcountertype: u32, dwformat: PDH_FMT, ptimebase: Option<*const i64>, prawvalue1: *const PDH_RAW_COUNTER, prawvalue2: *const PDH_RAW_COUNTER, pfmtvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhFormatFromRawValue(dwcountertype : u32, dwformat : PDH_FMT, ptimebase : *const i64, prawvalue1 : *const PDH_RAW_COUNTER, prawvalue2 : *const PDH_RAW_COUNTER, pfmtvalue : *mut PDH_FMT_COUNTERVALUE) -> u32); - PdhFormatFromRawValue(dwcountertype, dwformat, core::mem::transmute(ptimebase.unwrap_or(std::ptr::null())), prawvalue1, prawvalue2, pfmtvalue) + PdhFormatFromRawValue(dwcountertype, dwformat, core::mem::transmute(ptimebase.unwrap_or(core::ptr::null())), prawvalue1, prawvalue2, pfmtvalue) } #[inline] pub unsafe fn PdhGetCounterInfoA(hcounter: isize, bretrieveexplaintext: P0, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_A>) -> u32 @@ -362,7 +362,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoA(hcounter : isize, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_A) -> u32); - PdhGetCounterInfoA(hcounter, bretrieveexplaintext.param().abi(), pdwbuffersize, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetCounterInfoA(hcounter, bretrieveexplaintext.param().abi(), pdwbuffersize, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetCounterInfoW(hcounter: isize, bretrieveexplaintext: P0, pdwbuffersize: *mut u32, lpbuffer: Option<*mut PDH_COUNTER_INFO_W>) -> u32 @@ -370,7 +370,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhGetCounterInfoW(hcounter : isize, bretrieveexplaintext : super::super::Foundation:: BOOLEAN, pdwbuffersize : *mut u32, lpbuffer : *mut PDH_COUNTER_INFO_W) -> u32); - PdhGetCounterInfoW(hcounter, bretrieveexplaintext.param().abi(), pdwbuffersize, core::mem::transmute(lpbuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetCounterInfoW(hcounter, bretrieveexplaintext.param().abi(), pdwbuffersize, core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetCounterTimeBase(hcounter: isize, ptimebase: *mut i64) -> u32 { @@ -473,22 +473,22 @@ where #[inline] pub unsafe fn PdhGetDllVersion(lpdwversion: Option<*mut PDH_DLL_VERSION>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetDllVersion(lpdwversion : *mut PDH_DLL_VERSION) -> u32); - PdhGetDllVersion(core::mem::transmute(lpdwversion.unwrap_or(std::ptr::null_mut()))) + PdhGetDllVersion(core::mem::transmute(lpdwversion.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetFormattedCounterArrayA(hcounter: isize, dwformat: PDH_FMT, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_FMT_COUNTERVALUE_ITEM_A>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetFormattedCounterArrayA(hcounter : isize, dwformat : PDH_FMT, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_FMT_COUNTERVALUE_ITEM_A) -> u32); - PdhGetFormattedCounterArrayA(hcounter, dwformat, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetFormattedCounterArrayA(hcounter, dwformat, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetFormattedCounterArrayW(hcounter: isize, dwformat: PDH_FMT, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_FMT_COUNTERVALUE_ITEM_W>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetFormattedCounterArrayW(hcounter : isize, dwformat : PDH_FMT, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_FMT_COUNTERVALUE_ITEM_W) -> u32); - PdhGetFormattedCounterArrayW(hcounter, dwformat, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetFormattedCounterArrayW(hcounter, dwformat, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetFormattedCounterValue(hcounter: isize, dwformat: PDH_FMT, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_FMT_COUNTERVALUE) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetFormattedCounterValue(hcounter : isize, dwformat : PDH_FMT, lpdwtype : *mut u32, pvalue : *mut PDH_FMT_COUNTERVALUE) -> u32); - PdhGetFormattedCounterValue(hcounter, dwformat, core::mem::transmute(lpdwtype.unwrap_or(std::ptr::null_mut())), pvalue) + PdhGetFormattedCounterValue(hcounter, dwformat, core::mem::transmute(lpdwtype.unwrap_or(core::ptr::null_mut())), pvalue) } #[inline] pub unsafe fn PdhGetLogFileSize(hlog: isize, llsize: *mut i64) -> u32 { @@ -498,22 +498,22 @@ pub unsafe fn PdhGetLogFileSize(hlog: isize, llsize: *mut i64) -> u32 { #[inline] pub unsafe fn PdhGetLogSetGUID(hlog: isize, pguid: Option<*mut windows_core::GUID>, prunid: Option<*mut i32>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetLogSetGUID(hlog : isize, pguid : *mut windows_core::GUID, prunid : *mut i32) -> u32); - PdhGetLogSetGUID(hlog, core::mem::transmute(pguid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(prunid.unwrap_or(std::ptr::null_mut()))) + PdhGetLogSetGUID(hlog, core::mem::transmute(pguid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(prunid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetRawCounterArrayA(hcounter: isize, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_A>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterArrayA(hcounter : isize, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_RAW_COUNTER_ITEM_A) -> u32); - PdhGetRawCounterArrayA(hcounter, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetRawCounterArrayA(hcounter, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetRawCounterArrayW(hcounter: isize, lpdwbuffersize: *mut u32, lpdwitemcount: *mut u32, itembuffer: Option<*mut PDH_RAW_COUNTER_ITEM_W>) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterArrayW(hcounter : isize, lpdwbuffersize : *mut u32, lpdwitemcount : *mut u32, itembuffer : *mut PDH_RAW_COUNTER_ITEM_W) -> u32); - PdhGetRawCounterArrayW(hcounter, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(std::ptr::null_mut()))) + PdhGetRawCounterArrayW(hcounter, lpdwbuffersize, lpdwitemcount, core::mem::transmute(itembuffer.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PdhGetRawCounterValue(hcounter: isize, lpdwtype: Option<*mut u32>, pvalue: *mut PDH_RAW_COUNTER) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhGetRawCounterValue(hcounter : isize, lpdwtype : *mut u32, pvalue : *mut PDH_RAW_COUNTER) -> u32); - PdhGetRawCounterValue(hcounter, core::mem::transmute(lpdwtype.unwrap_or(std::ptr::null_mut())), pvalue) + PdhGetRawCounterValue(hcounter, core::mem::transmute(lpdwtype.unwrap_or(core::ptr::null_mut())), pvalue) } #[inline] pub unsafe fn PdhIsRealTimeQuery(hquery: isize) -> super::super::Foundation::BOOL { @@ -609,7 +609,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhParseCounterPathA(szfullpathbuffer : windows_core::PCSTR, pcounterpathelements : *mut PDH_COUNTER_PATH_ELEMENTS_A, pdwbuffersize : *mut u32, dwflags : u32) -> u32); - PdhParseCounterPathA(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(std::ptr::null_mut())), pdwbuffersize, dwflags) + PdhParseCounterPathA(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::ptr::null_mut())), pdwbuffersize, dwflags) } #[inline] pub unsafe fn PdhParseCounterPathW(szfullpathbuffer: P0, pcounterpathelements: Option<*mut PDH_COUNTER_PATH_ELEMENTS_W>, pdwbuffersize: *mut u32, dwflags: u32) -> u32 @@ -617,7 +617,7 @@ where P0: windows_core::Param, { windows_targets::link!("pdh.dll" "system" fn PdhParseCounterPathW(szfullpathbuffer : windows_core::PCWSTR, pcounterpathelements : *mut PDH_COUNTER_PATH_ELEMENTS_W, pdwbuffersize : *mut u32, dwflags : u32) -> u32); - PdhParseCounterPathW(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(std::ptr::null_mut())), pdwbuffersize, dwflags) + PdhParseCounterPathW(szfullpathbuffer.param().abi(), core::mem::transmute(pcounterpathelements.unwrap_or(core::ptr::null_mut())), pdwbuffersize, dwflags) } #[inline] pub unsafe fn PdhParseInstanceNameA(szinstancestring: P0, szinstancename: windows_core::PSTR, pcchinstancenamelength: *mut u32, szparentname: windows_core::PSTR, pcchparentnamelength: *mut u32, lpindex: *mut u32) -> u32 @@ -638,7 +638,7 @@ where #[inline] pub unsafe fn PdhReadRawLogRecord(hlog: isize, ftrecord: super::super::Foundation::FILETIME, prawlogrecord: Option<*mut PDH_RAW_LOG_RECORD>, pdwbufferlength: *mut u32) -> u32 { windows_targets::link!("pdh.dll" "system" fn PdhReadRawLogRecord(hlog : isize, ftrecord : super::super::Foundation:: FILETIME, prawlogrecord : *mut PDH_RAW_LOG_RECORD, pdwbufferlength : *mut u32) -> u32); - PdhReadRawLogRecord(hlog, core::mem::transmute(ftrecord), core::mem::transmute(prawlogrecord.unwrap_or(std::ptr::null_mut())), pdwbufferlength) + PdhReadRawLogRecord(hlog, core::mem::transmute(ftrecord), core::mem::transmute(prawlogrecord.unwrap_or(core::ptr::null_mut())), pdwbufferlength) } #[inline] pub unsafe fn PdhRemoveCounter(hcounter: isize) -> u32 { @@ -821,7 +821,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfEnumerateCounterSetInstances(szmachine : windows_core::PCWSTR, pcountersetid : *const windows_core::GUID, pinstances : *mut PERF_INSTANCE_HEADER, cbinstances : u32, pcbinstancesactual : *mut u32) -> u32); - PerfEnumerateCounterSetInstances(szmachine.param().abi(), pcountersetid, core::mem::transmute(pinstances.unwrap_or(std::ptr::null_mut())), cbinstances, pcbinstancesactual) + PerfEnumerateCounterSetInstances(szmachine.param().abi(), pcountersetid, core::mem::transmute(pinstances.unwrap_or(core::ptr::null_mut())), cbinstances, pcbinstancesactual) } #[inline] pub unsafe fn PerfIncrementULongCounterValue(provider: P0, instance: *mut PERF_COUNTERSET_INSTANCE, counterid: u32, value: u32) -> u32 @@ -853,7 +853,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfQueryCounterData(hquery : super::super::Foundation:: HANDLE, pcounterblock : *mut PERF_DATA_HEADER, cbcounterblock : u32, pcbcounterblockactual : *mut u32) -> u32); - PerfQueryCounterData(hquery.param().abi(), core::mem::transmute(pcounterblock.unwrap_or(std::ptr::null_mut())), cbcounterblock, pcbcounterblockactual) + PerfQueryCounterData(hquery.param().abi(), core::mem::transmute(pcounterblock.unwrap_or(core::ptr::null_mut())), cbcounterblock, pcbcounterblockactual) } #[inline] pub unsafe fn PerfQueryCounterInfo(hquery: P0, pcounters: Option<*mut PERF_COUNTER_IDENTIFIER>, cbcounters: u32, pcbcountersactual: *mut u32) -> u32 @@ -861,7 +861,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn PerfQueryCounterInfo(hquery : super::super::Foundation:: HANDLE, pcounters : *mut PERF_COUNTER_IDENTIFIER, cbcounters : u32, pcbcountersactual : *mut u32) -> u32); - PerfQueryCounterInfo(hquery.param().abi(), core::mem::transmute(pcounters.unwrap_or(std::ptr::null_mut())), cbcounters, pcbcountersactual) + PerfQueryCounterInfo(hquery.param().abi(), core::mem::transmute(pcounters.unwrap_or(core::ptr::null_mut())), cbcounters, pcbcountersactual) } #[inline] pub unsafe fn PerfQueryCounterSetRegistrationInfo(szmachine: P0, pcountersetid: *const windows_core::GUID, requestcode: PerfRegInfoType, requestlangid: u32, pbreginfo: Option<&mut [u8]>, pcbreginfoactual: *mut u32) -> u32 @@ -920,7 +920,7 @@ pub unsafe fn PerfStartProvider(providerguid: *const windows_core::GUID, control #[inline] pub unsafe fn PerfStartProviderEx(providerguid: *const windows_core::GUID, providercontext: Option<*const PERF_PROVIDER_CONTEXT>, provider: *mut super::super::Foundation::HANDLE) -> u32 { windows_targets::link!("advapi32.dll" "system" fn PerfStartProviderEx(providerguid : *const windows_core::GUID, providercontext : *const PERF_PROVIDER_CONTEXT, provider : *mut super::super::Foundation:: HANDLE) -> u32); - PerfStartProviderEx(providerguid, core::mem::transmute(providercontext.unwrap_or(std::ptr::null())), provider) + PerfStartProviderEx(providerguid, core::mem::transmute(providercontext.unwrap_or(core::ptr::null())), provider) } #[inline] pub unsafe fn PerfStopProvider(providerhandle: P0) -> u32 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 2747341e74..2db6807855 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Pipes/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { 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.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() + CallNamedPipeA(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, lpbytesread, ntimeout).ok() } #[inline] pub unsafe fn CallNamedPipeW(lpnamedpipename: P0, lpinbuffer: Option<*const core::ffi::c_void>, ninbuffersize: u32, lpoutbuffer: Option<*mut core::ffi::c_void>, noutbuffersize: u32, lpbytesread: *mut u32, ntimeout: u32) -> super::super::Foundation::BOOL @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CallNamedPipeW(lpnamedpipename : windows_core::PCWSTR, 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); - CallNamedPipeW(lpnamedpipename.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) + CallNamedPipeW(lpnamedpipename.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, lpbytesread, ntimeout) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -21,7 +21,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn ConnectNamedPipe(hnamedpipe : super::super::Foundation:: HANDLE, lpoverlapped : *mut super::IO:: OVERLAPPED) -> super::super::Foundation:: BOOL); - ConnectNamedPipe(hnamedpipe.param().abi(), core::mem::transmute(lpoverlapped.unwrap_or(std::ptr::null_mut()))).ok() + ConnectNamedPipe(hnamedpipe.param().abi(), core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] #[inline] @@ -30,7 +30,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateNamedPipeA(lpname : windows_core::PCSTR, dwopenmode : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, dwpipemode : NAMED_PIPE_MODE, nmaxinstances : u32, noutbuffersize : u32, ninbuffersize : u32, ndefaulttimeout : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - let result__ = CreateNamedPipeA(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))); + let result__ = CreateNamedPipeA(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Security", feature = "Win32_Storage_FileSystem"))] @@ -40,13 +40,13 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateNamedPipeW(lpname : windows_core::PCWSTR, dwopenmode : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, dwpipemode : NAMED_PIPE_MODE, nmaxinstances : u32, noutbuffersize : u32, ninbuffersize : u32, ndefaulttimeout : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES) -> super::super::Foundation:: HANDLE); - CreateNamedPipeW(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + CreateNamedPipeW(lpname.param().abi(), dwopenmode, dwpipemode, nmaxinstances, noutbuffersize, ninbuffersize, ndefaulttimeout, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn CreatePipe(hreadpipe: *mut super::super::Foundation::HANDLE, hwritepipe: *mut super::super::Foundation::HANDLE, lppipeattributes: 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).ok() + CreatePipe(hreadpipe, hwritepipe, core::mem::transmute(lppipeattributes.unwrap_or(core::ptr::null())), nsize).ok() } #[inline] pub unsafe fn DisconnectNamedPipe(hnamedpipe: P0) -> windows_core::Result<()> @@ -94,7 +94,16 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeHandleStateA(hnamedpipe : super::super::Foundation:: HANDLE, lpstate : *mut NAMED_PIPE_MODE, lpcurinstances : *mut u32, lpmaxcollectioncount : *mut u32, lpcollectdatatimeout : *mut u32, lpusername : windows_core::PSTR, nmaxusernamesize : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeHandleStateA(hnamedpipe.param().abi(), core::mem::transmute(lpstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcurinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpmaxcollectioncount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcollectdatatimeout.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpusername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + GetNamedPipeHandleStateA( + hnamedpipe.param().abi(), + core::mem::transmute(lpstate.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcurinstances.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpusername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ) + .ok() } #[inline] pub unsafe fn GetNamedPipeHandleStateW(hnamedpipe: P0, lpstate: Option<*mut NAMED_PIPE_MODE>, lpcurinstances: Option<*mut u32>, lpmaxcollectioncount: Option<*mut u32>, lpcollectdatatimeout: Option<*mut u32>, lpusername: Option<&mut [u16]>) -> super::super::Foundation::BOOL @@ -102,7 +111,15 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetNamedPipeHandleStateW(hnamedpipe : super::super::Foundation:: HANDLE, lpstate : *mut NAMED_PIPE_MODE, lpcurinstances : *mut u32, lpmaxcollectioncount : *mut u32, lpcollectdatatimeout : *mut u32, lpusername : windows_core::PWSTR, nmaxusernamesize : u32) -> super::super::Foundation:: BOOL); - GetNamedPipeHandleStateW(hnamedpipe.param().abi(), core::mem::transmute(lpstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcurinstances.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpmaxcollectioncount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpcollectdatatimeout.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpusername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())) + GetNamedPipeHandleStateW( + hnamedpipe.param().abi(), + core::mem::transmute(lpstate.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcurinstances.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpusername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), + lpusername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), + ) } #[inline] pub unsafe fn GetNamedPipeInfo(hnamedpipe: P0, lpflags: Option<*mut NAMED_PIPE_MODE>, lpoutbuffersize: Option<*mut u32>, lpinbuffersize: Option<*mut u32>, lpmaxinstances: Option<*mut u32>) -> windows_core::Result<()> @@ -110,7 +127,7 @@ where P0: windows_core::Param, { 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.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() + GetNamedPipeInfo(hnamedpipe.param().abi(), core::mem::transmute(lpflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpoutbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpinbuffersize.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpmaxinstances.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetNamedPipeServerProcessId(pipe: P0, serverprocessid: *mut u32) -> windows_core::Result<()> @@ -142,7 +159,7 @@ where P0: windows_core::Param, { 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.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() + PeekNamedPipe(hnamedpipe.param().abi(), core::mem::transmute(lpbuffer.unwrap_or(core::ptr::null_mut())), nbuffersize, core::mem::transmute(lpbytesread.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lptotalbytesavail.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpbytesleftthismessage.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetNamedPipeHandleState(hnamedpipe: P0, lpmode: Option<*const NAMED_PIPE_MODE>, lpmaxcollectioncount: Option<*const u32>, lpcollectdatatimeout: Option<*const u32>) -> windows_core::Result<()> @@ -150,7 +167,7 @@ where P0: windows_core::Param, { 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.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() + SetNamedPipeHandleState(hnamedpipe.param().abi(), core::mem::transmute(lpmode.unwrap_or(core::ptr::null())), core::mem::transmute(lpmaxcollectioncount.unwrap_or(core::ptr::null())), core::mem::transmute(lpcollectdatatimeout.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -159,7 +176,7 @@ where P0: windows_core::Param, { 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.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() + TransactNamedPipe(hnamedpipe.param().abi(), core::mem::transmute(lpinbuffer.unwrap_or(core::ptr::null())), ninbuffersize, core::mem::transmute(lpoutbuffer.unwrap_or(core::ptr::null_mut())), noutbuffersize, lpbytesread, core::mem::transmute(lpoverlapped.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WaitNamedPipeA(lpnamedpipename: P0, ntimeout: u32) -> windows_core::Result<()> 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 c47c7b1502..396ed52d1a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Power/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn CallNtPowerInformation(informationlevel: POWER_INFORMATION_LEVEL, inputbuffer: Option<*const core::ffi::c_void>, inputbufferlength: u32, outputbuffer: Option<*mut core::ffi::c_void>, outputbufferlength: u32) -> super::super::Foundation::NTSTATUS { windows_targets::link!("powrprof.dll" "system" fn CallNtPowerInformation(informationlevel : POWER_INFORMATION_LEVEL, inputbuffer : *const core::ffi::c_void, inputbufferlength : u32, outputbuffer : *mut core::ffi::c_void, outputbufferlength : u32) -> super::super::Foundation:: NTSTATUS); - CallNtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(std::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(std::ptr::null_mut())), outputbufferlength) + CallNtPowerInformation(informationlevel, core::mem::transmute(inputbuffer.unwrap_or(core::ptr::null())), inputbufferlength, core::mem::transmute(outputbuffer.unwrap_or(core::ptr::null_mut())), outputbufferlength) } #[inline] pub unsafe fn CanUserWritePwrScheme() -> super::super::Foundation::BOOLEAN { @@ -21,7 +21,7 @@ pub unsafe fn DevicePowerClose() -> super::super::Foundation::BOOLEAN { #[inline] pub unsafe fn DevicePowerEnumDevices(queryindex: u32, queryinterpretationflags: u32, queryflags: u32, preturnbuffer: Option<*mut u8>, pbuffersize: *mut u32) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn DevicePowerEnumDevices(queryindex : u32, queryinterpretationflags : u32, queryflags : u32, preturnbuffer : *mut u8, pbuffersize : *mut u32) -> super::super::Foundation:: BOOLEAN); - DevicePowerEnumDevices(queryindex, queryinterpretationflags, queryflags, core::mem::transmute(preturnbuffer.unwrap_or(std::ptr::null_mut())), pbuffersize) + DevicePowerEnumDevices(queryindex, queryinterpretationflags, queryflags, core::mem::transmute(preturnbuffer.unwrap_or(core::ptr::null_mut())), pbuffersize) } #[inline] pub unsafe fn DevicePowerOpen(debugmask: u32) -> super::super::Foundation::BOOLEAN { @@ -34,7 +34,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn DevicePowerSetDeviceState(devicedescription : windows_core::PCWSTR, setflags : u32, setdata : *const core::ffi::c_void) -> u32); - DevicePowerSetDeviceState(devicedescription.param().abi(), setflags, core::mem::transmute(setdata.unwrap_or(std::ptr::null()))) + DevicePowerSetDeviceState(devicedescription.param().abi(), setflags, core::mem::transmute(setdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn EnumPwrSchemes(lpfn: PWRSCHEMESENUMPROC, lparam: P0) -> super::super::Foundation::BOOLEAN @@ -175,7 +175,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), accessflags, index, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -199,7 +199,7 @@ where #[inline] pub unsafe fn PowerIsSettingRangeDefined(subkeyguid: Option<*const windows_core::GUID>, settingguid: Option<*const windows_core::GUID>) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn PowerIsSettingRangeDefined(subkeyguid : *const windows_core::GUID, settingguid : *const windows_core::GUID) -> super::super::Foundation:: BOOLEAN); - PowerIsSettingRangeDefined(core::mem::transmute(subkeyguid.unwrap_or(std::ptr::null())), core::mem::transmute(settingguid.unwrap_or(std::ptr::null()))) + PowerIsSettingRangeDefined(core::mem::transmute(subkeyguid.unwrap_or(core::ptr::null())), core::mem::transmute(settingguid.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -226,7 +226,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerReadACDefaultIndex(rootpowerkey : super::Registry:: HKEY, schemepersonalityguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, acdefaultindex : *mut u32) -> u32); - PowerReadACDefaultIndex(rootpowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), powersettingguid, acdefaultindex) + PowerReadACDefaultIndex(rootpowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), powersettingguid, acdefaultindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -235,7 +235,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(r#type.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffersize.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -244,7 +244,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerReadACValueIndex(rootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, acvalueindex : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - PowerReadACValueIndex(rootpowerkey.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())), acvalueindex) + PowerReadACValueIndex(rootpowerkey.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), acvalueindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -253,7 +253,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerReadDCDefaultIndex(rootpowerkey : super::Registry:: HKEY, schemepersonalityguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, dcdefaultindex : *mut u32) -> u32); - PowerReadDCDefaultIndex(rootpowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), powersettingguid, dcdefaultindex) + PowerReadDCDefaultIndex(rootpowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), powersettingguid, dcdefaultindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -262,7 +262,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(r#type.unwrap_or(core::ptr::null_mut())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -271,7 +271,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerReadDCValueIndex(rootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, dcvalueindex : *mut u32) -> u32); - PowerReadDCValueIndex(rootpowerkey.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())), dcvalueindex) + PowerReadDCValueIndex(rootpowerkey.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), dcvalueindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -280,7 +280,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -289,7 +289,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -298,7 +298,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null())), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -307,7 +307,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -316,7 +316,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -325,12 +325,12 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(r#type.unwrap_or(core::ptr::null_mut())), possiblesettingindex, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn PowerReadSettingAttributes(subgroupguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>) -> u32 { windows_targets::link!("powrprof.dll" "system" fn PowerReadSettingAttributes(subgroupguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID) -> u32); - PowerReadSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null()))) + PowerReadSettingAttributes(core::mem::transmute(subgroupguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -339,7 +339,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valueincrement) + PowerReadValueIncrement(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valueincrement) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -348,7 +348,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valuemaximum) + PowerReadValueMax(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valuemaximum) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -357,7 +357,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valueminimum) + PowerReadValueMin(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valueminimum) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -366,12 +366,12 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), buffersize) } #[inline] pub unsafe fn PowerRegisterForEffectivePowerModeNotifications(version: u32, callback: EFFECTIVE_POWER_MODE_CALLBACK, context: Option<*const core::ffi::c_void>, registrationhandle: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("powrprof.dll" "system" fn PowerRegisterForEffectivePowerModeNotifications(version : u32, callback : EFFECTIVE_POWER_MODE_CALLBACK, context : *const core::ffi::c_void, registrationhandle : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PowerRegisterForEffectivePowerModeNotifications(version, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), registrationhandle).ok() + PowerRegisterForEffectivePowerModeNotifications(version, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), registrationhandle).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -414,7 +414,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerSetActiveScheme(userrootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID) -> super::super::Foundation:: WIN32_ERROR); - PowerSetActiveScheme(userrootpowerkey.param().abi(), core::mem::transmute(schemeguid.unwrap_or(std::ptr::null()))) + PowerSetActiveScheme(userrootpowerkey.param().abi(), core::mem::transmute(schemeguid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PowerSetRequest(powerrequest: P0, requesttype: POWER_REQUEST_TYPE) -> windows_core::Result<()> @@ -427,13 +427,13 @@ where #[inline] pub unsafe fn PowerSettingAccessCheck(accessflags: POWER_DATA_ACCESSOR, powerguid: Option<*const windows_core::GUID>) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] pub unsafe fn PowerSettingAccessCheckEx(accessflags: POWER_DATA_ACCESSOR, powerguid: Option<*const windows_core::GUID>, accesstype: super::Registry::REG_SAM_FLAGS) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), accesstype) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -472,7 +472,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerWriteACDefaultIndex(rootsystempowerkey : super::Registry:: HKEY, schemepersonalityguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, defaultacindex : u32) -> u32); - PowerWriteACDefaultIndex(rootsystempowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), powersettingguid, defaultacindex) + PowerWriteACDefaultIndex(rootsystempowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), powersettingguid, defaultacindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -481,7 +481,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerWriteACValueIndex(rootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, acvalueindex : u32) -> super::super::Foundation:: WIN32_ERROR); - PowerWriteACValueIndex(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), acvalueindex) + PowerWriteACValueIndex(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), acvalueindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -490,7 +490,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerWriteDCDefaultIndex(rootsystempowerkey : super::Registry:: HKEY, schemepersonalityguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, defaultdcindex : u32) -> u32); - PowerWriteDCDefaultIndex(rootsystempowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), powersettingguid, defaultdcindex) + PowerWriteDCDefaultIndex(rootsystempowerkey.param().abi(), schemepersonalityguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), powersettingguid, defaultdcindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -499,7 +499,7 @@ where P0: windows_core::Param, { windows_targets::link!("powrprof.dll" "system" fn PowerWriteDCValueIndex(rootpowerkey : super::Registry:: HKEY, schemeguid : *const windows_core::GUID, subgroupofpowersettingsguid : *const windows_core::GUID, powersettingguid : *const windows_core::GUID, dcvalueindex : u32) -> u32); - PowerWriteDCValueIndex(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), dcvalueindex) + PowerWriteDCValueIndex(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), dcvalueindex) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -508,7 +508,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWriteDescription(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -517,7 +517,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWriteFriendlyName(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -526,7 +526,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWriteIconResourceSpecifier(rootpowerkey.param().abi(), schemeguid, core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -535,7 +535,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWritePossibleDescription(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -544,7 +544,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWritePossibleFriendlyName(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -553,12 +553,12 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWritePossibleValue(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), r#type, possiblesettingindex, core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[inline] pub unsafe fn PowerWriteSettingAttributes(subgroupguid: Option<*const windows_core::GUID>, powersettingguid: Option<*const windows_core::GUID>, attributes: u32) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), attributes) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -567,7 +567,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valueincrement) + PowerWriteValueIncrement(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valueincrement) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -576,7 +576,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valuemaximum) + PowerWriteValueMax(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valuemaximum) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -585,7 +585,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(std::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(std::ptr::null())), valueminimum) + PowerWriteValueMin(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), valueminimum) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -594,7 +594,7 @@ where P0: windows_core::Param, { 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.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().try_into().unwrap()) + PowerWriteValueUnitsSpecifier(rootpowerkey.param().abi(), core::mem::transmute(subgroupofpowersettingsguid.unwrap_or(core::ptr::null())), core::mem::transmute(powersettingguid.unwrap_or(core::ptr::null())), core::mem::transmute(buffer.as_ptr()), buffer.len().try_into().unwrap()) } #[inline] pub unsafe fn ReadGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN { @@ -639,7 +639,7 @@ pub unsafe fn RequestWakeupLatency(latency: LATENCY_TIME) -> super::super::Found #[inline] pub unsafe fn SetActivePwrScheme(uiid: u32, pglobalpowerpolicy: Option<*const GLOBAL_POWER_POLICY>, ppowerpolicy: Option<*const POWER_POLICY>) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn SetActivePwrScheme(uiid : u32, pglobalpowerpolicy : *const GLOBAL_POWER_POLICY, ppowerpolicy : *const POWER_POLICY) -> super::super::Foundation:: BOOLEAN); - SetActivePwrScheme(uiid, core::mem::transmute(pglobalpowerpolicy.unwrap_or(std::ptr::null())), core::mem::transmute(ppowerpolicy.unwrap_or(std::ptr::null()))) + SetActivePwrScheme(uiid, core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::ptr::null())), core::mem::transmute(ppowerpolicy.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetSuspendState(bhibernate: P0, bforce: P1, bwakeupeventsdisabled: P2) -> super::super::Foundation::BOOLEAN @@ -684,7 +684,7 @@ where #[inline] pub unsafe fn ValidatePowerPolicies(pglobalpowerpolicy: Option<*mut GLOBAL_POWER_POLICY>, ppowerpolicy: Option<*mut POWER_POLICY>) -> super::super::Foundation::BOOLEAN { windows_targets::link!("powrprof.dll" "system" fn ValidatePowerPolicies(pglobalpowerpolicy : *mut GLOBAL_POWER_POLICY, ppowerpolicy : *mut POWER_POLICY) -> super::super::Foundation:: BOOLEAN); - ValidatePowerPolicies(core::mem::transmute(pglobalpowerpolicy.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppowerpolicy.unwrap_or(std::ptr::null_mut()))) + ValidatePowerPolicies(core::mem::transmute(pglobalpowerpolicy.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppowerpolicy.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WriteGlobalPwrPolicy(pglobalpowerpolicy: *const GLOBAL_POWER_POLICY) -> super::super::Foundation::BOOLEAN { diff --git a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs index eb5e4c1ed9..b973d74fd4 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RealTimeCommunications/mod.rs @@ -1133,7 +1133,7 @@ impl core::ops::Deref for IRTCEnumBuddies { windows_core::imp::interface_hierarchy!(IRTCEnumBuddies, windows_core::IUnknown); impl IRTCEnumBuddies { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1164,7 +1164,7 @@ impl core::ops::Deref for IRTCEnumGroups { windows_core::imp::interface_hierarchy!(IRTCEnumGroups, windows_core::IUnknown); impl IRTCEnumGroups { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1195,7 +1195,7 @@ impl core::ops::Deref for IRTCEnumParticipants { windows_core::imp::interface_hierarchy!(IRTCEnumParticipants, windows_core::IUnknown); impl IRTCEnumParticipants { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1226,7 +1226,7 @@ impl core::ops::Deref for IRTCEnumPresenceDevices { windows_core::imp::interface_hierarchy!(IRTCEnumPresenceDevices, windows_core::IUnknown); impl IRTCEnumPresenceDevices { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1257,7 +1257,7 @@ impl core::ops::Deref for IRTCEnumProfiles { windows_core::imp::interface_hierarchy!(IRTCEnumProfiles, windows_core::IUnknown); impl IRTCEnumProfiles { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1288,7 +1288,7 @@ impl core::ops::Deref for IRTCEnumUserSearchResults { windows_core::imp::interface_hierarchy!(IRTCEnumUserSearchResults, windows_core::IUnknown); impl IRTCEnumUserSearchResults { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() @@ -1319,7 +1319,7 @@ impl core::ops::Deref for IRTCEnumWatchers { windows_core::imp::interface_hierarchy!(IRTCEnumWatchers, windows_core::IUnknown); impl IRTCEnumWatchers { pub unsafe fn Next(&self, ppelements: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), ppelements.len().try_into().unwrap(), core::mem::transmute(ppelements.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Reset(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Reset)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs index b518103060..a14c53bb7d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Recovery/mod.rs @@ -19,7 +19,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetApplicationRecoveryCallback(hprocess : super::super::Foundation:: HANDLE, precoverycallback : *mut super::WindowsProgramming:: APPLICATION_RECOVERY_CALLBACK, ppvparameter : *mut *mut core::ffi::c_void, pdwpinginterval : *mut u32, pdwflags : *mut u32) -> windows_core::HRESULT); - GetApplicationRecoveryCallback(hprocess.param().abi(), precoverycallback, core::mem::transmute(ppvparameter.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwpinginterval.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut()))) + GetApplicationRecoveryCallback(hprocess.param().abi(), precoverycallback, core::mem::transmute(ppvparameter.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwpinginterval.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetApplicationRestartSettings(hprocess: P0, pwzcommandline: windows_core::PWSTR, pcchsize: *mut u32, pdwflags: Option<*mut u32>) -> windows_core::Result<()> @@ -27,13 +27,13 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetApplicationRestartSettings(hprocess : super::super::Foundation:: HANDLE, pwzcommandline : windows_core::PWSTR, pcchsize : *mut u32, pdwflags : *mut u32) -> windows_core::HRESULT); - GetApplicationRestartSettings(hprocess.param().abi(), core::mem::transmute(pwzcommandline), pcchsize, core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut()))).ok() + GetApplicationRestartSettings(hprocess.param().abi(), core::mem::transmute(pwzcommandline), pcchsize, core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_WindowsProgramming")] #[inline] pub unsafe fn RegisterApplicationRecoveryCallback(precoveycallback: super::WindowsProgramming::APPLICATION_RECOVERY_CALLBACK, pvparameter: Option<*const core::ffi::c_void>, dwpinginterval: u32, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn RegisterApplicationRecoveryCallback(precoveycallback : super::WindowsProgramming:: APPLICATION_RECOVERY_CALLBACK, pvparameter : *const core::ffi::c_void, dwpinginterval : u32, dwflags : u32) -> windows_core::HRESULT); - RegisterApplicationRecoveryCallback(precoveycallback, core::mem::transmute(pvparameter.unwrap_or(std::ptr::null())), dwpinginterval, dwflags).ok() + RegisterApplicationRecoveryCallback(precoveycallback, core::mem::transmute(pvparameter.unwrap_or(core::ptr::null())), dwpinginterval, dwflags).ok() } #[inline] pub unsafe fn RegisterApplicationRestart(pwzcommandline: P0, dwflags: REGISTER_APPLICATION_RESTART_FLAGS) -> windows_core::Result<()> 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 e736df9543..0f49820e2e 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Registry/mod.rs @@ -8,7 +8,7 @@ where P4: windows_core::Param, { 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.param().abi(), pwszprimarysubkey.param().abi(), hkeyfallback.param().abi(), pwszfallbacksubkey.param().abi(), pwszvalue.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.param().abi(), pwszprimarysubkey.param().abi(), hkeyfallback.param().abi(), pwszfallbacksubkey.param().abi(), pwszvalue.param().abi(), dwflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), cbdatain, core::mem::transmute(pcbdataout.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegCloseKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR @@ -92,7 +92,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -103,7 +103,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -115,7 +115,7 @@ where P3: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.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.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(std::ptr::null()))) + RegCreateKeyTransactedA(hkey.param().abi(), lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -127,7 +127,7 @@ where P3: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), reserved, lpclass.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.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(std::ptr::null()))) + RegCreateKeyTransactedW(hkey.param().abi(), lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, core::mem::transmute(lpdwdisposition.unwrap_or(core::ptr::null_mut())), htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RegCreateKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -173,7 +173,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), samdesired, reserved, htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(std::ptr::null()))) + RegDeleteKeyTransactedA(hkey.param().abi(), lpsubkey.param().abi(), samdesired, reserved, htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RegDeleteKeyTransactedW(hkey: P0, lpsubkey: P1, samdesired: u32, reserved: u32, htransaction: P2, pextendedparameter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -183,7 +183,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), samdesired, reserved, htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(std::ptr::null()))) + RegDeleteKeyTransactedW(hkey.param().abi(), lpsubkey.param().abi(), samdesired, reserved, htransaction.param().abi(), core::mem::transmute(pextendedparameter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RegDeleteKeyValueA(hkey: P0, lpsubkey: P1, lpvaluename: P2) -> super::super::Foundation::WIN32_ERROR @@ -290,7 +290,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpname), lpcchname, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lpclass), core::mem::transmute(lpcchclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegEnumKeyExW(hkey: P0, dwindex: u32, lpname: windows_core::PWSTR, lpcchname: *mut u32, lpreserved: Option<*const u32>, lpclass: windows_core::PWSTR, lpcchclass: Option<*mut u32>, lpftlastwritetime: Option<*mut super::super::Foundation::FILETIME>) -> super::super::Foundation::WIN32_ERROR @@ -298,7 +298,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpname), lpcchname, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lpclass), core::mem::transmute(lpcchclass.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegEnumKeyW(hkey: P0, dwindex: u32, lpname: Option<&mut [u16]>) -> super::super::Foundation::WIN32_ERROR @@ -314,7 +314,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpvaluename), lpcchvaluename, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegEnumValueW(hkey: P0, dwindex: u32, lpvaluename: windows_core::PWSTR, lpcchvaluename: *mut u32, lpreserved: Option<*const u32>, lptype: Option<*mut u32>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -322,7 +322,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(lpvaluename), lpcchvaluename, core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegFlushKey(hkey: P0) -> super::super::Foundation::WIN32_ERROR @@ -349,7 +349,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpvalue.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.param().abi(), lpsubkey.param().abi(), lpvalue.param().abi(), dwflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegGetValueW(hkey: P0, lpsubkey: P1, lpvalue: P2, dwflags: REG_ROUTINE_FLAGS, pdwtype: Option<*mut REG_VALUE_TYPE>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -359,7 +359,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpvalue.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.param().abi(), lpsubkey.param().abi(), lpvalue.param().abi(), dwflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegLoadAppKeyA(lpfile: P0, phkresult: *mut HKEY, samdesired: u32, dwoptions: u32, reserved: u32) -> super::super::Foundation::WIN32_ERROR @@ -405,7 +405,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszvalue.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().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(std::ptr::null_mut())), flags, pszdirectory.param().abi()) + RegLoadMUIStringA(hkey.param().abi(), pszvalue.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().try_into().unwrap()), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), flags, pszdirectory.param().abi()) } #[inline] pub unsafe fn RegLoadMUIStringW(hkey: P0, pszvalue: P1, pszoutbuf: windows_core::PWSTR, cboutbuf: u32, pcbdata: Option<*mut u32>, flags: u32, pszdirectory: P2) -> super::super::Foundation::WIN32_ERROR @@ -415,7 +415,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszvalue.param().abi(), core::mem::transmute(pszoutbuf), cboutbuf, core::mem::transmute(pcbdata.unwrap_or(std::ptr::null_mut())), flags, pszdirectory.param().abi()) + RegLoadMUIStringW(hkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pszoutbuf), cboutbuf, core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), flags, pszdirectory.param().abi()) } #[inline] pub unsafe fn RegNotifyChangeKeyValue(hkey: P0, bwatchsubtree: P1, dwnotifyfilter: REG_NOTIFY_FILTER, hevent: P2, fasynchronous: P3) -> super::super::Foundation::WIN32_ERROR @@ -468,7 +468,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), uloptions, samdesired, phkresult, htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(std::ptr::null()))) + RegOpenKeyTransactedA(hkey.param().abi(), lpsubkey.param().abi(), uloptions, samdesired, phkresult, htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RegOpenKeyTransactedW(hkey: P0, lpsubkey: P1, uloptions: u32, samdesired: REG_SAM_FLAGS, phkresult: *mut HKEY, htransaction: P2, pextendedparemeter: Option<*const core::ffi::c_void>) -> super::super::Foundation::WIN32_ERROR @@ -478,7 +478,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), uloptions, samdesired, phkresult, htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(std::ptr::null()))) + RegOpenKeyTransactedW(hkey.param().abi(), lpsubkey.param().abi(), uloptions, samdesired, phkresult, htransaction.param().abi(), core::mem::transmute(pextendedparemeter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RegOpenKeyW(hkey: P0, lpsubkey: P1, phkresult: *mut HKEY) -> super::super::Foundation::WIN32_ERROR @@ -515,16 +515,16 @@ where RegQueryInfoKeyA( hkey.param().abi(), core::mem::transmute(lpclass), - core::mem::transmute(lpcchclass.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), - core::mem::transmute(lpcsubkeys.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxclasslen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcvalues.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxvaluelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpftlastwritetime.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchclass.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxclasslen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcvalues.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxvaluelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -536,16 +536,16 @@ where RegQueryInfoKeyW( hkey.param().abi(), core::mem::transmute(lpclass), - core::mem::transmute(lpcchclass.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpreserved.unwrap_or(std::ptr::null())), - core::mem::transmute(lpcsubkeys.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxclasslen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcvalues.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbmaxvaluelen.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lpftlastwritetime.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(lpcchclass.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), + core::mem::transmute(lpcsubkeys.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxsubkeylen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxclasslen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcvalues.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxvaluenamelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbmaxvaluelen.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpcbsecuritydescriptor.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lpftlastwritetime.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -554,7 +554,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf), core::mem::transmute(ldwtotsize.unwrap_or(std::ptr::null_mut()))) + RegQueryMultipleValuesA(hkey.param().abi(), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf), core::mem::transmute(ldwtotsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegQueryMultipleValuesW(hkey: P0, val_list: &mut [VALENTW], lpvaluebuf: windows_core::PWSTR, ldwtotsize: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -562,7 +562,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf), core::mem::transmute(ldwtotsize.unwrap_or(std::ptr::null_mut()))) + RegQueryMultipleValuesW(hkey.param().abi(), core::mem::transmute(val_list.as_ptr()), val_list.len().try_into().unwrap(), core::mem::transmute(lpvaluebuf), core::mem::transmute(ldwtotsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegQueryReflectionKey(hbase: P0, bisreflectiondisabled: *mut super::super::Foundation::BOOL) -> super::super::Foundation::WIN32_ERROR @@ -579,7 +579,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), core::mem::transmute(lpdata), core::mem::transmute(lpcbdata.unwrap_or(std::ptr::null_mut()))) + RegQueryValueA(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(lpdata), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegQueryValueExA(hkey: P0, lpvaluename: P1, lpreserved: Option<*const u32>, lptype: Option<*mut REG_VALUE_TYPE>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -588,7 +588,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpvaluename.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.param().abi(), lpvaluename.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegQueryValueExW(hkey: P0, lpvaluename: P1, lpreserved: Option<*const u32>, lptype: Option<*mut REG_VALUE_TYPE>, lpdata: Option<*mut u8>, lpcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -597,7 +597,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpvaluename.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.param().abi(), lpvaluename.param().abi(), core::mem::transmute(lpreserved.unwrap_or(core::ptr::null())), core::mem::transmute(lptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegQueryValueW(hkey: P0, lpsubkey: P1, lpdata: windows_core::PWSTR, lpcbdata: Option<*mut i32>) -> super::super::Foundation::WIN32_ERROR @@ -606,7 +606,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), core::mem::transmute(lpdata), core::mem::transmute(lpcbdata.unwrap_or(std::ptr::null_mut()))) + RegQueryValueW(hkey.param().abi(), lpsubkey.param().abi(), core::mem::transmute(lpdata), core::mem::transmute(lpcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegRenameKey(hkey: P0, lpsubkeyname: P1, lpnewkeyname: P2) -> super::super::Foundation::WIN32_ERROR @@ -666,7 +666,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + RegSaveKeyA(hkey.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -676,7 +676,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), flags) + RegSaveKeyExA(hkey.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), flags) } #[cfg(feature = "Win32_Security")] #[inline] @@ -686,7 +686,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), flags) + RegSaveKeyExW(hkey.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), flags) } #[cfg(feature = "Win32_Security")] #[inline] @@ -696,7 +696,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null()))) + RegSaveKeyW(hkey.param().abi(), lpfile.param().abi(), core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -716,7 +716,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cbdata) + RegSetKeyValueA(hkey.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cbdata) } #[inline] pub unsafe fn RegSetKeyValueW(hkey: P0, lpsubkey: P1, lpvaluename: P2, dwtype: u32, lpdata: Option<*const core::ffi::c_void>, cbdata: u32) -> super::super::Foundation::WIN32_ERROR @@ -726,7 +726,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(std::ptr::null())), cbdata) + RegSetKeyValueW(hkey.param().abi(), lpsubkey.param().abi(), lpvaluename.param().abi(), dwtype, core::mem::transmute(lpdata.unwrap_or(core::ptr::null())), cbdata) } #[inline] pub unsafe fn RegSetValueA(hkey: P0, lpsubkey: P1, dwtype: REG_VALUE_TYPE, lpdata: Option<&[u8]>) -> super::super::Foundation::WIN32_ERROR 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 396a289daa..79e5e973c6 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteDesktop/mod.rs @@ -70,7 +70,7 @@ where P0: windows_core::Param, { 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.param().abi(), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(std::ptr::null_mut())), pcount).ok() + WTSEnumerateListenersA(hserver.param().abi(), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(core::ptr::null_mut())), pcount).ok() } #[inline] pub unsafe fn WTSEnumerateListenersW(hserver: P0, preserved: *const core::ffi::c_void, reserved: u32, plisteners: Option<*mut *mut u16>, pcount: *mut u32) -> windows_core::Result<()> @@ -78,7 +78,7 @@ where P0: windows_core::Param, { 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.param().abi(), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(std::ptr::null_mut())), pcount).ok() + WTSEnumerateListenersW(hserver.param().abi(), preserved, reserved, core::mem::transmute(plisteners.unwrap_or(core::ptr::null_mut())), pcount).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -1360,7 +1360,7 @@ impl ITsSbClientConnection { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).PutContext)(windows_core::Interface::as_raw(self), contextid.param().abi(), context.param().abi(), core::mem::transmute(existingcontext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutContext)(windows_core::Interface::as_raw(self), contextid.param().abi(), context.param().abi(), core::mem::transmute(existingcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetContext(&self, contextid: P0) -> windows_core::Result diff --git a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs index 892fff99bc..7e60a2095a 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RemoteManagement/mod.rs @@ -39,7 +39,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManConnectShell(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, shellid : windows_core::PCWSTR, options : *const WSMAN_OPTION_SET, connectxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManConnectShell(session.param().abi(), flags, resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(options.unwrap_or(std::ptr::null())), core::mem::transmute(connectxml.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManConnectShell(session.param().abi(), flags, resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(connectxml.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -50,7 +50,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManConnectShellCommand(shell : WSMAN_SHELL_HANDLE, flags : u32, commandid : windows_core::PCWSTR, options : *const WSMAN_OPTION_SET, connectxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManConnectShellCommand(shell.param().abi(), flags, commandid.param().abi(), core::mem::transmute(options.unwrap_or(std::ptr::null())), core::mem::transmute(connectxml.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManConnectShellCommand(shell.param().abi(), flags, commandid.param().abi(), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(connectxml.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -60,7 +60,7 @@ where P1: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateSession(apihandle : WSMAN_API_HANDLE, connection : windows_core::PCWSTR, flags : u32, serverauthenticationcredentials : *const WSMAN_AUTHENTICATION_CREDENTIALS, proxyinfo : *const WSMAN_PROXY_INFO, session : *mut WSMAN_SESSION_HANDLE) -> u32); - WSManCreateSession(apihandle.param().abi(), connection.param().abi(), flags, core::mem::transmute(serverauthenticationcredentials.unwrap_or(std::ptr::null())), core::mem::transmute(proxyinfo.unwrap_or(std::ptr::null())), session) + WSManCreateSession(apihandle.param().abi(), connection.param().abi(), flags, core::mem::transmute(serverauthenticationcredentials.unwrap_or(core::ptr::null())), core::mem::transmute(proxyinfo.unwrap_or(core::ptr::null())), session) } #[inline] pub unsafe fn WSManCreateShell(session: P0, flags: u32, resourceuri: P1, startupinfo: Option<*const WSMAN_SHELL_STARTUP_INFO_V11>, options: Option<*const WSMAN_OPTION_SET>, createxml: Option<*const WSMAN_DATA>, r#async: *const WSMAN_SHELL_ASYNC) -> WSMAN_SHELL_HANDLE @@ -70,7 +70,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateShell(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, startupinfo : *const WSMAN_SHELL_STARTUP_INFO_V11, options : *const WSMAN_OPTION_SET, createxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManCreateShell(session.param().abi(), flags, resourceuri.param().abi(), core::mem::transmute(startupinfo.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), core::mem::transmute(createxml.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManCreateShell(session.param().abi(), flags, resourceuri.param().abi(), core::mem::transmute(startupinfo.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(createxml.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -82,7 +82,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManCreateShellEx(session : WSMAN_SESSION_HANDLE, flags : u32, resourceuri : windows_core::PCWSTR, shellid : windows_core::PCWSTR, startupinfo : *const WSMAN_SHELL_STARTUP_INFO_V11, options : *const WSMAN_OPTION_SET, createxml : *const WSMAN_DATA, r#async : *const WSMAN_SHELL_ASYNC, shell : *mut WSMAN_SHELL_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManCreateShellEx(session.param().abi(), flags, resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(startupinfo.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), core::mem::transmute(createxml.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManCreateShellEx(session.param().abi(), flags, resourceuri.param().abi(), shellid.param().abi(), core::mem::transmute(startupinfo.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), core::mem::transmute(createxml.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -137,7 +137,7 @@ where P0: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginAuthzOperationComplete(senderdetails : *const WSMAN_SENDER_DETAILS, flags : u32, userauthorizationcontext : *const core::ffi::c_void, errorcode : u32, extendederrorinformation : windows_core::PCWSTR) -> u32); - WSManPluginAuthzOperationComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(std::ptr::null())), errorcode, extendederrorinformation.param().abi()) + WSManPluginAuthzOperationComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(core::ptr::null())), errorcode, extendederrorinformation.param().abi()) } #[inline] pub unsafe fn WSManPluginAuthzQueryQuotaComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, quota: Option<*const WSMAN_AUTHZ_QUOTA>, errorcode: u32, extendederrorinformation: P0) -> u32 @@ -145,7 +145,7 @@ where P0: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginAuthzQueryQuotaComplete(senderdetails : *const WSMAN_SENDER_DETAILS, flags : u32, quota : *const WSMAN_AUTHZ_QUOTA, errorcode : u32, extendederrorinformation : windows_core::PCWSTR) -> u32); - WSManPluginAuthzQueryQuotaComplete(senderdetails, flags, core::mem::transmute(quota.unwrap_or(std::ptr::null())), errorcode, extendederrorinformation.param().abi()) + WSManPluginAuthzQueryQuotaComplete(senderdetails, flags, core::mem::transmute(quota.unwrap_or(core::ptr::null())), errorcode, extendederrorinformation.param().abi()) } #[inline] pub unsafe fn WSManPluginAuthzUserComplete(senderdetails: *const WSMAN_SENDER_DETAILS, flags: u32, userauthorizationcontext: Option<*const core::ffi::c_void>, impersonationtoken: P0, userisadministrator: P1, errorcode: u32, extendederrorinformation: P2) -> u32 @@ -155,7 +155,7 @@ where P2: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginAuthzUserComplete(senderdetails : *const WSMAN_SENDER_DETAILS, flags : u32, userauthorizationcontext : *const core::ffi::c_void, impersonationtoken : super::super::Foundation:: HANDLE, userisadministrator : super::super::Foundation:: BOOL, errorcode : u32, extendederrorinformation : windows_core::PCWSTR) -> u32); - WSManPluginAuthzUserComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(std::ptr::null())), impersonationtoken.param().abi(), userisadministrator.param().abi(), errorcode, extendederrorinformation.param().abi()) + WSManPluginAuthzUserComplete(senderdetails, flags, core::mem::transmute(userauthorizationcontext.unwrap_or(core::ptr::null())), impersonationtoken.param().abi(), userisadministrator.param().abi(), errorcode, extendederrorinformation.param().abi()) } #[inline] pub unsafe fn WSManPluginFreeRequestDetails(requestdetails: *const WSMAN_PLUGIN_REQUEST) -> u32 { @@ -187,7 +187,7 @@ where P1: windows_core::Param, { windows_targets::link!("wsmsvc.dll" "system" fn WSManPluginReceiveResult(requestdetails : *const WSMAN_PLUGIN_REQUEST, flags : u32, stream : windows_core::PCWSTR, streamresult : *const WSMAN_DATA, commandstate : windows_core::PCWSTR, exitcode : u32) -> u32); - WSManPluginReceiveResult(requestdetails, flags, stream.param().abi(), core::mem::transmute(streamresult.unwrap_or(std::ptr::null())), commandstate.param().abi(), exitcode) + WSManPluginReceiveResult(requestdetails, flags, stream.param().abi(), core::mem::transmute(streamresult.unwrap_or(core::ptr::null())), commandstate.param().abi(), exitcode) } #[inline] pub unsafe fn WSManPluginReportCompletion(plugincontext: *const core::ffi::c_void, flags: u32) -> u32 { @@ -207,7 +207,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManReceiveShellOutput(shell : WSMAN_SHELL_HANDLE, command : WSMAN_COMMAND_HANDLE, flags : u32, desiredstreamset : *const WSMAN_STREAM_ID_SET, r#async : *const WSMAN_SHELL_ASYNC, receiveoperation : *mut WSMAN_OPERATION_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManReceiveShellOutput(shell.param().abi(), command.param().abi(), flags, core::mem::transmute(desiredstreamset.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManReceiveShellOutput(shell.param().abi(), command.param().abi(), flags, core::mem::transmute(desiredstreamset.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -234,7 +234,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManRunShellCommand(shell : WSMAN_SHELL_HANDLE, flags : u32, commandline : windows_core::PCWSTR, args : *const WSMAN_COMMAND_ARG_SET, options : *const WSMAN_OPTION_SET, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManRunShellCommand(shell.param().abi(), flags, commandline.param().abi(), core::mem::transmute(args.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManRunShellCommand(shell.param().abi(), flags, commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] @@ -246,7 +246,7 @@ where { windows_targets::link!("wsmsvc.dll" "system" fn WSManRunShellCommandEx(shell : WSMAN_SHELL_HANDLE, flags : u32, commandid : windows_core::PCWSTR, commandline : windows_core::PCWSTR, args : *const WSMAN_COMMAND_ARG_SET, options : *const WSMAN_OPTION_SET, r#async : *const WSMAN_SHELL_ASYNC, command : *mut WSMAN_COMMAND_HANDLE)); let mut result__ = core::mem::zeroed(); - WSManRunShellCommandEx(shell.param().abi(), flags, commandid.param().abi(), commandline.param().abi(), core::mem::transmute(args.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), r#async, &mut result__); + WSManRunShellCommandEx(shell.param().abi(), flags, commandid.param().abi(), commandline.param().abi(), core::mem::transmute(args.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), r#async, &mut result__); result__ } #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs b/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs index 216b99f44c..ec1a304a9c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/RestartManager/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("rstrtmgr.dll" "system" fn RmAddFilter(dwsessionhandle : u32, strmodulename : windows_core::PCWSTR, pprocess : *const RM_UNIQUE_PROCESS, strserviceshortname : windows_core::PCWSTR, filteraction : RM_FILTER_ACTION) -> super::super::Foundation:: WIN32_ERROR); - RmAddFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(std::ptr::null())), strserviceshortname.param().abi(), filteraction) + RmAddFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::ptr::null())), strserviceshortname.param().abi(), filteraction) } #[inline] pub unsafe fn RmCancelCurrentTask(dwsessionhandle: u32) -> super::super::Foundation::WIN32_ERROR { @@ -25,7 +25,7 @@ pub unsafe fn RmGetFilterList(dwsessionhandle: u32, pbfilterbuf: Option<&mut [u8 #[inline] pub unsafe fn RmGetList(dwsessionhandle: u32, pnprocinfoneeded: *mut u32, pnprocinfo: *mut u32, rgaffectedapps: Option<*mut RM_PROCESS_INFO>, lpdwrebootreasons: *mut u32) -> super::super::Foundation::WIN32_ERROR { windows_targets::link!("rstrtmgr.dll" "system" fn RmGetList(dwsessionhandle : u32, pnprocinfoneeded : *mut u32, pnprocinfo : *mut u32, rgaffectedapps : *mut RM_PROCESS_INFO, lpdwrebootreasons : *mut u32) -> super::super::Foundation:: WIN32_ERROR); - RmGetList(dwsessionhandle, pnprocinfoneeded, pnprocinfo, core::mem::transmute(rgaffectedapps.unwrap_or(std::ptr::null_mut())), lpdwrebootreasons) + RmGetList(dwsessionhandle, pnprocinfoneeded, pnprocinfo, core::mem::transmute(rgaffectedapps.unwrap_or(core::ptr::null_mut())), lpdwrebootreasons) } #[inline] pub unsafe fn RmJoinSession(psessionhandle: *mut u32, strsessionkey: P0) -> super::super::Foundation::WIN32_ERROR @@ -55,7 +55,7 @@ where P1: windows_core::Param, { windows_targets::link!("rstrtmgr.dll" "system" fn RmRemoveFilter(dwsessionhandle : u32, strmodulename : windows_core::PCWSTR, pprocess : *const RM_UNIQUE_PROCESS, strserviceshortname : windows_core::PCWSTR) -> super::super::Foundation:: WIN32_ERROR); - RmRemoveFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(std::ptr::null())), strserviceshortname.param().abi()) + RmRemoveFilter(dwsessionhandle, strmodulename.param().abi(), core::mem::transmute(pprocess.unwrap_or(core::ptr::null())), strserviceshortname.param().abi()) } #[inline] pub unsafe fn RmRestart(dwsessionhandle: u32, dwrestartflags: u32, fnstatus: RM_WRITE_STATUS_CALLBACK) -> super::super::Foundation::WIN32_ERROR { diff --git a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs index 6fcd8ed0e4..0fa1aeaa26 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Rpc/mod.rs @@ -72,7 +72,7 @@ pub unsafe fn I_RpcBindingHandleToAsyncHandle(binding: *mut core::ffi::c_void, a #[inline] pub unsafe fn I_RpcBindingInqClientTokenAttributes(binding: *const core::ffi::c_void, tokenid: Option<*mut super::super::Foundation::LUID>, authenticationid: Option<*mut super::super::Foundation::LUID>, modifiedid: Option<*mut super::super::Foundation::LUID>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqClientTokenAttributes(binding : *const core::ffi::c_void, tokenid : *mut super::super::Foundation:: LUID, authenticationid : *mut super::super::Foundation:: LUID, modifiedid : *mut super::super::Foundation:: LUID) -> RPC_STATUS); - I_RpcBindingInqClientTokenAttributes(binding, core::mem::transmute(tokenid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authenticationid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(modifiedid.unwrap_or(std::ptr::null_mut()))) + I_RpcBindingInqClientTokenAttributes(binding, core::mem::transmute(tokenid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authenticationid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(modifiedid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn I_RpcBindingInqDynamicEndpointA(binding: *const core::ffi::c_void, dynamicendpoint: *mut windows_core::PSTR) -> RPC_STATUS { @@ -102,7 +102,7 @@ pub unsafe fn I_RpcBindingInqSecurityContext(binding: *mut core::ffi::c_void, se #[inline] pub unsafe fn I_RpcBindingInqSecurityContextKeyInfo(binding: Option<*const core::ffi::c_void>, keyinfo: *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcBindingInqSecurityContextKeyInfo(binding : *const core::ffi::c_void, keyinfo : *mut core::ffi::c_void) -> RPC_STATUS); - I_RpcBindingInqSecurityContextKeyInfo(core::mem::transmute(binding.unwrap_or(std::ptr::null())), keyinfo) + I_RpcBindingInqSecurityContextKeyInfo(core::mem::transmute(binding.unwrap_or(core::ptr::null())), keyinfo) } #[inline] pub unsafe fn I_RpcBindingInqTransportType(binding: *mut core::ffi::c_void, r#type: *mut u32) -> RPC_STATUS { @@ -253,7 +253,7 @@ pub unsafe fn I_RpcNsSendReceive(message: *mut RPC_MESSAGE, handle: *mut *mut co #[inline] pub unsafe fn I_RpcOpenClientProcess(binding: Option<*const core::ffi::c_void>, desiredaccess: u32, clientprocess: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcOpenClientProcess(binding : *const core::ffi::c_void, desiredaccess : u32, clientprocess : *mut *mut core::ffi::c_void) -> RPC_STATUS); - I_RpcOpenClientProcess(core::mem::transmute(binding.unwrap_or(std::ptr::null())), desiredaccess, clientprocess) + I_RpcOpenClientProcess(core::mem::transmute(binding.unwrap_or(core::ptr::null())), desiredaccess, clientprocess) } #[inline] pub unsafe fn I_RpcPauseExecution(milliseconds: u32) { @@ -308,7 +308,7 @@ pub unsafe fn I_RpcServerDisableExceptionFilter() -> i32 { #[inline] pub unsafe fn I_RpcServerGetAssociationID(binding: Option<*const core::ffi::c_void>, associationid: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerGetAssociationID(binding : *const core::ffi::c_void, associationid : *mut u32) -> RPC_STATUS); - I_RpcServerGetAssociationID(core::mem::transmute(binding.unwrap_or(std::ptr::null())), associationid) + I_RpcServerGetAssociationID(core::mem::transmute(binding.unwrap_or(core::ptr::null())), associationid) } #[inline] pub unsafe fn I_RpcServerInqAddressChangeFn() -> *mut RPC_ADDRESS_CHANGE_FN { @@ -352,17 +352,17 @@ where #[inline] pub unsafe fn I_RpcServerSubscribeForDisconnectNotification(binding: Option<*const core::ffi::c_void>, hevent: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerSubscribeForDisconnectNotification(binding : *const core::ffi::c_void, hevent : *const core::ffi::c_void) -> RPC_STATUS); - I_RpcServerSubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(std::ptr::null())), core::mem::transmute(hevent.unwrap_or(std::ptr::null()))) + I_RpcServerSubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::ptr::null())), core::mem::transmute(hevent.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn I_RpcServerSubscribeForDisconnectNotification2(binding: Option<*const core::ffi::c_void>, hevent: *const core::ffi::c_void, subscriptionid: *mut windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerSubscribeForDisconnectNotification2(binding : *const core::ffi::c_void, hevent : *const core::ffi::c_void, subscriptionid : *mut windows_core::GUID) -> RPC_STATUS); - I_RpcServerSubscribeForDisconnectNotification2(core::mem::transmute(binding.unwrap_or(std::ptr::null())), hevent, subscriptionid) + I_RpcServerSubscribeForDisconnectNotification2(core::mem::transmute(binding.unwrap_or(core::ptr::null())), hevent, subscriptionid) } #[inline] pub unsafe fn I_RpcServerUnsubscribeForDisconnectNotification(binding: Option<*const core::ffi::c_void>, subscriptionid: windows_core::GUID) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerUnsubscribeForDisconnectNotification(binding : *const core::ffi::c_void, subscriptionid : windows_core::GUID) -> RPC_STATUS); - I_RpcServerUnsubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(std::ptr::null())), core::mem::transmute(subscriptionid)) + I_RpcServerUnsubscribeForDisconnectNotification(core::mem::transmute(binding.unwrap_or(core::ptr::null())), core::mem::transmute(subscriptionid)) } #[inline] pub unsafe fn I_RpcServerUseProtseq2A(networkaddress: P0, protseq: P1, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -371,7 +371,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerUseProtseq2A(networkaddress : windows_core::PCSTR, protseq : windows_core::PCSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void, policy : *const core::ffi::c_void) -> RPC_STATUS); - I_RpcServerUseProtseq2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + I_RpcServerUseProtseq2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn I_RpcServerUseProtseq2W(networkaddress: P0, protseq: P1, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -380,7 +380,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerUseProtseq2W(networkaddress : windows_core::PCWSTR, protseq : windows_core::PCWSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void, policy : *const core::ffi::c_void) -> RPC_STATUS); - I_RpcServerUseProtseq2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + I_RpcServerUseProtseq2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn I_RpcServerUseProtseqEp2A(networkaddress: P0, protseq: P1, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -390,7 +390,7 @@ where P2: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerUseProtseqEp2A(networkaddress : windows_core::PCSTR, protseq : windows_core::PCSTR, maxcalls : u32, endpoint : windows_core::PCSTR, securitydescriptor : *const core::ffi::c_void, policy : *const core::ffi::c_void) -> RPC_STATUS); - I_RpcServerUseProtseqEp2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + I_RpcServerUseProtseqEp2A(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn I_RpcServerUseProtseqEp2W(networkaddress: P0, protseq: P1, maxcalls: u32, endpoint: P2, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const core::ffi::c_void) -> RPC_STATUS @@ -400,7 +400,7 @@ where P2: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn I_RpcServerUseProtseqEp2W(networkaddress : windows_core::PCWSTR, protseq : windows_core::PCWSTR, maxcalls : u32, endpoint : windows_core::PCWSTR, securitydescriptor : *const core::ffi::c_void, policy : *const core::ffi::c_void) -> RPC_STATUS); - I_RpcServerUseProtseqEp2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + I_RpcServerUseProtseqEp2W(networkaddress.param().abi(), protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn I_RpcSessionStrictContextHandle() { @@ -430,7 +430,7 @@ pub unsafe fn I_UuidCreate(uuid: *mut windows_core::GUID) -> RPC_STATUS { #[inline] pub unsafe fn MesBufferHandleReset(handle: *const core::ffi::c_void, handlestyle: u32, operation: MIDL_ES_CODE, pbuffer: Option<&[u8]>, pencodedsize: Option<*mut u32>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn MesBufferHandleReset(handle : *const core::ffi::c_void, handlestyle : u32, operation : MIDL_ES_CODE, pbuffer : *const *const i8, buffersize : u32, pencodedsize : *mut u32) -> RPC_STATUS); - MesBufferHandleReset(handle, handlestyle, operation, core::mem::transmute(pbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pencodedsize.unwrap_or(std::ptr::null_mut()))) + MesBufferHandleReset(handle, handlestyle, operation, core::mem::transmute(pbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pencodedsize.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn MesDecodeBufferHandleCreate(buffer: &[u8], phandle: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -485,7 +485,7 @@ pub unsafe fn NDRCContextMarshall(ccontext: isize, pbuff: *mut core::ffi::c_void #[inline] pub unsafe fn NDRCContextUnmarshall(pccontext: Option<*mut isize>, hbinding: *const core::ffi::c_void, pbuff: *const core::ffi::c_void, datarepresentation: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NDRCContextUnmarshall(pccontext : *mut isize, hbinding : *const core::ffi::c_void, pbuff : *const core::ffi::c_void, datarepresentation : u32)); - NDRCContextUnmarshall(core::mem::transmute(pccontext.unwrap_or(std::ptr::null_mut())), hbinding, pbuff, datarepresentation) + NDRCContextUnmarshall(core::mem::transmute(pccontext.unwrap_or(core::ptr::null_mut())), hbinding, pbuff, datarepresentation) } #[inline] pub unsafe fn NDRSContextMarshall(ccontext: *const NDR_SCONTEXT, pbuff: *mut core::ffi::c_void, userrundownin: NDR_RUNDOWN) { @@ -495,7 +495,7 @@ pub unsafe fn NDRSContextMarshall(ccontext: *const NDR_SCONTEXT, pbuff: *mut cor #[inline] pub unsafe fn NDRSContextMarshall2(bindinghandle: *const core::ffi::c_void, ccontext: *const NDR_SCONTEXT, pbuff: *mut core::ffi::c_void, userrundownin: NDR_RUNDOWN, ctxguard: Option<*const core::ffi::c_void>, flags: u32) { windows_targets::link!("rpcrt4.dll" "system" fn NDRSContextMarshall2(bindinghandle : *const core::ffi::c_void, ccontext : *const NDR_SCONTEXT, pbuff : *mut core::ffi::c_void, userrundownin : NDR_RUNDOWN, ctxguard : *const core::ffi::c_void, flags : u32)); - NDRSContextMarshall2(bindinghandle, ccontext, pbuff, userrundownin, core::mem::transmute(ctxguard.unwrap_or(std::ptr::null())), flags) + NDRSContextMarshall2(bindinghandle, ccontext, pbuff, userrundownin, core::mem::transmute(ctxguard.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn NDRSContextMarshallEx(bindinghandle: *const core::ffi::c_void, ccontext: *const NDR_SCONTEXT, pbuff: *mut core::ffi::c_void, userrundownin: NDR_RUNDOWN) { @@ -510,7 +510,7 @@ pub unsafe fn NDRSContextUnmarshall(pbuff: *const core::ffi::c_void, datareprese #[inline] pub unsafe fn NDRSContextUnmarshall2(bindinghandle: *const core::ffi::c_void, pbuff: Option<*const core::ffi::c_void>, datarepresentation: u32, ctxguard: Option<*const core::ffi::c_void>, flags: u32) -> *mut NDR_SCONTEXT { windows_targets::link!("rpcrt4.dll" "system" fn NDRSContextUnmarshall2(bindinghandle : *const core::ffi::c_void, pbuff : *const core::ffi::c_void, datarepresentation : u32, ctxguard : *const core::ffi::c_void, flags : u32) -> *mut NDR_SCONTEXT); - NDRSContextUnmarshall2(bindinghandle, core::mem::transmute(pbuff.unwrap_or(std::ptr::null())), datarepresentation, core::mem::transmute(ctxguard.unwrap_or(std::ptr::null())), flags) + NDRSContextUnmarshall2(bindinghandle, core::mem::transmute(pbuff.unwrap_or(core::ptr::null())), datarepresentation, core::mem::transmute(ctxguard.unwrap_or(core::ptr::null())), flags) } #[inline] pub unsafe fn NDRSContextUnmarshallEx(bindinghandle: *const core::ffi::c_void, pbuff: *const core::ffi::c_void, datarepresentation: u32) -> *mut NDR_SCONTEXT { @@ -1566,7 +1566,7 @@ where #[inline] pub unsafe fn RpcAsyncCompleteCall(pasync: *mut RPC_ASYNC_STATE, reply: Option<*mut core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcAsyncCompleteCall(pasync : *mut RPC_ASYNC_STATE, reply : *mut core::ffi::c_void) -> RPC_STATUS); - RpcAsyncCompleteCall(pasync, core::mem::transmute(reply.unwrap_or(std::ptr::null_mut()))) + RpcAsyncCompleteCall(pasync, core::mem::transmute(reply.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_IO")] #[inline] @@ -1590,7 +1590,7 @@ pub unsafe fn RpcAsyncRegisterInfo(pasync: *const RPC_ASYNC_STATE) -> RPC_STATUS #[inline] pub unsafe fn RpcBindingBind(pasync: Option<*const RPC_ASYNC_STATE>, binding: *const core::ffi::c_void, ifspec: *const core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingBind(pasync : *const RPC_ASYNC_STATE, binding : *const core::ffi::c_void, ifspec : *const core::ffi::c_void) -> RPC_STATUS); - RpcBindingBind(core::mem::transmute(pasync.unwrap_or(std::ptr::null())), binding, ifspec) + RpcBindingBind(core::mem::transmute(pasync.unwrap_or(core::ptr::null())), binding, ifspec) } #[inline] pub unsafe fn RpcBindingCopy(sourcebinding: *const core::ffi::c_void, destinationbinding: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -1601,13 +1601,13 @@ pub unsafe fn RpcBindingCopy(sourcebinding: *const core::ffi::c_void, destinatio #[inline] pub unsafe fn RpcBindingCreateA(template: *const RPC_BINDING_HANDLE_TEMPLATE_V1_A, security: Option<*const RPC_BINDING_HANDLE_SECURITY_V1_A>, options: Option<*const RPC_BINDING_HANDLE_OPTIONS_V1>, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingCreateA(template : *const RPC_BINDING_HANDLE_TEMPLATE_V1_A, security : *const RPC_BINDING_HANDLE_SECURITY_V1_A, options : *const RPC_BINDING_HANDLE_OPTIONS_V1, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcBindingCreateA(template, core::mem::transmute(security.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), binding) + RpcBindingCreateA(template, core::mem::transmute(security.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), binding) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn RpcBindingCreateW(template: *const RPC_BINDING_HANDLE_TEMPLATE_V1_W, security: Option<*const RPC_BINDING_HANDLE_SECURITY_V1_W>, options: Option<*const RPC_BINDING_HANDLE_OPTIONS_V1>, binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingCreateW(template : *const RPC_BINDING_HANDLE_TEMPLATE_V1_W, security : *const RPC_BINDING_HANDLE_SECURITY_V1_W, options : *const RPC_BINDING_HANDLE_OPTIONS_V1, binding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcBindingCreateW(template, core::mem::transmute(security.unwrap_or(std::ptr::null())), core::mem::transmute(options.unwrap_or(std::ptr::null())), binding) + RpcBindingCreateW(template, core::mem::transmute(security.unwrap_or(core::ptr::null())), core::mem::transmute(options.unwrap_or(core::ptr::null())), binding) } #[inline] pub unsafe fn RpcBindingFree(binding: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -1633,44 +1633,44 @@ where #[inline] pub unsafe fn RpcBindingInqAuthClientA(clientbinding: Option<*const core::ffi::c_void>, privs: *mut *mut core::ffi::c_void, serverprincname: Option<*mut windows_core::PSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authzsvc: Option<*mut u32>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthClientA(clientbinding : *const core::ffi::c_void, privs : *mut *mut core::ffi::c_void, serverprincname : *mut windows_core::PSTR, authnlevel : *mut u32, authnsvc : *mut u32, authzsvc : *mut u32) -> RPC_STATUS); - RpcBindingInqAuthClientA(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthClientA(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcBindingInqAuthClientExA(clientbinding: Option<*const core::ffi::c_void>, privs: *mut *mut core::ffi::c_void, serverprincname: Option<*mut windows_core::PSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authzsvc: Option<*mut u32>, flags: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthClientExA(clientbinding : *const core::ffi::c_void, privs : *mut *mut core::ffi::c_void, serverprincname : *mut windows_core::PSTR, authnlevel : *mut u32, authnsvc : *mut u32, authzsvc : *mut u32, flags : u32) -> RPC_STATUS); - RpcBindingInqAuthClientExA(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut())), flags) + RpcBindingInqAuthClientExA(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut())), flags) } #[inline] pub unsafe fn RpcBindingInqAuthClientExW(clientbinding: Option<*const core::ffi::c_void>, privs: *mut *mut core::ffi::c_void, serverprincname: Option<*mut windows_core::PWSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authzsvc: Option<*mut u32>, flags: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthClientExW(clientbinding : *const core::ffi::c_void, privs : *mut *mut core::ffi::c_void, serverprincname : *mut windows_core::PWSTR, authnlevel : *mut u32, authnsvc : *mut u32, authzsvc : *mut u32, flags : u32) -> RPC_STATUS); - RpcBindingInqAuthClientExW(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut())), flags) + RpcBindingInqAuthClientExW(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut())), flags) } #[inline] pub unsafe fn RpcBindingInqAuthClientW(clientbinding: Option<*const core::ffi::c_void>, privs: *mut *mut core::ffi::c_void, serverprincname: Option<*mut windows_core::PWSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authzsvc: Option<*mut u32>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthClientW(clientbinding : *const core::ffi::c_void, privs : *mut *mut core::ffi::c_void, serverprincname : *mut windows_core::PWSTR, authnlevel : *mut u32, authnsvc : *mut u32, authzsvc : *mut u32) -> RPC_STATUS); - RpcBindingInqAuthClientW(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthClientW(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), privs, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcBindingInqAuthInfoA(binding: *const core::ffi::c_void, serverprincname: Option<*mut windows_core::PSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authidentity: Option<*mut *mut core::ffi::c_void>, authzsvc: Option<*mut u32>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthInfoA(binding : *const core::ffi::c_void, serverprincname : *mut windows_core::PSTR, authnlevel : *mut u32, authnsvc : *mut u32, authidentity : *mut *mut core::ffi::c_void, authzsvc : *mut u32) -> RPC_STATUS); - RpcBindingInqAuthInfoA(binding, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthInfoA(binding, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn RpcBindingInqAuthInfoExA(binding: *const core::ffi::c_void, serverprincname: Option<*mut windows_core::PSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authidentity: Option<*mut *mut core::ffi::c_void>, authzsvc: Option<*mut u32>, rpcqosversion: u32, securityqos: Option<*mut RPC_SECURITY_QOS>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthInfoExA(binding : *const core::ffi::c_void, serverprincname : *mut windows_core::PSTR, authnlevel : *mut u32, authnsvc : *mut u32, authidentity : *mut *mut core::ffi::c_void, authzsvc : *mut u32, rpcqosversion : u32, securityqos : *mut RPC_SECURITY_QOS) -> RPC_STATUS); - RpcBindingInqAuthInfoExA(binding, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthInfoExA(binding, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Com")] #[inline] pub unsafe fn RpcBindingInqAuthInfoExW(binding: *const core::ffi::c_void, serverprincname: Option<*mut windows_core::PWSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authidentity: Option<*mut *mut core::ffi::c_void>, authzsvc: Option<*mut u32>, rpcqosversion: u32, securityqos: Option<*mut RPC_SECURITY_QOS>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthInfoExW(binding : *const core::ffi::c_void, serverprincname : *mut windows_core::PWSTR, authnlevel : *mut u32, authnsvc : *mut u32, authidentity : *mut *mut core::ffi::c_void, authzsvc : *mut u32, rpcqosversion : u32, securityqos : *mut RPC_SECURITY_QOS) -> RPC_STATUS); - RpcBindingInqAuthInfoExW(binding, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthInfoExW(binding, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut())), rpcqosversion, core::mem::transmute(securityqos.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcBindingInqAuthInfoW(binding: *const core::ffi::c_void, serverprincname: Option<*mut windows_core::PWSTR>, authnlevel: Option<*mut u32>, authnsvc: Option<*mut u32>, authidentity: Option<*mut *mut core::ffi::c_void>, authzsvc: Option<*mut u32>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingInqAuthInfoW(binding : *const core::ffi::c_void, serverprincname : *mut windows_core::PWSTR, authnlevel : *mut u32, authnsvc : *mut u32, authidentity : *mut *mut core::ffi::c_void, authzsvc : *mut u32) -> RPC_STATUS); - RpcBindingInqAuthInfoW(binding, core::mem::transmute(serverprincname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(std::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(std::ptr::null_mut()))) + RpcBindingInqAuthInfoW(binding, core::mem::transmute(serverprincname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnlevel.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authnsvc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authidentity.unwrap_or(core::ptr::null_mut())), core::mem::transmute(authzsvc.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcBindingInqMaxCalls(binding: *const core::ffi::c_void, maxcalls: *mut u32) -> RPC_STATUS { @@ -1695,7 +1695,7 @@ pub unsafe fn RpcBindingReset(binding: *const core::ffi::c_void) -> RPC_STATUS { #[inline] pub unsafe fn RpcBindingServerFromClient(clientbinding: Option<*const core::ffi::c_void>, serverbinding: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingServerFromClient(clientbinding : *const core::ffi::c_void, serverbinding : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcBindingServerFromClient(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), serverbinding) + RpcBindingServerFromClient(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), serverbinding) } #[inline] pub unsafe fn RpcBindingSetAuthInfoA(binding: *const core::ffi::c_void, serverprincname: P0, authnlevel: u32, authnsvc: u32, authidentity: Option<*const core::ffi::c_void>, authzsvc: u32) -> RPC_STATUS @@ -1703,7 +1703,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingSetAuthInfoA(binding : *const core::ffi::c_void, serverprincname : windows_core::PCSTR, authnlevel : u32, authnsvc : u32, authidentity : *const core::ffi::c_void, authzsvc : u32) -> RPC_STATUS); - RpcBindingSetAuthInfoA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), authzsvc) + RpcBindingSetAuthInfoA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), authzsvc) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1712,7 +1712,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingSetAuthInfoExA(binding : *const core::ffi::c_void, serverprincname : windows_core::PCSTR, authnlevel : u32, authnsvc : u32, authidentity : *const core::ffi::c_void, authzsvc : u32, securityqos : *const RPC_SECURITY_QOS) -> RPC_STATUS); - RpcBindingSetAuthInfoExA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), authzsvc, core::mem::transmute(securityqos.unwrap_or(std::ptr::null()))) + RpcBindingSetAuthInfoExA(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), authzsvc, core::mem::transmute(securityqos.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -1721,7 +1721,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingSetAuthInfoExW(binding : *const core::ffi::c_void, serverprincname : windows_core::PCWSTR, authnlevel : u32, authnsvc : u32, authidentity : *const core::ffi::c_void, authzsvc : u32, securityqos : *const RPC_SECURITY_QOS) -> RPC_STATUS); - RpcBindingSetAuthInfoExW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), authzsvc, core::mem::transmute(securityqos.unwrap_or(std::ptr::null()))) + RpcBindingSetAuthInfoExW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), authzsvc, core::mem::transmute(securityqos.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcBindingSetAuthInfoW(binding: *const core::ffi::c_void, serverprincname: P0, authnlevel: u32, authnsvc: u32, authidentity: Option<*const core::ffi::c_void>, authzsvc: u32) -> RPC_STATUS @@ -1729,7 +1729,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcBindingSetAuthInfoW(binding : *const core::ffi::c_void, serverprincname : windows_core::PCWSTR, authnlevel : u32, authnsvc : u32, authidentity : *const core::ffi::c_void, authzsvc : u32) -> RPC_STATUS); - RpcBindingSetAuthInfoW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(std::ptr::null())), authzsvc) + RpcBindingSetAuthInfoW(binding, serverprincname.param().abi(), authnlevel, authnsvc, core::mem::transmute(authidentity.unwrap_or(core::ptr::null())), authzsvc) } #[inline] pub unsafe fn RpcBindingSetObject(binding: *const core::ffi::c_void, objectuuid: *const windows_core::GUID) -> RPC_STATUS { @@ -1789,7 +1789,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcEpRegisterA(ifspec : *const core::ffi::c_void, bindingvector : *const RPC_BINDING_VECTOR, uuidvector : *const UUID_VECTOR, annotation : windows_core::PCSTR) -> RPC_STATUS); - RpcEpRegisterA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(std::ptr::null())), annotation.param().abi()) + RpcEpRegisterA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) } #[inline] pub unsafe fn RpcEpRegisterNoReplaceA(ifspec: *const core::ffi::c_void, bindingvector: *const RPC_BINDING_VECTOR, uuidvector: Option<*const UUID_VECTOR>, annotation: P0) -> RPC_STATUS @@ -1797,7 +1797,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcEpRegisterNoReplaceA(ifspec : *const core::ffi::c_void, bindingvector : *const RPC_BINDING_VECTOR, uuidvector : *const UUID_VECTOR, annotation : windows_core::PCSTR) -> RPC_STATUS); - RpcEpRegisterNoReplaceA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(std::ptr::null())), annotation.param().abi()) + RpcEpRegisterNoReplaceA(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) } #[inline] pub unsafe fn RpcEpRegisterNoReplaceW(ifspec: *const core::ffi::c_void, bindingvector: *const RPC_BINDING_VECTOR, uuidvector: Option<*const UUID_VECTOR>, annotation: P0) -> RPC_STATUS @@ -1805,7 +1805,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcEpRegisterNoReplaceW(ifspec : *const core::ffi::c_void, bindingvector : *const RPC_BINDING_VECTOR, uuidvector : *const UUID_VECTOR, annotation : windows_core::PCWSTR) -> RPC_STATUS); - RpcEpRegisterNoReplaceW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(std::ptr::null())), annotation.param().abi()) + RpcEpRegisterNoReplaceW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) } #[inline] pub unsafe fn RpcEpRegisterW(ifspec: *const core::ffi::c_void, bindingvector: *const RPC_BINDING_VECTOR, uuidvector: Option<*const UUID_VECTOR>, annotation: P0) -> RPC_STATUS @@ -1813,7 +1813,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcEpRegisterW(ifspec : *const core::ffi::c_void, bindingvector : *const RPC_BINDING_VECTOR, uuidvector : *const UUID_VECTOR, annotation : windows_core::PCWSTR) -> RPC_STATUS); - RpcEpRegisterW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(std::ptr::null())), annotation.param().abi()) + RpcEpRegisterW(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::ptr::null())), annotation.param().abi()) } #[inline] pub unsafe fn RpcEpResolveBinding(binding: *const core::ffi::c_void, ifspec: *const core::ffi::c_void) -> RPC_STATUS { @@ -1823,7 +1823,7 @@ pub unsafe fn RpcEpResolveBinding(binding: *const core::ffi::c_void, ifspec: *co #[inline] pub unsafe fn RpcEpUnregister(ifspec: *const core::ffi::c_void, bindingvector: *const RPC_BINDING_VECTOR, uuidvector: Option<*const UUID_VECTOR>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcEpUnregister(ifspec : *const core::ffi::c_void, bindingvector : *const RPC_BINDING_VECTOR, uuidvector : *const UUID_VECTOR) -> RPC_STATUS); - RpcEpUnregister(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(std::ptr::null()))) + RpcEpUnregister(ifspec, bindingvector, core::mem::transmute(uuidvector.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcErrorAddRecord(errorinfo: *const RPC_EXTENDED_ERROR_INFO) -> RPC_STATUS { @@ -1889,7 +1889,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcGetAuthorizationContextForClient(clientbinding : *const core::ffi::c_void, impersonateonreturn : super::super::Foundation:: BOOL, reserved1 : *const core::ffi::c_void, pexpirationtime : *const i64, reserved2 : super::super::Foundation:: LUID, reserved3 : u32, reserved4 : *const core::ffi::c_void, pauthzclientcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), impersonateonreturn.param().abi(), core::mem::transmute(reserved1.unwrap_or(std::ptr::null())), core::mem::transmute(pexpirationtime.unwrap_or(std::ptr::null())), core::mem::transmute(reserved2), reserved3, core::mem::transmute(reserved4.unwrap_or(std::ptr::null())), pauthzclientcontext) + RpcGetAuthorizationContextForClient(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), impersonateonreturn.param().abi(), core::mem::transmute(reserved1.unwrap_or(core::ptr::null())), core::mem::transmute(pexpirationtime.unwrap_or(core::ptr::null())), core::mem::transmute(reserved2), reserved3, core::mem::transmute(reserved4.unwrap_or(core::ptr::null())), pauthzclientcontext) } #[inline] pub unsafe fn RpcIfIdVectorFree(ifidvector: *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS { @@ -1904,17 +1904,17 @@ pub unsafe fn RpcIfInqId(rpcifhandle: *const core::ffi::c_void, rpcifid: *mut RP #[inline] pub unsafe fn RpcImpersonateClient(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcImpersonateClient(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - RpcImpersonateClient(core::mem::transmute(bindinghandle.unwrap_or(std::ptr::null()))) + RpcImpersonateClient(core::mem::transmute(bindinghandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcImpersonateClient2(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcImpersonateClient2(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - RpcImpersonateClient2(core::mem::transmute(bindinghandle.unwrap_or(std::ptr::null()))) + RpcImpersonateClient2(core::mem::transmute(bindinghandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcImpersonateClientContainer(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcImpersonateClientContainer(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - RpcImpersonateClientContainer(core::mem::transmute(bindinghandle.unwrap_or(std::ptr::null()))) + RpcImpersonateClientContainer(core::mem::transmute(bindinghandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { @@ -1924,7 +1924,7 @@ pub unsafe fn RpcMgmtEnableIdleCleanup() -> RPC_STATUS { #[inline] pub unsafe fn RpcMgmtEpEltInqBegin(epbinding: Option<*const core::ffi::c_void>, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: u32, objectuuid: Option<*const windows_core::GUID>, inquirycontext: *mut *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtEpEltInqBegin(epbinding : *const core::ffi::c_void, inquirytype : u32, ifid : *const RPC_IF_ID, versoption : u32, objectuuid : *const windows_core::GUID, inquirycontext : *mut *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcMgmtEpEltInqBegin(core::mem::transmute(epbinding.unwrap_or(std::ptr::null())), inquirytype, core::mem::transmute(ifid.unwrap_or(std::ptr::null())), versoption, core::mem::transmute(objectuuid.unwrap_or(std::ptr::null())), inquirycontext) + RpcMgmtEpEltInqBegin(core::mem::transmute(epbinding.unwrap_or(core::ptr::null())), inquirytype, core::mem::transmute(ifid.unwrap_or(core::ptr::null())), versoption, core::mem::transmute(objectuuid.unwrap_or(core::ptr::null())), inquirycontext) } #[inline] pub unsafe fn RpcMgmtEpEltInqDone(inquirycontext: *mut *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -1934,17 +1934,17 @@ pub unsafe fn RpcMgmtEpEltInqDone(inquirycontext: *mut *mut *mut core::ffi::c_vo #[inline] pub unsafe fn RpcMgmtEpEltInqNextA(inquirycontext: *const *const core::ffi::c_void, ifid: *mut RPC_IF_ID, binding: Option<*mut *mut core::ffi::c_void>, objectuuid: Option<*mut windows_core::GUID>, annotation: Option<*mut windows_core::PSTR>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtEpEltInqNextA(inquirycontext : *const *const core::ffi::c_void, ifid : *mut RPC_IF_ID, binding : *mut *mut core::ffi::c_void, objectuuid : *mut windows_core::GUID, annotation : *mut windows_core::PSTR) -> RPC_STATUS); - RpcMgmtEpEltInqNextA(inquirycontext, ifid, core::mem::transmute(binding.unwrap_or(std::ptr::null_mut())), core::mem::transmute(objectuuid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(annotation.unwrap_or(std::ptr::null_mut()))) + RpcMgmtEpEltInqNextA(inquirycontext, ifid, core::mem::transmute(binding.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectuuid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(annotation.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcMgmtEpEltInqNextW(inquirycontext: *const *const core::ffi::c_void, ifid: *mut RPC_IF_ID, binding: Option<*mut *mut core::ffi::c_void>, objectuuid: Option<*mut windows_core::GUID>, annotation: Option<*mut windows_core::PWSTR>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtEpEltInqNextW(inquirycontext : *const *const core::ffi::c_void, ifid : *mut RPC_IF_ID, binding : *mut *mut core::ffi::c_void, objectuuid : *mut windows_core::GUID, annotation : *mut windows_core::PWSTR) -> RPC_STATUS); - RpcMgmtEpEltInqNextW(inquirycontext, ifid, core::mem::transmute(binding.unwrap_or(std::ptr::null_mut())), core::mem::transmute(objectuuid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(annotation.unwrap_or(std::ptr::null_mut()))) + RpcMgmtEpEltInqNextW(inquirycontext, ifid, core::mem::transmute(binding.unwrap_or(core::ptr::null_mut())), core::mem::transmute(objectuuid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(annotation.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcMgmtEpUnregister(epbinding: Option<*const core::ffi::c_void>, ifid: *const RPC_IF_ID, binding: *const core::ffi::c_void, objectuuid: Option<*const windows_core::GUID>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtEpUnregister(epbinding : *const core::ffi::c_void, ifid : *const RPC_IF_ID, binding : *const core::ffi::c_void, objectuuid : *const windows_core::GUID) -> RPC_STATUS); - RpcMgmtEpUnregister(core::mem::transmute(epbinding.unwrap_or(std::ptr::null())), ifid, binding, core::mem::transmute(objectuuid.unwrap_or(std::ptr::null()))) + RpcMgmtEpUnregister(core::mem::transmute(epbinding.unwrap_or(core::ptr::null())), ifid, binding, core::mem::transmute(objectuuid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcMgmtInqComTimeout(binding: *const core::ffi::c_void, timeout: *mut u32) -> RPC_STATUS { @@ -1959,27 +1959,27 @@ pub unsafe fn RpcMgmtInqDefaultProtectLevel(authnsvc: u32, authnlevel: *mut u32) #[inline] pub unsafe fn RpcMgmtInqIfIds(binding: Option<*const core::ffi::c_void>, ifidvector: *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqIfIds(binding : *const core::ffi::c_void, ifidvector : *mut *mut RPC_IF_ID_VECTOR) -> RPC_STATUS); - RpcMgmtInqIfIds(core::mem::transmute(binding.unwrap_or(std::ptr::null())), ifidvector) + RpcMgmtInqIfIds(core::mem::transmute(binding.unwrap_or(core::ptr::null())), ifidvector) } #[inline] pub unsafe fn RpcMgmtInqServerPrincNameA(binding: Option<*const core::ffi::c_void>, authnsvc: u32, serverprincname: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqServerPrincNameA(binding : *const core::ffi::c_void, authnsvc : u32, serverprincname : *mut windows_core::PSTR) -> RPC_STATUS); - RpcMgmtInqServerPrincNameA(core::mem::transmute(binding.unwrap_or(std::ptr::null())), authnsvc, serverprincname) + RpcMgmtInqServerPrincNameA(core::mem::transmute(binding.unwrap_or(core::ptr::null())), authnsvc, serverprincname) } #[inline] pub unsafe fn RpcMgmtInqServerPrincNameW(binding: Option<*const core::ffi::c_void>, authnsvc: u32, serverprincname: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqServerPrincNameW(binding : *const core::ffi::c_void, authnsvc : u32, serverprincname : *mut windows_core::PWSTR) -> RPC_STATUS); - RpcMgmtInqServerPrincNameW(core::mem::transmute(binding.unwrap_or(std::ptr::null())), authnsvc, serverprincname) + RpcMgmtInqServerPrincNameW(core::mem::transmute(binding.unwrap_or(core::ptr::null())), authnsvc, serverprincname) } #[inline] pub unsafe fn RpcMgmtInqStats(binding: Option<*const core::ffi::c_void>, statistics: *mut *mut RPC_STATS_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtInqStats(binding : *const core::ffi::c_void, statistics : *mut *mut RPC_STATS_VECTOR) -> RPC_STATUS); - RpcMgmtInqStats(core::mem::transmute(binding.unwrap_or(std::ptr::null())), statistics) + RpcMgmtInqStats(core::mem::transmute(binding.unwrap_or(core::ptr::null())), statistics) } #[inline] pub unsafe fn RpcMgmtIsServerListening(binding: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtIsServerListening(binding : *const core::ffi::c_void) -> RPC_STATUS); - RpcMgmtIsServerListening(core::mem::transmute(binding.unwrap_or(std::ptr::null()))) + RpcMgmtIsServerListening(core::mem::transmute(binding.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcMgmtSetAuthorizationFn(authorizationfn: RPC_MGMT_AUTHORIZATION_FN) -> RPC_STATUS { @@ -2009,7 +2009,7 @@ pub unsafe fn RpcMgmtStatsVectorFree(statsvector: *mut *mut RPC_STATS_VECTOR) -> #[inline] pub unsafe fn RpcMgmtStopServerListening(binding: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcMgmtStopServerListening(binding : *const core::ffi::c_void) -> RPC_STATUS); - RpcMgmtStopServerListening(core::mem::transmute(binding.unwrap_or(std::ptr::null()))) + RpcMgmtStopServerListening(core::mem::transmute(binding.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcMgmtWaitServerListen() -> RPC_STATUS { @@ -2048,7 +2048,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingExportA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, bindingvec : *const RPC_BINDING_VECTOR, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingExportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(bindingvec.unwrap_or(std::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsBindingExportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(bindingvec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingExportPnPA(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2056,7 +2056,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingExportPnPA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, objectvector : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingExportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectvector.unwrap_or(std::ptr::null()))) + RpcNsBindingExportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingExportPnPW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2064,7 +2064,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingExportPnPW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, objectvector : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingExportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectvector.unwrap_or(std::ptr::null()))) + RpcNsBindingExportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingExportW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, bindingvec: Option<*const RPC_BINDING_VECTOR>, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2072,7 +2072,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingExportW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, bindingvec : *const RPC_BINDING_VECTOR, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingExportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(bindingvec.unwrap_or(std::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsBindingExportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(bindingvec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingImportBeginA(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objuuid: Option<*const windows_core::GUID>, importcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2080,7 +2080,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingImportBeginA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, objuuid : *const windows_core::GUID, importcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsBindingImportBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objuuid.unwrap_or(std::ptr::null())), importcontext) + RpcNsBindingImportBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), importcontext) } #[inline] pub unsafe fn RpcNsBindingImportBeginW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objuuid: Option<*const windows_core::GUID>, importcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2088,7 +2088,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingImportBeginW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, objuuid : *const windows_core::GUID, importcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsBindingImportBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objuuid.unwrap_or(std::ptr::null())), importcontext) + RpcNsBindingImportBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), importcontext) } #[inline] pub unsafe fn RpcNsBindingImportDone(importcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -2116,7 +2116,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingLookupBeginA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, objuuid : *const windows_core::GUID, bindingmaxcount : u32, lookupcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsBindingLookupBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objuuid.unwrap_or(std::ptr::null())), bindingmaxcount, lookupcontext) + RpcNsBindingLookupBeginA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), bindingmaxcount, lookupcontext) } #[inline] pub unsafe fn RpcNsBindingLookupBeginW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objuuid: Option<*const windows_core::GUID>, bindingmaxcount: u32, lookupcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2124,7 +2124,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingLookupBeginW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, objuuid : *const windows_core::GUID, bindingmaxcount : u32, lookupcontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsBindingLookupBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objuuid.unwrap_or(std::ptr::null())), bindingmaxcount, lookupcontext) + RpcNsBindingLookupBeginW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objuuid.unwrap_or(core::ptr::null())), bindingmaxcount, lookupcontext) } #[inline] pub unsafe fn RpcNsBindingLookupDone(lookupcontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -2147,7 +2147,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingUnexportA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingUnexportPnPA(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2155,7 +2155,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingUnexportPnPA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifspec : *const core::ffi::c_void, objectvector : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingUnexportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectvector.unwrap_or(std::ptr::null()))) + RpcNsBindingUnexportPnPA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingUnexportPnPW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objectvector: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2163,7 +2163,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingUnexportPnPW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, objectvector : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingUnexportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectvector.unwrap_or(std::ptr::null()))) + RpcNsBindingUnexportPnPW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectvector.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsBindingUnexportW(entrynamesyntax: u32, entryname: P0, ifspec: Option<*const core::ffi::c_void>, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2171,7 +2171,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsBindingUnexportW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifspec : *const core::ffi::c_void, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsEntryExpandNameA(entrynamesyntax: u32, entryname: P0, expandedname: *mut windows_core::PSTR) -> RPC_STATUS @@ -2304,7 +2304,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtBindingUnexportA(entrynamesyntax : u32, entryname : windows_core::PCSTR, ifid : *const RPC_IF_ID, versoption : u32, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsMgmtBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsMgmtBindingUnexportA(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsMgmtBindingUnexportW(entrynamesyntax: u32, entryname: P0, ifid: Option<*const RPC_IF_ID>, versoption: u32, objectuuidvec: Option<*const UUID_VECTOR>) -> RPC_STATUS @@ -2312,7 +2312,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsMgmtBindingUnexportW(entrynamesyntax : u32, entryname : windows_core::PCWSTR, ifid : *const RPC_IF_ID, versoption : u32, objectuuidvec : *const UUID_VECTOR) -> RPC_STATUS); - RpcNsMgmtBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(std::ptr::null()))) + RpcNsMgmtBindingUnexportW(entrynamesyntax, entryname.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), versoption, core::mem::transmute(objectuuidvec.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcNsMgmtEntryCreateA(entrynamesyntax: u32, entryname: P0) -> RPC_STATUS @@ -2401,7 +2401,7 @@ where P2: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltAddA(profilenamesyntax : u32, profilename : windows_core::PCSTR, ifid : *const RPC_IF_ID, membernamesyntax : u32, membername : windows_core::PCSTR, priority : u32, annotation : windows_core::PCSTR) -> RPC_STATUS); - RpcNsProfileEltAddA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) + RpcNsProfileEltAddA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltAddW(profilenamesyntax: u32, profilename: P0, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P1, priority: u32, annotation: P2) -> RPC_STATUS @@ -2411,7 +2411,7 @@ where P2: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltAddW(profilenamesyntax : u32, profilename : windows_core::PCWSTR, ifid : *const RPC_IF_ID, membernamesyntax : u32, membername : windows_core::PCWSTR, priority : u32, annotation : windows_core::PCWSTR) -> RPC_STATUS); - RpcNsProfileEltAddW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) + RpcNsProfileEltAddW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), membernamesyntax, membername.param().abi(), priority, annotation.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltInqBeginA(profilenamesyntax: u32, profilename: P0, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: u32, membernamesyntax: u32, membername: P1, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2420,7 +2420,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltInqBeginA(profilenamesyntax : u32, profilename : windows_core::PCSTR, inquirytype : u32, ifid : *const RPC_IF_ID, versoption : u32, membernamesyntax : u32, membername : windows_core::PCSTR, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsProfileEltInqBeginA(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(std::ptr::null())), versoption, membernamesyntax, membername.param().abi(), inquirycontext) + RpcNsProfileEltInqBeginA(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(core::ptr::null())), versoption, membernamesyntax, membername.param().abi(), inquirycontext) } #[inline] pub unsafe fn RpcNsProfileEltInqBeginW(profilenamesyntax: u32, profilename: P0, inquirytype: u32, ifid: Option<*const RPC_IF_ID>, versoption: u32, membernamesyntax: u32, membername: P1, inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS @@ -2429,7 +2429,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltInqBeginW(profilenamesyntax : u32, profilename : windows_core::PCWSTR, inquirytype : u32, ifid : *const RPC_IF_ID, versoption : u32, membernamesyntax : u32, membername : windows_core::PCWSTR, inquirycontext : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcNsProfileEltInqBeginW(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(std::ptr::null())), versoption, membernamesyntax, membername.param().abi(), inquirycontext) + RpcNsProfileEltInqBeginW(profilenamesyntax, profilename.param().abi(), inquirytype, core::mem::transmute(ifid.unwrap_or(core::ptr::null())), versoption, membernamesyntax, membername.param().abi(), inquirycontext) } #[inline] pub unsafe fn RpcNsProfileEltInqDone(inquirycontext: *mut *mut core::ffi::c_void) -> RPC_STATUS { @@ -2439,12 +2439,12 @@ pub unsafe fn RpcNsProfileEltInqDone(inquirycontext: *mut *mut core::ffi::c_void #[inline] pub unsafe fn RpcNsProfileEltInqNextA(inquirycontext: *const core::ffi::c_void, ifid: Option<*mut RPC_IF_ID>, membername: *mut windows_core::PSTR, priority: *mut u32, annotation: *mut windows_core::PSTR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltInqNextA(inquirycontext : *const core::ffi::c_void, ifid : *mut RPC_IF_ID, membername : *mut windows_core::PSTR, priority : *mut u32, annotation : *mut windows_core::PSTR) -> RPC_STATUS); - RpcNsProfileEltInqNextA(inquirycontext, core::mem::transmute(ifid.unwrap_or(std::ptr::null_mut())), membername, priority, annotation) + RpcNsProfileEltInqNextA(inquirycontext, core::mem::transmute(ifid.unwrap_or(core::ptr::null_mut())), membername, priority, annotation) } #[inline] pub unsafe fn RpcNsProfileEltInqNextW(inquirycontext: *const core::ffi::c_void, ifid: Option<*mut RPC_IF_ID>, membername: *mut windows_core::PWSTR, priority: *mut u32, annotation: *mut windows_core::PWSTR) -> RPC_STATUS { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltInqNextW(inquirycontext : *const core::ffi::c_void, ifid : *mut RPC_IF_ID, membername : *mut windows_core::PWSTR, priority : *mut u32, annotation : *mut windows_core::PWSTR) -> RPC_STATUS); - RpcNsProfileEltInqNextW(inquirycontext, core::mem::transmute(ifid.unwrap_or(std::ptr::null_mut())), membername, priority, annotation) + RpcNsProfileEltInqNextW(inquirycontext, core::mem::transmute(ifid.unwrap_or(core::ptr::null_mut())), membername, priority, annotation) } #[inline] pub unsafe fn RpcNsProfileEltRemoveA(profilenamesyntax: u32, profilename: P0, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P1) -> RPC_STATUS @@ -2453,7 +2453,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltRemoveA(profilenamesyntax : u32, profilename : windows_core::PCSTR, ifid : *const RPC_IF_ID, membernamesyntax : u32, membername : windows_core::PCSTR) -> RPC_STATUS); - RpcNsProfileEltRemoveA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), membernamesyntax, membername.param().abi()) + RpcNsProfileEltRemoveA(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), membernamesyntax, membername.param().abi()) } #[inline] pub unsafe fn RpcNsProfileEltRemoveW(profilenamesyntax: u32, profilename: P0, ifid: Option<*const RPC_IF_ID>, membernamesyntax: u32, membername: P1) -> RPC_STATUS @@ -2462,12 +2462,12 @@ where P1: windows_core::Param, { windows_targets::link!("rpcns4.dll" "system" fn RpcNsProfileEltRemoveW(profilenamesyntax : u32, profilename : windows_core::PCWSTR, ifid : *const RPC_IF_ID, membernamesyntax : u32, membername : windows_core::PCWSTR) -> RPC_STATUS); - RpcNsProfileEltRemoveW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(std::ptr::null())), membernamesyntax, membername.param().abi()) + RpcNsProfileEltRemoveW(profilenamesyntax, profilename.param().abi(), core::mem::transmute(ifid.unwrap_or(core::ptr::null())), membernamesyntax, membername.param().abi()) } #[inline] pub unsafe fn RpcObjectInqType(objuuid: *const windows_core::GUID, typeuuid: Option<*mut windows_core::GUID>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcObjectInqType(objuuid : *const windows_core::GUID, typeuuid : *mut windows_core::GUID) -> RPC_STATUS); - RpcObjectInqType(objuuid, core::mem::transmute(typeuuid.unwrap_or(std::ptr::null_mut()))) + RpcObjectInqType(objuuid, core::mem::transmute(typeuuid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcObjectSetInqFn(inquiryfn: RPC_OBJECT_INQ_FN) -> RPC_STATUS { @@ -2477,7 +2477,7 @@ pub unsafe fn RpcObjectSetInqFn(inquiryfn: RPC_OBJECT_INQ_FN) -> RPC_STATUS { #[inline] pub unsafe fn RpcObjectSetType(objuuid: *const windows_core::GUID, typeuuid: Option<*const windows_core::GUID>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcObjectSetType(objuuid : *const windows_core::GUID, typeuuid : *const windows_core::GUID) -> RPC_STATUS); - RpcObjectSetType(objuuid, core::mem::transmute(typeuuid.unwrap_or(std::ptr::null()))) + RpcObjectSetType(objuuid, core::mem::transmute(typeuuid.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcProtseqVectorFreeA(protseqvector: *mut *mut RPC_PROTSEQ_VECTORA) -> RPC_STATUS { @@ -2507,7 +2507,7 @@ pub unsafe fn RpcRevertToSelf() -> RPC_STATUS { #[inline] pub unsafe fn RpcRevertToSelfEx(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcRevertToSelfEx(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - RpcRevertToSelfEx(core::mem::transmute(bindinghandle.unwrap_or(std::ptr::null()))) + RpcRevertToSelfEx(core::mem::transmute(bindinghandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerCompleteSecurityCallback(bindinghandle: *const core::ffi::c_void, status: RPC_STATUS) -> RPC_STATUS { @@ -2527,17 +2527,17 @@ pub unsafe fn RpcServerInqBindings(bindingvector: *mut *mut RPC_BINDING_VECTOR) #[inline] pub unsafe fn RpcServerInqBindingsEx(securitydescriptor: Option<*const core::ffi::c_void>, bindingvector: *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqBindingsEx(securitydescriptor : *const core::ffi::c_void, bindingvector : *mut *mut RPC_BINDING_VECTOR) -> RPC_STATUS); - RpcServerInqBindingsEx(core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), bindingvector) + RpcServerInqBindingsEx(core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), bindingvector) } #[inline] pub unsafe fn RpcServerInqCallAttributesA(clientbinding: Option<*const core::ffi::c_void>, rpccallattributes: *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqCallAttributesA(clientbinding : *const core::ffi::c_void, rpccallattributes : *mut core::ffi::c_void) -> RPC_STATUS); - RpcServerInqCallAttributesA(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), rpccallattributes) + RpcServerInqCallAttributesA(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), rpccallattributes) } #[inline] pub unsafe fn RpcServerInqCallAttributesW(clientbinding: Option<*const core::ffi::c_void>, rpccallattributes: *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqCallAttributesW(clientbinding : *const core::ffi::c_void, rpccallattributes : *mut core::ffi::c_void) -> RPC_STATUS); - RpcServerInqCallAttributesW(core::mem::transmute(clientbinding.unwrap_or(std::ptr::null())), rpccallattributes) + RpcServerInqCallAttributesW(core::mem::transmute(clientbinding.unwrap_or(core::ptr::null())), rpccallattributes) } #[inline] pub unsafe fn RpcServerInqDefaultPrincNameA(authnsvc: u32, princname: *mut windows_core::PSTR) -> RPC_STATUS { @@ -2552,7 +2552,7 @@ pub unsafe fn RpcServerInqDefaultPrincNameW(authnsvc: u32, princname: *mut windo #[inline] pub unsafe fn RpcServerInqIf(ifspec: *const core::ffi::c_void, mgrtypeuuid: Option<*const windows_core::GUID>, mgrepv: *mut *mut core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerInqIf(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, mgrepv : *mut *mut core::ffi::c_void) -> RPC_STATUS); - RpcServerInqIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), mgrepv) + RpcServerInqIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), mgrepv) } #[inline] pub unsafe fn RpcServerInterfaceGroupActivate(ifgroup: *const core::ffi::c_void) -> RPC_STATUS { @@ -2595,7 +2595,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterAuthInfoA(serverprincname : windows_core::PCSTR, authnsvc : u32, getkeyfn : RPC_AUTH_KEY_RETRIEVAL_FN, arg : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerRegisterAuthInfoA(serverprincname.param().abi(), authnsvc, getkeyfn, core::mem::transmute(arg.unwrap_or(std::ptr::null()))) + RpcServerRegisterAuthInfoA(serverprincname.param().abi(), authnsvc, getkeyfn, core::mem::transmute(arg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerRegisterAuthInfoW(serverprincname: P0, authnsvc: u32, getkeyfn: RPC_AUTH_KEY_RETRIEVAL_FN, arg: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2603,73 +2603,73 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterAuthInfoW(serverprincname : windows_core::PCWSTR, authnsvc : u32, getkeyfn : RPC_AUTH_KEY_RETRIEVAL_FN, arg : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerRegisterAuthInfoW(serverprincname.param().abi(), authnsvc, getkeyfn, core::mem::transmute(arg.unwrap_or(std::ptr::null()))) + RpcServerRegisterAuthInfoW(serverprincname.param().abi(), authnsvc, getkeyfn, core::mem::transmute(arg.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerRegisterIf(ifspec: *const core::ffi::c_void, mgrtypeuuid: Option<*const windows_core::GUID>, mgrepv: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterIf(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, mgrepv : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerRegisterIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(std::ptr::null()))) + RpcServerRegisterIf(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerRegisterIf2(ifspec: *const core::ffi::c_void, mgrtypeuuid: Option<*const windows_core::GUID>, mgrepv: Option<*const core::ffi::c_void>, flags: u32, maxcalls: u32, maxrpcsize: u32, ifcallbackfn: RPC_IF_CALLBACK_FN) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterIf2(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, mgrepv : *const core::ffi::c_void, flags : u32, maxcalls : u32, maxrpcsize : u32, ifcallbackfn : RPC_IF_CALLBACK_FN) -> RPC_STATUS); - RpcServerRegisterIf2(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(std::ptr::null())), flags, maxcalls, maxrpcsize, ifcallbackfn) + RpcServerRegisterIf2(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), flags, maxcalls, maxrpcsize, ifcallbackfn) } #[inline] pub unsafe fn RpcServerRegisterIf3(ifspec: *const core::ffi::c_void, mgrtypeuuid: Option<*const windows_core::GUID>, mgrepv: Option<*const core::ffi::c_void>, flags: u32, maxcalls: u32, maxrpcsize: u32, ifcallback: RPC_IF_CALLBACK_FN, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterIf3(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, mgrepv : *const core::ffi::c_void, flags : u32, maxcalls : u32, maxrpcsize : u32, ifcallback : RPC_IF_CALLBACK_FN, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerRegisterIf3(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(std::ptr::null())), flags, maxcalls, maxrpcsize, ifcallback, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerRegisterIf3(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), flags, maxcalls, maxrpcsize, ifcallback, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerRegisterIfEx(ifspec: *const core::ffi::c_void, mgrtypeuuid: Option<*const windows_core::GUID>, mgrepv: Option<*const core::ffi::c_void>, flags: u32, maxcalls: u32, ifcallback: RPC_IF_CALLBACK_FN) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerRegisterIfEx(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, mgrepv : *const core::ffi::c_void, flags : u32, maxcalls : u32, ifcallback : RPC_IF_CALLBACK_FN) -> RPC_STATUS); - RpcServerRegisterIfEx(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(std::ptr::null())), flags, maxcalls, ifcallback) + RpcServerRegisterIfEx(ifspec, core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), core::mem::transmute(mgrepv.unwrap_or(core::ptr::null())), flags, maxcalls, ifcallback) } #[cfg(feature = "Win32_System_IO")] #[inline] pub unsafe fn RpcServerSubscribeForNotification(binding: Option<*const core::ffi::c_void>, notification: RPC_NOTIFICATIONS, notificationtype: RPC_NOTIFICATION_TYPES, notificationinfo: *const RPC_ASYNC_NOTIFICATION_INFO) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerSubscribeForNotification(binding : *const core::ffi::c_void, notification : RPC_NOTIFICATIONS, notificationtype : RPC_NOTIFICATION_TYPES, notificationinfo : *const RPC_ASYNC_NOTIFICATION_INFO) -> RPC_STATUS); - RpcServerSubscribeForNotification(core::mem::transmute(binding.unwrap_or(std::ptr::null())), notification, notificationtype, notificationinfo) + RpcServerSubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::ptr::null())), notification, notificationtype, notificationinfo) } #[inline] pub unsafe fn RpcServerTestCancel(bindinghandle: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerTestCancel(bindinghandle : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerTestCancel(core::mem::transmute(bindinghandle.unwrap_or(std::ptr::null()))) + RpcServerTestCancel(core::mem::transmute(bindinghandle.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUnregisterIf(ifspec: Option<*const core::ffi::c_void>, mgrtypeuuid: Option<*const windows_core::GUID>, waitforcallstocomplete: u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUnregisterIf(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, waitforcallstocomplete : u32) -> RPC_STATUS); - RpcServerUnregisterIf(core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), waitforcallstocomplete) + RpcServerUnregisterIf(core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), waitforcallstocomplete) } #[inline] pub unsafe fn RpcServerUnregisterIfEx(ifspec: Option<*const core::ffi::c_void>, mgrtypeuuid: Option<*const windows_core::GUID>, rundowncontexthandles: i32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUnregisterIfEx(ifspec : *const core::ffi::c_void, mgrtypeuuid : *const windows_core::GUID, rundowncontexthandles : i32) -> RPC_STATUS); - RpcServerUnregisterIfEx(core::mem::transmute(ifspec.unwrap_or(std::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(std::ptr::null())), rundowncontexthandles) + RpcServerUnregisterIfEx(core::mem::transmute(ifspec.unwrap_or(core::ptr::null())), core::mem::transmute(mgrtypeuuid.unwrap_or(core::ptr::null())), rundowncontexthandles) } #[inline] pub unsafe fn RpcServerUnsubscribeForNotification(binding: Option<*const core::ffi::c_void>, notification: RPC_NOTIFICATIONS, notificationsqueued: *mut u32) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUnsubscribeForNotification(binding : *const core::ffi::c_void, notification : RPC_NOTIFICATIONS, notificationsqueued : *mut u32) -> RPC_STATUS); - RpcServerUnsubscribeForNotification(core::mem::transmute(binding.unwrap_or(std::ptr::null())), notification, notificationsqueued) + RpcServerUnsubscribeForNotification(core::mem::transmute(binding.unwrap_or(core::ptr::null())), notification, notificationsqueued) } #[inline] pub unsafe fn RpcServerUseAllProtseqs(maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseAllProtseqs(maxcalls : u32, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseAllProtseqs(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseAllProtseqs(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseAllProtseqsEx(maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseAllProtseqsEx(maxcalls : u32, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseAllProtseqsEx(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseAllProtseqsEx(maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseAllProtseqsIf(maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseAllProtseqsIf(maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseAllProtseqsIf(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseAllProtseqsIf(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseAllProtseqsIfEx(maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseAllProtseqsIfEx(maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseAllProtseqsIfEx(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseAllProtseqsIfEx(maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqA(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2677,7 +2677,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqA(protseq : windows_core::PCSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseProtseqEpA(protseq: P0, maxcalls: u32, endpoint: P1, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2686,7 +2686,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqEpA(protseq : windows_core::PCSTR, maxcalls : u32, endpoint : windows_core::PCSTR, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqEpA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqEpA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseProtseqEpExA(protseq: P0, maxcalls: u32, endpoint: P1, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2695,7 +2695,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqEpExA(protseq : windows_core::PCSTR, maxcalls : u32, endpoint : windows_core::PCSTR, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqEpExA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqEpExA(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqEpExW(protseq: P0, maxcalls: u32, endpoint: P1, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2704,7 +2704,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqEpExW(protseq : windows_core::PCWSTR, maxcalls : u32, endpoint : windows_core::PCWSTR, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqEpExW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqEpExW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqEpW(protseq: P0, maxcalls: u32, endpoint: P1, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2713,7 +2713,7 @@ where P1: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqEpW(protseq : windows_core::PCWSTR, maxcalls : u32, endpoint : windows_core::PCWSTR, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqEpW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqEpW(protseq.param().abi(), maxcalls, endpoint.param().abi(), core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseProtseqExA(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2721,7 +2721,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqExA(protseq : windows_core::PCSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqExA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqExA(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqExW(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2729,7 +2729,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqExW(protseq : windows_core::PCWSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqExW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqExW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqIfA(protseq: P0, maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2737,7 +2737,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqIfA(protseq : windows_core::PCSTR, maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqIfA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqIfA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseProtseqIfExA(protseq: P0, maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2745,7 +2745,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqIfExA(protseq : windows_core::PCSTR, maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqIfExA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqIfExA(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqIfExW(protseq: P0, maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>, policy: *const RPC_POLICY) -> RPC_STATUS @@ -2753,7 +2753,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqIfExW(protseq : windows_core::PCWSTR, maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void, policy : *const RPC_POLICY) -> RPC_STATUS); - RpcServerUseProtseqIfExW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null())), policy) + RpcServerUseProtseqIfExW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null())), policy) } #[inline] pub unsafe fn RpcServerUseProtseqIfW(protseq: P0, maxcalls: u32, ifspec: *const core::ffi::c_void, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2761,7 +2761,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqIfW(protseq : windows_core::PCWSTR, maxcalls : u32, ifspec : *const core::ffi::c_void, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqIfW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqIfW(protseq.param().abi(), maxcalls, ifspec, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerUseProtseqW(protseq: P0, maxcalls: u32, securitydescriptor: Option<*const core::ffi::c_void>) -> RPC_STATUS @@ -2769,7 +2769,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcServerUseProtseqW(protseq : windows_core::PCWSTR, maxcalls : u32, securitydescriptor : *const core::ffi::c_void) -> RPC_STATUS); - RpcServerUseProtseqW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(std::ptr::null()))) + RpcServerUseProtseqW(protseq.param().abi(), maxcalls, core::mem::transmute(securitydescriptor.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn RpcServerYield() { @@ -2834,7 +2834,7 @@ pub unsafe fn RpcSsAllocate(size: usize) -> *mut core::ffi::c_void { #[inline] pub unsafe fn RpcSsContextLockExclusive(serverbindinghandle: Option<*const core::ffi::c_void>, usercontext: *const core::ffi::c_void) -> RPC_STATUS { windows_targets::link!("rpcrt4.dll" "system" fn RpcSsContextLockExclusive(serverbindinghandle : *const core::ffi::c_void, usercontext : *const core::ffi::c_void) -> RPC_STATUS); - RpcSsContextLockExclusive(core::mem::transmute(serverbindinghandle.unwrap_or(std::ptr::null())), usercontext) + RpcSsContextLockExclusive(core::mem::transmute(serverbindinghandle.unwrap_or(core::ptr::null())), usercontext) } #[inline] pub unsafe fn RpcSsContextLockShared(serverbindinghandle: *const core::ffi::c_void, usercontext: *const core::ffi::c_void) -> RPC_STATUS { @@ -2901,7 +2901,7 @@ where P4: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringBindingComposeA(objuuid : windows_core::PCSTR, protseq : windows_core::PCSTR, networkaddr : windows_core::PCSTR, endpoint : windows_core::PCSTR, options : windows_core::PCSTR, stringbinding : *mut windows_core::PSTR) -> RPC_STATUS); - RpcStringBindingComposeA(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), core::mem::transmute(stringbinding.unwrap_or(std::ptr::null_mut()))) + RpcStringBindingComposeA(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), core::mem::transmute(stringbinding.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcStringBindingComposeW(objuuid: P0, protseq: P1, networkaddr: P2, endpoint: P3, options: P4, stringbinding: Option<*mut windows_core::PWSTR>) -> RPC_STATUS @@ -2913,7 +2913,7 @@ where P4: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringBindingComposeW(objuuid : windows_core::PCWSTR, protseq : windows_core::PCWSTR, networkaddr : windows_core::PCWSTR, endpoint : windows_core::PCWSTR, options : windows_core::PCWSTR, stringbinding : *mut windows_core::PWSTR) -> RPC_STATUS); - RpcStringBindingComposeW(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), core::mem::transmute(stringbinding.unwrap_or(std::ptr::null_mut()))) + RpcStringBindingComposeW(objuuid.param().abi(), protseq.param().abi(), networkaddr.param().abi(), endpoint.param().abi(), options.param().abi(), core::mem::transmute(stringbinding.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcStringBindingParseA(stringbinding: P0, objuuid: Option<*mut windows_core::PSTR>, protseq: Option<*mut windows_core::PSTR>, networkaddr: Option<*mut windows_core::PSTR>, endpoint: Option<*mut windows_core::PSTR>, networkoptions: Option<*mut windows_core::PSTR>) -> RPC_STATUS @@ -2921,7 +2921,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringBindingParseA(stringbinding : windows_core::PCSTR, objuuid : *mut windows_core::PSTR, protseq : *mut windows_core::PSTR, networkaddr : *mut windows_core::PSTR, endpoint : *mut windows_core::PSTR, networkoptions : *mut windows_core::PSTR) -> RPC_STATUS); - RpcStringBindingParseA(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(protseq.unwrap_or(std::ptr::null_mut())), core::mem::transmute(networkaddr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endpoint.unwrap_or(std::ptr::null_mut())), core::mem::transmute(networkoptions.unwrap_or(std::ptr::null_mut()))) + RpcStringBindingParseA(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(protseq.unwrap_or(core::ptr::null_mut())), core::mem::transmute(networkaddr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endpoint.unwrap_or(core::ptr::null_mut())), core::mem::transmute(networkoptions.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcStringBindingParseW(stringbinding: P0, objuuid: Option<*mut windows_core::PWSTR>, protseq: Option<*mut windows_core::PWSTR>, networkaddr: Option<*mut windows_core::PWSTR>, endpoint: Option<*mut windows_core::PWSTR>, networkoptions: Option<*mut windows_core::PWSTR>) -> RPC_STATUS @@ -2929,7 +2929,7 @@ where P0: windows_core::Param, { windows_targets::link!("rpcrt4.dll" "system" fn RpcStringBindingParseW(stringbinding : windows_core::PCWSTR, objuuid : *mut windows_core::PWSTR, protseq : *mut windows_core::PWSTR, networkaddr : *mut windows_core::PWSTR, endpoint : *mut windows_core::PWSTR, networkoptions : *mut windows_core::PWSTR) -> RPC_STATUS); - RpcStringBindingParseW(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(protseq.unwrap_or(std::ptr::null_mut())), core::mem::transmute(networkaddr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(endpoint.unwrap_or(std::ptr::null_mut())), core::mem::transmute(networkoptions.unwrap_or(std::ptr::null_mut()))) + RpcStringBindingParseW(stringbinding.param().abi(), core::mem::transmute(objuuid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(protseq.unwrap_or(core::ptr::null_mut())), core::mem::transmute(networkaddr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(endpoint.unwrap_or(core::ptr::null_mut())), core::mem::transmute(networkoptions.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RpcStringFreeA(string: *mut windows_core::PSTR) -> RPC_STATUS { diff --git a/crates/libs/windows/src/Windows/Win32/System/Search/impl.rs b/crates/libs/windows/src/Windows/Win32/System/Search/impl.rs index 1b2d550ecc..085c7f8352 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/impl.rs @@ -6188,7 +6188,7 @@ impl IUMS_Vtbl { } } #[doc(hidden)] -struct IUMS_ImplVtbl(std::marker::PhantomData); +struct IUMS_ImplVtbl(core::marker::PhantomData); impl IUMS_ImplVtbl { const VTABLE: IUMS_Vtbl = IUMS_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs index f34517d4cc..3966736136 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Search/mod.rs @@ -39,13 +39,13 @@ pub unsafe fn SQLAllocStmt(connectionhandle: *mut core::ffi::c_void, statementha #[inline] pub unsafe fn SQLBindCol(statementhandle: *mut core::ffi::c_void, columnnumber: u16, targettype: i16, targetvalue: Option<*mut core::ffi::c_void>, bufferlength: i64, strlen_or_ind: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindCol(statementhandle : *mut core::ffi::c_void, columnnumber : u16, targettype : i16, targetvalue : *mut core::ffi::c_void, bufferlength : i64, strlen_or_ind : *mut i64) -> i16); - SQLBindCol(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(std::ptr::null_mut()))) + SQLBindCol(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLBindCol(statementhandle: *mut core::ffi::c_void, columnnumber: u16, targettype: i16, targetvalue: Option<*mut core::ffi::c_void>, bufferlength: i32, strlen_or_ind: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBindCol(statementhandle : *mut core::ffi::c_void, columnnumber : u16, targettype : i16, targetvalue : *mut core::ffi::c_void, bufferlength : i32, strlen_or_ind : *mut i32) -> i16); - SQLBindCol(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(std::ptr::null_mut()))) + SQLBindCol(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_ind.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -74,17 +74,17 @@ pub unsafe fn SQLBindParameter(hstmt: *mut core::ffi::c_void, ipar: u16, fparamt #[inline] pub unsafe fn SQLBrowseConnect(hdbc: *mut core::ffi::c_void, szconnstrin: &[u8], szconnstrout: Option<&mut [u8]>, pcchconnstrout: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnect(hdbc : *mut core::ffi::c_void, szconnstrin : *const u8, cchconnstrin : i16, szconnstrout : *mut u8, cchconnstroutmax : i16, pcchconnstrout : *mut i16) -> i16); - SQLBrowseConnect(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(std::ptr::null_mut()))) + SQLBrowseConnect(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBrowseConnectA(hdbc: *mut core::ffi::c_void, szconnstrin: &[u8], szconnstrout: Option<&mut [u8]>, pcbconnstrout: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnectA(hdbc : *mut core::ffi::c_void, szconnstrin : *const u8, cbconnstrin : i16, szconnstrout : *mut u8, cbconnstroutmax : i16, pcbconnstrout : *mut i16) -> i16); - SQLBrowseConnectA(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbconnstrout.unwrap_or(std::ptr::null_mut()))) + SQLBrowseConnectA(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbconnstrout.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBrowseConnectW(hdbc: *mut core::ffi::c_void, szconnstrin: &[u16], szconnstrout: Option<&mut [u16]>, pcchconnstrout: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLBrowseConnectW(hdbc : *mut core::ffi::c_void, szconnstrin : *const u16, cchconnstrin : i16, szconnstrout : *mut u16, cchconnstroutmax : i16, pcchconnstrout : *mut i16) -> i16); - SQLBrowseConnectW(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(std::ptr::null_mut()))) + SQLBrowseConnectW(hdbc, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLBulkOperations(statementhandle: *mut core::ffi::c_void, operation: i16) -> i16 { @@ -118,37 +118,37 @@ where #[inline] pub unsafe fn SQLColAttribute(statementhandle: *mut core::ffi::c_void, columnnumber: u16, fieldidentifier: u16, characterattribute: Option<*mut core::ffi::c_void>, bufferlength: i16, stringlength: Option<*mut i16>, numericattribute: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttribute(statementhandle : *mut core::ffi::c_void, columnnumber : u16, fieldidentifier : u16, characterattribute : *mut core::ffi::c_void, bufferlength : i16, stringlength : *mut i16, numericattribute : *mut i64) -> i16); - SQLColAttribute(statementhandle, columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(std::ptr::null_mut()))) + SQLColAttribute(statementhandle, columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttribute(statementhandle: *mut core::ffi::c_void, columnnumber: u16, fieldidentifier: u16, characterattribute: Option<*mut core::ffi::c_void>, bufferlength: i16, stringlength: Option<*mut i16>, numericattribute: Option<*mut core::ffi::c_void>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttribute(statementhandle : *mut core::ffi::c_void, columnnumber : u16, fieldidentifier : u16, characterattribute : *mut core::ffi::c_void, bufferlength : i16, stringlength : *mut i16, numericattribute : *mut core::ffi::c_void) -> i16); - SQLColAttribute(statementhandle, columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(std::ptr::null_mut()))) + SQLColAttribute(statementhandle, columnnumber, fieldidentifier, core::mem::transmute(characterattribute.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(numericattribute.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLColAttributeA(hstmt: *mut core::ffi::c_void, icol: i16, ifield: i16, pcharattr: Option<*mut core::ffi::c_void>, cbcharattrmax: i16, pcbcharattr: Option<*mut i16>, pnumattr: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributeA(hstmt : *mut core::ffi::c_void, icol : i16, ifield : i16, pcharattr : *mut core::ffi::c_void, cbcharattrmax : i16, pcbcharattr : *mut i16, pnumattr : *mut i64) -> i16); - SQLColAttributeA(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(std::ptr::null_mut())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(std::ptr::null_mut()))) + SQLColAttributeA(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributeA(hstmt: *mut core::ffi::c_void, icol: i16, ifield: i16, pcharattr: Option<*mut core::ffi::c_void>, cbcharattrmax: i16, pcbcharattr: Option<*mut i16>, pnumattr: Option<*mut core::ffi::c_void>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributeA(hstmt : *mut core::ffi::c_void, icol : i16, ifield : i16, pcharattr : *mut core::ffi::c_void, cbcharattrmax : i16, pcbcharattr : *mut i16, pnumattr : *mut core::ffi::c_void) -> i16); - SQLColAttributeA(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(std::ptr::null_mut())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(std::ptr::null_mut()))) + SQLColAttributeA(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), cbcharattrmax, core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLColAttributeW(hstmt: *mut core::ffi::c_void, icol: u16, ifield: u16, pcharattr: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbcharattr: Option<*mut i16>, pnumattr: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributeW(hstmt : *mut core::ffi::c_void, icol : u16, ifield : u16, pcharattr : *mut core::ffi::c_void, cbdescmax : i16, pcbcharattr : *mut i16, pnumattr : *mut i64) -> i16); - SQLColAttributeW(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(std::ptr::null_mut()))) + SQLColAttributeW(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributeW(hstmt: *mut core::ffi::c_void, icol: u16, ifield: u16, pcharattr: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbcharattr: Option<*mut i16>, pnumattr: Option<*mut core::ffi::c_void>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributeW(hstmt : *mut core::ffi::c_void, icol : u16, ifield : u16, pcharattr : *mut core::ffi::c_void, cbdescmax : i16, pcbcharattr : *mut i16, pnumattr : *mut core::ffi::c_void) -> i16); - SQLColAttributeW(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(std::ptr::null_mut()))) + SQLColAttributeW(hstmt, icol, ifield, core::mem::transmute(pcharattr.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbcharattr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnumattr.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -166,25 +166,25 @@ pub unsafe fn SQLColAttributes(hstmt: *mut core::ffi::c_void, icol: u16, fdescty #[inline] pub unsafe fn SQLColAttributesA(hstmt: *mut core::ffi::c_void, icol: u16, fdesctype: u16, rgbdesc: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbdesc: Option<*mut i16>, pfdesc: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributesA(hstmt : *mut core::ffi::c_void, icol : u16, fdesctype : u16, rgbdesc : *mut core::ffi::c_void, cbdescmax : i16, pcbdesc : *mut i16, pfdesc : *mut i64) -> i16); - SQLColAttributesA(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(std::ptr::null_mut()))) + SQLColAttributesA(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributesA(hstmt: *mut core::ffi::c_void, icol: u16, fdesctype: u16, rgbdesc: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbdesc: Option<*mut i16>, pfdesc: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributesA(hstmt : *mut core::ffi::c_void, icol : u16, fdesctype : u16, rgbdesc : *mut core::ffi::c_void, cbdescmax : i16, pcbdesc : *mut i16, pfdesc : *mut i32) -> i16); - SQLColAttributesA(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(std::ptr::null_mut()))) + SQLColAttributesA(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLColAttributesW(hstmt: *mut core::ffi::c_void, icol: u16, fdesctype: u16, rgbdesc: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbdesc: Option<*mut i16>, pfdesc: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributesW(hstmt : *mut core::ffi::c_void, icol : u16, fdesctype : u16, rgbdesc : *mut core::ffi::c_void, cbdescmax : i16, pcbdesc : *mut i16, pfdesc : *mut i64) -> i16); - SQLColAttributesW(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(std::ptr::null_mut()))) + SQLColAttributesW(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLColAttributesW(hstmt: *mut core::ffi::c_void, icol: u16, fdesctype: u16, rgbdesc: Option<*mut core::ffi::c_void>, cbdescmax: i16, pcbdesc: Option<*mut i16>, pfdesc: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLColAttributesW(hstmt : *mut core::ffi::c_void, icol : u16, fdesctype : u16, rgbdesc : *mut core::ffi::c_void, cbdescmax : i16, pcbdesc : *mut i16, pfdesc : *mut i32) -> i16); - SQLColAttributesW(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(std::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(std::ptr::null_mut()))) + SQLColAttributesW(hstmt, icol, fdesctype, core::mem::transmute(rgbdesc.unwrap_or(core::ptr::null_mut())), cbdescmax, core::mem::transmute(pcbdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfdesc.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLColumnPrivileges(hstmt: *mut core::ffi::c_void, szcatalogname: Option<&[u8]>, szschemaname: Option<&[u8]>, sztablename: Option<&[u8]>, szcolumnname: Option<&[u8]>) -> i16 { @@ -309,10 +309,10 @@ pub unsafe fn SQLDataSources(environmenthandle: *mut core::ffi::c_void, directio direction, core::mem::transmute(servername.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), servername.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(namelength1ptr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(namelength1ptr.unwrap_or(core::ptr::null_mut())), core::mem::transmute(description.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), description.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(namelength2ptr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(namelength2ptr.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -328,10 +328,10 @@ pub unsafe fn SQLDataSourcesW(henv: *mut core::ffi::c_void, fdirection: u16, szd fdirection, core::mem::transmute(szdsn.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdsn.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdsn.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdsn.unwrap_or(core::ptr::null_mut())), core::mem::transmute(wszdescription.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wszdescription.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdescription.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdescription.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -343,11 +343,11 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumb columnnumber, core::mem::transmute(columnname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), columnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(namelength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(datatype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(columnsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(decimaldigits.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(nullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(namelength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(datatype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(columnsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(decimaldigits.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(nullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -359,11 +359,11 @@ pub unsafe fn SQLDescribeCol(statementhandle: *mut core::ffi::c_void, columnnumb columnnumber, core::mem::transmute(columnname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), columnname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(namelength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(datatype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(columnsize.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(decimaldigits.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(nullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(namelength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(datatype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(columnsize.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(decimaldigits.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(nullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -375,11 +375,11 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam icol, core::mem::transmute(szcolname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbcolname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbcoldef.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbcolname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbcoldef.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -391,11 +391,11 @@ pub unsafe fn SQLDescribeColA(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam icol, core::mem::transmute(szcolname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbcolname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbcoldef.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbcolname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbcoldef.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -407,11 +407,11 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam icol, core::mem::transmute(szcolname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchcolname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbcoldef.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchcolname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbcoldef.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -423,24 +423,24 @@ pub unsafe fn SQLDescribeColW(hstmt: *mut core::ffi::c_void, icol: u16, szcolnam icol, core::mem::transmute(szcolname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcolname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchcolname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcbcoldef.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchcolname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcbcoldef.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLDescribeParam(hstmt: *mut core::ffi::c_void, ipar: u16, pfsqltype: Option<*mut i16>, pcbparamdef: Option<*mut u64>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeParam(hstmt : *mut core::ffi::c_void, ipar : u16, pfsqltype : *mut i16, pcbparamdef : *mut u64, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - SQLDescribeParam(hstmt, ipar, core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbparamdef.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut()))) + SQLDescribeParam(hstmt, ipar, core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbparamdef.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLDescribeParam(hstmt: *mut core::ffi::c_void, ipar: u16, pfsqltype: Option<*mut i16>, pcbparamdef: Option<*mut u32>, pibscale: Option<*mut i16>, pfnullable: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDescribeParam(hstmt : *mut core::ffi::c_void, ipar : u16, pfsqltype : *mut i16, pcbparamdef : *mut u32, pibscale : *mut i16, pfnullable : *mut i16) -> i16); - SQLDescribeParam(hstmt, ipar, core::mem::transmute(pfsqltype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbparamdef.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pibscale.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfnullable.unwrap_or(std::ptr::null_mut()))) + SQLDescribeParam(hstmt, ipar, core::mem::transmute(pfsqltype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbparamdef.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pibscale.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfnullable.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLDisconnect(connectionhandle: *mut core::ffi::c_void) -> i16 { @@ -450,17 +450,17 @@ pub unsafe fn SQLDisconnect(connectionhandle: *mut core::ffi::c_void) -> i16 { #[inline] pub unsafe fn SQLDriverConnect(hdbc: *mut core::ffi::c_void, hwnd: isize, szconnstrin: &[u8], szconnstrout: Option<&mut [u8]>, pcchconnstrout: Option<*mut i16>, fdrivercompletion: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnect(hdbc : *mut core::ffi::c_void, hwnd : isize, szconnstrin : *const u8, cchconnstrin : i16, szconnstrout : *mut u8, cchconnstroutmax : i16, pcchconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnect(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnect(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDriverConnectA(hdbc: *mut core::ffi::c_void, hwnd: isize, szconnstrin: &[u8], szconnstrout: Option<&mut [u8]>, pcbconnstrout: Option<*mut i16>, fdrivercompletion: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnectA(hdbc : *mut core::ffi::c_void, hwnd : isize, szconnstrin : *const u8, cbconnstrin : i16, szconnstrout : *mut u8, cbconnstroutmax : i16, pcbconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnectA(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbconnstrout.unwrap_or(std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnectA(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbconnstrout.unwrap_or(core::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDriverConnectW(hdbc: *mut core::ffi::c_void, hwnd: isize, szconnstrin: &[u16], szconnstrout: Option<&mut [u16]>, pcchconnstrout: Option<*mut i16>, fdrivercompletion: u16) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLDriverConnectW(hdbc : *mut core::ffi::c_void, hwnd : isize, szconnstrin : *const u16, cchconnstrin : i16, szconnstrout : *mut u16, cchconnstroutmax : i16, pcchconnstrout : *mut i16, fdrivercompletion : u16) -> i16); - SQLDriverConnectW(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(std::ptr::null_mut())), fdrivercompletion) + SQLDriverConnectW(hdbc, hwnd, core::mem::transmute(szconnstrin.as_ptr()), szconnstrin.len().try_into().unwrap(), core::mem::transmute(szconnstrout.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szconnstrout.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchconnstrout.unwrap_or(core::ptr::null_mut())), fdrivercompletion) } #[inline] pub unsafe fn SQLDrivers(henv: *mut core::ffi::c_void, fdirection: u16, szdriverdesc: Option<&mut [u8]>, pcchdriverdesc: Option<*mut i16>, szdriverattributes: Option<&mut [u8]>, pcchdrvrattr: Option<*mut i16>) -> i16 { @@ -470,10 +470,10 @@ pub unsafe fn SQLDrivers(henv: *mut core::ffi::c_void, fdirection: u16, szdriver fdirection, core::mem::transmute(szdriverdesc.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdriverdesc.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdriverdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdriverattributes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdrvrattr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdrvrattr.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -484,10 +484,10 @@ pub unsafe fn SQLDriversA(henv: *mut core::ffi::c_void, fdirection: u16, szdrive fdirection, core::mem::transmute(szdriverdesc.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbdriverdesc.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbdriverdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdriverattributes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbdrvrattr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbdrvrattr.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -498,10 +498,10 @@ pub unsafe fn SQLDriversW(henv: *mut core::ffi::c_void, fdirection: u16, szdrive fdirection, core::mem::transmute(szdriverdesc.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverdesc.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdriverdesc.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdriverdesc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szdriverattributes.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szdriverattributes.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchdrvrattr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchdrvrattr.unwrap_or(core::ptr::null_mut())), ) } #[inline] @@ -512,17 +512,17 @@ pub unsafe fn SQLEndTran(handletype: i16, handle: *mut core::ffi::c_void, comple #[inline] pub unsafe fn SQLError(environmenthandle: *mut core::ffi::c_void, connectionhandle: *mut core::ffi::c_void, statementhandle: *mut core::ffi::c_void, sqlstate: &mut [u8; 6], nativeerror: Option<*mut i32>, messagetext: Option<&mut [u8]>, textlength: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLError(environmenthandle : *mut core::ffi::c_void, connectionhandle : *mut core::ffi::c_void, statementhandle : *mut core::ffi::c_void, sqlstate : *mut u8, nativeerror : *mut i32, messagetext : *mut u8, bufferlength : i16, textlength : *mut i16) -> i16); - SQLError(environmenthandle, connectionhandle, statementhandle, core::mem::transmute(sqlstate.as_ptr()), core::mem::transmute(nativeerror.unwrap_or(std::ptr::null_mut())), core::mem::transmute(messagetext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textlength.unwrap_or(std::ptr::null_mut()))) + SQLError(environmenthandle, connectionhandle, statementhandle, core::mem::transmute(sqlstate.as_ptr()), core::mem::transmute(nativeerror.unwrap_or(core::ptr::null_mut())), core::mem::transmute(messagetext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLErrorA(henv: *mut core::ffi::c_void, hdbc: *mut core::ffi::c_void, hstmt: *mut core::ffi::c_void, szsqlstate: *mut u8, pfnativeerror: Option<*mut i32>, szerrormsg: Option<&mut [u8]>, pcberrormsg: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLErrorA(henv : *mut core::ffi::c_void, hdbc : *mut core::ffi::c_void, hstmt : *mut core::ffi::c_void, szsqlstate : *mut u8, pfnativeerror : *mut i32, szerrormsg : *mut u8, cberrormsgmax : i16, pcberrormsg : *mut i16) -> i16); - SQLErrorA(henv, hdbc, hstmt, szsqlstate, core::mem::transmute(pfnativeerror.unwrap_or(std::ptr::null_mut())), core::mem::transmute(szerrormsg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcberrormsg.unwrap_or(std::ptr::null_mut()))) + SQLErrorA(henv, hdbc, hstmt, szsqlstate, core::mem::transmute(pfnativeerror.unwrap_or(core::ptr::null_mut())), core::mem::transmute(szerrormsg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcberrormsg.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLErrorW(henv: *mut core::ffi::c_void, hdbc: *mut core::ffi::c_void, hstmt: *mut core::ffi::c_void, wszsqlstate: &mut [u16; 6], pfnativeerror: Option<*mut i32>, wszerrormsg: Option<&mut [u16]>, pccherrormsg: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLErrorW(henv : *mut core::ffi::c_void, hdbc : *mut core::ffi::c_void, hstmt : *mut core::ffi::c_void, wszsqlstate : *mut u16, pfnativeerror : *mut i32, wszerrormsg : *mut u16, ccherrormsgmax : i16, pccherrormsg : *mut i16) -> i16); - SQLErrorW(henv, hdbc, hstmt, core::mem::transmute(wszsqlstate.as_ptr()), core::mem::transmute(pfnativeerror.unwrap_or(std::ptr::null_mut())), core::mem::transmute(wszerrormsg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wszerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pccherrormsg.unwrap_or(std::ptr::null_mut()))) + SQLErrorW(henv, hdbc, hstmt, core::mem::transmute(wszsqlstate.as_ptr()), core::mem::transmute(pfnativeerror.unwrap_or(core::ptr::null_mut())), core::mem::transmute(wszerrormsg.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), wszerrormsg.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pccherrormsg.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLExecDirect(statementhandle: *mut core::ffi::c_void, statementtext: Option<&[u8]>) -> i16 { @@ -548,13 +548,13 @@ pub unsafe fn SQLExecute(statementhandle: *mut core::ffi::c_void) -> i16 { #[inline] pub unsafe fn SQLExtendedFetch(hstmt: *mut core::ffi::c_void, ffetchtype: u16, irow: i64, pcrow: Option<*mut u64>, rgfrowstatus: Option<*mut u16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExtendedFetch(hstmt : *mut core::ffi::c_void, ffetchtype : u16, irow : i64, pcrow : *mut u64, rgfrowstatus : *mut u16) -> i16); - SQLExtendedFetch(hstmt, ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(std::ptr::null_mut()))) + SQLExtendedFetch(hstmt, ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLExtendedFetch(hstmt: *mut core::ffi::c_void, ffetchtype: u16, irow: i32, pcrow: Option<*mut u32>, rgfrowstatus: Option<*mut u16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLExtendedFetch(hstmt : *mut core::ffi::c_void, ffetchtype : u16, irow : i32, pcrow : *mut u32, rgfrowstatus : *mut u16) -> i16); - SQLExtendedFetch(hstmt, ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(std::ptr::null_mut()))) + SQLExtendedFetch(hstmt, ffetchtype, irow, core::mem::transmute(pcrow.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rgfrowstatus.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLFetch(statementhandle: *mut core::ffi::c_void) -> i16 { @@ -653,17 +653,17 @@ pub unsafe fn SQLFreeStmt(statementhandle: *mut core::ffi::c_void, option: u16) #[inline] pub unsafe fn SQLGetConnectAttr(connectionhandle: *mut core::ffi::c_void, attribute: i32, value: Option<*mut core::ffi::c_void>, bufferlength: i32, stringlengthptr: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectAttr(connectionhandle : *mut core::ffi::c_void, attribute : i32, value : *mut core::ffi::c_void, bufferlength : i32, stringlengthptr : *mut i32) -> i16); - SQLGetConnectAttr(connectionhandle, attribute, core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(std::ptr::null_mut()))) + SQLGetConnectAttr(connectionhandle, attribute, core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetConnectAttrA(hdbc: *mut core::ffi::c_void, fattribute: i32, rgbvalue: Option<*mut core::ffi::c_void>, cbvaluemax: i32, pcbvalue: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectAttrA(hdbc : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32, pcbvalue : *mut i32) -> i16); - SQLGetConnectAttrA(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null_mut())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(std::ptr::null_mut()))) + SQLGetConnectAttrA(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetConnectAttrW(hdbc: *mut core::ffi::c_void, fattribute: i32, rgbvalue: Option<*mut core::ffi::c_void>, cbvaluemax: i32, pcbvalue: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetConnectAttrW(hdbc : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *mut core::ffi::c_void, cbvaluemax : i32, pcbvalue : *mut i32) -> i16); - SQLGetConnectAttrW(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null_mut())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(std::ptr::null_mut()))) + SQLGetConnectAttrW(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), cbvaluemax, core::mem::transmute(pcbvalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetConnectOption(connectionhandle: *mut core::ffi::c_void, option: u16, value: *mut core::ffi::c_void) -> i16 { @@ -683,44 +683,44 @@ pub unsafe fn SQLGetConnectOptionW(hdbc: *mut core::ffi::c_void, foption: u16, p #[inline] pub unsafe fn SQLGetCursorName(statementhandle: *mut core::ffi::c_void, cursorname: Option<&mut [u8]>, namelengthptr: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorName(statementhandle : *mut core::ffi::c_void, cursorname : *mut u8, bufferlength : i16, namelengthptr : *mut i16) -> i16); - SQLGetCursorName(statementhandle, core::mem::transmute(cursorname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cursorname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namelengthptr.unwrap_or(std::ptr::null_mut()))) + SQLGetCursorName(statementhandle, core::mem::transmute(cursorname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), cursorname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(namelengthptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetCursorNameA(hstmt: *mut core::ffi::c_void, szcursor: Option<&mut [u8]>, pcbcursor: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorNameA(hstmt : *mut core::ffi::c_void, szcursor : *mut u8, cbcursormax : i16, pcbcursor : *mut i16) -> i16); - SQLGetCursorNameA(hstmt, core::mem::transmute(szcursor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbcursor.unwrap_or(std::ptr::null_mut()))) + SQLGetCursorNameA(hstmt, core::mem::transmute(szcursor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcbcursor.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetCursorNameW(hstmt: *mut core::ffi::c_void, szcursor: Option<&mut [u16]>, pcchcursor: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetCursorNameW(hstmt : *mut core::ffi::c_void, szcursor : *mut u16, cchcursormax : i16, pcchcursor : *mut i16) -> i16); - SQLGetCursorNameW(hstmt, core::mem::transmute(szcursor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchcursor.unwrap_or(std::ptr::null_mut()))) + SQLGetCursorNameW(hstmt, core::mem::transmute(szcursor.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szcursor.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pcchcursor.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] pub unsafe fn SQLGetData(statementhandle: *mut core::ffi::c_void, columnnumber: u16, targettype: i16, targetvalue: Option<*mut core::ffi::c_void>, bufferlength: i64, strlen_or_indptr: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetData(statementhandle : *mut core::ffi::c_void, columnnumber : u16, targettype : i16, targetvalue : *mut core::ffi::c_void, bufferlength : i64, strlen_or_indptr : *mut i64) -> i16); - SQLGetData(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(std::ptr::null_mut()))) + SQLGetData(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLGetData(statementhandle: *mut core::ffi::c_void, columnnumber: u16, targettype: i16, targetvalue: Option<*mut core::ffi::c_void>, bufferlength: i32, strlen_or_indptr: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetData(statementhandle : *mut core::ffi::c_void, columnnumber : u16, targettype : i16, targetvalue : *mut core::ffi::c_void, bufferlength : i32, strlen_or_indptr : *mut i32) -> i16); - SQLGetData(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(std::ptr::null_mut()))) + SQLGetData(statementhandle, columnnumber, targettype, core::mem::transmute(targetvalue.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(strlen_or_indptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDescField(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, fieldidentifier: i16, value: Option<*mut core::ffi::c_void>, bufferlength: i32, stringlength: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDescField(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, fieldidentifier : i16, value : *mut core::ffi::c_void, bufferlength : i32, stringlength : *mut i32) -> i16); - SQLGetDescField(descriptorhandle, recnumber, fieldidentifier, core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDescField(descriptorhandle, recnumber, fieldidentifier, core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDescFieldA(hdesc: *mut core::ffi::c_void, irecord: i16, ifield: i16, rgbvalue: Option<*mut core::ffi::c_void>, cbbufferlength: i32, stringlength: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDescFieldA(hdesc : *mut core::ffi::c_void, irecord : i16, ifield : i16, rgbvalue : *mut core::ffi::c_void, cbbufferlength : i32, stringlength : *mut i32) -> i16); - SQLGetDescFieldA(hdesc, irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null_mut())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDescFieldA(hdesc, irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDescFieldW(hdesc: *mut core::ffi::c_void, irecord: i16, ifield: i16, rgbvalue: Option<*mut core::ffi::c_void>, cbbufferlength: i32, stringlength: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDescFieldW(hdesc : *mut core::ffi::c_void, irecord : i16, ifield : i16, rgbvalue : *mut core::ffi::c_void, cbbufferlength : i32, stringlength : *mut i32) -> i16); - SQLGetDescFieldW(hdesc, irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null_mut())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDescFieldW(hdesc, irecord, ifield, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null_mut())), cbbufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -731,13 +731,13 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: recnumber, core::mem::transmute(name.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(stringlengthptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(typeptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(subtypeptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lengthptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(precisionptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(scaleptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(nullableptr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(typeptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(subtypeptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lengthptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(precisionptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(scaleptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(nullableptr.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -749,13 +749,13 @@ pub unsafe fn SQLGetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: recnumber, core::mem::transmute(name.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), name.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(stringlengthptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(typeptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(subtypeptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(lengthptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(precisionptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(scaleptr.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(nullableptr.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(typeptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(subtypeptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(lengthptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(precisionptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(scaleptr.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(nullableptr.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -767,13 +767,13 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname irecord, core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pftype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsubtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pprecision.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pftype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsubtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pprecision.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -785,13 +785,13 @@ pub unsafe fn SQLGetDescRecA(hdesc: *mut core::ffi::c_void, irecord: i16, szname irecord, core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcbname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pftype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsubtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pprecision.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcbname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pftype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsubtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pprecision.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] @@ -803,13 +803,13 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname irecord, core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pftype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsubtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pprecision.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pftype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsubtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pprecision.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pnullable.unwrap_or(core::ptr::null_mut())), ) } #[cfg(target_arch = "x86")] @@ -821,34 +821,34 @@ pub unsafe fn SQLGetDescRecW(hdesc: *mut core::ffi::c_void, irecord: i16, szname irecord, core::mem::transmute(szname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), szname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), - core::mem::transmute(pcchname.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pftype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pfsubtype.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pprecision.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pscale.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pnullable.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pcchname.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pftype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pfsubtype.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pprecision.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pscale.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pnullable.unwrap_or(core::ptr::null_mut())), ) } #[inline] pub unsafe fn SQLGetDiagField(handletype: i16, handle: *mut core::ffi::c_void, recnumber: i16, diagidentifier: i16, diaginfo: Option<*mut core::ffi::c_void>, bufferlength: i16, stringlength: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagField(handletype : i16, handle : *mut core::ffi::c_void, recnumber : i16, diagidentifier : i16, diaginfo : *mut core::ffi::c_void, bufferlength : i16, stringlength : *mut i16) -> i16); - SQLGetDiagField(handletype, handle, recnumber, diagidentifier, core::mem::transmute(diaginfo.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDiagField(handletype, handle, recnumber, diagidentifier, core::mem::transmute(diaginfo.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDiagFieldA(fhandletype: i16, handle: *mut core::ffi::c_void, irecord: i16, fdiagfield: i16, rgbdiaginfo: Option<*mut core::ffi::c_void>, cbdiaginfomax: i16, pcbdiaginfo: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagFieldA(fhandletype : i16, handle : *mut core::ffi::c_void, irecord : i16, fdiagfield : i16, rgbdiaginfo : *mut core::ffi::c_void, cbdiaginfomax : i16, pcbdiaginfo : *mut i16) -> i16); - SQLGetDiagFieldA(fhandletype, handle, irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(std::ptr::null_mut())), cbdiaginfomax, core::mem::transmute(pcbdiaginfo.unwrap_or(std::ptr::null_mut()))) + SQLGetDiagFieldA(fhandletype, handle, irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(core::ptr::null_mut())), cbdiaginfomax, core::mem::transmute(pcbdiaginfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDiagFieldW(fhandletype: i16, handle: *mut core::ffi::c_void, irecord: i16, fdiagfield: i16, rgbdiaginfo: Option<*mut core::ffi::c_void>, cbbufferlength: i16, pcbstringlength: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagFieldW(fhandletype : i16, handle : *mut core::ffi::c_void, irecord : i16, fdiagfield : i16, rgbdiaginfo : *mut core::ffi::c_void, cbbufferlength : i16, pcbstringlength : *mut i16) -> i16); - SQLGetDiagFieldW(fhandletype, handle, irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(std::ptr::null_mut())), cbbufferlength, core::mem::transmute(pcbstringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDiagFieldW(fhandletype, handle, irecord, fdiagfield, core::mem::transmute(rgbdiaginfo.unwrap_or(core::ptr::null_mut())), cbbufferlength, core::mem::transmute(pcbstringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDiagRec(handletype: i16, handle: *mut core::ffi::c_void, recnumber: i16, sqlstate: Option<&mut [u8; 6]>, nativeerror: *mut i32, messagetext: Option<&mut [u8]>, textlength: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetDiagRec(handletype : i16, handle : *mut core::ffi::c_void, recnumber : i16, sqlstate : *mut u8, nativeerror : *mut i32, messagetext : *mut u8, bufferlength : i16, textlength : *mut i16) -> i16); - SQLGetDiagRec(handletype, handle, recnumber, core::mem::transmute(sqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), nativeerror, core::mem::transmute(messagetext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textlength.unwrap_or(std::ptr::null_mut()))) + SQLGetDiagRec(handletype, handle, recnumber, core::mem::transmute(sqlstate.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), nativeerror, core::mem::transmute(messagetext.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), messagetext.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(textlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetDiagRecA(fhandletype: i16, handle: *mut core::ffi::c_void, irecord: i16, szsqlstate: Option<&mut [u8; 6]>, pfnativeerror: *mut i32, szerrormsg: Option<&mut [u8]>, pcberrormsg: *mut i16) -> i16 { @@ -863,27 +863,27 @@ pub unsafe fn SQLGetDiagRecW(fhandletype: i16, handle: *mut core::ffi::c_void, i #[inline] pub unsafe fn SQLGetEnvAttr(environmenthandle: *mut core::ffi::c_void, attribute: i32, value: *mut core::ffi::c_void, bufferlength: i32, stringlength: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetEnvAttr(environmenthandle : *mut core::ffi::c_void, attribute : i32, value : *mut core::ffi::c_void, bufferlength : i32, stringlength : *mut i32) -> i16); - SQLGetEnvAttr(environmenthandle, attribute, value, bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetEnvAttr(environmenthandle, attribute, value, bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetFunctions(connectionhandle: *mut core::ffi::c_void, functionid: u16, supported: Option<*mut u16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetFunctions(connectionhandle : *mut core::ffi::c_void, functionid : u16, supported : *mut u16) -> i16); - SQLGetFunctions(connectionhandle, functionid, core::mem::transmute(supported.unwrap_or(std::ptr::null_mut()))) + SQLGetFunctions(connectionhandle, functionid, core::mem::transmute(supported.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetInfo(connectionhandle: *mut core::ffi::c_void, infotype: u16, infovalue: Option<*mut core::ffi::c_void>, bufferlength: i16, stringlengthptr: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetInfo(connectionhandle : *mut core::ffi::c_void, infotype : u16, infovalue : *mut core::ffi::c_void, bufferlength : i16, stringlengthptr : *mut i16) -> i16); - SQLGetInfo(connectionhandle, infotype, core::mem::transmute(infovalue.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(std::ptr::null_mut()))) + SQLGetInfo(connectionhandle, infotype, core::mem::transmute(infovalue.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlengthptr.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetInfoA(hdbc: *mut core::ffi::c_void, finfotype: u16, rgbinfovalue: Option<*mut core::ffi::c_void>, cbinfovaluemax: i16, pcbinfovalue: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetInfoA(hdbc : *mut core::ffi::c_void, finfotype : u16, rgbinfovalue : *mut core::ffi::c_void, cbinfovaluemax : i16, pcbinfovalue : *mut i16) -> i16); - SQLGetInfoA(hdbc, finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(std::ptr::null_mut())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(std::ptr::null_mut()))) + SQLGetInfoA(hdbc, finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(core::ptr::null_mut())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetInfoW(hdbc: *mut core::ffi::c_void, finfotype: u16, rgbinfovalue: Option<*mut core::ffi::c_void>, cbinfovaluemax: i16, pcbinfovalue: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetInfoW(hdbc : *mut core::ffi::c_void, finfotype : u16, rgbinfovalue : *mut core::ffi::c_void, cbinfovaluemax : i16, pcbinfovalue : *mut i16) -> i16); - SQLGetInfoW(hdbc, finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(std::ptr::null_mut())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(std::ptr::null_mut()))) + SQLGetInfoW(hdbc, finfotype, core::mem::transmute(rgbinfovalue.unwrap_or(core::ptr::null_mut())), cbinfovaluemax, core::mem::transmute(pcbinfovalue.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetNextEnumeration(henumhandle: P0, prgenumdata: *mut u8, pienumlength: *mut i32) -> i16 @@ -896,7 +896,7 @@ where #[inline] pub unsafe fn SQLGetStmtAttr(statementhandle: *mut core::ffi::c_void, attribute: i32, value: Option<*mut core::ffi::c_void>, bufferlength: i32, stringlength: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLGetStmtAttr(statementhandle : *mut core::ffi::c_void, attribute : i32, value : *mut core::ffi::c_void, bufferlength : i32, stringlength : *mut i32) -> i16); - SQLGetStmtAttr(statementhandle, attribute, core::mem::transmute(value.unwrap_or(std::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut()))) + SQLGetStmtAttr(statementhandle, attribute, core::mem::transmute(value.unwrap_or(core::ptr::null_mut())), bufferlength, core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLGetStmtAttrA(hstmt: *mut core::ffi::c_void, fattribute: i32, rgbvalue: *mut core::ffi::c_void, cbvaluemax: i32, pcbvalue: *mut i32) -> i16 { @@ -981,7 +981,7 @@ pub unsafe fn SQLNativeSqlW(hdbc: *mut core::ffi::c_void, szsqlstrin: &[u16], sz #[inline] pub unsafe fn SQLNumParams(hstmt: *mut core::ffi::c_void, pcpar: Option<*mut i16>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLNumParams(hstmt : *mut core::ffi::c_void, pcpar : *mut i16) -> i16); - SQLNumParams(hstmt, core::mem::transmute(pcpar.unwrap_or(std::ptr::null_mut()))) + SQLNumParams(hstmt, core::mem::transmute(pcpar.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLNumResultCols(statementhandle: *mut core::ffi::c_void, columncount: *mut i16) -> i16 { @@ -991,7 +991,7 @@ pub unsafe fn SQLNumResultCols(statementhandle: *mut core::ffi::c_void, columnco #[inline] pub unsafe fn SQLParamData(statementhandle: *mut core::ffi::c_void, value: Option<*mut *mut core::ffi::c_void>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLParamData(statementhandle : *mut core::ffi::c_void, value : *mut *mut core::ffi::c_void) -> i16); - SQLParamData(statementhandle, core::mem::transmute(value.unwrap_or(std::ptr::null_mut()))) + SQLParamData(statementhandle, core::mem::transmute(value.unwrap_or(core::ptr::null_mut()))) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -1170,17 +1170,17 @@ pub unsafe fn SQLRowCount(statementhandle: *const core::ffi::c_void, rowcount: * #[inline] pub unsafe fn SQLSetConnectAttr(connectionhandle: *mut core::ffi::c_void, attribute: i32, value: Option<*const core::ffi::c_void>, stringlength: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectAttr(connectionhandle : *mut core::ffi::c_void, attribute : i32, value : *const core::ffi::c_void, stringlength : i32) -> i16); - SQLSetConnectAttr(connectionhandle, attribute, core::mem::transmute(value.unwrap_or(std::ptr::null())), stringlength) + SQLSetConnectAttr(connectionhandle, attribute, core::mem::transmute(value.unwrap_or(core::ptr::null())), stringlength) } #[inline] pub unsafe fn SQLSetConnectAttrA(hdbc: *mut core::ffi::c_void, fattribute: i32, rgbvalue: Option<*const core::ffi::c_void>, cbvalue: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectAttrA(hdbc : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *const core::ffi::c_void, cbvalue : i32) -> i16); - SQLSetConnectAttrA(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null())), cbvalue) + SQLSetConnectAttrA(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null())), cbvalue) } #[inline] pub unsafe fn SQLSetConnectAttrW(hdbc: *mut core::ffi::c_void, fattribute: i32, rgbvalue: Option<*const core::ffi::c_void>, cbvalue: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetConnectAttrW(hdbc : *mut core::ffi::c_void, fattribute : i32, rgbvalue : *const core::ffi::c_void, cbvalue : i32) -> i16); - SQLSetConnectAttrW(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(std::ptr::null())), cbvalue) + SQLSetConnectAttrW(hdbc, fattribute, core::mem::transmute(rgbvalue.unwrap_or(core::ptr::null())), cbvalue) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -1247,18 +1247,18 @@ pub unsafe fn SQLSetDescFieldW(descriptorhandle: *mut core::ffi::c_void, recnumb #[inline] pub unsafe fn SQLSetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, r#type: i16, subtype: i16, length: i64, precision: i16, scale: i16, data: Option<*mut core::ffi::c_void>, stringlength: Option<*mut i64>, indicator: Option<*mut i64>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetDescRec(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, r#type : i16, subtype : i16, length : i64, precision : i16, scale : i16, data : *mut core::ffi::c_void, stringlength : *mut i64, indicator : *mut i64) -> i16); - SQLSetDescRec(descriptorhandle, recnumber, r#type, subtype, length, precision, scale, core::mem::transmute(data.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(indicator.unwrap_or(std::ptr::null_mut()))) + SQLSetDescRec(descriptorhandle, recnumber, r#type, subtype, length, precision, scale, core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(indicator.unwrap_or(core::ptr::null_mut()))) } #[cfg(target_arch = "x86")] #[inline] pub unsafe fn SQLSetDescRec(descriptorhandle: *mut core::ffi::c_void, recnumber: i16, r#type: i16, subtype: i16, length: i32, precision: i16, scale: i16, data: Option<*mut core::ffi::c_void>, stringlength: Option<*mut i32>, indicator: Option<*mut i32>) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetDescRec(descriptorhandle : *mut core::ffi::c_void, recnumber : i16, r#type : i16, subtype : i16, length : i32, precision : i16, scale : i16, data : *mut core::ffi::c_void, stringlength : *mut i32, indicator : *mut i32) -> i16); - SQLSetDescRec(descriptorhandle, recnumber, r#type, subtype, length, precision, scale, core::mem::transmute(data.unwrap_or(std::ptr::null_mut())), core::mem::transmute(stringlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(indicator.unwrap_or(std::ptr::null_mut()))) + SQLSetDescRec(descriptorhandle, recnumber, r#type, subtype, length, precision, scale, core::mem::transmute(data.unwrap_or(core::ptr::null_mut())), core::mem::transmute(stringlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(indicator.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SQLSetEnvAttr(environmenthandle: *mut core::ffi::c_void, attribute: i32, value: Option<*const core::ffi::c_void>, stringlength: i32) -> i16 { windows_targets::link!("odbc32.dll" "system" fn SQLSetEnvAttr(environmenthandle : *mut core::ffi::c_void, attribute : i32, value : *const core::ffi::c_void, stringlength : i32) -> i16); - SQLSetEnvAttr(environmenthandle, attribute, core::mem::transmute(value.unwrap_or(std::ptr::null())), stringlength) + SQLSetEnvAttr(environmenthandle, attribute, core::mem::transmute(value.unwrap_or(core::ptr::null())), stringlength) } #[cfg(any(target_arch = "aarch64", target_arch = "arm64ec", target_arch = "x86_64"))] #[inline] @@ -1727,24 +1727,24 @@ impl IAccessor { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddRefAccessor)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pcrefcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddRefAccessor)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn CreateAccessor(&self, dwaccessorflags: u32, cbindings: usize, rgbindings: *const DBBINDING, cbrowsize: usize, phaccessor: *mut HACCESSOR, rgstatus: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateAccessor)(windows_core::Interface::as_raw(self), dwaccessorflags, cbindings, rgbindings, cbrowsize, phaccessor, core::mem::transmute(rgstatus.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateAccessor)(windows_core::Interface::as_raw(self), dwaccessorflags, cbindings, rgbindings, cbrowsize, phaccessor, core::mem::transmute(rgstatus.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetBindings(&self, haccessor: P0, pdwaccessorflags: *mut u32, pcbindings: Option<*mut usize>, prgbindings: *mut *mut DBBINDING) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetBindings)(windows_core::Interface::as_raw(self), haccessor.param().abi(), pdwaccessorflags, core::mem::transmute(pcbindings.unwrap_or(std::ptr::null_mut())), prgbindings).ok() + (windows_core::Interface::vtable(self).GetBindings)(windows_core::Interface::as_raw(self), haccessor.param().abi(), pdwaccessorflags, core::mem::transmute(pcbindings.unwrap_or(core::ptr::null_mut())), prgbindings).ok() } pub unsafe fn ReleaseAccessor(&self, haccessor: P0, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).ReleaseAccessor)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pcrefcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReleaseAccessor)(windows_core::Interface::as_raw(self), haccessor.param().abi(), core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1829,7 +1829,7 @@ impl IBindResource { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwbindstatus.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppunk)).ok() + (windows_core::Interface::vtable(self).Bind)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwbindstatus.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppunk)).ok() } } #[repr(C)] @@ -1850,10 +1850,10 @@ impl core::ops::Deref for IChapteredRowset { windows_core::imp::interface_hierarchy!(IChapteredRowset, windows_core::IUnknown); impl IChapteredRowset { pub unsafe fn AddRefChapter(&self, hchapter: usize, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddRefChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddRefChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ReleaseChapter(&self, hchapter: usize, pcrefcount: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ReleaseChapter)(windows_core::Interface::as_raw(self), hchapter, core::mem::transmute(pcrefcount.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1941,11 +1941,11 @@ windows_core::imp::interface_hierarchy!(IColumnsInfo, windows_core::IUnknown); impl IColumnsInfo { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] pub unsafe fn GetColumnInfo(&self, pccolumns: *mut usize, prginfo: *mut *mut DBCOLUMNINFO, ppstringsbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), pccolumns, prginfo, core::mem::transmute(ppstringsbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetColumnInfo)(windows_core::Interface::as_raw(self), pccolumns, prginfo, core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn MapColumnIDs(&self, ccolumnids: usize, rgcolumnids: Option<*const super::super::Storage::IndexServer::DBID>, rgcolumns: Option<*mut usize>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).MapColumnIDs)(windows_core::Interface::as_raw(self), ccolumnids, core::mem::transmute(rgcolumnids.unwrap_or(std::ptr::null())), core::mem::transmute(rgcolumns.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).MapColumnIDs)(windows_core::Interface::as_raw(self), ccolumnids, core::mem::transmute(rgcolumnids.unwrap_or(core::ptr::null())), core::mem::transmute(rgcolumns.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -1971,7 +1971,7 @@ windows_core::imp::interface_hierarchy!(IColumnsInfo2, windows_core::IUnknown, I impl IColumnsInfo2 { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com"))] pub unsafe fn GetRestrictedColumnInfo(&self, rgcolumnidmasks: &[super::super::Storage::IndexServer::DBID], dwflags: u32, pccolumns: *mut usize, prgcolumnids: *mut *mut super::super::Storage::IndexServer::DBID, prgcolumninfo: *mut *mut DBCOLUMNINFO, ppstringsbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(windows_core::Interface::as_raw(self), rgcolumnidmasks.len().try_into().unwrap(), core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, pccolumns, prgcolumnids, prgcolumninfo, core::mem::transmute(ppstringsbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRestrictedColumnInfo)(windows_core::Interface::as_raw(self), rgcolumnidmasks.len().try_into().unwrap(), core::mem::transmute(rgcolumnidmasks.as_ptr()), dwflags, pccolumns, prgcolumnids, prgcolumninfo, core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2031,7 +2031,7 @@ impl ICommand { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), riid, core::mem::transmute(pparams.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcrowsaffected.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), punkouter.param().abi(), riid, core::mem::transmute(pparams.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcrowsaffected.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetDBSession(&self, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2210,7 +2210,7 @@ impl core::ops::Deref for ICommandStream { windows_core::imp::interface_hierarchy!(ICommandStream, windows_core::IUnknown); impl ICommandStream { pub unsafe fn GetCommandStream(&self, piid: Option<*mut windows_core::GUID>, pguiddialect: Option<*mut windows_core::GUID>, ppcommandstream: *mut Option) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommandStream)(windows_core::Interface::as_raw(self), core::mem::transmute(piid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pguiddialect.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppcommandstream)).ok() + (windows_core::Interface::vtable(self).GetCommandStream)(windows_core::Interface::as_raw(self), core::mem::transmute(piid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pguiddialect.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppcommandstream)).ok() } pub unsafe fn SetCommandStream(&self, riid: *const windows_core::GUID, rguiddialect: *const windows_core::GUID, pcommandstream: P0) -> windows_core::Result<()> where @@ -2235,7 +2235,7 @@ impl core::ops::Deref for ICommandText { windows_core::imp::interface_hierarchy!(ICommandText, windows_core::IUnknown, ICommand); impl ICommandText { pub unsafe fn GetCommandText(&self, pguiddialect: Option<*mut windows_core::GUID>, ppwszcommand: *mut windows_core::PWSTR) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommandText)(windows_core::Interface::as_raw(self), core::mem::transmute(pguiddialect.unwrap_or(std::ptr::null_mut())), ppwszcommand).ok() + (windows_core::Interface::vtable(self).GetCommandText)(windows_core::Interface::as_raw(self), core::mem::transmute(pguiddialect.unwrap_or(core::ptr::null_mut())), ppwszcommand).ok() } pub unsafe fn SetCommandText(&self, rguiddialect: *const windows_core::GUID, pwszcommand: P0) -> windows_core::Result<()> where @@ -2283,13 +2283,13 @@ windows_core::imp::interface_hierarchy!(ICommandWithParameters, windows_core::IU impl ICommandWithParameters { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetParameterInfo(&self, pcparams: *mut usize, prgparaminfo: *mut *mut DBPARAMINFO, ppnamesbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), pcparams, prgparaminfo, core::mem::transmute(ppnamesbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetParameterInfo)(windows_core::Interface::as_raw(self), pcparams, prgparaminfo, core::mem::transmute(ppnamesbuffer.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn MapParameterNames(&self, cparamnames: usize, rgparamnames: *const windows_core::PCWSTR, rgparamordinals: *mut isize) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).MapParameterNames)(windows_core::Interface::as_raw(self), cparamnames, rgparamnames, rgparamordinals).ok() } pub unsafe fn SetParameterInfo(&self, cparams: usize, rgparamordinals: Option<*const usize>, rgparambindinfo: Option<*const DBPARAMBINDINFO>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetParameterInfo)(windows_core::Interface::as_raw(self), cparams, core::mem::transmute(rgparamordinals.unwrap_or(std::ptr::null())), core::mem::transmute(rgparambindinfo.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetParameterInfo)(windows_core::Interface::as_raw(self), cparams, core::mem::transmute(rgparamordinals.unwrap_or(core::ptr::null())), core::mem::transmute(rgparambindinfo.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -2329,7 +2329,7 @@ impl ICondition { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant"))] pub unsafe fn GetComparisonInfo(&self, ppszpropertyname: Option<*mut windows_core::PWSTR>, pcop: Option<*mut Common::CONDITION_OPERATION>, ppropvar: Option<*mut super::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetComparisonInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszpropertyname.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcop.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppropvar.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetComparisonInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszpropertyname.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppropvar.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetValueType(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -2340,7 +2340,7 @@ impl ICondition { (windows_core::Interface::vtable(self).GetValueNormalization)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetInputTerms(&self, pppropertyterm: Option<*mut Option>, ppoperationterm: Option<*mut Option>, ppvalueterm: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetInputTerms)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropertyterm.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppoperationterm.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppvalueterm.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetInputTerms)(windows_core::Interface::as_raw(self), core::mem::transmute(pppropertyterm.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppoperationterm.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppvalueterm.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Clone(&self) -> windows_core::Result { @@ -2388,7 +2388,7 @@ impl ICondition2 { } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Search_Common", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn GetLeafConditionInfo(&self, ppropkey: Option<*mut super::super::UI::Shell::PropertiesSystem::PROPERTYKEY>, pcop: Option<*mut Common::CONDITION_OPERATION>, ppropvar: Option<*mut super::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLeafConditionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppropkey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcop.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppropvar.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLeafConditionInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppropkey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcop.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppropvar.unwrap_or(core::ptr::null_mut()))).ok() } } #[cfg(feature = "Win32_System_Com")] @@ -2447,7 +2447,7 @@ impl IConditionFactory { P0: windows_core::Param, { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).Resolve)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2560,7 +2560,7 @@ impl IConditionFactory2 { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).ResolveCondition)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(std::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).ResolveCondition)(windows_core::Interface::as_raw(self), pc.param().abi(), sqro, core::mem::transmute(pstreferencetime.unwrap_or(core::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -2645,7 +2645,7 @@ impl IConditionGenerator { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.param().abi(), core::mem::transmute(ppszphrase.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), pszvaluetype.param().abi(), core::mem::transmute(ppropvar), fuseenglish.param().abi(), core::mem::transmute(ppszphrase.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2696,7 +2696,7 @@ impl ICreateRow { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateRow)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(std::ptr::null_mut())), pdwbindstatus, core::mem::transmute(ppwsznewurl.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppunk)).ok() + (windows_core::Interface::vtable(self).CreateRow)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pwszurl.param().abi(), dwbindurlflags, rguid, riid, pauthenticate.param().abi(), core::mem::transmute(pimplsession.unwrap_or(core::ptr::null_mut())), pdwbindstatus, core::mem::transmute(ppwsznewurl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppunk)).ok() } } #[repr(C)] @@ -2752,7 +2752,7 @@ impl IDBAsynchStatus { (windows_core::Interface::vtable(self).Abort)(windows_core::Interface::as_raw(self), hchapter, eoperation).ok() } pub unsafe fn GetStatus(&self, hchapter: usize, eoperation: u32, pulprogress: Option<*mut usize>, pulprogressmax: Option<*mut usize>, peasynchphase: *mut u32, ppwszstatustext: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), hchapter, eoperation, core::mem::transmute(pulprogress.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pulprogressmax.unwrap_or(std::ptr::null_mut())), peasynchphase, core::mem::transmute(ppwszstatustext.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStatus)(windows_core::Interface::as_raw(self), hchapter, eoperation, core::mem::transmute(pulprogress.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pulprogressmax.unwrap_or(core::ptr::null_mut())), peasynchphase, core::mem::transmute(ppwszstatustext.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -2837,14 +2837,14 @@ impl IDBDataSourceAdmin { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CreateDataSource)(windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), punkouter.param().abi(), riid, core::mem::transmute(ppdbsession.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateDataSource)(windows_core::Interface::as_raw(self), rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), punkouter.param().abi(), riid, core::mem::transmute(ppdbsession.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DestroyDataSource(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).DestroyDataSource)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetCreationProperties(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCreationProperties)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, core::mem::transmute(ppdescbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCreationProperties)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, core::mem::transmute(ppdescbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ModifyDataSource(&self, rgpropertysets: Option<&mut [DBPROPSET]>) -> windows_core::Result<()> { @@ -2961,7 +2961,7 @@ impl IDBProperties { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetPropertyInfo(&self, rgpropertyidsets: Option<&[DBPROPIDSET]>, pcpropertyinfosets: *mut u32, prgpropertyinfosets: *mut *mut DBPROPINFOSET, ppdescbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, core::mem::transmute(ppdescbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetPropertyInfo)(windows_core::Interface::as_raw(self), rgpropertyidsets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertyidsets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pcpropertyinfosets, prgpropertyinfosets, core::mem::transmute(ppdescbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn SetProperties(&self, rgpropertysets: Option<&mut [DBPROPSET]>) -> windows_core::Result<()> { @@ -3079,13 +3079,13 @@ impl core::ops::Deref for IDataConvert { windows_core::imp::interface_hierarchy!(IDataConvert, windows_core::IUnknown); impl IDataConvert { pub unsafe fn DataConvert(&self, wsrctype: u16, wdsttype: u16, cbsrclength: usize, pcbdstlength: Option<*mut usize>, psrc: *const core::ffi::c_void, pdst: *mut core::ffi::c_void, cbdstmaxlength: usize, dbssrcstatus: u32, pdbsstatus: Option<*mut u32>, bprecision: u8, bscale: u8, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DataConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, cbsrclength, core::mem::transmute(pcbdstlength.unwrap_or(std::ptr::null_mut())), psrc, pdst, cbdstmaxlength, dbssrcstatus, core::mem::transmute(pdbsstatus.unwrap_or(std::ptr::null_mut())), bprecision, bscale, dwflags).ok() + (windows_core::Interface::vtable(self).DataConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, cbsrclength, core::mem::transmute(pcbdstlength.unwrap_or(core::ptr::null_mut())), psrc, pdst, cbdstmaxlength, dbssrcstatus, core::mem::transmute(pdbsstatus.unwrap_or(core::ptr::null_mut())), bprecision, bscale, dwflags).ok() } pub unsafe fn CanConvert(&self, wsrctype: u16, wdsttype: u16) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).CanConvert)(windows_core::Interface::as_raw(self), wsrctype, wdsttype).ok() } pub unsafe fn GetConversionSize(&self, wsrctype: u16, wdsttype: u16, pcbsrclength: Option<*const usize>, pcbdstlength: Option<*mut usize>, psrc: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetConversionSize)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, core::mem::transmute(pcbsrclength.unwrap_or(std::ptr::null())), core::mem::transmute(pcbdstlength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(psrc.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).GetConversionSize)(windows_core::Interface::as_raw(self), wsrctype, wdsttype, core::mem::transmute(pcbsrclength.unwrap_or(core::ptr::null())), core::mem::transmute(pcbdstlength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(psrc.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -3220,7 +3220,7 @@ impl core::ops::Deref for IEntity { windows_core::imp::interface_hierarchy!(IEntity, windows_core::IUnknown); impl IEntity { pub unsafe fn Name(&self, ppszname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Base(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -3262,7 +3262,7 @@ impl IEntity { (windows_core::Interface::vtable(self).GetNamedEntity)(windows_core::Interface::as_raw(self), pszvalue.param().abi(), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn DefaultPhrase(&self, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -3426,7 +3426,7 @@ windows_core::imp::interface_hierarchy!(IErrorLookup, windows_core::IUnknown); impl IErrorLookup { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetErrorDescription(&self, hrerror: windows_core::HRESULT, dwlookupid: u32, pdispparams: *const super::Com::DISPPARAMS, lcid: u32, pbstrsource: Option<*mut windows_core::BSTR>, pbstrdescription: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, pdispparams, lcid, core::mem::transmute(pbstrsource.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pbstrdescription.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetErrorDescription)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, pdispparams, lcid, core::mem::transmute(pbstrsource.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbstrdescription.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetHelpInfo(&self, hrerror: windows_core::HRESULT, dwlookupid: u32, lcid: u32, pbstrhelpfile: *mut windows_core::BSTR, pdwhelpcontext: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetHelpInfo)(windows_core::Interface::as_raw(self), hrerror, dwlookupid, lcid, core::mem::transmute(pbstrhelpfile), pdwhelpcontext).ok() @@ -3459,7 +3459,7 @@ impl IErrorRecords { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), perrorinfo, dwlookupid, core::mem::transmute(pdispparams.unwrap_or(std::ptr::null())), punkcustomerror.param().abi(), dwdynamicerrorid).ok() + (windows_core::Interface::vtable(self).AddErrorRecord)(windows_core::Interface::as_raw(self), perrorinfo, dwlookupid, core::mem::transmute(pdispparams.unwrap_or(core::ptr::null())), punkcustomerror.param().abi(), dwdynamicerrorid).ok() } pub unsafe fn GetBasicErrorInfo(&self, ulrecordnum: u32, perrorinfo: *mut ERRORINFO) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).GetBasicErrorInfo)(windows_core::Interface::as_raw(self), ulrecordnum, perrorinfo).ok() @@ -3597,11 +3597,11 @@ windows_core::imp::interface_hierarchy!(IIndexDefinition, windows_core::IUnknown impl IIndexDefinition { #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn CreateIndex(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: Option<*const super::super::Storage::IndexServer::DBID>, rgindexcolumndescs: &[DBINDEXCOLUMNDESC], rgpropertysets: &mut [DBPROPSET], ppindexid: Option<*mut *mut super::super::Storage::IndexServer::DBID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).CreateIndex)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pindexid.unwrap_or(std::ptr::null())), rgindexcolumndescs.len().try_into().unwrap(), core::mem::transmute(rgindexcolumndescs.as_ptr()), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(ppindexid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).CreateIndex)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), rgindexcolumndescs.len().try_into().unwrap(), core::mem::transmute(rgindexcolumndescs.as_ptr()), rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(ppindexid.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn DropIndex(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pindexid: Option<*const super::super::Storage::IndexServer::DBID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DropIndex)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pindexid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).DropIndex)(windows_core::Interface::as_raw(self), ptableid, core::mem::transmute(pindexid.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -3821,7 +3821,7 @@ impl core::ops::Deref for IMetaData { windows_core::imp::interface_hierarchy!(IMetaData, windows_core::IUnknown); impl IMetaData { pub unsafe fn GetData(&self, ppszkey: Option<*mut windows_core::PWSTR>, ppszvalue: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszkey.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppszvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszkey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppszvalue.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -3842,7 +3842,7 @@ impl IMultipleResults { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), lresultflag, riid, core::mem::transmute(pcrowsaffected.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetResult)(windows_core::Interface::as_raw(self), punkouter.param().abi(), lresultflag, riid, core::mem::transmute(pcrowsaffected.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -3864,7 +3864,7 @@ impl INamedEntity { (windows_core::Interface::vtable(self).GetValue)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn DefaultPhrase(&self, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -3994,7 +3994,7 @@ impl IOpenRowset { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(ptableid.unwrap_or(std::ptr::null())), core::mem::transmute(pindexid.unwrap_or(std::ptr::null())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(ptableid.unwrap_or(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -4222,7 +4222,7 @@ windows_core::imp::interface_hierarchy!(IQuerySolution, windows_core::IUnknown, impl IQuerySolution { #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetQuery(&self, ppquerynode: Option<*mut Option>, ppmaintype: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(ppquerynode.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppmaintype.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetQuery)(windows_core::Interface::as_raw(self), core::mem::transmute(ppquerynode.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppmaintype.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetErrors(&self) -> windows_core::Result where @@ -4232,7 +4232,7 @@ impl IQuerySolution { (windows_core::Interface::vtable(self).GetErrors)(windows_core::Interface::as_raw(self), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn GetLexicalData(&self, ppszinputstring: Option<*mut windows_core::PWSTR>, pptokens: Option<*mut Option>, plcid: Option<*mut u32>, ppwordbreaker: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetLexicalData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszinputstring.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pptokens.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plcid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppwordbreaker.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetLexicalData)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszinputstring.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pptokens.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plcid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppwordbreaker.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -4316,7 +4316,7 @@ impl core::ops::Deref for IRelationship { windows_core::imp::interface_hierarchy!(IRelationship, windows_core::IUnknown); impl IRelationship { pub unsafe fn Name(&self, ppszname: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Name)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszname.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn IsReal(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -4334,7 +4334,7 @@ impl IRelationship { (windows_core::Interface::vtable(self).MetaData)(windows_core::Interface::as_raw(self), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn DefaultPhrase(&self, ppszphrase: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DefaultPhrase)(windows_core::Interface::as_raw(self), core::mem::transmute(ppszphrase.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -4357,7 +4357,7 @@ windows_core::imp::interface_hierarchy!(IRichChunk, windows_core::IUnknown); impl IRichChunk { #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] pub unsafe fn GetData(&self, pfirstpos: Option<*mut u32>, plength: Option<*mut u32>, ppsz: Option<*mut windows_core::PWSTR>, pvalue: Option<*mut super::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfirstpos.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppsz.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), core::mem::transmute(pfirstpos.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsz.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvalue.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -4382,14 +4382,14 @@ impl IRow { (windows_core::Interface::vtable(self).GetColumns)(windows_core::Interface::as_raw(self), rgcolumns.len().try_into().unwrap(), core::mem::transmute(rgcolumns.as_ptr())).ok() } pub unsafe fn GetSourceRowset(&self, riid: *const windows_core::GUID, pprowset: Option<*mut Option>, phrow: Option<*mut usize>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetSourceRowset)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phrow.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetSourceRowset)(windows_core::Interface::as_raw(self), riid, core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phrow.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn Open(&self, punkouter: P0, pcolumnid: *const super::super::Storage::IndexServer::DBID, rguidcolumntype: *const windows_core::GUID, dwbindflags: u32, riid: *const windows_core::GUID, ppunk: Option<*mut Option>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pcolumnid, rguidcolumntype, dwbindflags, riid, core::mem::transmute(ppunk.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Open)(windows_core::Interface::as_raw(self), punkouter.param().abi(), pcolumnid, rguidcolumntype, dwbindflags, riid, core::mem::transmute(ppunk.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -4440,7 +4440,7 @@ impl IRowPosition { (windows_core::Interface::vtable(self).ClearRowPosition)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn GetRowPosition(&self, phchapter: Option<*mut usize>, phrow: *mut usize, pdwpositionflags: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetRowPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(phchapter.unwrap_or(std::ptr::null_mut())), phrow, core::mem::transmute(pdwpositionflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetRowPosition)(windows_core::Interface::as_raw(self), core::mem::transmute(phchapter.unwrap_or(core::ptr::null_mut())), phrow, core::mem::transmute(pdwpositionflags.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetRowset(&self, riid: *const windows_core::GUID) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -5389,7 +5389,7 @@ windows_core::imp::interface_hierarchy!(ISQLGetDiagField, windows_core::IUnknown impl ISQLGetDiagField { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn GetDiagField(&self, pdiaginfo: Option<*mut KAGGETDIAG>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDiagField)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiaginfo.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetDiagField)(windows_core::Interface::as_raw(self), core::mem::transmute(pdiaginfo.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -5571,14 +5571,14 @@ impl IScopedOperations { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(std::ptr::null())), rgpwszdesturls, dwcopyflags, pauthenticate.param().abi(), rgdwstatus, core::mem::transmute(rgpwsznewurls.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Copy)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(core::ptr::null())), rgpwszdesturls, dwcopyflags, pauthenticate.param().abi(), rgdwstatus, core::mem::transmute(rgpwsznewurls.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn Move(&self, crows: usize, rgpwszsourceurls: Option<*const windows_core::PCWSTR>, rgpwszdesturls: *const windows_core::PCWSTR, dwmoveflags: u32, pauthenticate: P0, rgdwstatus: *mut u32, rgpwsznewurls: Option<*mut windows_core::PWSTR>, ppstringsbuffer: Option<*mut *mut u16>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(std::ptr::null())), rgpwszdesturls, dwmoveflags, pauthenticate.param().abi(), rgdwstatus, core::mem::transmute(rgpwsznewurls.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Move)(windows_core::Interface::as_raw(self), crows, core::mem::transmute(rgpwszsourceurls.unwrap_or(core::ptr::null())), rgpwszdesturls, dwmoveflags, pauthenticate.param().abi(), rgdwstatus, core::mem::transmute(rgpwsznewurls.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppstringsbuffer.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Delete(&self, crows: usize, rgpwszurls: *const windows_core::PCWSTR, dwdeleteflags: u32, rgdwstatus: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self), crows, rgpwszurls, dwdeleteflags, rgdwstatus).ok() @@ -5588,7 +5588,7 @@ impl IScopedOperations { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(ptableid.unwrap_or(std::ptr::null())), core::mem::transmute(pindexid.unwrap_or(std::ptr::null())), riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenRowset)(windows_core::Interface::as_raw(self), punkouter.param().abi(), core::mem::transmute(ptableid.unwrap_or(core::ptr::null())), core::mem::transmute(pindexid.unwrap_or(core::ptr::null())), riid, rgpropertysets.len().try_into().unwrap(), core::mem::transmute(rgpropertysets.as_ptr()), core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7024,13 +7024,13 @@ impl ITableCreation { (windows_core::Interface::vtable(self).GetTableDefinition)( windows_core::Interface::as_raw(self), ptableid, - core::mem::transmute(pccolumndescs.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(prgcolumndescs.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcpropertysets.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(prgpropertysets.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pcconstraintdescs.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(prgconstraintdescs.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(ppwszstringbuffer.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pccolumndescs.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(prgcolumndescs.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcpropertysets.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(prgpropertysets.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pcconstraintdescs.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(prgconstraintdescs.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(ppwszstringbuffer.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7060,14 +7060,14 @@ impl ITableDefinition { (windows_core::Interface::vtable(self).CreateTable)( windows_core::Interface::as_raw(self), punkouter.param().abi(), - core::mem::transmute(ptableid.unwrap_or(std::ptr::null())), + core::mem::transmute(ptableid.unwrap_or(core::ptr::null())), rgcolumndescs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgcolumndescs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), riid, rgpropertysets.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(rgpropertysets.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(pptableid.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(pprowset.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(pptableid.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(pprowset.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -7077,7 +7077,7 @@ impl ITableDefinition { } #[cfg(all(feature = "Win32_Storage_IndexServer", feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AddColumn(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pcolumndesc: *const DBCOLUMNDESC, ppcolumnid: Option<*mut *mut super::super::Storage::IndexServer::DBID>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddColumn)(windows_core::Interface::as_raw(self), ptableid, pcolumndesc, core::mem::transmute(ppcolumnid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddColumn)(windows_core::Interface::as_raw(self), ptableid, pcolumndesc, core::mem::transmute(ppcolumnid.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Storage_IndexServer")] pub unsafe fn DropColumn(&self, ptableid: *const super::super::Storage::IndexServer::DBID, pcolumnid: *const super::super::Storage::IndexServer::DBID) -> windows_core::Result<()> { @@ -7188,7 +7188,7 @@ impl ITokenCollection { (windows_core::Interface::vtable(self).NumberOfTokens)(windows_core::Interface::as_raw(self), pcount).ok() } pub unsafe fn GetToken(&self, i: u32, pbegin: Option<*mut u32>, plength: Option<*mut u32>, ppsz: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), i, core::mem::transmute(pbegin.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plength.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppsz.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetToken)(windows_core::Interface::as_raw(self), i, core::mem::transmute(pbegin.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plength.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsz.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -7255,7 +7255,7 @@ impl ITransactionLocal { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), isolevel, isoflags, potheroptions.param().abi(), core::mem::transmute(pultransactionlevel.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).StartTransaction)(windows_core::Interface::as_raw(self), isolevel, isoflags, potheroptions.param().abi(), core::mem::transmute(pultransactionlevel.unwrap_or(core::ptr::null_mut()))).ok() } } #[cfg(feature = "Win32_System_DistributedTransactionCoordinator")] @@ -7624,7 +7624,7 @@ impl IViewChapter { (windows_core::Interface::vtable(self).GetSpecification)(windows_core::Interface::as_raw(self), riid, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn OpenViewChapter(&self, hsource: usize, phviewchapter: Option<*mut usize>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OpenViewChapter)(windows_core::Interface::as_raw(self), hsource, core::mem::transmute(phviewchapter.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenViewChapter)(windows_core::Interface::as_raw(self), hsource, core::mem::transmute(phviewchapter.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] 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 546b9dd0ed..64f93dab2b 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Services/mod.rs @@ -4,7 +4,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfig2A(hservice : SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpinfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ChangeServiceConfig2A(hservice.param().abi(), dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null()))).ok() + ChangeServiceConfig2A(hservice.param().abi(), dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ChangeServiceConfig2W(hservice: P0, dwinfolevel: SERVICE_CONFIG, lpinfo: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -12,7 +12,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfig2W(hservice : SC_HANDLE, dwinfolevel : SERVICE_CONFIG, lpinfo : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - ChangeServiceConfig2W(hservice.param().abi(), dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null()))).ok() + ChangeServiceConfig2W(hservice.param().abi(), dwinfolevel, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn ChangeServiceConfigA(hservice: P0, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> windows_core::Result<()> @@ -26,7 +26,7 @@ where P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfigA(hservice : SC_HANDLE, dwservicetype : ENUM_SERVICE_TYPE, 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.param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(std::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() + ChangeServiceConfigA(hservice.param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() } #[inline] pub unsafe fn ChangeServiceConfigW(hservice: P0, dwservicetype: ENUM_SERVICE_TYPE, dwstarttype: SERVICE_START_TYPE, dwerrorcontrol: SERVICE_ERROR, lpbinarypathname: P1, lploadordergroup: P2, lpdwtagid: Option<*mut u32>, lpdependencies: P3, lpservicestartname: P4, lppassword: P5, lpdisplayname: P6) -> windows_core::Result<()> @@ -40,7 +40,7 @@ where P6: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn ChangeServiceConfigW(hservice : SC_HANDLE, dwservicetype : ENUM_SERVICE_TYPE, 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.param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(std::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() + ChangeServiceConfigW(hservice.param().abi(), dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi(), lpdisplayname.param().abi()).ok() } #[inline] pub unsafe fn CloseServiceHandle(hscobject: P0) -> windows_core::Result<()> @@ -87,7 +87,7 @@ where P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreateServiceA(hscmanager : SC_HANDLE, lpservicename : windows_core::PCSTR, lpdisplayname : windows_core::PCSTR, dwdesiredaccess : u32, dwservicetype : ENUM_SERVICE_TYPE, 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) -> SC_HANDLE); - let result__ = CreateServiceA(hscmanager.param().abi(), lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(std::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); + let result__ = CreateServiceA(hscmanager.param().abi(), lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -103,7 +103,7 @@ where P7: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn CreateServiceW(hscmanager : SC_HANDLE, lpservicename : windows_core::PCWSTR, lpdisplayname : windows_core::PCWSTR, dwdesiredaccess : u32, dwservicetype : ENUM_SERVICE_TYPE, 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) -> SC_HANDLE); - let result__ = CreateServiceW(hscmanager.param().abi(), lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(std::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); + let result__ = CreateServiceW(hscmanager.param().abi(), lpservicename.param().abi(), lpdisplayname.param().abi(), dwdesiredaccess, dwservicetype, dwstarttype, dwerrorcontrol, lpbinarypathname.param().abi(), lploadordergroup.param().abi(), core::mem::transmute(lpdwtagid.unwrap_or(core::ptr::null_mut())), lpdependencies.param().abi(), lpservicestartname.param().abi(), lppassword.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -120,7 +120,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumDependentServicesA(hservice : 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.param().abi(), dwservicestate, core::mem::transmute(lpservices.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() + EnumDependentServicesA(hservice.param().abi(), dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() } #[inline] pub unsafe fn EnumDependentServicesW(hservice: P0, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32) -> windows_core::Result<()> @@ -128,7 +128,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumDependentServicesW(hservice : 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.param().abi(), dwservicestate, core::mem::transmute(lpservices.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() + EnumDependentServicesW(hservice.param().abi(), dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned).ok() } #[inline] pub unsafe fn EnumServicesStatusA(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSA>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: Option<*mut u32>) -> windows_core::Result<()> @@ -136,7 +136,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusA(hscmanager : 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.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() + EnumServicesStatusA(hscmanager.param().abi(), dwservicetype, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn EnumServicesStatusExA(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: Option<*mut u32>, pszgroupname: P1) -> windows_core::Result<()> @@ -145,7 +145,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExA(hscmanager : 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.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().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(std::ptr::null_mut())), pszgroupname.param().abi()).ok() + EnumServicesStatusExA(hscmanager.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().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut())), pszgroupname.param().abi()).ok() } #[inline] pub unsafe fn EnumServicesStatusExW(hscmanager: P0, infolevel: SC_ENUM_TYPE, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<&mut [u8]>, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: Option<*mut u32>, pszgroupname: P1) -> windows_core::Result<()> @@ -154,7 +154,7 @@ where P1: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusExW(hscmanager : 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.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().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(std::ptr::null_mut())), pszgroupname.param().abi()).ok() + EnumServicesStatusExW(hscmanager.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().try_into().unwrap()), pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut())), pszgroupname.param().abi()).ok() } #[inline] pub unsafe fn EnumServicesStatusW(hscmanager: P0, dwservicetype: ENUM_SERVICE_TYPE, dwservicestate: ENUM_SERVICE_STATE, lpservices: Option<*mut ENUM_SERVICE_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32, lpservicesreturned: *mut u32, lpresumehandle: Option<*mut u32>) -> windows_core::Result<()> @@ -162,7 +162,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn EnumServicesStatusW(hscmanager : 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.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() + EnumServicesStatusW(hscmanager.param().abi(), dwservicetype, dwservicestate, core::mem::transmute(lpservices.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded, lpservicesreturned, core::mem::transmute(lpresumehandle.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetServiceDirectory(hservicestatus: P0, edirectorytype: SERVICE_DIRECTORY_TYPE, lppathbuffer: Option<&mut [u16]>, lpcchrequiredbufferlength: *mut u32) -> u32 @@ -328,7 +328,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfigA(hservice : SC_HANDLE, lpserviceconfig : *mut QUERY_SERVICE_CONFIGA, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfigA(hservice.param().abi(), core::mem::transmute(lpserviceconfig.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() + QueryServiceConfigA(hservice.param().abi(), core::mem::transmute(lpserviceconfig.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[inline] pub unsafe fn QueryServiceConfigW(hservice: P0, lpserviceconfig: Option<*mut QUERY_SERVICE_CONFIGW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> @@ -336,7 +336,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryServiceConfigW(hservice : SC_HANDLE, lpserviceconfig : *mut QUERY_SERVICE_CONFIGW, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceConfigW(hservice.param().abi(), core::mem::transmute(lpserviceconfig.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() + QueryServiceConfigW(hservice.param().abi(), core::mem::transmute(lpserviceconfig.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[inline] pub unsafe fn QueryServiceDynamicInformation(hservicestatus: P0, dwinfolevel: u32, ppdynamicinfo: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -352,7 +352,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryServiceLockStatusA(hscmanager : SC_HANDLE, lplockstatus : *mut QUERY_SERVICE_LOCK_STATUSA, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceLockStatusA(hscmanager.param().abi(), core::mem::transmute(lplockstatus.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() + QueryServiceLockStatusA(hscmanager.param().abi(), core::mem::transmute(lplockstatus.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[inline] pub unsafe fn QueryServiceLockStatusW(hscmanager: P0, lplockstatus: Option<*mut QUERY_SERVICE_LOCK_STATUSW>, cbbufsize: u32, pcbbytesneeded: *mut u32) -> windows_core::Result<()> @@ -360,7 +360,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn QueryServiceLockStatusW(hscmanager : SC_HANDLE, lplockstatus : *mut QUERY_SERVICE_LOCK_STATUSW, cbbufsize : u32, pcbbytesneeded : *mut u32) -> super::super::Foundation:: BOOL); - QueryServiceLockStatusW(hscmanager.param().abi(), core::mem::transmute(lplockstatus.unwrap_or(std::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() + QueryServiceLockStatusW(hscmanager.param().abi(), core::mem::transmute(lplockstatus.unwrap_or(core::ptr::null_mut())), cbbufsize, pcbbytesneeded).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -402,7 +402,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegisterServiceCtrlHandlerExA(lpservicename : windows_core::PCSTR, lphandlerproc : LPHANDLER_FUNCTION_EX, lpcontext : *const core::ffi::c_void) -> SERVICE_STATUS_HANDLE); - let result__ = RegisterServiceCtrlHandlerExA(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(std::ptr::null()))); + let result__ = RegisterServiceCtrlHandlerExA(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -411,7 +411,7 @@ where P0: windows_core::Param, { windows_targets::link!("advapi32.dll" "system" fn RegisterServiceCtrlHandlerExW(lpservicename : windows_core::PCWSTR, lphandlerproc : LPHANDLER_FUNCTION_EX, lpcontext : *const core::ffi::c_void) -> SERVICE_STATUS_HANDLE); - let result__ = RegisterServiceCtrlHandlerExW(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(std::ptr::null()))); + let result__ = RegisterServiceCtrlHandlerExW(lpservicename.param().abi(), lphandlerproc, core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -483,7 +483,7 @@ where P0: windows_core::Param, { windows_targets::link!("sechost.dll" "system" fn SubscribeServiceChangeNotifications(hservice : SC_HANDLE, eeventtype : SC_EVENT_TYPE, pcallback : PSC_NOTIFICATION_CALLBACK, pcallbackcontext : *const core::ffi::c_void, psubscription : *mut PSC_NOTIFICATION_REGISTRATION) -> u32); - SubscribeServiceChangeNotifications(hservice.param().abi(), eeventtype, pcallback, core::mem::transmute(pcallbackcontext.unwrap_or(std::ptr::null())), psubscription) + SubscribeServiceChangeNotifications(hservice.param().abi(), eeventtype, pcallback, core::mem::transmute(pcallbackcontext.unwrap_or(core::ptr::null())), psubscription) } #[inline] pub unsafe fn UnlockServiceDatabase(sclock: *const core::ffi::c_void) -> windows_core::Result<()> { 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 b8007e327c..28e1b340d8 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SetupAndMigration/mod.rs @@ -6,7 +6,7 @@ pub unsafe fn OOBEComplete(isoobecomplete: *mut super::super::Foundation::BOOL) #[inline] pub unsafe fn RegisterWaitUntilOOBECompleted(oobecompletedcallback: OOBE_COMPLETED_CALLBACK, callbackcontext: 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).ok() + RegisterWaitUntilOOBECompleted(oobecompletedcallback, core::mem::transmute(callbackcontext.unwrap_or(core::ptr::null())), waithandle).ok() } #[inline] pub unsafe fn UnregisterWaitUntilOOBECompleted(waithandle: *const core::ffi::c_void) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs index 7c0bed43fa..9f3a44826c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SideShow/mod.rs @@ -272,7 +272,7 @@ impl ISideShowNotification { (windows_core::Interface::vtable(self).ExpirationTime)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn SetExpirationTime(&self, in_ptime: Option<*const super::super::Foundation::SYSTEMTIME>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetExpirationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(in_ptime.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetExpirationTime)(windows_core::Interface::as_raw(self), core::mem::transmute(in_ptime.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] 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 7b2d4d7451..c83960f17d 100644 --- a/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/StationsAndDesktops/mod.rs @@ -5,7 +5,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn BroadcastSystemMessageA(flags : u32, lpinfo : *mut u32, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> i32); - BroadcastSystemMessageA(flags, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi()) + BroadcastSystemMessageA(flags, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi()) } #[inline] pub unsafe fn BroadcastSystemMessageExA(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P0, lparam: P1, pbsminfo: Option<*mut BSMINFO>) -> i32 @@ -14,7 +14,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn BroadcastSystemMessageExA(flags : BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo : *mut BROADCAST_SYSTEM_MESSAGE_INFO, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, pbsminfo : *mut BSMINFO) -> i32); - BroadcastSystemMessageExA(flags, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(std::ptr::null_mut()))) + BroadcastSystemMessageExA(flags, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BroadcastSystemMessageExW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P0, lparam: P1, pbsminfo: Option<*mut BSMINFO>) -> i32 @@ -23,7 +23,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn BroadcastSystemMessageExW(flags : BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo : *mut BROADCAST_SYSTEM_MESSAGE_INFO, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, pbsminfo : *mut BSMINFO) -> i32); - BroadcastSystemMessageExW(flags, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(std::ptr::null_mut()))) + BroadcastSystemMessageExW(flags, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pbsminfo.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn BroadcastSystemMessageW(flags: BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo: Option<*mut BROADCAST_SYSTEM_MESSAGE_INFO>, msg: u32, wparam: P0, lparam: P1) -> i32 @@ -32,7 +32,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn BroadcastSystemMessageW(flags : BROADCAST_SYSTEM_MESSAGE_FLAGS, lpinfo : *mut BROADCAST_SYSTEM_MESSAGE_INFO, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM) -> i32); - BroadcastSystemMessageW(flags, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi()) + BroadcastSystemMessageW(flags, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null_mut())), msg, wparam.param().abi(), lparam.param().abi()) } #[inline] pub unsafe fn CloseDesktop(hdesktop: P0) -> windows_core::Result<()> @@ -58,7 +58,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDesktopA(lpszdesktop : windows_core::PCSTR, lpszdevice : windows_core::PCSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEA, dwflags : DESKTOP_CONTROL_FLAGS, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> HDESK); - let result__ = CreateDesktopA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null()))); + let result__ = CreateDesktopA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -69,7 +69,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDesktopExA(lpszdesktop : windows_core::PCSTR, lpszdevice : windows_core::PCSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEA, dwflags : DESKTOP_CONTROL_FLAGS, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES, ulheapsize : u32, pvoid : *const core::ffi::c_void) -> HDESK); - let result__ = CreateDesktopExA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(std::ptr::null()))); + let result__ = CreateDesktopExA(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -80,7 +80,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDesktopExW(lpszdesktop : windows_core::PCWSTR, lpszdevice : windows_core::PCWSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEW, dwflags : DESKTOP_CONTROL_FLAGS, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES, ulheapsize : u32, pvoid : *const core::ffi::c_void) -> HDESK); - let result__ = CreateDesktopExW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(std::ptr::null()))); + let result__ = CreateDesktopExW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null())), ulheapsize, core::mem::transmute(pvoid.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_Security"))] @@ -91,7 +91,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateDesktopW(lpszdesktop : windows_core::PCWSTR, lpszdevice : windows_core::PCWSTR, pdevmode : *const super::super::Graphics::Gdi:: DEVMODEW, dwflags : DESKTOP_CONTROL_FLAGS, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> HDESK); - let result__ = CreateDesktopW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(std::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null()))); + let result__ = CreateDesktopW(lpszdesktop.param().abi(), lpszdevice.param().abi(), core::mem::transmute(pdevmode.unwrap_or(core::ptr::null())), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -101,7 +101,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateWindowStationA(lpwinsta : windows_core::PCSTR, dwflags : u32, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> HWINSTA); - let result__ = CreateWindowStationA(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null()))); + let result__ = CreateWindowStationA(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -111,7 +111,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateWindowStationW(lpwinsta : windows_core::PCWSTR, dwflags : u32, dwdesiredaccess : u32, lpsa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> HWINSTA); - let result__ = CreateWindowStationW(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(std::ptr::null()))); + let result__ = CreateWindowStationW(lpwinsta.param().abi(), dwflags, dwdesiredaccess, core::mem::transmute(lpsa.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] @@ -176,7 +176,7 @@ where P0: windows_core::Param, { 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.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() + GetUserObjectInformationA(hobj.param().abi(), nindex, core::mem::transmute(pvinfo.unwrap_or(core::ptr::null_mut())), nlength, core::mem::transmute(lpnlengthneeded.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetUserObjectInformationW(hobj: P0, nindex: USER_OBJECT_INFORMATION_INDEX, pvinfo: Option<*mut core::ffi::c_void>, nlength: u32, lpnlengthneeded: Option<*mut u32>) -> windows_core::Result<()> @@ -184,7 +184,7 @@ where P0: windows_core::Param, { 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.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() + GetUserObjectInformationW(hobj.param().abi(), nindex, core::mem::transmute(pvinfo.unwrap_or(core::ptr::null_mut())), nlength, core::mem::transmute(lpnlengthneeded.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn OpenDesktopA(lpszdesktop: P0, dwflags: DESKTOP_CONTROL_FLAGS, finherit: P1, dwdesiredaccess: u32) -> windows_core::Result 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 debc75e2e5..b6b7b9f181 100644 --- a/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/SystemInformation/mod.rs @@ -47,12 +47,12 @@ pub unsafe fn GetLocalTime() -> super::super::Foundation::SYSTEMTIME { #[inline] pub unsafe fn GetLogicalProcessorInformation(buffer: 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).ok() + GetLogicalProcessorInformation(core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), returnedlength).ok() } #[inline] pub unsafe fn GetLogicalProcessorInformationEx(relationshiptype: LOGICAL_PROCESSOR_RELATIONSHIP, buffer: 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).ok() + GetLogicalProcessorInformationEx(relationshiptype, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), returnedlength).ok() } #[inline] pub unsafe fn GetNativeSystemInfo(lpsysteminfo: *mut SYSTEM_INFO) { @@ -77,7 +77,7 @@ pub unsafe fn GetPhysicallyInstalledSystemMemory(totalmemoryinkilobytes: *mut u6 #[inline] pub unsafe fn GetProcessorSystemCycleTime(group: u16, buffer: 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).ok() + GetProcessorSystemCycleTime(group, core::mem::transmute(buffer.unwrap_or(core::ptr::null_mut())), returnedlength).ok() } #[inline] pub unsafe fn GetProductInfo(dwosmajorversion: u32, dwosminorversion: u32, dwspmajorversion: u32, dwspminorversion: u32, pdwreturnedproducttype: *mut OS_PRODUCT_TYPE) -> super::super::Foundation::BOOL { @@ -90,7 +90,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetSystemCpuSetInformation(information : *mut SYSTEM_CPU_SET_INFORMATION, bufferlength : u32, returnedlength : *mut u32, process : super::super::Foundation:: HANDLE, flags : u32) -> super::super::Foundation:: BOOL); - GetSystemCpuSetInformation(core::mem::transmute(information.unwrap_or(std::ptr::null_mut())), bufferlength, returnedlength, process.param().abi(), flags) + GetSystemCpuSetInformation(core::mem::transmute(information.unwrap_or(core::ptr::null_mut())), bufferlength, returnedlength, process.param().abi(), flags) } #[inline] pub unsafe fn GetSystemDEPPolicy() -> DEP_SYSTEM_POLICY_TYPE { @@ -247,7 +247,7 @@ pub unsafe fn RtlConvertDeviceFamilyInfoToString(puldevicefamilybuffersize: *mut #[inline] pub unsafe fn RtlGetDeviceFamilyInfoEnum(pulluapinfo: Option<*mut u64>, puldevicefamily: Option<*mut DEVICEFAMILYINFOENUM>, puldeviceform: Option<*mut DEVICEFAMILYDEVICEFORM>) { windows_targets::link!("ntdll.dll" "system" fn RtlGetDeviceFamilyInfoEnum(pulluapinfo : *mut u64, puldevicefamily : *mut DEVICEFAMILYINFOENUM, puldeviceform : *mut DEVICEFAMILYDEVICEFORM)); - RtlGetDeviceFamilyInfoEnum(core::mem::transmute(pulluapinfo.unwrap_or(std::ptr::null_mut())), core::mem::transmute(puldevicefamily.unwrap_or(std::ptr::null_mut())), core::mem::transmute(puldeviceform.unwrap_or(std::ptr::null_mut()))) + RtlGetDeviceFamilyInfoEnum(core::mem::transmute(pulluapinfo.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puldevicefamily.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puldeviceform.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RtlGetProductInfo(osmajorversion: u32, osminorversion: u32, spmajorversion: u32, spminorversion: u32, returnedproducttype: *mut u32) -> super::super::Foundation::BOOLEAN { 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 0b5fd27797..4d01527648 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Threading/mod.rs @@ -53,7 +53,7 @@ where #[inline] pub unsafe fn AvRtCreateThreadOrderingGroup(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut windows_core::GUID, timeout: 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()))).ok() + AvRtCreateThreadOrderingGroup(context, period, threadorderingguid, core::mem::transmute(timeout.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn AvRtCreateThreadOrderingGroupExA(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut windows_core::GUID, timeout: Option<*const i64>, taskname: P0) -> windows_core::Result<()> @@ -61,7 +61,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + AvRtCreateThreadOrderingGroupExA(context, period, threadorderingguid, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), taskname.param().abi()).ok() } #[inline] pub unsafe fn AvRtCreateThreadOrderingGroupExW(context: *mut super::super::Foundation::HANDLE, period: *const i64, threadorderingguid: *mut windows_core::GUID, timeout: Option<*const i64>, taskname: P0) -> windows_core::Result<()> @@ -69,7 +69,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + AvRtCreateThreadOrderingGroupExW(context, period, threadorderingguid, core::mem::transmute(timeout.unwrap_or(core::ptr::null())), taskname.param().abi()).ok() } #[inline] pub unsafe fn AvRtDeleteThreadOrderingGroup(context: P0) -> windows_core::Result<()> @@ -221,7 +221,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CloseThreadpoolCleanupGroupMembers(ptpcg : PTP_CLEANUP_GROUP, fcancelpendingcallbacks : super::super::Foundation:: BOOL, pvcleanupcontext : *mut core::ffi::c_void)); - CloseThreadpoolCleanupGroupMembers(ptpcg.param().abi(), fcancelpendingcallbacks.param().abi(), core::mem::transmute(pvcleanupcontext.unwrap_or(std::ptr::null_mut()))) + CloseThreadpoolCleanupGroupMembers(ptpcg.param().abi(), fcancelpendingcallbacks.param().abi(), core::mem::transmute(pvcleanupcontext.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn CloseThreadpoolIo(pio: P0) @@ -263,12 +263,12 @@ pub unsafe fn ConvertFiberToThread() -> windows_core::Result<()> { #[inline] pub unsafe fn ConvertThreadToFiber(lpparameter: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn ConvertThreadToFiber(lpparameter : *const core::ffi::c_void) -> *mut core::ffi::c_void); - ConvertThreadToFiber(core::mem::transmute(lpparameter.unwrap_or(std::ptr::null()))) + ConvertThreadToFiber(core::mem::transmute(lpparameter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn ConvertThreadToFiberEx(lpparameter: Option<*const core::ffi::c_void>, dwflags: u32) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn ConvertThreadToFiberEx(lpparameter : *const core::ffi::c_void, dwflags : u32) -> *mut core::ffi::c_void); - ConvertThreadToFiberEx(core::mem::transmute(lpparameter.unwrap_or(std::ptr::null())), dwflags) + ConvertThreadToFiberEx(core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), dwflags) } #[inline] pub unsafe fn CreateBoundaryDescriptorA(name: P0, flags: u32) -> windows_core::Result @@ -296,7 +296,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventA(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, binitialstate : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(std::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventA(core::mem::transmute(lpeventattributes.unwrap_or(core::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -306,7 +306,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventExA(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCSTR, dwflags : CREATE_EVENT, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventExA(core::mem::transmute(lpeventattributes.unwrap_or(std::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateEventExA(core::mem::transmute(lpeventattributes.unwrap_or(core::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -316,7 +316,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventExW(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCWSTR, dwflags : CREATE_EVENT, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventExW(core::mem::transmute(lpeventattributes.unwrap_or(std::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateEventExW(core::mem::transmute(lpeventattributes.unwrap_or(core::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -328,18 +328,18 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateEventW(lpeventattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, binitialstate : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(std::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); + let result__ = CreateEventW(core::mem::transmute(lpeventattributes.unwrap_or(core::ptr::null())), bmanualreset.param().abi(), binitialstate.param().abi(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateFiber(dwstacksize: usize, lpstartaddress: LPFIBER_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn CreateFiber(dwstacksize : usize, lpstartaddress : LPFIBER_START_ROUTINE, lpparameter : *const core::ffi::c_void) -> *mut core::ffi::c_void); - CreateFiber(dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(std::ptr::null()))) + CreateFiber(dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn CreateFiberEx(dwstackcommitsize: usize, dwstackreservesize: usize, dwflags: u32, lpstartaddress: LPFIBER_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>) -> *mut core::ffi::c_void { windows_targets::link!("kernel32.dll" "system" fn CreateFiberEx(dwstackcommitsize : usize, dwstackreservesize : usize, dwflags : u32, lpstartaddress : LPFIBER_START_ROUTINE, lpparameter : *const core::ffi::c_void) -> *mut core::ffi::c_void); - CreateFiberEx(dwstackcommitsize, dwstackreservesize, dwflags, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(std::ptr::null()))) + CreateFiberEx(dwstackcommitsize, dwstackreservesize, dwflags, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -349,7 +349,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexA(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binitialowner : super::super::Foundation:: BOOL, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(std::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexA(core::mem::transmute(lpmutexattributes.unwrap_or(core::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -359,7 +359,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexExA(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexExA(core::mem::transmute(lpmutexattributes.unwrap_or(std::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateMutexExA(core::mem::transmute(lpmutexattributes.unwrap_or(core::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -369,7 +369,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexExW(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpname : windows_core::PCWSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexExW(core::mem::transmute(lpmutexattributes.unwrap_or(std::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateMutexExW(core::mem::transmute(lpmutexattributes.unwrap_or(core::ptr::null())), lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -380,7 +380,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateMutexW(lpmutexattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, binitialowner : super::super::Foundation:: BOOL, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(std::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); + let result__ = CreateMutexW(core::mem::transmute(lpmutexattributes.unwrap_or(core::ptr::null())), binitialowner.param().abi(), lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -390,7 +390,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreatePrivateNamespaceA(lpprivatenamespaceattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpboundarydescriptor : *const core::ffi::c_void, lpaliasprefix : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreatePrivateNamespaceA(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(std::ptr::null())), lpboundarydescriptor, lpaliasprefix.param().abi()); + let result__ = CreatePrivateNamespaceA(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::ptr::null())), lpboundarydescriptor, lpaliasprefix.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -400,7 +400,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreatePrivateNamespaceW(lpprivatenamespaceattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lpboundarydescriptor : *const core::ffi::c_void, lpaliasprefix : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - CreatePrivateNamespaceW(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(std::ptr::null())), lpboundarydescriptor, lpaliasprefix.param().abi()) + CreatePrivateNamespaceW(core::mem::transmute(lpprivatenamespaceattributes.unwrap_or(core::ptr::null())), lpboundarydescriptor, lpaliasprefix.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -411,7 +411,7 @@ where P2: windows_core::Param, { 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.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.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessA(lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(lpprocessattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -423,7 +423,7 @@ where P3: windows_core::Param, { 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.param().abi(), lpapplicationname.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.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessAsUserA(htoken.param().abi(), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(lpprocessattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -435,7 +435,7 @@ where P3: windows_core::Param, { 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.param().abi(), lpapplicationname.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.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessAsUserW(htoken.param().abi(), lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(lpprocessattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -446,7 +446,7 @@ where P2: windows_core::Param, { 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.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.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessW(lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), core::mem::transmute(lpprocessattributes.unwrap_or(core::ptr::null())), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), binherithandles.param().abi(), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[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: Option<*const core::ffi::c_void>, lpcurrentdirectory: P4, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> @@ -458,7 +458,7 @@ where P4: windows_core::Param, { 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.param().abi(), lpdomain.param().abi(), lppassword.param().abi(), dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessWithLogonW(lpusername.param().abi(), lpdomain.param().abi(), lppassword.param().abi(), dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[inline] pub unsafe fn CreateProcessWithTokenW(htoken: P0, dwlogonflags: CREATE_PROCESS_LOGON_FLAGS, lpapplicationname: P1, lpcommandline: windows_core::PWSTR, dwcreationflags: PROCESS_CREATION_FLAGS, lpenvironment: Option<*const core::ffi::c_void>, lpcurrentdirectory: P2, lpstartupinfo: *const STARTUPINFOW, lpprocessinformation: *mut PROCESS_INFORMATION) -> windows_core::Result<()> @@ -468,7 +468,7 @@ where P2: windows_core::Param, { 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.param().abi(), dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(std::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() + CreateProcessWithTokenW(htoken.param().abi(), dwlogonflags, lpapplicationname.param().abi(), core::mem::transmute(lpcommandline), dwcreationflags, core::mem::transmute(lpenvironment.unwrap_or(core::ptr::null())), lpcurrentdirectory.param().abi(), lpstartupinfo, lpprocessinformation).ok() } #[cfg(feature = "Win32_Security")] #[inline] @@ -477,7 +477,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateRemoteThread(hprocess : super::super::Foundation:: HANDLE, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwstacksize : usize, lpstartaddress : LPTHREAD_START_ROUTINE, lpparameter : *const core::ffi::c_void, dwcreationflags : u32, lpthreadid : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateRemoteThread(hprocess.param().abi(), core::mem::transmute(lpthreadattributes.unwrap_or(std::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(std::ptr::null())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(std::ptr::null_mut()))); + let result__ = CreateRemoteThread(hprocess.param().abi(), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -488,7 +488,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateRemoteThreadEx(hprocess : super::super::Foundation:: HANDLE, lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwstacksize : usize, lpstartaddress : LPTHREAD_START_ROUTINE, lpparameter : *const core::ffi::c_void, dwcreationflags : u32, lpattributelist : LPPROC_THREAD_ATTRIBUTE_LIST, lpthreadid : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateRemoteThreadEx(hprocess.param().abi(), core::mem::transmute(lpthreadattributes.unwrap_or(std::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(std::ptr::null())), dwcreationflags, lpattributelist.param().abi(), core::mem::transmute(lpthreadid.unwrap_or(std::ptr::null_mut()))); + let result__ = CreateRemoteThreadEx(hprocess.param().abi(), core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), dwcreationflags, lpattributelist.param().abi(), core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -498,7 +498,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSemaphoreA(lpsemaphoreattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, linitialcount : i32, lmaximumcount : i32, lpname : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateSemaphoreA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(std::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi()); + let result__ = CreateSemaphoreA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -508,7 +508,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSemaphoreExA(lpsemaphoreattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, linitialcount : i32, lmaximumcount : i32, lpname : windows_core::PCSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateSemaphoreExA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(std::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateSemaphoreExA(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -518,7 +518,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSemaphoreExW(lpsemaphoreattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, linitialcount : i32, lmaximumcount : i32, lpname : windows_core::PCWSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateSemaphoreExW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(std::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateSemaphoreExW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -528,20 +528,20 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateSemaphoreW(lpsemaphoreattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, linitialcount : i32, lmaximumcount : i32, lpname : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateSemaphoreW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(std::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi()); + let result__ = CreateSemaphoreW(core::mem::transmute(lpsemaphoreattributes.unwrap_or(core::ptr::null())), linitialcount, lmaximumcount, lpname.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] #[inline] pub unsafe fn CreateThread(lpthreadattributes: Option<*const super::super::Security::SECURITY_ATTRIBUTES>, dwstacksize: usize, lpstartaddress: LPTHREAD_START_ROUTINE, lpparameter: Option<*const core::ffi::c_void>, dwcreationflags: THREAD_CREATION_FLAGS, lpthreadid: Option<*mut u32>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThread(lpthreadattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, dwstacksize : usize, lpstartaddress : LPTHREAD_START_ROUTINE, lpparameter : *const core::ffi::c_void, dwcreationflags : THREAD_CREATION_FLAGS, lpthreadid : *mut u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateThread(core::mem::transmute(lpthreadattributes.unwrap_or(std::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(std::ptr::null())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(std::ptr::null_mut()))); + let result__ = CreateThread(core::mem::transmute(lpthreadattributes.unwrap_or(core::ptr::null())), dwstacksize, lpstartaddress, core::mem::transmute(lpparameter.unwrap_or(core::ptr::null())), dwcreationflags, core::mem::transmute(lpthreadid.unwrap_or(core::ptr::null_mut()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateThreadpool(reserved: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThreadpool(reserved : *const core::ffi::c_void) -> PTP_POOL); - let result__ = CreateThreadpool(core::mem::transmute(reserved.unwrap_or(std::ptr::null()))); + let result__ = CreateThreadpool(core::mem::transmute(reserved.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -556,25 +556,25 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateThreadpoolIo(fl : super::super::Foundation:: HANDLE, pfnio : PTP_WIN32_IO_CALLBACK, pv : *mut core::ffi::c_void, pcbe : *const TP_CALLBACK_ENVIRON_V3) -> PTP_IO); - let result__ = CreateThreadpoolIo(fl.param().abi(), pfnio, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(std::ptr::null()))); + let result__ = CreateThreadpoolIo(fl.param().abi(), pfnio, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateThreadpoolTimer(pfnti: PTP_TIMER_CALLBACK, pv: Option<*mut core::ffi::c_void>, pcbe: Option<*const TP_CALLBACK_ENVIRON_V3>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThreadpoolTimer(pfnti : PTP_TIMER_CALLBACK, pv : *mut core::ffi::c_void, pcbe : *const TP_CALLBACK_ENVIRON_V3) -> PTP_TIMER); - let result__ = CreateThreadpoolTimer(pfnti, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(std::ptr::null()))); + let result__ = CreateThreadpoolTimer(pfnti, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateThreadpoolWait(pfnwa: PTP_WAIT_CALLBACK, pv: Option<*mut core::ffi::c_void>, pcbe: Option<*const TP_CALLBACK_ENVIRON_V3>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThreadpoolWait(pfnwa : PTP_WAIT_CALLBACK, pv : *mut core::ffi::c_void, pcbe : *const TP_CALLBACK_ENVIRON_V3) -> PTP_WAIT); - let result__ = CreateThreadpoolWait(pfnwa, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(std::ptr::null()))); + let result__ = CreateThreadpoolWait(pfnwa, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] pub unsafe fn CreateThreadpoolWork(pfnwk: PTP_WORK_CALLBACK, pv: Option<*mut core::ffi::c_void>, pcbe: Option<*const TP_CALLBACK_ENVIRON_V3>) -> windows_core::Result { windows_targets::link!("kernel32.dll" "system" fn CreateThreadpoolWork(pfnwk : PTP_WORK_CALLBACK, pv : *mut core::ffi::c_void, pcbe : *const TP_CALLBACK_ENVIRON_V3) -> PTP_WORK); - let result__ = CreateThreadpoolWork(pfnwk, core::mem::transmute(pv.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(std::ptr::null()))); + let result__ = CreateThreadpoolWork(pfnwk, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -589,7 +589,7 @@ where P0: windows_core::Param, { 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.param().abi(), callback, core::mem::transmute(parameter.unwrap_or(std::ptr::null())), duetime, period, flags).ok() + CreateTimerQueueTimer(phnewtimer, timerqueue.param().abi(), callback, core::mem::transmute(parameter.unwrap_or(core::ptr::null())), duetime, period, flags).ok() } #[inline] pub unsafe fn CreateUmsCompletionList(umscompletionlist: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -609,7 +609,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerA(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, lptimername : windows_core::PCSTR) -> super::super::Foundation:: HANDLE); - CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(std::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()) + CreateWaitableTimerA(core::mem::transmute(lptimerattributes.unwrap_or(core::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()) } #[cfg(feature = "Win32_Security")] #[inline] @@ -618,7 +618,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerExA(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lptimername : windows_core::PCSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - CreateWaitableTimerExA(core::mem::transmute(lptimerattributes.unwrap_or(std::ptr::null())), lptimername.param().abi(), dwflags, dwdesiredaccess) + CreateWaitableTimerExA(core::mem::transmute(lptimerattributes.unwrap_or(core::ptr::null())), lptimername.param().abi(), dwflags, dwdesiredaccess) } #[cfg(feature = "Win32_Security")] #[inline] @@ -627,7 +627,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerExW(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, lptimername : windows_core::PCWSTR, dwflags : u32, dwdesiredaccess : u32) -> super::super::Foundation:: HANDLE); - let result__ = CreateWaitableTimerExW(core::mem::transmute(lptimerattributes.unwrap_or(std::ptr::null())), lptimername.param().abi(), dwflags, dwdesiredaccess); + let result__ = CreateWaitableTimerExW(core::mem::transmute(lptimerattributes.unwrap_or(core::ptr::null())), lptimername.param().abi(), dwflags, dwdesiredaccess); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(feature = "Win32_Security")] @@ -638,7 +638,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn CreateWaitableTimerW(lptimerattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, bmanualreset : super::super::Foundation:: BOOL, lptimername : windows_core::PCWSTR) -> super::super::Foundation:: HANDLE); - let result__ = CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(std::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()); + let result__ = CreateWaitableTimerW(core::mem::transmute(lptimerattributes.unwrap_or(core::ptr::null())), bmanualreset.param().abi(), lptimername.param().abi()); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -770,7 +770,7 @@ pub unsafe fn FlsGetValue(dwflsindex: u32) -> *mut core::ffi::c_void { #[inline] pub unsafe fn FlsSetValue(dwflsindex: u32, lpflsdata: 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()))).ok() + FlsSetValue(dwflsindex, core::mem::transmute(lpflsdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn FlushProcessWriteBuffers() { @@ -1097,7 +1097,7 @@ pub unsafe fn GetStartupInfoW(lpstartupinfo: *mut STARTUPINFOW) { #[inline] pub unsafe fn GetSystemTimes(lpidletime: Option<*mut super::super::Foundation::FILETIME>, lpkerneltime: Option<*mut super::super::Foundation::FILETIME>, lpusertime: 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()))).ok() + GetSystemTimes(core::mem::transmute(lpidletime.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpkerneltime.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpusertime.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetThreadDescription(hthread: P0) -> windows_core::Result @@ -1207,17 +1207,17 @@ where #[inline] pub unsafe fn InitOnceBeginInitialize(lpinitonce: *mut INIT_ONCE, dwflags: u32, fpending: *mut super::super::Foundation::BOOL, lpcontext: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitOnceBeginInitialize(lpinitonce : *mut INIT_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()))).ok() + InitOnceBeginInitialize(lpinitonce, dwflags, fpending, core::mem::transmute(lpcontext.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn InitOnceComplete(lpinitonce: *mut INIT_ONCE, dwflags: u32, lpcontext: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitOnceComplete(lpinitonce : *mut INIT_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()))).ok() + InitOnceComplete(lpinitonce, dwflags, core::mem::transmute(lpcontext.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn InitOnceExecuteOnce(initonce: *mut INIT_ONCE, initfn: PINIT_ONCE_FN, parameter: Option<*mut core::ffi::c_void>, context: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn InitOnceExecuteOnce(initonce : *mut INIT_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()))).ok() + InitOnceExecuteOnce(initonce, initfn, core::mem::transmute(parameter.unwrap_or(core::ptr::null_mut())), core::mem::transmute(context.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn InitOnceInitialize() -> INIT_ONCE { @@ -1349,7 +1349,7 @@ where P0: windows_core::Param, { 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.param().abi(), pprocessmachine, core::mem::transmute(pnativemachine.unwrap_or(std::ptr::null_mut()))).ok() + IsWow64Process2(hprocess.param().abi(), pprocessmachine, core::mem::transmute(pnativemachine.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Kernel")] #[inline] @@ -1514,7 +1514,7 @@ where P0: windows_core::Param, { 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.param().abi(), core::mem::transmute(lpdwflags.unwrap_or(std::ptr::null_mut()))).ok() + QueryProcessAffinityUpdateMode(hprocess.param().abi(), core::mem::transmute(lpdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueryProtectedPolicy(policyguid: *const windows_core::GUID, policyvalue: *mut usize) -> super::super::Foundation::BOOL { @@ -1532,7 +1532,7 @@ where #[inline] pub unsafe fn QueryUmsThreadInformation(umsthread: *const core::ffi::c_void, umsthreadinfoclass: UMS_THREAD_INFO_CLASS, umsthreadinformation: *mut core::ffi::c_void, umsthreadinformationlength: u32, returnlength: Option<*mut u32>) -> windows_core::Result<()> { windows_targets::link!("kernel32.dll" "system" fn QueryUmsThreadInformation(umsthread : *const core::ffi::c_void, umsthreadinfoclass : 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()))).ok() + QueryUmsThreadInformation(umsthread, umsthreadinfoclass, umsthreadinformation, umsthreadinformationlength, core::mem::transmute(returnlength.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueueUserAPC(pfnapc: super::super::Foundation::PAPCFUNC, hthread: P0, dwdata: usize) -> u32 @@ -1553,7 +1553,7 @@ where #[inline] pub unsafe fn QueueUserWorkItem(function: LPTHREAD_START_ROUTINE, context: 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).ok() + QueueUserWorkItem(function, core::mem::transmute(context.unwrap_or(core::ptr::null())), flags).ok() } #[inline] pub unsafe fn RegisterWaitForSingleObject(phnewwaitobject: *mut super::super::Foundation::HANDLE, hobject: P0, callback: WAITORTIMERCALLBACK, context: Option<*const core::ffi::c_void>, dwmilliseconds: u32, dwflags: WORKER_THREAD_FLAGS) -> windows_core::Result<()> @@ -1561,7 +1561,7 @@ where P0: windows_core::Param, { 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.param().abi(), callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), dwmilliseconds, dwflags).ok() + RegisterWaitForSingleObject(phnewwaitobject, hobject.param().abi(), callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), dwmilliseconds, dwflags).ok() } #[inline] pub unsafe fn ReleaseMutex(hmutex: P0) -> windows_core::Result<()> @@ -1596,7 +1596,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn ReleaseSemaphore(hsemaphore : super::super::Foundation:: HANDLE, lreleasecount : i32, lppreviouscount : *mut i32) -> super::super::Foundation:: BOOL); - ReleaseSemaphore(hsemaphore.param().abi(), lreleasecount, core::mem::transmute(lppreviouscount.unwrap_or(std::ptr::null_mut()))).ok() + ReleaseSemaphore(hsemaphore.param().abi(), lreleasecount, core::mem::transmute(lppreviouscount.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ReleaseSemaphoreWhenCallbackReturns(pci: P0, sem: P1, crel: u32) @@ -1629,7 +1629,7 @@ where P0: windows_core::Param, { windows_targets::link!("rtworkq.dll" "system" fn RtwqAddPeriodicCallback(callback : RTWQPERIODICCALLBACK, context : * mut core::ffi::c_void, key : *mut u32) -> windows_core::HRESULT); - RtwqAddPeriodicCallback(callback, context.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null_mut()))).ok() + RtwqAddPeriodicCallback(callback, context.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RtwqAllocateSerialWorkQueue(workqueueidin: u32) -> windows_core::Result { @@ -1754,7 +1754,7 @@ where P1: windows_core::Param, { windows_targets::link!("rtworkq.dll" "system" fn RtwqPutWaitingWorkItem(hevent : super::super::Foundation:: HANDLE, lpriority : i32, result : * mut core::ffi::c_void, key : *mut u64) -> windows_core::HRESULT); - RtwqPutWaitingWorkItem(hevent.param().abi(), lpriority, result.param().abi(), core::mem::transmute(key.unwrap_or(std::ptr::null_mut()))).ok() + RtwqPutWaitingWorkItem(hevent.param().abi(), lpriority, result.param().abi(), core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RtwqPutWorkItem(dwqueue: u32, lpriority: i32, result: P0) -> windows_core::Result<()> @@ -1791,7 +1791,7 @@ where P0: windows_core::Param, { windows_targets::link!("rtworkq.dll" "system" fn RtwqScheduleWorkItem(result : * mut core::ffi::c_void, timeout : i64, key : *mut u64) -> windows_core::HRESULT); - RtwqScheduleWorkItem(result.param().abi(), timeout, core::mem::transmute(key.unwrap_or(std::ptr::null_mut()))).ok() + RtwqScheduleWorkItem(result.param().abi(), timeout, core::mem::transmute(key.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RtwqSetDeadline(workqueueid: u32, deadlineinhns: i64) -> windows_core::Result { @@ -1985,7 +1985,7 @@ where #[inline] pub unsafe fn SetProtectedPolicy(policyguid: *const windows_core::GUID, policyvalue: usize, oldpolicyvalue: 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()))).ok() + SetProtectedPolicy(policyguid, policyvalue, core::mem::transmute(oldpolicyvalue.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetThreadAffinityMask(hthread: P0, dwthreadaffinitymask: usize) -> usize @@ -2011,7 +2011,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadGroupAffinity(hthread : super::super::Foundation:: HANDLE, groupaffinity : *const super::SystemInformation:: GROUP_AFFINITY, previousgroupaffinity : *mut super::SystemInformation:: GROUP_AFFINITY) -> super::super::Foundation:: BOOL); - SetThreadGroupAffinity(hthread.param().abi(), groupaffinity, core::mem::transmute(previousgroupaffinity.unwrap_or(std::ptr::null_mut()))) + SetThreadGroupAffinity(hthread.param().abi(), groupaffinity, core::mem::transmute(previousgroupaffinity.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SetThreadIdealProcessor(hthread: P0, dwidealprocessor: u32) -> u32 @@ -2028,7 +2028,7 @@ where P0: windows_core::Param, { 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.param().abi(), lpidealprocessor, core::mem::transmute(lppreviousidealprocessor.unwrap_or(std::ptr::null_mut()))).ok() + SetThreadIdealProcessorEx(hthread.param().abi(), lpidealprocessor, core::mem::transmute(lppreviousidealprocessor.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SetThreadInformation(hthread: P0, threadinformationclass: THREAD_INFORMATION_CLASS, threadinformation: *const core::ffi::c_void, threadinformationsize: u32) -> windows_core::Result<()> @@ -2083,7 +2083,7 @@ where P0: windows_core::Param, { 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.param().abi()).ok() + SetThreadToken(core::mem::transmute(thread.unwrap_or(core::ptr::null())), token.param().abi()).ok() } #[inline] pub unsafe fn SetThreadpoolStackInformation(ptpp: P0, ptpsi: *const TP_POOL_STACK_INFORMATION) -> windows_core::Result<()> @@ -2115,7 +2115,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolTimer(pti : PTP_TIMER, pftduetime : *const super::super::Foundation:: FILETIME, msperiod : u32, mswindowlength : u32)); - SetThreadpoolTimer(pti.param().abi(), core::mem::transmute(pftduetime.unwrap_or(std::ptr::null())), msperiod, mswindowlength) + SetThreadpoolTimer(pti.param().abi(), core::mem::transmute(pftduetime.unwrap_or(core::ptr::null())), msperiod, mswindowlength) } #[inline] pub unsafe fn SetThreadpoolTimerEx(pti: P0, pftduetime: Option<*const super::super::Foundation::FILETIME>, msperiod: u32, mswindowlength: u32) -> super::super::Foundation::BOOL @@ -2123,7 +2123,7 @@ where P0: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolTimerEx(pti : PTP_TIMER, pftduetime : *const super::super::Foundation:: FILETIME, msperiod : u32, mswindowlength : u32) -> super::super::Foundation:: BOOL); - SetThreadpoolTimerEx(pti.param().abi(), core::mem::transmute(pftduetime.unwrap_or(std::ptr::null())), msperiod, mswindowlength) + SetThreadpoolTimerEx(pti.param().abi(), core::mem::transmute(pftduetime.unwrap_or(core::ptr::null())), msperiod, mswindowlength) } #[inline] pub unsafe fn SetThreadpoolWait(pwa: P0, h: P1, pfttimeout: Option<*const super::super::Foundation::FILETIME>) @@ -2132,7 +2132,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolWait(pwa : PTP_WAIT, h : super::super::Foundation:: HANDLE, pfttimeout : *const super::super::Foundation:: FILETIME)); - SetThreadpoolWait(pwa.param().abi(), h.param().abi(), core::mem::transmute(pfttimeout.unwrap_or(std::ptr::null()))) + SetThreadpoolWait(pwa.param().abi(), h.param().abi(), core::mem::transmute(pfttimeout.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetThreadpoolWaitEx(pwa: P0, h: P1, pfttimeout: Option<*const super::super::Foundation::FILETIME>, reserved: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -2141,7 +2141,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetThreadpoolWaitEx(pwa : PTP_WAIT, h : super::super::Foundation:: HANDLE, pfttimeout : *const super::super::Foundation:: FILETIME, reserved : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetThreadpoolWaitEx(pwa.param().abi(), h.param().abi(), core::mem::transmute(pfttimeout.unwrap_or(std::ptr::null())), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))) + SetThreadpoolWaitEx(pwa.param().abi(), h.param().abi(), core::mem::transmute(pfttimeout.unwrap_or(core::ptr::null())), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetTimerQueueTimer(timerqueue: P0, callback: WAITORTIMERCALLBACK, parameter: Option<*const core::ffi::c_void>, duetime: u32, period: u32, preferio: P1) -> super::super::Foundation::HANDLE @@ -2150,7 +2150,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn SetTimerQueueTimer(timerqueue : super::super::Foundation:: HANDLE, callback : WAITORTIMERCALLBACK, parameter : *const core::ffi::c_void, duetime : u32, period : u32, preferio : super::super::Foundation:: BOOL) -> super::super::Foundation:: HANDLE); - SetTimerQueueTimer(timerqueue.param().abi(), callback, core::mem::transmute(parameter.unwrap_or(std::ptr::null())), duetime, period, preferio.param().abi()) + SetTimerQueueTimer(timerqueue.param().abi(), callback, core::mem::transmute(parameter.unwrap_or(core::ptr::null())), duetime, period, preferio.param().abi()) } #[inline] pub unsafe fn SetUmsThreadInformation(umsthread: *const core::ffi::c_void, umsthreadinfoclass: UMS_THREAD_INFO_CLASS, umsthreadinformation: *const core::ffi::c_void, umsthreadinformationlength: u32) -> windows_core::Result<()> { @@ -2164,7 +2164,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpduetime, lperiod, pfncompletionroutine, core::mem::transmute(lpargtocompletionroutine.unwrap_or(std::ptr::null())), fresume.param().abi()).ok() + SetWaitableTimer(htimer.param().abi(), lpduetime, lperiod, pfncompletionroutine, core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::ptr::null())), fresume.param().abi()).ok() } #[inline] pub unsafe fn SetWaitableTimerEx(htimer: P0, lpduetime: *const i64, lperiod: i32, pfncompletionroutine: PTIMERAPCROUTINE, lpargtocompletionroutine: Option<*const core::ffi::c_void>, wakecontext: Option<*const REASON_CONTEXT>, tolerabledelay: u32) -> windows_core::Result<()> @@ -2172,7 +2172,7 @@ where P0: windows_core::Param, { 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.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() + SetWaitableTimerEx(htimer.param().abi(), lpduetime, lperiod, pfncompletionroutine, core::mem::transmute(lpargtocompletionroutine.unwrap_or(core::ptr::null())), core::mem::transmute(wakecontext.unwrap_or(core::ptr::null())), tolerabledelay).ok() } #[inline] pub unsafe fn SignalObjectAndWait(hobjecttosignal: P0, hobjecttowaiton: P1, dwmilliseconds: u32, balertable: P2) -> super::super::Foundation::WAIT_EVENT @@ -2276,7 +2276,7 @@ pub unsafe fn TlsGetValue(dwtlsindex: u32) -> *mut core::ffi::c_void { #[inline] pub unsafe fn TlsSetValue(dwtlsindex: u32, lptlsvalue: 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()))).ok() + TlsSetValue(dwtlsindex, core::mem::transmute(lptlsvalue.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn TryAcquireSRWLockExclusive(srwlock: *mut SRWLOCK) -> super::super::Foundation::BOOLEAN { @@ -2297,7 +2297,7 @@ pub unsafe fn TryEnterCriticalSection(lpcriticalsection: *mut CRITICAL_SECTION) #[inline] pub unsafe fn TrySubmitThreadpoolCallback(pfns: PTP_SIMPLE_CALLBACK, pv: Option<*mut core::ffi::c_void>, pcbe: 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()))).ok() + TrySubmitThreadpoolCallback(pfns, core::mem::transmute(pv.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbe.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn UmsThreadYield(schedulerparam: *const core::ffi::c_void) -> windows_core::Result<()> { @@ -2324,7 +2324,7 @@ where #[inline] pub unsafe fn UpdateProcThreadAttribute(lpattributelist: LPPROC_THREAD_ATTRIBUTE_LIST, dwflags: u32, attribute: usize, lpvalue: Option<*const core::ffi::c_void>, cbsize: usize, lppreviousvalue: Option<*mut core::ffi::c_void>, lpreturnsize: 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()))).ok() + UpdateProcThreadAttribute(lpattributelist, dwflags, attribute, core::mem::transmute(lpvalue.unwrap_or(core::ptr::null())), cbsize, core::mem::transmute(lppreviousvalue.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpreturnsize.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn WaitForInputIdle(hprocess: P0, dwmilliseconds: u32) -> u32 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 dd31d8019b..4ae0e0e730 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Time/mod.rs @@ -26,17 +26,17 @@ pub unsafe fn GetTimeZoneInformation(lptimezoneinformation: *mut TIME_ZONE_INFOR #[inline] pub unsafe fn GetTimeZoneInformationForYear(wyear: u16, pdtzi: 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).ok() + GetTimeZoneInformationForYear(wyear, core::mem::transmute(pdtzi.unwrap_or(core::ptr::null())), ptzi).ok() } #[inline] pub unsafe fn LocalFileTimeToLocalSystemTime(timezoneinformation: Option<*const TIME_ZONE_INFORMATION>, localfiletime: *const super::super::Foundation::FILETIME, localsystemtime: *mut super::super::Foundation::SYSTEMTIME) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn LocalFileTimeToLocalSystemTime(timezoneinformation : *const TIME_ZONE_INFORMATION, localfiletime : *const super::super::Foundation:: FILETIME, localsystemtime : *mut super::super::Foundation:: SYSTEMTIME) -> super::super::Foundation:: BOOL); - LocalFileTimeToLocalSystemTime(core::mem::transmute(timezoneinformation.unwrap_or(std::ptr::null())), localfiletime, localsystemtime) + LocalFileTimeToLocalSystemTime(core::mem::transmute(timezoneinformation.unwrap_or(core::ptr::null())), localfiletime, localsystemtime) } #[inline] pub unsafe fn LocalSystemTimeToLocalFileTime(timezoneinformation: Option<*const TIME_ZONE_INFORMATION>, localsystemtime: *const super::super::Foundation::SYSTEMTIME, localfiletime: *mut super::super::Foundation::FILETIME) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn LocalSystemTimeToLocalFileTime(timezoneinformation : *const TIME_ZONE_INFORMATION, localsystemtime : *const super::super::Foundation:: SYSTEMTIME, localfiletime : *mut super::super::Foundation:: FILETIME) -> super::super::Foundation:: BOOL); - LocalSystemTimeToLocalFileTime(core::mem::transmute(timezoneinformation.unwrap_or(std::ptr::null())), localsystemtime, localfiletime) + LocalSystemTimeToLocalFileTime(core::mem::transmute(timezoneinformation.unwrap_or(core::ptr::null())), localsystemtime, localfiletime) } #[inline] pub unsafe fn SetDynamicTimeZoneInformation(lptimezoneinformation: *const DYNAMIC_TIME_ZONE_INFORMATION) -> windows_core::Result<()> { @@ -56,22 +56,22 @@ pub unsafe fn SystemTimeToFileTime(lpsystemtime: *const super::super::Foundation #[inline] pub unsafe fn SystemTimeToTzSpecificLocalTime(lptimezoneinformation: 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).ok() + SystemTimeToTzSpecificLocalTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::ptr::null())), lpuniversaltime, lplocaltime).ok() } #[inline] pub unsafe fn SystemTimeToTzSpecificLocalTimeEx(lptimezoneinformation: 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).ok() + SystemTimeToTzSpecificLocalTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::ptr::null())), lpuniversaltime, lplocaltime).ok() } #[inline] pub unsafe fn TzSpecificLocalTimeToSystemTime(lptimezoneinformation: 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).ok() + TzSpecificLocalTimeToSystemTime(core::mem::transmute(lptimezoneinformation.unwrap_or(core::ptr::null())), lplocaltime, lpuniversaltime).ok() } #[inline] pub unsafe fn TzSpecificLocalTimeToSystemTimeEx(lptimezoneinformation: 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).ok() + TzSpecificLocalTimeToSystemTimeEx(core::mem::transmute(lptimezoneinformation.unwrap_or(core::ptr::null())), lplocaltime, lpuniversaltime).ok() } pub const TIME_ZONE_ID_INVALID: u32 = 4294967295u32; pub const TSF_Authenticated: u32 = 2u32; diff --git a/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs b/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs index dc3c597bcd..4cb2e66d92 100644 --- a/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/TpmBaseServices/mod.rs @@ -1,12 +1,12 @@ #[inline] pub unsafe fn GetDeviceID(pbwindowsaik: Option<&mut [u8]>, pcbresult: *mut u32, pfprotectedbytpm: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { windows_targets::link!("tbs.dll" "system" fn GetDeviceID(pbwindowsaik : *mut u8, cbwindowsaik : u32, pcbresult : *mut u32, pfprotectedbytpm : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetDeviceID(core::mem::transmute(pbwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, core::mem::transmute(pfprotectedbytpm.unwrap_or(std::ptr::null_mut()))).ok() + GetDeviceID(core::mem::transmute(pbwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pbwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcbresult, core::mem::transmute(pfprotectedbytpm.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetDeviceIDString(pszwindowsaik: Option<&mut [u16]>, pcchresult: *mut u32, pfprotectedbytpm: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { windows_targets::link!("tbs.dll" "system" fn GetDeviceIDString(pszwindowsaik : windows_core::PWSTR, cchwindowsaik : u32, pcchresult : *mut u32, pfprotectedbytpm : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - GetDeviceIDString(core::mem::transmute(pszwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchresult, core::mem::transmute(pfprotectedbytpm.unwrap_or(std::ptr::null_mut()))).ok() + GetDeviceIDString(core::mem::transmute(pszwindowsaik.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszwindowsaik.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pcchresult, core::mem::transmute(pfprotectedbytpm.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn Tbsi_Context_Create(pcontextparams: *const TBS_CONTEXT_PARAMS, phcontext: *mut *mut core::ffi::c_void) -> u32 { @@ -26,17 +26,17 @@ pub unsafe fn Tbsi_GetDeviceInfo(size: u32, info: *mut core::ffi::c_void) -> u32 #[inline] pub unsafe fn Tbsi_Get_OwnerAuth(hcontext: *const core::ffi::c_void, ownerauthtype: u32, poutputbuf: Option<*mut u8>, poutputbuflen: *mut u32) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_Get_OwnerAuth(hcontext : *const core::ffi::c_void, ownerauthtype : u32, poutputbuf : *mut u8, poutputbuflen : *mut u32) -> u32); - Tbsi_Get_OwnerAuth(hcontext, ownerauthtype, core::mem::transmute(poutputbuf.unwrap_or(std::ptr::null_mut())), poutputbuflen) + Tbsi_Get_OwnerAuth(hcontext, ownerauthtype, core::mem::transmute(poutputbuf.unwrap_or(core::ptr::null_mut())), poutputbuflen) } #[inline] pub unsafe fn Tbsi_Get_TCG_Log(hcontext: *const core::ffi::c_void, poutputbuf: Option<*mut u8>, poutputbuflen: *mut u32) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_Get_TCG_Log(hcontext : *const core::ffi::c_void, poutputbuf : *mut u8, poutputbuflen : *mut u32) -> u32); - Tbsi_Get_TCG_Log(hcontext, core::mem::transmute(poutputbuf.unwrap_or(std::ptr::null_mut())), poutputbuflen) + Tbsi_Get_TCG_Log(hcontext, core::mem::transmute(poutputbuf.unwrap_or(core::ptr::null_mut())), poutputbuflen) } #[inline] pub unsafe fn Tbsi_Get_TCG_Log_Ex(logtype: u32, pboutput: Option<*mut u8>, pcboutput: *mut u32) -> u32 { windows_targets::link!("tbs.dll" "system" fn Tbsi_Get_TCG_Log_Ex(logtype : u32, pboutput : *mut u8, pcboutput : *mut u32) -> u32); - Tbsi_Get_TCG_Log_Ex(logtype, core::mem::transmute(pboutput.unwrap_or(std::ptr::null_mut())), pcboutput) + Tbsi_Get_TCG_Log_Ex(logtype, core::mem::transmute(pboutput.unwrap_or(core::ptr::null_mut())), pcboutput) } #[inline] pub unsafe fn Tbsi_Is_Tpm_Present() -> super::super::Foundation::BOOL { diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs index 2437da9428..3998024c0c 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Composition/mod.rs @@ -38,7 +38,7 @@ impl ICompositionDrawingSurfaceInterop { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(updaterect.unwrap_or(std::ptr::null())), &T::IID, &mut result__, updateoffset).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).BeginDraw)(windows_core::Interface::as_raw(self), core::mem::transmute(updaterect.unwrap_or(core::ptr::null())), &T::IID, &mut result__, updateoffset).and_then(|| windows_core::Type::from_abi(result__)) } pub unsafe fn EndDraw(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).EndDraw)(windows_core::Interface::as_raw(self)).ok() @@ -47,7 +47,7 @@ impl ICompositionDrawingSurfaceInterop { (windows_core::Interface::vtable(self).Resize)(windows_core::Interface::as_raw(self), core::mem::transmute(sizepixels)).ok() } pub unsafe fn Scroll(&self, scrollrect: Option<*const super::super::super::Foundation::RECT>, cliprect: Option<*const super::super::super::Foundation::RECT>, offsetx: i32, offsety: i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(std::ptr::null())), core::mem::transmute(cliprect.unwrap_or(std::ptr::null())), offsetx, offsety).ok() + (windows_core::Interface::vtable(self).Scroll)(windows_core::Interface::as_raw(self), core::mem::transmute(scrollrect.unwrap_or(core::ptr::null())), core::mem::transmute(cliprect.unwrap_or(core::ptr::null())), offsetx, offsety).ok() } pub unsafe fn ResumeDraw(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ResumeDraw)(windows_core::Interface::as_raw(self)).ok() @@ -79,7 +79,7 @@ impl ICompositionDrawingSurfaceInterop2 { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), destinationoffsetx, destinationoffsety, core::mem::transmute(sourcerectangle.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).CopySurface)(windows_core::Interface::as_raw(self), destinationresource.param().abi(), destinationoffsetx, destinationoffsety, core::mem::transmute(sourcerectangle.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs index c4eda1e857..297d9a49ef 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Graphics/Imaging/mod.rs @@ -47,7 +47,7 @@ impl ISoftwareBitmapNativeFactory { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(std::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromMF2DBuffer2)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::ptr::null())), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs index 929edf56db..1978f17bef 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Media/mod.rs @@ -96,7 +96,7 @@ impl IVideoFrameNativeFactory { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(std::ptr::null())), device.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).CreateFromMFSample)(windows_core::Interface::as_raw(self), data.param().abi(), subtype, width, height, forcereadonly.param().abi(), core::mem::transmute(mindisplayaperture.unwrap_or(core::ptr::null())), device.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/impl.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/impl.rs index 371b745bdf..cd81d58749 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/impl.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/impl.rs @@ -1557,7 +1557,7 @@ impl IRoMetaDataLocator_Vtbl { } } #[doc(hidden)] -struct IRoMetaDataLocator_ImplVtbl(std::marker::PhantomData); +struct IRoMetaDataLocator_ImplVtbl(core::marker::PhantomData); impl IRoMetaDataLocator_ImplVtbl { const VTABLE: IRoMetaDataLocator_Vtbl = IRoMetaDataLocator_Vtbl::new::(); } @@ -1647,7 +1647,7 @@ impl IRoSimpleMetaDataBuilder_Vtbl { } } #[doc(hidden)] -struct IRoSimpleMetaDataBuilder_ImplVtbl(std::marker::PhantomData); +struct IRoSimpleMetaDataBuilder_ImplVtbl(core::marker::PhantomData); impl IRoSimpleMetaDataBuilder_ImplVtbl { const VTABLE: IRoSimpleMetaDataBuilder_Vtbl = IRoSimpleMetaDataBuilder_Vtbl::new::(); } diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs index 66ba99b4fd..f3cf9b31c2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Metadata/mod.rs @@ -31,7 +31,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-ro-typeresolution-l1-1-0.dll" "system" fn RoGetMetaDataFile(name : core::mem::MaybeUninit < windows_core::HSTRING >, metadatadispenser : * mut core::ffi::c_void, metadatafilepath : *mut core::mem::MaybeUninit < windows_core::HSTRING >, metadataimport : *mut * mut core::ffi::c_void, typedeftoken : *mut u32) -> windows_core::HRESULT); - RoGetMetaDataFile(core::mem::transmute_copy(name), metadatadispenser.param().abi(), core::mem::transmute(metadatafilepath.unwrap_or(std::ptr::null_mut())), core::mem::transmute(metadataimport.unwrap_or(std::ptr::null_mut())), core::mem::transmute(typedeftoken.unwrap_or(std::ptr::null_mut()))).ok() + RoGetMetaDataFile(core::mem::transmute_copy(name), metadatadispenser.param().abi(), core::mem::transmute(metadatafilepath.unwrap_or(core::ptr::null_mut())), core::mem::transmute(metadataimport.unwrap_or(core::ptr::null_mut())), core::mem::transmute(typedeftoken.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RoGetParameterizedTypeInstanceIID(nameelements: &[windows_core::PCWSTR], metadatalocator: P0, iid: *mut windows_core::GUID, pextra: Option<*mut ROPARAMIIDHANDLE>) -> windows_core::Result<()> @@ -39,7 +39,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-winrt-roparameterizediid-l1-1-0.dll" "system" fn RoGetParameterizedTypeInstanceIID(nameelementcount : u32, nameelements : *const windows_core::PCWSTR, metadatalocator : * mut core::ffi::c_void, iid : *mut windows_core::GUID, pextra : *mut ROPARAMIIDHANDLE) -> windows_core::HRESULT); - RoGetParameterizedTypeInstanceIID(nameelements.len().try_into().unwrap(), core::mem::transmute(nameelements.as_ptr()), metadatalocator.param().abi(), iid, core::mem::transmute(pextra.unwrap_or(std::ptr::null_mut()))).ok() + RoGetParameterizedTypeInstanceIID(nameelements.len().try_into().unwrap(), core::mem::transmute(nameelements.as_ptr()), metadatalocator.param().abi(), iid, core::mem::transmute(pextra.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RoIsApiContractMajorVersionPresent(name: P0, majorversion: u16) -> windows_core::Result @@ -80,10 +80,10 @@ pub unsafe fn RoResolveNamespace(name: &windows_core::HSTRING, windowsmetadatadi core::mem::transmute_copy(windowsmetadatadir), packagegraphdirs.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(packagegraphdirs.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), - core::mem::transmute(metadatafilepathscount.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(metadatafilepaths.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(subnamespacescount.unwrap_or(std::ptr::null_mut())), - core::mem::transmute(subnamespaces.unwrap_or(std::ptr::null_mut())), + core::mem::transmute(metadatafilepathscount.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(metadatafilepaths.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(subnamespacescount.unwrap_or(core::ptr::null_mut())), + core::mem::transmute(subnamespaces.unwrap_or(core::ptr::null_mut())), ) .ok() } @@ -103,7 +103,7 @@ impl ICeeGen { (windows_core::Interface::vtable(self).EmitString)(windows_core::Interface::as_raw(self), lpstring.param().abi(), rva).ok() } pub unsafe fn GetString(&self, rva: u32, lpstring: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(lpstring.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetString)(windows_core::Interface::as_raw(self), rva, core::mem::transmute(lpstring.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AllocateMethodBuffer(&self, cchbuffer: u32, lpbuffer: *mut *mut u8, rva: *mut u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AllocateMethodBuffer)(windows_core::Interface::as_raw(self), cchbuffer, lpbuffer, rva).ok() @@ -1402,7 +1402,7 @@ impl IRoSimpleMetaDataBuilder { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetInterfaceGroupSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), core::mem::transmute(defaultinterfaceiid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetInterfaceGroupSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), core::mem::transmute(defaultinterfaceiid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetInterfaceGroupParameterizedDefault(&self, name: P0, defaultinterfacenameelements: &[windows_core::PCWSTR]) -> windows_core::Result<()> where @@ -1415,7 +1415,7 @@ impl IRoSimpleMetaDataBuilder { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetRuntimeClassSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), core::mem::transmute(defaultinterfaceiid.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetRuntimeClassSimpleDefault)(windows_core::Interface::as_raw(self), name.param().abi(), defaultinterfacename.param().abi(), core::mem::transmute(defaultinterfaceiid.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetRuntimeClassParameterizedDefault(&self, name: P0, defaultinterfacenameelements: &[windows_core::PCWSTR]) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs index 582eac26bc..1e9e3b64e2 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/Pdf/mod.rs @@ -23,7 +23,7 @@ impl IPdfRendererNative { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderPageToSurface)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), psurface.param().abi(), core::mem::transmute(offset), core::mem::transmute(prenderparams.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RenderPageToSurface)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), psurface.param().abi(), core::mem::transmute(offset), core::mem::transmute(prenderparams.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Direct2D_Common")] pub unsafe fn RenderPageToDeviceContext(&self, pdfpage: P0, pd2ddevicecontext: P1, prenderparams: Option<*const PDF_RENDER_PARAMS>) -> windows_core::Result<()> @@ -31,7 +31,7 @@ impl IPdfRendererNative { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).RenderPageToDeviceContext)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), pd2ddevicecontext.param().abi(), core::mem::transmute(prenderparams.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).RenderPageToDeviceContext)(windows_core::Interface::as_raw(self), pdfpage.param().abi(), pd2ddevicecontext.param().abi(), core::mem::transmute(prenderparams.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] diff --git a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs index 9be45827cc..432b6077de 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WinRT/mod.rs @@ -219,13 +219,13 @@ pub unsafe fn RoInitialize(inittype: RO_INIT_TYPE) -> windows_core::Result<()> { #[inline] pub unsafe fn RoInspectCapturedStackBackTrace(targeterrorinfoaddress: usize, machine: u16, readmemorycallback: PINSPECT_MEMORY_CALLBACK, context: Option<*const core::ffi::c_void>, framecount: *mut u32, targetbacktraceaddress: *mut usize) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-error-l1-1-1.dll" "system" fn RoInspectCapturedStackBackTrace(targeterrorinfoaddress : usize, machine : u16, readmemorycallback : PINSPECT_MEMORY_CALLBACK, context : *const core::ffi::c_void, framecount : *mut u32, targetbacktraceaddress : *mut usize) -> windows_core::HRESULT); - RoInspectCapturedStackBackTrace(targeterrorinfoaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(std::ptr::null())), framecount, targetbacktraceaddress).ok() + RoInspectCapturedStackBackTrace(targeterrorinfoaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(core::ptr::null())), framecount, targetbacktraceaddress).ok() } #[inline] pub unsafe fn RoInspectThreadErrorInfo(targettebaddress: usize, machine: u16, readmemorycallback: PINSPECT_MEMORY_CALLBACK, context: Option<*const core::ffi::c_void>) -> windows_core::Result { windows_targets::link!("api-ms-win-core-winrt-error-l1-1-1.dll" "system" fn RoInspectThreadErrorInfo(targettebaddress : usize, machine : u16, readmemorycallback : PINSPECT_MEMORY_CALLBACK, context : *const core::ffi::c_void, targeterrorinfoaddress : *mut usize) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - RoInspectThreadErrorInfo(targettebaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + RoInspectThreadErrorInfo(targettebaddress, machine, readmemorycallback, core::mem::transmute(context.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn RoOriginateError(error: windows_core::HRESULT, message: &windows_core::HSTRING) -> super::super::Foundation::BOOL { @@ -382,17 +382,17 @@ pub unsafe fn WindowsGetStringLen(string: &windows_core::HSTRING) -> u32 { #[inline] pub unsafe fn WindowsGetStringRawBuffer(string: &windows_core::HSTRING, length: Option<*mut u32>) -> windows_core::PCWSTR { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsGetStringRawBuffer(string : core::mem::MaybeUninit < windows_core::HSTRING >, length : *mut u32) -> windows_core::PCWSTR); - WindowsGetStringRawBuffer(core::mem::transmute_copy(string), core::mem::transmute(length.unwrap_or(std::ptr::null_mut()))) + WindowsGetStringRawBuffer(core::mem::transmute_copy(string), core::mem::transmute(length.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WindowsInspectString(targethstring: usize, machine: u16, callback: PINSPECT_HSTRING_CALLBACK, context: Option<*const core::ffi::c_void>, length: *mut u32, targetstringaddress: *mut usize) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-0.dll" "system" fn WindowsInspectString(targethstring : usize, machine : u16, callback : PINSPECT_HSTRING_CALLBACK, context : *const core::ffi::c_void, length : *mut u32, targetstringaddress : *mut usize) -> windows_core::HRESULT); - WindowsInspectString(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), length, targetstringaddress).ok() + WindowsInspectString(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), length, targetstringaddress).ok() } #[inline] pub unsafe fn WindowsInspectString2(targethstring: u64, machine: u16, callback: PINSPECT_HSTRING_CALLBACK2, context: Option<*const core::ffi::c_void>, length: *mut u32, targetstringaddress: *mut u64) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-winrt-string-l1-1-1.dll" "system" fn WindowsInspectString2(targethstring : u64, machine : u16, callback : PINSPECT_HSTRING_CALLBACK2, context : *const core::ffi::c_void, length : *mut u32, targetstringaddress : *mut u64) -> windows_core::HRESULT); - WindowsInspectString2(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(std::ptr::null())), length, targetstringaddress).ok() + WindowsInspectString2(targethstring, machine, callback, core::mem::transmute(context.unwrap_or(core::ptr::null())), length, targetstringaddress).ok() } #[inline] pub unsafe fn WindowsIsStringEmpty(string: &windows_core::HSTRING) -> super::super::Foundation::BOOL { 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 1e71259ad9..80ce76ece9 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsProgramming/mod.rs @@ -66,12 +66,12 @@ pub unsafe fn CloseINFEngine(hinf: *mut core::ffi::c_void) -> windows_core::Resu #[inline] pub unsafe fn ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue: u64, lpperformancecountervalue: *mut u64, lpconversionerror: Option<*mut u64>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-realtime-l1-1-2.dll" "system" fn ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue : u64, lpperformancecountervalue : *mut u64, lpconversionerror : *mut u64) -> windows_core::HRESULT); - ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue, lpperformancecountervalue, core::mem::transmute(lpconversionerror.unwrap_or(std::ptr::null_mut()))).ok() + ConvertAuxiliaryCounterToPerformanceCounter(ullauxiliarycountervalue, lpperformancecountervalue, core::mem::transmute(lpconversionerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue: u64, lpauxiliarycountervalue: *mut u64, lpconversionerror: Option<*mut u64>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-realtime-l1-1-2.dll" "system" fn ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue : u64, lpauxiliarycountervalue : *mut u64, lpconversionerror : *mut u64) -> windows_core::HRESULT); - ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue, lpauxiliarycountervalue, core::mem::transmute(lpconversionerror.unwrap_or(std::ptr::null_mut()))).ok() + ConvertPerformanceCounterToAuxiliaryCounter(ullperformancecountervalue, lpauxiliarycountervalue, core::mem::transmute(lpconversionerror.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn DCIBeginAccess(pdci: *mut DCISURFACEINFO, x: i32, y: i32, dx: i32, dy: i32) -> i32 { @@ -362,7 +362,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFirmwareEnvironmentVariableA(lpname : windows_core::PCSTR, lpguid : windows_core::PCSTR, pbuffer : *mut core::ffi::c_void, nsize : u32) -> u32); - GetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), nsize) + GetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), nsize) } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableExA(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32, pdwattribubutes: Option<*mut u32>) -> u32 @@ -371,7 +371,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFirmwareEnvironmentVariableExA(lpname : windows_core::PCSTR, lpguid : windows_core::PCSTR, pbuffer : *mut core::ffi::c_void, nsize : u32, pdwattribubutes : *mut u32) -> u32); - GetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(std::ptr::null_mut()))) + GetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32, pdwattribubutes: Option<*mut u32>) -> u32 @@ -380,7 +380,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFirmwareEnvironmentVariableExW(lpname : windows_core::PCWSTR, lpguid : windows_core::PCWSTR, pbuffer : *mut core::ffi::c_void, nsize : u32, pdwattribubutes : *mut u32) -> u32); - GetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(std::ptr::null_mut()))) + GetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), nsize, core::mem::transmute(pdwattribubutes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pbuffer: Option<*mut core::ffi::c_void>, nsize: u32) -> u32 @@ -389,7 +389,7 @@ where P1: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetFirmwareEnvironmentVariableW(lpname : windows_core::PCWSTR, lpguid : windows_core::PCWSTR, pbuffer : *mut core::ffi::c_void, nsize : u32) -> u32); - GetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), nsize) + GetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), nsize) } #[inline] pub unsafe fn GetPrivateProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32, lpfilename: P2) -> u32 @@ -475,7 +475,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileStructA(lpszsection : windows_core::PCSTR, lpszkey : windows_core::PCSTR, lpstruct : *mut core::ffi::c_void, usizestruct : u32, szfile : windows_core::PCSTR) -> super::super::Foundation:: BOOL); - GetPrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(std::ptr::null_mut())), usizestruct, szfile.param().abi()) + GetPrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::ptr::null_mut())), usizestruct, szfile.param().abi()) } #[inline] pub unsafe fn GetPrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: Option<*mut core::ffi::c_void>, usizestruct: u32, szfile: P2) -> super::super::Foundation::BOOL @@ -485,7 +485,7 @@ where P2: windows_core::Param, { windows_targets::link!("kernel32.dll" "system" fn GetPrivateProfileStructW(lpszsection : windows_core::PCWSTR, lpszkey : windows_core::PCWSTR, lpstruct : *mut core::ffi::c_void, usizestruct : u32, szfile : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - GetPrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(std::ptr::null_mut())), usizestruct, szfile.param().abi()) + GetPrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::ptr::null_mut())), usizestruct, szfile.param().abi()) } #[inline] pub unsafe fn GetProfileIntA(lpappname: P0, lpkeyname: P1, ndefault: i32) -> u32 @@ -544,7 +544,7 @@ where #[inline] pub unsafe fn GetSystemRegistryQuota(pdwquotaallowed: Option<*mut u32>, pdwquotaused: 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()))).ok() + GetSystemRegistryQuota(core::mem::transmute(pdwquotaallowed.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwquotaused.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(any(target_arch = "arm64ec", target_arch = "x86", target_arch = "x86_64"))] #[inline] @@ -697,12 +697,12 @@ where #[inline] pub unsafe fn IsBadHugeReadPtr(lp: Option<*const core::ffi::c_void>, ucb: usize) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn IsBadHugeReadPtr(lp : *const core::ffi::c_void, ucb : usize) -> super::super::Foundation:: BOOL); - IsBadHugeReadPtr(core::mem::transmute(lp.unwrap_or(std::ptr::null())), ucb) + IsBadHugeReadPtr(core::mem::transmute(lp.unwrap_or(core::ptr::null())), ucb) } #[inline] pub unsafe fn IsBadHugeWritePtr(lp: Option<*const core::ffi::c_void>, ucb: usize) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn IsBadHugeWritePtr(lp : *const core::ffi::c_void, ucb : usize) -> super::super::Foundation:: BOOL); - IsBadHugeWritePtr(core::mem::transmute(lp.unwrap_or(std::ptr::null())), ucb) + IsBadHugeWritePtr(core::mem::transmute(lp.unwrap_or(core::ptr::null())), ucb) } #[inline] pub unsafe fn IsNTAdmin(dwreserved: u32, lpdwreserved: *mut u32) -> super::super::Foundation::BOOL { @@ -814,12 +814,12 @@ pub unsafe fn QueryAuxiliaryCounterFrequency() -> windows_core::Result { #[inline] pub unsafe fn QueryIdleProcessorCycleTime(bufferlength: *mut u32, processoridlecycletime: 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()))).ok() + QueryIdleProcessorCycleTime(bufferlength, core::mem::transmute(processoridlecycletime.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn QueryIdleProcessorCycleTimeEx(group: u16, bufferlength: *mut u32, processoridlecycletime: Option<*mut u64>) -> super::super::Foundation::BOOL { windows_targets::link!("kernel32.dll" "system" fn QueryIdleProcessorCycleTimeEx(group : u16, bufferlength : *mut u32, processoridlecycletime : *mut u64) -> super::super::Foundation:: BOOL); - QueryIdleProcessorCycleTimeEx(group, bufferlength, core::mem::transmute(processoridlecycletime.unwrap_or(std::ptr::null_mut()))) + QueryIdleProcessorCycleTimeEx(group, bufferlength, core::mem::transmute(processoridlecycletime.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn QueryInterruptTime() -> u64 { @@ -1191,7 +1191,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(std::ptr::null())), nsize).ok() + SetFirmwareEnvironmentVariableA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::ptr::null())), nsize).ok() } #[inline] pub unsafe fn SetFirmwareEnvironmentVariableExA(lpname: P0, lpguid: P1, pvalue: Option<*const core::ffi::c_void>, nsize: u32, dwattributes: u32) -> windows_core::Result<()> @@ -1200,7 +1200,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(std::ptr::null())), nsize, dwattributes).ok() + SetFirmwareEnvironmentVariableExA(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::ptr::null())), nsize, dwattributes).ok() } #[inline] pub unsafe fn SetFirmwareEnvironmentVariableExW(lpname: P0, lpguid: P1, pvalue: Option<*const core::ffi::c_void>, nsize: u32, dwattributes: u32) -> windows_core::Result<()> @@ -1209,7 +1209,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(std::ptr::null())), nsize, dwattributes).ok() + SetFirmwareEnvironmentVariableExW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::ptr::null())), nsize, dwattributes).ok() } #[inline] pub unsafe fn SetFirmwareEnvironmentVariableW(lpname: P0, lpguid: P1, pvalue: Option<*const core::ffi::c_void>, nsize: u32) -> windows_core::Result<()> @@ -1218,7 +1218,7 @@ where P1: windows_core::Param, { 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.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(std::ptr::null())), nsize).ok() + SetFirmwareEnvironmentVariableW(lpname.param().abi(), lpguid.param().abi(), core::mem::transmute(pvalue.unwrap_or(core::ptr::null())), nsize).ok() } #[inline] pub unsafe fn SetHandleCount(unumber: u32) -> u32 { @@ -1246,7 +1246,7 @@ pub unsafe fn SetPerUserSecValuesW(pperuser: *mut PERUSERSECTIONW) -> windows_co #[inline] pub unsafe fn SubscribeFeatureStateChangeNotification(subscription: *mut FEATURE_STATE_CHANGE_SUBSCRIPTION, callback: PFEATURE_STATE_CHANGE_CALLBACK, context: Option<*const core::ffi::c_void>) { windows_targets::link!("api-ms-win-core-featurestaging-l1-1-0.dll" "system" fn SubscribeFeatureStateChangeNotification(subscription : *mut FEATURE_STATE_CHANGE_SUBSCRIPTION, callback : PFEATURE_STATE_CHANGE_CALLBACK, context : *const core::ffi::c_void)); - SubscribeFeatureStateChangeNotification(subscription, callback, core::mem::transmute(context.unwrap_or(std::ptr::null()))) + SubscribeFeatureStateChangeNotification(subscription, callback, core::mem::transmute(context.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TranslateInfStringA(pszinffilename: P0, pszinstallsection: P1, psztranslatesection: P2, psztranslatekey: P3, pszbuffer: Option<&mut [u8]>, pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1257,7 +1257,7 @@ where P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn TranslateInfStringA(pszinffilename : windows_core::PCSTR, pszinstallsection : windows_core::PCSTR, psztranslatesection : windows_core::PCSTR, psztranslatekey : windows_core::PCSTR, pszbuffer : windows_core::PSTR, cchbuffer : u32, pdwrequiredsize : *mut u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - TranslateInfStringA(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + TranslateInfStringA(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringExA(hinf: *mut core::ffi::c_void, pszinffilename: P0, psztranslatesection: P1, psztranslatekey: P2, pszbuffer: &mut [u8], pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1267,7 +1267,7 @@ where P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn TranslateInfStringExA(hinf : *mut core::ffi::c_void, pszinffilename : windows_core::PCSTR, psztranslatesection : windows_core::PCSTR, psztranslatekey : windows_core::PCSTR, pszbuffer : windows_core::PSTR, dwbuffersize : u32, pdwrequiredsize : *mut u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - TranslateInfStringExA(hinf, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + TranslateInfStringExA(hinf, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringExW(hinf: *mut core::ffi::c_void, pszinffilename: P0, psztranslatesection: P1, psztranslatekey: P2, pszbuffer: &mut [u16], pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1277,7 +1277,7 @@ where P2: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn TranslateInfStringExW(hinf : *mut core::ffi::c_void, pszinffilename : windows_core::PCWSTR, psztranslatesection : windows_core::PCWSTR, psztranslatekey : windows_core::PCWSTR, pszbuffer : windows_core::PWSTR, dwbuffersize : u32, pdwrequiredsize : *mut u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - TranslateInfStringExW(hinf, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + TranslateInfStringExW(hinf, pszinffilename.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_ptr()), pszbuffer.len().try_into().unwrap(), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn TranslateInfStringW(pszinffilename: P0, pszinstallsection: P1, psztranslatesection: P2, psztranslatekey: P3, pszbuffer: Option<&mut [u16]>, pdwrequiredsize: *mut u32, pvreserved: Option<*const core::ffi::c_void>) -> windows_core::Result<()> @@ -1288,7 +1288,7 @@ where P3: windows_core::Param, { windows_targets::link!("advpack.dll" "system" fn TranslateInfStringW(pszinffilename : windows_core::PCWSTR, pszinstallsection : windows_core::PCWSTR, psztranslatesection : windows_core::PCWSTR, psztranslatekey : windows_core::PCWSTR, pszbuffer : windows_core::PWSTR, cchbuffer : u32, pdwrequiredsize : *mut u32, pvreserved : *const core::ffi::c_void) -> windows_core::HRESULT); - TranslateInfStringW(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + TranslateInfStringW(pszinffilename.param().abi(), pszinstallsection.param().abi(), psztranslatesection.param().abi(), psztranslatekey.param().abi(), core::mem::transmute(pszbuffer.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszbuffer.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), pdwrequiredsize, core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn UnsubscribeFeatureStateChangeNotification(subscription: P0) @@ -1438,7 +1438,7 @@ where #[inline] pub unsafe fn WldpGetLockdownPolicy(hostinformation: Option<*const WLDP_HOST_INFORMATION>, lockdownstate: *mut u32, lockdownflags: u32) -> windows_core::Result<()> { windows_targets::link!("wldp.dll" "system" fn WldpGetLockdownPolicy(hostinformation : *const WLDP_HOST_INFORMATION, lockdownstate : *mut u32, lockdownflags : u32) -> windows_core::HRESULT); - WldpGetLockdownPolicy(core::mem::transmute(hostinformation.unwrap_or(std::ptr::null())), lockdownstate, lockdownflags).ok() + WldpGetLockdownPolicy(core::mem::transmute(hostinformation.unwrap_or(core::ptr::null())), lockdownstate, lockdownflags).ok() } #[inline] pub unsafe fn WldpIsClassInApprovedList(classid: *const windows_core::GUID, hostinformation: *const WLDP_HOST_INFORMATION, isapproved: *mut super::super::Foundation::BOOL, optionalflags: u32) -> windows_core::Result<()> { @@ -1462,7 +1462,7 @@ where P0: windows_core::Param, { windows_targets::link!("wldp.dll" "system" fn WldpQueryDynamicCodeTrust(filehandle : super::super::Foundation:: HANDLE, baseimage : *const core::ffi::c_void, imagesize : u32) -> windows_core::HRESULT); - WldpQueryDynamicCodeTrust(filehandle.param().abi(), core::mem::transmute(baseimage.unwrap_or(std::ptr::null())), imagesize).ok() + WldpQueryDynamicCodeTrust(filehandle.param().abi(), core::mem::transmute(baseimage.unwrap_or(core::ptr::null())), imagesize).ok() } #[inline] pub unsafe fn WldpSetDynamicCodeTrust(filehandle: P0) -> windows_core::Result<()> @@ -1522,7 +1522,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(std::ptr::null())), usizestruct, szfile.param().abi()).ok() + WritePrivateProfileStructA(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::ptr::null())), usizestruct, szfile.param().abi()).ok() } #[inline] pub unsafe fn WritePrivateProfileStructW(lpszsection: P0, lpszkey: P1, lpstruct: Option<*const core::ffi::c_void>, usizestruct: u32, szfile: P2) -> windows_core::Result<()> @@ -1532,7 +1532,7 @@ where P2: windows_core::Param, { 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.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(std::ptr::null())), usizestruct, szfile.param().abi()).ok() + WritePrivateProfileStructW(lpszsection.param().abi(), lpszkey.param().abi(), core::mem::transmute(lpstruct.unwrap_or(core::ptr::null())), usizestruct, szfile.param().abi()).ok() } #[inline] pub unsafe fn WriteProfileSectionA(lpappname: P0, lpstring: P1) -> windows_core::Result<()> @@ -1698,7 +1698,7 @@ impl ICameraUIControl { (windows_core::Interface::vtable(self).GetCurrentViewType)(windows_core::Interface::as_raw(self), &mut result__).map(|| result__) } pub unsafe fn GetActiveItem(&self, pbstractiveitempath: Option<*mut windows_core::BSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetActiveItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstractiveitempath.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetActiveItem)(windows_core::Interface::as_raw(self), core::mem::transmute(pbstractiveitempath.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetSelectedItems(&self) -> windows_core::Result<*mut super::Com::SAFEARRAY> { diff --git a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs index 122e343e45..0f457c1399 100644 --- a/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/WindowsSync/mod.rs @@ -2451,7 +2451,7 @@ impl ISyncProviderRegistration { } pub unsafe fn EnumerateSyncProviderConfigUIs(&self, pguidcontenttype: Option<*const windows_core::GUID>, dwsupportedarchitecture: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumerateSyncProviderConfigUIs)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidcontenttype.unwrap_or(std::ptr::null())), dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateSyncProviderConfigUIs)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidcontenttype.unwrap_or(core::ptr::null())), dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn CreateSyncProviderRegistrationInstance(&self, pproviderconfiguration: *const SyncProviderConfiguration) -> windows_core::Result { @@ -2468,7 +2468,7 @@ impl ISyncProviderRegistration { } pub unsafe fn EnumerateSyncProviders(&self, pguidcontenttype: Option<*const windows_core::GUID>, dwstateflagstofiltermask: u32, dwstateflagstofilter: u32, refproviderclsid: *const windows_core::GUID, dwsupportedarchitecture: u32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).EnumerateSyncProviders)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidcontenttype.unwrap_or(std::ptr::null())), dwstateflagstofiltermask, dwstateflagstofilter, refproviderclsid, dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).EnumerateSyncProviders)(windows_core::Interface::as_raw(self), core::mem::transmute(pguidcontenttype.unwrap_or(core::ptr::null())), dwstateflagstofiltermask, dwstateflagstofilter, refproviderclsid, dwsupportedarchitecture, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetSyncProviderInfo(&self, pguidinstanceid: *const windows_core::GUID) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs index bfb063a0a8..8e777d8a82 100644 --- a/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/System/Wmi/mod.rs @@ -1,7 +1,7 @@ #[inline] pub unsafe fn MI_Application_InitializeV1(flags: u32, applicationid: Option<*const u16>, extendederror: Option<*mut *mut MI_Instance>, application: *mut MI_Application) -> MI_Result { windows_targets::link!("mi.dll" "cdecl" fn MI_Application_InitializeV1(flags : u32, applicationid : *const u16, extendederror : *mut *mut MI_Instance, application : *mut MI_Application) -> MI_Result); - MI_Application_InitializeV1(flags, core::mem::transmute(applicationid.unwrap_or(std::ptr::null())), core::mem::transmute(extendederror.unwrap_or(std::ptr::null_mut())), application) + MI_Application_InitializeV1(flags, core::mem::transmute(applicationid.unwrap_or(core::ptr::null())), core::mem::transmute(extendederror.unwrap_or(core::ptr::null_mut())), application) } windows_core::imp::define_interface!(IEnumWbemClassObject, IEnumWbemClassObject_Vtbl, 0x027947e1_d731_11ce_a357_000000000001); impl core::ops::Deref for IEnumWbemClassObject { @@ -2410,7 +2410,7 @@ impl IWbemClassObject { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), core::mem::transmute(ptype.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plflavor.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Get)(windows_core::Interface::as_raw(self), wszname.param().abi(), lflags, core::mem::transmute(pval), core::mem::transmute(ptype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plflavor.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Put(&self, wszname: P0, lflags: i32, pval: *const super::Variant::VARIANT, r#type: i32) -> windows_core::Result<()> @@ -3851,7 +3851,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), strnamespace.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppworkingnamespace.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).OpenNamespace)(windows_core::Interface::as_raw(self), strnamespace.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppworkingnamespace.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn CancelAsyncCall(&self, psink: P0) -> windows_core::Result<()> where @@ -3868,7 +3868,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppobject.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetObject)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppobject.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetObjectAsync(&self, strobjectpath: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P1, presponsehandler: P2) -> windows_core::Result<()> where @@ -3883,7 +3883,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutClass)(windows_core::Interface::as_raw(self), pobject.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn PutClassAsync(&self, pobject: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P1, presponsehandler: P2) -> windows_core::Result<()> where @@ -3898,7 +3898,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), strclass.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeleteClass)(windows_core::Interface::as_raw(self), strclass.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DeleteClassAsync(&self, strclass: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P1, presponsehandler: P2) -> windows_core::Result<()> where @@ -3929,7 +3929,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).PutInstance)(windows_core::Interface::as_raw(self), pinst.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn PutInstanceAsync(&self, pinst: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P1, presponsehandler: P2) -> windows_core::Result<()> where @@ -3944,7 +3944,7 @@ impl IWbemServices { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).DeleteInstance)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), lflags, pctx.param().abi(), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn DeleteInstanceAsync(&self, strobjectpath: P0, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P1, presponsehandler: P2) -> windows_core::Result<()> where @@ -4013,7 +4013,7 @@ impl IWbemServices { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), strmethodname.param().abi(), lflags, pctx.param().abi(), pinparams.param().abi(), core::mem::transmute(ppoutparams.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppcallresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ExecMethod)(windows_core::Interface::as_raw(self), strobjectpath.param().abi(), strmethodname.param().abi(), lflags, pctx.param().abi(), pinparams.param().abi(), core::mem::transmute(ppoutparams.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppcallresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn ExecMethodAsync(&self, strobjectpath: P0, strmethodname: P1, lflags: WBEM_GENERIC_FLAG_TYPE, pctx: P2, pinparams: P3, presponsehandler: P4) -> windows_core::Result<()> where 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 9140ac2da8..9b47402928 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Accessibility/mod.rs @@ -965,7 +965,7 @@ where P0: windows_core::Param, { windows_targets::link!("oleacc.dll" "system" fn WindowFromAccessibleObject(param0 : * mut core::ffi::c_void, phwnd : *mut super::super::Foundation:: HWND) -> windows_core::HRESULT); - WindowFromAccessibleObject(param0.param().abi(), core::mem::transmute(phwnd.unwrap_or(std::ptr::null_mut()))).ok() + WindowFromAccessibleObject(param0.param().abi(), core::mem::transmute(phwnd.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn WindowPattern_Close(hobj: P0) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs index 7a9c9b256c..67a457ae3d 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Animation/mod.rs @@ -151,7 +151,7 @@ impl IUIAnimationManager { (windows_core::Interface::vtable(self).AbandonAllStoryboards)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Update(&self, timenow: f64, updateresult: Option<*mut UI_ANIMATION_UPDATE_RESULT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -275,7 +275,7 @@ impl IUIAnimationManager2 { (windows_core::Interface::vtable(self).AbandonAllStoryboards)(windows_core::Interface::as_raw(self)).ok() } pub unsafe fn Update(&self, timenow: f64, updateresult: Option<*mut UI_ANIMATION_UPDATE_RESULT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Update)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(updateresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetVariableFromTag(&self, object: P0, id: u32) -> windows_core::Result where @@ -537,7 +537,7 @@ impl IUIAnimationStoryboard { (windows_core::Interface::vtable(self).SetLongestAcceptableDelay)(windows_core::Interface::as_raw(self), delay).ok() } pub unsafe fn Schedule(&self, timenow: f64, schedulingresult: Option<*mut UI_ANIMATION_SCHEDULING_RESULT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() @@ -555,7 +555,7 @@ impl IUIAnimationStoryboard { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -662,7 +662,7 @@ impl IUIAnimationStoryboard2 { (windows_core::Interface::vtable(self).SetSkipDuration)(windows_core::Interface::as_raw(self), secondsduration).ok() } pub unsafe fn Schedule(&self, timenow: f64, schedulingresult: Option<*mut UI_ANIMATION_SCHEDULING_RESULT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Schedule)(windows_core::Interface::as_raw(self), timenow, core::mem::transmute(schedulingresult.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Conclude(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Conclude)(windows_core::Interface::as_raw(self)).ok() @@ -680,7 +680,7 @@ impl IUIAnimationStoryboard2 { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetStatus(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -1255,7 +1255,7 @@ impl IUIAnimationVariable { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetVariableChangeHandler(&self, handler: P0) -> windows_core::Result<()> where @@ -1380,7 +1380,7 @@ impl IUIAnimationVariable2 { (windows_core::Interface::vtable(self).SetTag)(windows_core::Interface::as_raw(self), object.param().abi(), id).ok() } pub unsafe fn GetTag(&self, object: Option<*mut Option>, id: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(std::ptr::null_mut())), core::mem::transmute(id.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTag)(windows_core::Interface::as_raw(self), core::mem::transmute(object.unwrap_or(core::ptr::null_mut())), core::mem::transmute(id.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetVariableChangeHandler(&self, handler: P0, fregisterfornextanimationevent: P1) -> windows_core::Result<()> where diff --git a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs index 2c27ba8524..842f4268c0 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/ColorSystem/mod.rs @@ -325,7 +325,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn EnumColorProfilesA(pmachinename : windows_core::PCSTR, penumrecord : *const ENUMTYPEA, penumerationbuffer : *mut u8, pdwsizeofenumerationbuffer : *mut u32, pnprofiles : *mut u32) -> super::super::Foundation:: BOOL); - EnumColorProfilesA(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(std::ptr::null_mut())), pdwsizeofenumerationbuffer, core::mem::transmute(pnprofiles.unwrap_or(std::ptr::null_mut()))) + EnumColorProfilesA(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(core::ptr::null_mut())), pdwsizeofenumerationbuffer, core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn EnumColorProfilesW(pmachinename: P0, penumrecord: *const ENUMTYPEW, penumerationbuffer: Option<*mut u8>, pdwsizeofenumerationbuffer: *mut u32, pnprofiles: Option<*mut u32>) -> super::super::Foundation::BOOL @@ -333,7 +333,7 @@ where P0: windows_core::Param, { windows_targets::link!("mscms.dll" "system" fn EnumColorProfilesW(pmachinename : windows_core::PCWSTR, penumrecord : *const ENUMTYPEW, penumerationbuffer : *mut u8, pdwsizeofenumerationbuffer : *mut u32, pnprofiles : *mut u32) -> super::super::Foundation:: BOOL); - EnumColorProfilesW(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(std::ptr::null_mut())), pdwsizeofenumerationbuffer, core::mem::transmute(pnprofiles.unwrap_or(std::ptr::null_mut()))) + EnumColorProfilesW(pmachinename.param().abi(), penumrecord, core::mem::transmute(penumerationbuffer.unwrap_or(core::ptr::null_mut())), pdwsizeofenumerationbuffer, core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -379,7 +379,7 @@ where #[inline] pub unsafe fn GetColorProfileElement(hprofile: isize, tag: u32, dwoffset: u32, pcbelement: *mut u32, pelement: Option<*mut core::ffi::c_void>, pbreference: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetColorProfileElement(hprofile : isize, tag : u32, dwoffset : u32, pcbelement : *mut u32, pelement : *mut core::ffi::c_void, pbreference : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetColorProfileElement(hprofile, tag, dwoffset, pcbelement, core::mem::transmute(pelement.unwrap_or(std::ptr::null_mut())), pbreference) + GetColorProfileElement(hprofile, tag, dwoffset, pcbelement, core::mem::transmute(pelement.unwrap_or(core::ptr::null_mut())), pbreference) } #[inline] pub unsafe fn GetColorProfileElementTag(hprofile: isize, dwindex: u32, ptag: *mut u32) -> super::super::Foundation::BOOL { @@ -389,7 +389,7 @@ pub unsafe fn GetColorProfileElementTag(hprofile: isize, dwindex: u32, ptag: *mu #[inline] pub unsafe fn GetColorProfileFromHandle(hprofile: isize, pprofile: Option<*mut u8>, pcbprofile: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetColorProfileFromHandle(hprofile : isize, pprofile : *mut u8, pcbprofile : *mut u32) -> super::super::Foundation:: BOOL); - GetColorProfileFromHandle(hprofile, core::mem::transmute(pprofile.unwrap_or(std::ptr::null_mut())), pcbprofile) + GetColorProfileFromHandle(hprofile, core::mem::transmute(pprofile.unwrap_or(core::ptr::null_mut())), pcbprofile) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -464,17 +464,17 @@ pub unsafe fn GetNamedProfileInfo(hprofile: isize, pnamedprofileinfo: *mut NAMED #[inline] pub unsafe fn GetPS2ColorRenderingDictionary(hprofile: isize, dwintent: u32, pps2colorrenderingdictionary: Option<*mut u8>, pcbps2colorrenderingdictionary: *mut u32, pbbinary: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetPS2ColorRenderingDictionary(hprofile : isize, dwintent : u32, pps2colorrenderingdictionary : *mut u8, pcbps2colorrenderingdictionary : *mut u32, pbbinary : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetPS2ColorRenderingDictionary(hprofile, dwintent, core::mem::transmute(pps2colorrenderingdictionary.unwrap_or(std::ptr::null_mut())), pcbps2colorrenderingdictionary, pbbinary) + GetPS2ColorRenderingDictionary(hprofile, dwintent, core::mem::transmute(pps2colorrenderingdictionary.unwrap_or(core::ptr::null_mut())), pcbps2colorrenderingdictionary, pbbinary) } #[inline] pub unsafe fn GetPS2ColorRenderingIntent(hprofile: isize, dwintent: u32, pbuffer: Option<*mut u8>, pcbps2colorrenderingintent: *mut u32) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetPS2ColorRenderingIntent(hprofile : isize, dwintent : u32, pbuffer : *mut u8, pcbps2colorrenderingintent : *mut u32) -> super::super::Foundation:: BOOL); - GetPS2ColorRenderingIntent(hprofile, dwintent, core::mem::transmute(pbuffer.unwrap_or(std::ptr::null_mut())), pcbps2colorrenderingintent) + GetPS2ColorRenderingIntent(hprofile, dwintent, core::mem::transmute(pbuffer.unwrap_or(core::ptr::null_mut())), pcbps2colorrenderingintent) } #[inline] pub unsafe fn GetPS2ColorSpaceArray(hprofile: isize, dwintent: u32, dwcsatype: u32, pps2colorspacearray: Option<*mut u8>, pcbps2colorspacearray: *mut u32, pbbinary: *mut super::super::Foundation::BOOL) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn GetPS2ColorSpaceArray(hprofile : isize, dwintent : u32, dwcsatype : u32, pps2colorspacearray : *mut u8, pcbps2colorspacearray : *mut u32, pbbinary : *mut super::super::Foundation:: BOOL) -> super::super::Foundation:: BOOL); - GetPS2ColorSpaceArray(hprofile, dwintent, dwcsatype, core::mem::transmute(pps2colorspacearray.unwrap_or(std::ptr::null_mut())), pcbps2colorspacearray, pbbinary) + GetPS2ColorSpaceArray(hprofile, dwintent, dwcsatype, core::mem::transmute(pps2colorspacearray.unwrap_or(core::ptr::null_mut())), pcbps2colorspacearray, pbbinary) } #[inline] pub unsafe fn GetStandardColorSpaceProfileA(pmachinename: P0, dwscs: u32, pbuffer: windows_core::PSTR, pcbsize: *mut u32) -> super::super::Foundation::BOOL @@ -750,7 +750,7 @@ where #[inline] pub unsafe fn WcsEnumColorProfiles(scope: WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord: *const ENUMTYPEW, pbuffer: &mut [u8], pnprofiles: Option<*mut u32>) -> super::super::Foundation::BOOL { windows_targets::link!("mscms.dll" "system" fn WcsEnumColorProfiles(scope : WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord : *const ENUMTYPEW, pbuffer : *mut u8, dwsize : u32, pnprofiles : *mut u32) -> super::super::Foundation:: BOOL); - WcsEnumColorProfiles(scope, penumrecord, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pnprofiles.unwrap_or(std::ptr::null_mut()))) + WcsEnumColorProfiles(scope, penumrecord, core::mem::transmute(pbuffer.as_ptr()), pbuffer.len().try_into().unwrap(), core::mem::transmute(pnprofiles.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn WcsEnumColorProfilesSize(scope: WCS_PROFILE_MANAGEMENT_SCOPE, penumrecord: *const ENUMTYPEW, pdwsize: *mut u32) -> super::super::Foundation::BOOL { @@ -794,12 +794,12 @@ where #[inline] pub unsafe fn WcsOpenColorProfileA(pcdmpprofile: *const PROFILE, pcampprofile: Option<*const PROFILE>, pgmmpprofile: Option<*const PROFILE>, dwdesireaccess: u32, dwsharemode: u32, dwcreationmode: u32, dwflags: u32) -> isize { windows_targets::link!("mscms.dll" "system" fn WcsOpenColorProfileA(pcdmpprofile : *const PROFILE, pcampprofile : *const PROFILE, pgmmpprofile : *const PROFILE, dwdesireaccess : u32, dwsharemode : u32, dwcreationmode : u32, dwflags : u32) -> isize); - WcsOpenColorProfileA(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(std::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(std::ptr::null())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) + WcsOpenColorProfileA(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(core::ptr::null())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } #[inline] pub unsafe fn WcsOpenColorProfileW(pcdmpprofile: *const PROFILE, pcampprofile: Option<*const PROFILE>, pgmmpprofile: Option<*const PROFILE>, dwdesireaccess: u32, dwsharemode: u32, dwcreationmode: u32, dwflags: u32) -> isize { windows_targets::link!("mscms.dll" "system" fn WcsOpenColorProfileW(pcdmpprofile : *const PROFILE, pcampprofile : *const PROFILE, pgmmpprofile : *const PROFILE, dwdesireaccess : u32, dwsharemode : u32, dwcreationmode : u32, dwflags : u32) -> isize); - WcsOpenColorProfileW(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(std::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(std::ptr::null())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) + WcsOpenColorProfileW(pcdmpprofile, core::mem::transmute(pcampprofile.unwrap_or(core::ptr::null())), core::mem::transmute(pgmmpprofile.unwrap_or(core::ptr::null())), dwdesireaccess, dwsharemode, dwcreationmode, dwflags) } #[inline] pub unsafe fn WcsSetCalibrationManagementState(bisenabled: P0) -> super::super::Foundation::BOOL 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 54bf26d266..44e905ff9c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Controls/mod.rs @@ -10,7 +10,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn BeginBufferedAnimation(hwnd : super::super::Foundation:: HWND, hdctarget : super::super::Graphics::Gdi:: HDC, prctarget : *const super::super::Foundation:: RECT, dwformat : BP_BUFFERFORMAT, ppaintparams : *const BP_PAINTPARAMS, panimationparams : *const BP_ANIMATIONPARAMS, phdcfrom : *mut super::super::Graphics::Gdi:: HDC, phdcto : *mut super::super::Graphics::Gdi:: HDC) -> isize); - BeginBufferedAnimation(hwnd.param().abi(), hdctarget.param().abi(), prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(std::ptr::null())), panimationparams, phdcfrom, phdcto) + BeginBufferedAnimation(hwnd.param().abi(), hdctarget.param().abi(), prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(core::ptr::null())), panimationparams, phdcfrom, phdcto) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -19,7 +19,7 @@ where P0: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn BeginBufferedPaint(hdctarget : super::super::Graphics::Gdi:: HDC, prctarget : *const super::super::Foundation:: RECT, dwformat : BP_BUFFERFORMAT, ppaintparams : *const BP_PAINTPARAMS, phdc : *mut super::super::Graphics::Gdi:: HDC) -> isize); - BeginBufferedPaint(hdctarget.param().abi(), prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(std::ptr::null())), phdc) + BeginBufferedPaint(hdctarget.param().abi(), prctarget, dwformat, core::mem::transmute(ppaintparams.unwrap_or(core::ptr::null())), phdc) } #[inline] pub unsafe fn BeginPanningFeedback(hwnd: P0) -> super::super::Foundation::BOOL @@ -32,7 +32,7 @@ where #[inline] pub unsafe fn BufferedPaintClear(hbufferedpaint: isize, prc: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn BufferedPaintClear(hbufferedpaint : isize, prc : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - BufferedPaintClear(hbufferedpaint, core::mem::transmute(prc.unwrap_or(std::ptr::null()))).ok() + BufferedPaintClear(hbufferedpaint, core::mem::transmute(prc.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn BufferedPaintInit() -> windows_core::Result<()> { @@ -52,7 +52,7 @@ where #[inline] pub unsafe fn BufferedPaintSetAlpha(hbufferedpaint: isize, prc: Option<*const super::super::Foundation::RECT>, alpha: u8) -> windows_core::Result<()> { windows_targets::link!("uxtheme.dll" "system" fn BufferedPaintSetAlpha(hbufferedpaint : isize, prc : *const super::super::Foundation:: RECT, alpha : u8) -> windows_core::HRESULT); - BufferedPaintSetAlpha(hbufferedpaint, core::mem::transmute(prc.unwrap_or(std::ptr::null())), alpha).ok() + BufferedPaintSetAlpha(hbufferedpaint, core::mem::transmute(prc.unwrap_or(core::ptr::null())), alpha).ok() } #[inline] pub unsafe fn BufferedPaintStopAllAnimations(hwnd: P0) -> windows_core::Result<()> @@ -98,7 +98,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn CreateMappedBitmap(hinstance : super::super::Foundation:: HINSTANCE, idbitmap : isize, wflags : u32, lpcolormap : *const COLORMAP, inummaps : i32) -> super::super::Graphics::Gdi:: HBITMAP); - let result__ = CreateMappedBitmap(hinstance.param().abi(), idbitmap, wflags, core::mem::transmute(lpcolormap.unwrap_or(std::ptr::null())), inummaps); + let result__ = CreateMappedBitmap(hinstance.param().abi(), idbitmap, wflags, core::mem::transmute(lpcolormap.unwrap_or(core::ptr::null())), inummaps); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[cfg(all(feature = "Win32_Graphics_Gdi", feature = "Win32_UI_WindowsAndMessaging"))] @@ -212,7 +212,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_DestroyCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DPA_DestroyCallback(hdpa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))) + DPA_DestroyCallback(hdpa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DPA_EnumCallback(hdpa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) @@ -220,7 +220,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_EnumCallback(hdpa : HDPA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DPA_EnumCallback(hdpa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))) + DPA_EnumCallback(hdpa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DPA_GetPtr(hdpa: P0, i: isize) -> *mut core::ffi::c_void @@ -236,7 +236,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_GetPtrIndex(hdpa : HDPA, p : *const core::ffi::c_void) -> i32); - DPA_GetPtrIndex(hdpa.param().abi(), core::mem::transmute(p.unwrap_or(std::ptr::null()))) + DPA_GetPtrIndex(hdpa.param().abi(), core::mem::transmute(p.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DPA_GetSize(hdpa: P0) -> u64 @@ -260,7 +260,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_InsertPtr(hdpa : HDPA, i : i32, p : *const core::ffi::c_void) -> i32); - DPA_InsertPtr(hdpa.param().abi(), i, core::mem::transmute(p.unwrap_or(std::ptr::null()))) + DPA_InsertPtr(hdpa.param().abi(), i, core::mem::transmute(p.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -269,7 +269,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_LoadStream(phdpa : *mut HDPA, pfn : PFNDPASTREAM, pstream : * mut core::ffi::c_void, pvinstdata : *const core::ffi::c_void) -> windows_core::HRESULT); - DPA_LoadStream(phdpa, pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(std::ptr::null()))).ok() + DPA_LoadStream(phdpa, pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DPA_Merge(hdpadest: P0, hdpasrc: P1, dwflags: u32, pfncompare: PFNDACOMPARE, pfnmerge: PFNDPAMERGE, lparam: P2) -> super::super::Foundation::BOOL @@ -289,7 +289,7 @@ where P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_SaveStream(hdpa : HDPA, pfn : PFNDPASTREAM, pstream : * mut core::ffi::c_void, pvinstdata : *const core::ffi::c_void) -> windows_core::HRESULT); - DPA_SaveStream(hdpa.param().abi(), pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(std::ptr::null()))).ok() + DPA_SaveStream(hdpa.param().abi(), pfn, pstream.param().abi(), core::mem::transmute(pvinstdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn DPA_Search(hdpa: P0, pfind: Option<*const core::ffi::c_void>, istart: i32, pfncompare: PFNDACOMPARE, lparam: P1, options: u32) -> i32 @@ -298,7 +298,7 @@ where P1: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_Search(hdpa : HDPA, pfind : *const core::ffi::c_void, istart : i32, pfncompare : PFNDACOMPARE, lparam : super::super::Foundation:: LPARAM, options : u32) -> i32); - DPA_Search(hdpa.param().abi(), core::mem::transmute(pfind.unwrap_or(std::ptr::null())), istart, pfncompare, lparam.param().abi(), options) + DPA_Search(hdpa.param().abi(), core::mem::transmute(pfind.unwrap_or(core::ptr::null())), istart, pfncompare, lparam.param().abi(), options) } #[inline] pub unsafe fn DPA_SetPtr(hdpa: P0, i: i32, p: Option<*const core::ffi::c_void>) -> super::super::Foundation::BOOL @@ -306,7 +306,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DPA_SetPtr(hdpa : HDPA, i : i32, p : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - DPA_SetPtr(hdpa.param().abi(), i, core::mem::transmute(p.unwrap_or(std::ptr::null()))) + DPA_SetPtr(hdpa.param().abi(), i, core::mem::transmute(p.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DPA_Sort(hdpa: P0, pfncompare: PFNDACOMPARE, lparam: P1) -> super::super::Foundation::BOOL @@ -360,7 +360,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DSA_DestroyCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DSA_DestroyCallback(hdsa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))) + DSA_DestroyCallback(hdsa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DSA_EnumCallback(hdsa: P0, pfncb: PFNDAENUMCALLBACK, pdata: Option<*const core::ffi::c_void>) @@ -368,7 +368,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn DSA_EnumCallback(hdsa : HDSA, pfncb : PFNDAENUMCALLBACK, pdata : *const core::ffi::c_void)); - DSA_EnumCallback(hdsa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(std::ptr::null()))) + DSA_EnumCallback(hdsa.param().abi(), pfncb, core::mem::transmute(pdata.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DSA_GetItem(hdsa: P0, i: i32, pitem: *mut core::ffi::c_void) -> super::super::Foundation::BOOL @@ -547,7 +547,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeBackground(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, pcliprect : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - DrawThemeBackground(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, prect, core::mem::transmute(pcliprect.unwrap_or(std::ptr::null()))).ok() + DrawThemeBackground(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, prect, core::mem::transmute(pcliprect.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -557,7 +557,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeBackgroundEx(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prect : *const super::super::Foundation:: RECT, poptions : *const DTBGOPTS) -> windows_core::HRESULT); - DrawThemeBackgroundEx(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, prect, core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + DrawThemeBackgroundEx(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, prect, core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -567,7 +567,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeEdge(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, pdestrect : *const super::super::Foundation:: RECT, uedge : super::super::Graphics::Gdi:: DRAWEDGE_FLAGS, uflags : super::super::Graphics::Gdi:: DRAW_EDGE_FLAGS, pcontentrect : *mut super::super::Foundation:: RECT) -> windows_core::HRESULT); - DrawThemeEdge(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, pdestrect, uedge, uflags, core::mem::transmute(pcontentrect.unwrap_or(std::ptr::null_mut()))).ok() + DrawThemeEdge(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, pdestrect, uedge, uflags, core::mem::transmute(pcontentrect.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -588,7 +588,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeParentBackground(hwnd : super::super::Foundation:: HWND, hdc : super::super::Graphics::Gdi:: HDC, prc : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - DrawThemeParentBackground(hwnd.param().abi(), hdc.param().abi(), core::mem::transmute(prc.unwrap_or(std::ptr::null()))).ok() + DrawThemeParentBackground(hwnd.param().abi(), hdc.param().abi(), core::mem::transmute(prc.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -598,7 +598,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeParentBackgroundEx(hwnd : super::super::Foundation:: HWND, hdc : super::super::Graphics::Gdi:: HDC, dwflags : DRAW_THEME_PARENT_BACKGROUND_FLAGS, prc : *const super::super::Foundation:: RECT) -> windows_core::HRESULT); - DrawThemeParentBackgroundEx(hwnd.param().abi(), hdc.param().abi(), dwflags, core::mem::transmute(prc.unwrap_or(std::ptr::null()))).ok() + DrawThemeParentBackgroundEx(hwnd.param().abi(), hdc.param().abi(), dwflags, core::mem::transmute(prc.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -618,7 +618,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn DrawThemeTextEx(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : windows_core::PCWSTR, cchtext : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, prect : *mut super::super::Foundation:: RECT, poptions : *const DTTOPTS) -> windows_core::HRESULT); - DrawThemeTextEx(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, prect, core::mem::transmute(poptions.unwrap_or(std::ptr::null()))).ok() + DrawThemeTextEx(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, prect, core::mem::transmute(poptions.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn EnableScrollBar(hwnd: P0, wsbflags: u32, warrows: ENABLE_SCROLL_BAR_ARROWS) -> windows_core::Result<()> @@ -835,7 +835,7 @@ where P0: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn GetThemeAnimationProperty(htheme : HTHEME, istoryboardid : i32, itargetid : i32, eproperty : TA_PROPERTY, pvproperty : *mut core::ffi::c_void, cbsize : u32, pcbsizeout : *mut u32) -> windows_core::HRESULT); - GetThemeAnimationProperty(htheme.param().abi(), istoryboardid, itargetid, eproperty, core::mem::transmute(pvproperty.unwrap_or(std::ptr::null_mut())), cbsize, pcbsizeout).ok() + GetThemeAnimationProperty(htheme.param().abi(), istoryboardid, itargetid, eproperty, core::mem::transmute(pvproperty.unwrap_or(core::ptr::null_mut())), cbsize, pcbsizeout).ok() } #[inline] pub unsafe fn GetThemeAnimationTransform(htheme: P0, istoryboardid: i32, itargetid: i32, dwtransformindex: u32, ptransform: Option<*mut TA_TRANSFORM>, cbsize: u32, pcbsizeout: *mut u32) -> windows_core::Result<()> @@ -843,7 +843,7 @@ where P0: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn GetThemeAnimationTransform(htheme : HTHEME, istoryboardid : i32, itargetid : i32, dwtransformindex : u32, ptransform : *mut TA_TRANSFORM, cbsize : u32, pcbsizeout : *mut u32) -> windows_core::HRESULT); - GetThemeAnimationTransform(htheme.param().abi(), istoryboardid, itargetid, dwtransformindex, core::mem::transmute(ptransform.unwrap_or(std::ptr::null_mut())), cbsize, pcbsizeout).ok() + GetThemeAnimationTransform(htheme.param().abi(), istoryboardid, itargetid, dwtransformindex, core::mem::transmute(ptransform.unwrap_or(core::ptr::null_mut())), cbsize, pcbsizeout).ok() } #[inline] pub unsafe fn GetThemeAppProperties() -> SET_THEME_APP_PROPERTIES_FLAGS { @@ -973,7 +973,7 @@ where { windows_targets::link!("uxtheme.dll" "system" fn GetThemeMargins(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, ipropid : i32, prc : *const super::super::Foundation:: RECT, pmargins : *mut MARGINS) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeMargins(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, ipropid.0 as _, core::mem::transmute(prc.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + GetThemeMargins(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, ipropid.0 as _, core::mem::transmute(prc.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -995,7 +995,7 @@ where { windows_targets::link!("uxtheme.dll" "system" fn GetThemePartSize(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, prc : *const super::super::Foundation:: RECT, esize : THEMESIZE, psz : *mut super::super::Foundation:: SIZE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemePartSize(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(prc.unwrap_or(std::ptr::null())), esize, &mut result__).map(|| result__) + GetThemePartSize(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(prc.unwrap_or(core::ptr::null())), esize, &mut result__).map(|| result__) } #[inline] pub unsafe fn GetThemePosition(htheme: P0, ipartid: i32, istateid: i32, ipropid: THEME_PROPERTY_SYMBOL_ID) -> windows_core::Result @@ -1031,7 +1031,7 @@ where P1: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn GetThemeStream(htheme : HTHEME, ipartid : i32, istateid : i32, ipropid : i32, ppvstream : *mut *mut core::ffi::c_void, pcbstream : *mut u32, hinst : super::super::Foundation:: HINSTANCE) -> windows_core::HRESULT); - GetThemeStream(htheme.param().abi(), ipartid, istateid, ipropid, ppvstream, core::mem::transmute(pcbstream.unwrap_or(std::ptr::null_mut())), hinst.param().abi()).ok() + GetThemeStream(htheme.param().abi(), ipartid, istateid, ipropid, ppvstream, core::mem::transmute(pcbstream.unwrap_or(core::ptr::null_mut())), hinst.param().abi()).ok() } #[inline] pub unsafe fn GetThemeString(htheme: P0, ipartid: i32, istateid: i32, ipropid: i32, pszbuff: &mut [u16]) -> windows_core::Result<()> @@ -1109,7 +1109,7 @@ where { windows_targets::link!("uxtheme.dll" "system" fn GetThemeTextExtent(htheme : HTHEME, hdc : super::super::Graphics::Gdi:: HDC, ipartid : i32, istateid : i32, psztext : windows_core::PCWSTR, cchcharcount : i32, dwtextflags : super::super::Graphics::Gdi:: DRAW_TEXT_FORMAT, pboundingrect : *const super::super::Foundation:: RECT, pextentrect : *mut super::super::Foundation:: RECT) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetThemeTextExtent(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, core::mem::transmute(pboundingrect.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + GetThemeTextExtent(htheme.param().abi(), hdc.param().abi(), ipartid, istateid, core::mem::transmute(psztext.as_ptr()), psztext.len().try_into().unwrap(), dwtextflags, core::mem::transmute(pboundingrect.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -1127,7 +1127,7 @@ where P0: windows_core::Param, { windows_targets::link!("uxtheme.dll" "system" fn GetThemeTimingFunction(htheme : HTHEME, itimingfunctionid : i32, ptimingfunction : *mut TA_TIMINGFUNCTION, cbsize : u32, pcbsizeout : *mut u32) -> windows_core::HRESULT); - GetThemeTimingFunction(htheme.param().abi(), itimingfunctionid, core::mem::transmute(ptimingfunction.unwrap_or(std::ptr::null_mut())), cbsize, pcbsizeout).ok() + GetThemeTimingFunction(htheme.param().abi(), itimingfunctionid, core::mem::transmute(ptimingfunction.unwrap_or(core::ptr::null_mut())), cbsize, pcbsizeout).ok() } #[inline] pub unsafe fn GetThemeTransitionDuration(htheme: P0, ipartid: i32, istateidfrom: i32, istateidto: i32, ipropid: i32) -> windows_core::Result @@ -1144,7 +1144,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetWindowFeedbackSetting(hwnd : super::super::Foundation:: HWND, feedback : FEEDBACK_TYPE, dwflags : u32, psize : *mut u32, config : *mut core::ffi::c_void) -> super::super::Foundation:: BOOL); - GetWindowFeedbackSetting(hwnd.param().abi(), feedback, dwflags, psize, core::mem::transmute(config.unwrap_or(std::ptr::null_mut()))) + GetWindowFeedbackSetting(hwnd.param().abi(), feedback, dwflags, psize, core::mem::transmute(config.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetWindowTheme(hwnd: P0) -> HTHEME @@ -1317,7 +1317,7 @@ where #[inline] pub unsafe fn ImageList_GetDragImage(ppt: Option<*mut super::super::Foundation::POINT>, ppthotspot: Option<*mut super::super::Foundation::POINT>) -> HIMAGELIST { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetDragImage(ppt : *mut super::super::Foundation:: POINT, ppthotspot : *mut super::super::Foundation:: POINT) -> HIMAGELIST); - ImageList_GetDragImage(core::mem::transmute(ppt.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(std::ptr::null_mut()))) + ImageList_GetDragImage(core::mem::transmute(ppt.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -1334,7 +1334,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn ImageList_GetIconSize(himl : HIMAGELIST, cx : *mut i32, cy : *mut i32) -> super::super::Foundation:: BOOL); - ImageList_GetIconSize(himl.param().abi(), core::mem::transmute(cx.unwrap_or(std::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(std::ptr::null_mut()))) + ImageList_GetIconSize(himl.param().abi(), core::mem::transmute(cx.unwrap_or(core::ptr::null_mut())), core::mem::transmute(cy.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ImageList_GetImageCount(himl: P0) -> i32 @@ -1712,7 +1712,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SetWindowFeedbackSetting(hwnd : super::super::Foundation:: HWND, feedback : FEEDBACK_TYPE, dwflags : u32, size : u32, configuration : *const core::ffi::c_void) -> super::super::Foundation:: BOOL); - SetWindowFeedbackSetting(hwnd.param().abi(), feedback, dwflags, size, core::mem::transmute(configuration.unwrap_or(std::ptr::null()))) + SetWindowFeedbackSetting(hwnd.param().abi(), feedback, dwflags, size, core::mem::transmute(configuration.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SetWindowTheme(hwnd: P0, pszsubappname: P1, pszsubidlist: P2) -> windows_core::Result<()> @@ -1769,13 +1769,13 @@ where P5: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn TaskDialog(hwndowner : super::super::Foundation:: HWND, hinstance : super::super::Foundation:: HINSTANCE, pszwindowtitle : windows_core::PCWSTR, pszmaininstruction : windows_core::PCWSTR, pszcontent : windows_core::PCWSTR, dwcommonbuttons : TASKDIALOG_COMMON_BUTTON_FLAGS, pszicon : windows_core::PCWSTR, pnbutton : *mut i32) -> windows_core::HRESULT); - TaskDialog(hwndowner.param().abi(), hinstance.param().abi(), pszwindowtitle.param().abi(), pszmaininstruction.param().abi(), pszcontent.param().abi(), dwcommonbuttons, pszicon.param().abi(), core::mem::transmute(pnbutton.unwrap_or(std::ptr::null_mut()))).ok() + TaskDialog(hwndowner.param().abi(), hinstance.param().abi(), pszwindowtitle.param().abi(), pszmaininstruction.param().abi(), pszcontent.param().abi(), dwcommonbuttons, pszicon.param().abi(), core::mem::transmute(pnbutton.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn TaskDialogIndirect(ptaskconfig: *const TASKDIALOGCONFIG, pnbutton: Option<*mut i32>, pnradiobutton: Option<*mut i32>, pfverificationflagchecked: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { windows_targets::link!("comctl32.dll" "system" fn TaskDialogIndirect(ptaskconfig : *const TASKDIALOGCONFIG, pnbutton : *mut i32, pnradiobutton : *mut i32, pfverificationflagchecked : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - TaskDialogIndirect(ptaskconfig, core::mem::transmute(pnbutton.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pnradiobutton.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfverificationflagchecked.unwrap_or(std::ptr::null_mut()))).ok() + TaskDialogIndirect(ptaskconfig, core::mem::transmute(pnbutton.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pnradiobutton.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfverificationflagchecked.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn UninitializeFlatSB(param0: P0) -> windows_core::Result<()> @@ -1933,7 +1933,7 @@ impl IImageList { (windows_core::Interface::vtable(self).DragShowNolock)(windows_core::Interface::as_raw(self), fshow.param().abi()).ok() } pub unsafe fn GetDragImage(&self, ppt: Option<*mut super::super::Foundation::POINT>, ppthotspot: Option<*mut super::super::Foundation::POINT>, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDragImage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(std::ptr::null_mut())), riid, ppv).ok() + (windows_core::Interface::vtable(self).GetDragImage)(windows_core::Interface::as_raw(self), core::mem::transmute(ppt.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppthotspot.unwrap_or(core::ptr::null_mut())), riid, ppv).ok() } pub unsafe fn GetItemFlags(&self, i: i32) -> windows_core::Result { let mut result__ = core::mem::zeroed(); 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 42f2ddd2a0..b0e4783cbe 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/HiDpi/mod.rs @@ -214,7 +214,7 @@ pub unsafe fn SetThreadDpiHostingBehavior(value: DPI_HOSTING_BEHAVIOR) -> DPI_HO #[inline] pub unsafe fn SystemParametersInfoForDpi(uiaction: u32, uiparam: u32, pvparam: 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).ok() + SystemParametersInfoForDpi(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), fwinini, dpi).ok() } pub const DCDC_DEFAULT: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS(0i32); pub const DCDC_DISABLE_FONT_UPDATE: DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS = DIALOG_CONTROL_DPI_CHANGE_BEHAVIORS(1i32); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs index c6fa59504d..d723e8da74 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/Ime/mod.rs @@ -157,7 +157,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListA(param0 : HIMC, deindex : u32, lpcandlist : *mut CANDIDATELIST, dwbuflen : u32) -> u32); - ImmGetCandidateListA(param0.param().abi(), deindex, core::mem::transmute(lpcandlist.unwrap_or(std::ptr::null_mut())), dwbuflen) + ImmGetCandidateListA(param0.param().abi(), deindex, core::mem::transmute(lpcandlist.unwrap_or(core::ptr::null_mut())), dwbuflen) } #[inline] pub unsafe fn ImmGetCandidateListCountA(param0: P0, lpdwlistcount: *mut u32) -> u32 @@ -181,7 +181,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetCandidateListW(param0 : HIMC, deindex : u32, lpcandlist : *mut CANDIDATELIST, dwbuflen : u32) -> u32); - ImmGetCandidateListW(param0.param().abi(), deindex, core::mem::transmute(lpcandlist.unwrap_or(std::ptr::null_mut())), dwbuflen) + ImmGetCandidateListW(param0.param().abi(), deindex, core::mem::transmute(lpcandlist.unwrap_or(core::ptr::null_mut())), dwbuflen) } #[inline] pub unsafe fn ImmGetCandidateWindow(param0: P0, param1: u32, lpcandidate: *mut CANDIDATEFORM) -> super::super::super::Foundation::BOOL @@ -215,7 +215,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetCompositionStringA(param0 : HIMC, param1 : IME_COMPOSITION_STRING, lpbuf : *mut core::ffi::c_void, dwbuflen : u32) -> i32); - ImmGetCompositionStringA(param0.param().abi(), param1, core::mem::transmute(lpbuf.unwrap_or(std::ptr::null_mut())), dwbuflen) + ImmGetCompositionStringA(param0.param().abi(), param1, core::mem::transmute(lpbuf.unwrap_or(core::ptr::null_mut())), dwbuflen) } #[inline] pub unsafe fn ImmGetCompositionStringW(param0: P0, param1: IME_COMPOSITION_STRING, lpbuf: Option<*mut core::ffi::c_void>, dwbuflen: u32) -> i32 @@ -223,7 +223,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetCompositionStringW(param0 : HIMC, param1 : IME_COMPOSITION_STRING, lpbuf : *mut core::ffi::c_void, dwbuflen : u32) -> i32); - ImmGetCompositionStringW(param0.param().abi(), param1, core::mem::transmute(lpbuf.unwrap_or(std::ptr::null_mut())), dwbuflen) + ImmGetCompositionStringW(param0.param().abi(), param1, core::mem::transmute(lpbuf.unwrap_or(core::ptr::null_mut())), dwbuflen) } #[inline] pub unsafe fn ImmGetCompositionWindow(param0: P0, lpcompform: *mut COMPOSITIONFORM) -> super::super::super::Foundation::BOOL @@ -269,7 +269,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetConversionStatus(param0 : HIMC, lpfdwconversion : *mut IME_CONVERSION_MODE, lpfdwsentence : *mut IME_SENTENCE_MODE) -> super::super::super::Foundation:: BOOL); - ImmGetConversionStatus(param0.param().abi(), core::mem::transmute(lpfdwconversion.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpfdwsentence.unwrap_or(std::ptr::null_mut()))) + ImmGetConversionStatus(param0.param().abi(), core::mem::transmute(lpfdwconversion.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpfdwsentence.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn ImmGetDefaultIMEWnd(param0: P0) -> super::super::super::Foundation::HWND @@ -368,7 +368,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetImeMenuItemsA(param0 : HIMC, param1 : u32, param2 : u32, lpimeparentmenu : *mut IMEMENUITEMINFOA, lpimemenu : *mut IMEMENUITEMINFOA, dwsize : u32) -> u32); - ImmGetImeMenuItemsA(param0.param().abi(), param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(std::ptr::null_mut())), dwsize) + ImmGetImeMenuItemsA(param0.param().abi(), param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(core::ptr::null_mut())), dwsize) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -377,7 +377,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmGetImeMenuItemsW(param0 : HIMC, param1 : u32, param2 : u32, lpimeparentmenu : *mut IMEMENUITEMINFOW, lpimemenu : *mut IMEMENUITEMINFOW, dwsize : u32) -> u32); - ImmGetImeMenuItemsW(param0.param().abi(), param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(std::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(std::ptr::null_mut())), dwsize) + ImmGetImeMenuItemsW(param0.param().abi(), param1, param2, core::mem::transmute(lpimeparentmenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(lpimemenu.unwrap_or(core::ptr::null_mut())), dwsize) } #[inline] pub unsafe fn ImmGetOpenStatus(param0: P0) -> super::super::super::Foundation::BOOL @@ -595,7 +595,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmSetCompositionStringA(param0 : HIMC, dwindex : SET_COMPOSITION_STRING_TYPE, lpcomp : *const core::ffi::c_void, dwcomplen : u32, lpread : *const core::ffi::c_void, dwreadlen : u32) -> super::super::super::Foundation:: BOOL); - ImmSetCompositionStringA(param0.param().abi(), dwindex, core::mem::transmute(lpcomp.unwrap_or(std::ptr::null())), dwcomplen, core::mem::transmute(lpread.unwrap_or(std::ptr::null())), dwreadlen) + ImmSetCompositionStringA(param0.param().abi(), dwindex, core::mem::transmute(lpcomp.unwrap_or(core::ptr::null())), dwcomplen, core::mem::transmute(lpread.unwrap_or(core::ptr::null())), dwreadlen) } #[inline] pub unsafe fn ImmSetCompositionStringW(param0: P0, dwindex: SET_COMPOSITION_STRING_TYPE, lpcomp: Option<*const core::ffi::c_void>, dwcomplen: u32, lpread: Option<*const core::ffi::c_void>, dwreadlen: u32) -> super::super::super::Foundation::BOOL @@ -603,7 +603,7 @@ where P0: windows_core::Param, { windows_targets::link!("imm32.dll" "system" fn ImmSetCompositionStringW(param0 : HIMC, dwindex : SET_COMPOSITION_STRING_TYPE, lpcomp : *const core::ffi::c_void, dwcomplen : u32, lpread : *const core::ffi::c_void, dwreadlen : u32) -> super::super::super::Foundation:: BOOL); - ImmSetCompositionStringW(param0.param().abi(), dwindex, core::mem::transmute(lpcomp.unwrap_or(std::ptr::null())), dwcomplen, core::mem::transmute(lpread.unwrap_or(std::ptr::null())), dwreadlen) + ImmSetCompositionStringW(param0.param().abi(), dwindex, core::mem::transmute(lpcomp.unwrap_or(core::ptr::null())), dwcomplen, core::mem::transmute(lpread.unwrap_or(core::ptr::null())), dwreadlen) } #[inline] pub unsafe fn ImmSetCompositionWindow(param0: P0, lpcompform: *const COMPOSITIONFORM) -> super::super::super::Foundation::BOOL 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 b2dfdc5523..da7f89a994 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 @@ -27,7 +27,7 @@ where P0: windows_core::Param, { 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.param().abi(), cursorcount, core::mem::transmute(devicecursors.unwrap_or(std::ptr::null_mut()))).ok() + GetPointerDeviceCursors(device.param().abi(), cursorcount, core::mem::transmute(devicecursors.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_Controls")] #[inline] @@ -36,7 +36,7 @@ where P0: windows_core::Param, { 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.param().abi(), propertycount, core::mem::transmute(pointerproperties.unwrap_or(std::ptr::null_mut()))).ok() + GetPointerDeviceProperties(device.param().abi(), propertycount, core::mem::transmute(pointerproperties.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetPointerDeviceRects(device: P0, pointerdevicerect: *mut super::super::super::Foundation::RECT, displayrect: *mut super::super::super::Foundation::RECT) -> windows_core::Result<()> @@ -50,43 +50,43 @@ where #[inline] pub unsafe fn GetPointerDevices(devicecount: *mut u32, pointerdevices: 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()))).ok() + GetPointerDevices(devicecount, core::mem::transmute(pointerdevices.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFrameInfo(pointerid: u32, pointercount: *mut u32, pointerinfo: 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()))).ok() + GetPointerFrameInfo(pointerid, pointercount, core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFrameInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, pointerinfo: 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()))).ok() + GetPointerFrameInfoHistory(pointerid, entriescount, pointercount, core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFramePenInfo(pointerid: u32, pointercount: *mut u32, peninfo: 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()))).ok() + GetPointerFramePenInfo(pointerid, pointercount, core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFramePenInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, peninfo: 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()))).ok() + GetPointerFramePenInfoHistory(pointerid, entriescount, pointercount, core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFrameTouchInfo(pointerid: u32, pointercount: *mut u32, touchinfo: 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()))).ok() + GetPointerFrameTouchInfo(pointerid, pointercount, core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] pub unsafe fn GetPointerFrameTouchInfoHistory(pointerid: u32, entriescount: *mut u32, pointercount: *mut u32, touchinfo: 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()))).ok() + GetPointerFrameTouchInfoHistory(pointerid, entriescount, pointercount, core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -98,7 +98,7 @@ pub unsafe fn GetPointerInfo(pointerid: u32, pointerinfo: *mut POINTER_INFO) -> #[inline] pub unsafe fn GetPointerInfoHistory(pointerid: u32, entriescount: *mut u32, pointerinfo: 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()))).ok() + GetPointerInfoHistory(pointerid, entriescount, core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetPointerInputTransform(pointerid: u32, inputtransform: &mut [INPUT_TRANSFORM]) -> windows_core::Result<()> { @@ -115,7 +115,7 @@ pub unsafe fn GetPointerPenInfo(pointerid: u32, peninfo: *mut POINTER_PEN_INFO) #[inline] pub unsafe fn GetPointerPenInfoHistory(pointerid: u32, entriescount: *mut u32, peninfo: 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()))).ok() + GetPointerPenInfoHistory(pointerid, entriescount, core::mem::transmute(peninfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -127,7 +127,7 @@ pub unsafe fn GetPointerTouchInfo(pointerid: u32, touchinfo: *mut POINTER_TOUCH_ #[inline] pub unsafe fn GetPointerTouchInfoHistory(pointerid: u32, entriescount: *mut u32, touchinfo: 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()))).ok() + GetPointerTouchInfoHistory(pointerid, entriescount, core::mem::transmute(touchinfo.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] 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 7a6d8e7ebd..46b3cdefea 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 @@ -52,7 +52,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn IsTouchWindow(hwnd : super::super::super::Foundation:: HWND, pulflags : *mut u32) -> super::super::super::Foundation:: BOOL); - IsTouchWindow(hwnd.param().abi(), core::mem::transmute(pulflags.unwrap_or(std::ptr::null_mut()))) + IsTouchWindow(hwnd.param().abi(), core::mem::transmute(pulflags.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn RegisterTouchWindow(hwnd: P0, ulflags: REGISTER_TOUCH_WINDOW_FLAGS) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs index 5306147be4..30f9ab3bd7 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/XboxController/mod.rs @@ -9,7 +9,7 @@ where #[inline] pub unsafe fn XInputGetAudioDeviceIds(dwuserindex: u32, prenderdeviceid: windows_core::PWSTR, prendercount: Option<*mut u32>, pcapturedeviceid: windows_core::PWSTR, pcapturecount: Option<*mut u32>) -> u32 { windows_targets::link!("xinput1_4.dll" "system" fn XInputGetAudioDeviceIds(dwuserindex : u32, prenderdeviceid : windows_core::PWSTR, prendercount : *mut u32, pcapturedeviceid : windows_core::PWSTR, pcapturecount : *mut u32) -> u32); - XInputGetAudioDeviceIds(dwuserindex, core::mem::transmute(prenderdeviceid), core::mem::transmute(prendercount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcapturedeviceid), core::mem::transmute(pcapturecount.unwrap_or(std::ptr::null_mut()))) + XInputGetAudioDeviceIds(dwuserindex, core::mem::transmute(prenderdeviceid), core::mem::transmute(prendercount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcapturedeviceid), core::mem::transmute(pcapturecount.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn XInputGetBatteryInformation(dwuserindex: u32, devtype: BATTERY_DEVTYPE, pbatteryinformation: *mut XINPUT_BATTERY_INFORMATION) -> u32 { 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 bc70bb545d..992fa948d2 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Input/mod.rs @@ -30,7 +30,7 @@ pub unsafe fn GetCurrentInputMessageSource(inputmessagesource: *mut INPUT_MESSAG #[inline] pub unsafe fn GetRawInputBuffer(pdata: Option<*mut RAWINPUT>, pcbsize: *mut u32, cbsizeheader: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn GetRawInputBuffer(pdata : *mut RAWINPUT, pcbsize : *mut u32, cbsizeheader : u32) -> u32); - GetRawInputBuffer(core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), pcbsize, cbsizeheader) + GetRawInputBuffer(core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), pcbsize, cbsizeheader) } #[inline] pub unsafe fn GetRawInputData(hrawinput: P0, uicommand: RAW_INPUT_DATA_COMMAND_FLAGS, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32, cbsizeheader: u32) -> u32 @@ -38,7 +38,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetRawInputData(hrawinput : HRAWINPUT, uicommand : RAW_INPUT_DATA_COMMAND_FLAGS, pdata : *mut core::ffi::c_void, pcbsize : *mut u32, cbsizeheader : u32) -> u32); - GetRawInputData(hrawinput.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), pcbsize, cbsizeheader) + GetRawInputData(hrawinput.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), pcbsize, cbsizeheader) } #[inline] pub unsafe fn GetRawInputDeviceInfoA(hdevice: P0, uicommand: RAW_INPUT_DEVICE_INFO_COMMAND, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32) -> u32 @@ -46,7 +46,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetRawInputDeviceInfoA(hdevice : super::super::Foundation:: HANDLE, uicommand : RAW_INPUT_DEVICE_INFO_COMMAND, pdata : *mut core::ffi::c_void, pcbsize : *mut u32) -> u32); - GetRawInputDeviceInfoA(hdevice.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), pcbsize) + GetRawInputDeviceInfoA(hdevice.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), pcbsize) } #[inline] pub unsafe fn GetRawInputDeviceInfoW(hdevice: P0, uicommand: RAW_INPUT_DEVICE_INFO_COMMAND, pdata: Option<*mut core::ffi::c_void>, pcbsize: *mut u32) -> u32 @@ -54,17 +54,17 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetRawInputDeviceInfoW(hdevice : super::super::Foundation:: HANDLE, uicommand : RAW_INPUT_DEVICE_INFO_COMMAND, pdata : *mut core::ffi::c_void, pcbsize : *mut u32) -> u32); - GetRawInputDeviceInfoW(hdevice.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(std::ptr::null_mut())), pcbsize) + GetRawInputDeviceInfoW(hdevice.param().abi(), uicommand, core::mem::transmute(pdata.unwrap_or(core::ptr::null_mut())), pcbsize) } #[inline] pub unsafe fn GetRawInputDeviceList(prawinputdevicelist: Option<*mut RAWINPUTDEVICELIST>, puinumdevices: *mut u32, cbsize: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn GetRawInputDeviceList(prawinputdevicelist : *mut RAWINPUTDEVICELIST, puinumdevices : *mut u32, cbsize : u32) -> u32); - GetRawInputDeviceList(core::mem::transmute(prawinputdevicelist.unwrap_or(std::ptr::null_mut())), puinumdevices, cbsize) + GetRawInputDeviceList(core::mem::transmute(prawinputdevicelist.unwrap_or(core::ptr::null_mut())), puinumdevices, cbsize) } #[inline] pub unsafe fn GetRegisteredRawInputDevices(prawinputdevices: Option<*mut RAWINPUTDEVICE>, puinumdevices: *mut u32, cbsize: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn GetRegisteredRawInputDevices(prawinputdevices : *mut RAWINPUTDEVICE, puinumdevices : *mut u32, cbsize : u32) -> u32); - GetRegisteredRawInputDevices(core::mem::transmute(prawinputdevices.unwrap_or(std::ptr::null_mut())), puinumdevices, cbsize) + GetRegisteredRawInputDevices(core::mem::transmute(prawinputdevices.unwrap_or(core::ptr::null_mut())), puinumdevices, cbsize) } #[inline] pub unsafe fn RegisterRawInputDevices(prawinputdevices: &[RAWINPUTDEVICE], cbsize: u32) -> windows_core::Result<()> { diff --git a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs index 0ad105eaeb..044fdb86fe 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/InteractionContext/mod.rs @@ -90,7 +90,7 @@ where { windows_targets::link!("ninput.dll" "system" fn GetStateInteractionContext(interactioncontext : HINTERACTIONCONTEXT, pointerinfo : *const super::Input::Pointer:: POINTER_INFO, state : *mut INTERACTION_STATE) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - GetStateInteractionContext(interactioncontext.param().abi(), core::mem::transmute(pointerinfo.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + GetStateInteractionContext(interactioncontext.param().abi(), core::mem::transmute(pointerinfo.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } #[inline] pub unsafe fn GetTapParameterInteractionContext(interactioncontext: P0, parameter: TAP_PARAMETER) -> windows_core::Result @@ -142,7 +142,7 @@ where P0: windows_core::Param, { windows_targets::link!("ninput.dll" "system" fn RegisterOutputCallbackInteractionContext(interactioncontext : HINTERACTIONCONTEXT, outputcallback : INTERACTION_CONTEXT_OUTPUT_CALLBACK, clientdata : *const core::ffi::c_void) -> windows_core::HRESULT); - RegisterOutputCallbackInteractionContext(interactioncontext.param().abi(), outputcallback, core::mem::transmute(clientdata.unwrap_or(std::ptr::null()))).ok() + RegisterOutputCallbackInteractionContext(interactioncontext.param().abi(), outputcallback, core::mem::transmute(clientdata.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -151,7 +151,7 @@ where P0: windows_core::Param, { windows_targets::link!("ninput.dll" "system" fn RegisterOutputCallbackInteractionContext2(interactioncontext : HINTERACTIONCONTEXT, outputcallback : INTERACTION_CONTEXT_OUTPUT_CALLBACK2, clientdata : *const core::ffi::c_void) -> windows_core::HRESULT); - RegisterOutputCallbackInteractionContext2(interactioncontext.param().abi(), outputcallback, core::mem::transmute(clientdata.unwrap_or(std::ptr::null()))).ok() + RegisterOutputCallbackInteractionContext2(interactioncontext.param().abi(), outputcallback, core::mem::transmute(clientdata.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn RemovePointerInteractionContext(interactioncontext: P0, pointerid: u32) -> windows_core::Result<()> diff --git a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs index a30f0a4cb6..5a5e237bfd 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/LegacyWindowsEnvironmentFeatures/mod.rs @@ -217,7 +217,7 @@ impl IReconcilableObject { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), dwflags, hwndowner.param().abi(), hwndprogressfeedback.param().abi(), rgpmkotherinput.len().try_into().unwrap(), core::mem::transmute(rgpmkotherinput.as_ptr()), ploutindex, pstgnewresidues.param().abi(), core::mem::transmute(pvreserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Reconcile)(windows_core::Interface::as_raw(self), pinitiator.param().abi(), dwflags, hwndowner.param().abi(), hwndprogressfeedback.param().abi(), rgpmkotherinput.len().try_into().unwrap(), core::mem::transmute(rgpmkotherinput.as_ptr()), ploutindex, pstgnewresidues.param().abi(), core::mem::transmute(pvreserved.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn GetProgressFeedbackMaxEstimate(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); diff --git a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs index d649336178..684c93df54 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Ribbon/mod.rs @@ -120,12 +120,12 @@ impl IUICommandHandler { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), commandid, verb, core::mem::transmute(key.unwrap_or(std::ptr::null())), core::mem::transmute(currentvalue.unwrap_or(std::ptr::null())), commandexecutionproperties.param().abi()).ok() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), commandid, verb, core::mem::transmute(key.unwrap_or(core::ptr::null())), core::mem::transmute(currentvalue.unwrap_or(core::ptr::null())), commandexecutionproperties.param().abi()).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn UpdateProperty(&self, commandid: u32, key: *const super::Shell::PropertiesSystem::PROPERTYKEY, currentvalue: Option<*const super::super::System::Com::StructuredStorage::PROPVARIANT>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).UpdateProperty)(windows_core::Interface::as_raw(self), commandid, key, core::mem::transmute(currentvalue.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).UpdateProperty)(windows_core::Interface::as_raw(self), commandid, key, core::mem::transmute(currentvalue.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } } #[repr(C)] @@ -237,7 +237,7 @@ impl IUIFramework { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn InvalidateUICommand(&self, commandid: u32, flags: UI_INVALIDATIONS, key: Option<*const super::Shell::PropertiesSystem::PROPERTYKEY>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), commandid, flags, core::mem::transmute(key.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).InvalidateUICommand)(windows_core::Interface::as_raw(self), commandid, flags, core::mem::transmute(key.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn FlushPendingInvalidations(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).FlushPendingInvalidations)(windows_core::Interface::as_raw(self)).ok() diff --git a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs index 4575c64a52..1029aaa1f0 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/PropertiesSystem/mod.rs @@ -34,7 +34,7 @@ pub unsafe fn PSCreateMultiplexPropertyStore(prgpunkstores: &[Option, rgflags: Option<*const PKA_FLAGS>, rgpropvar: Option<*const super::super::super::System::Com::StructuredStorage::PROPVARIANT>, cchanges: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn PSCreatePropertyChangeArray(rgpropkey : *const PROPERTYKEY, rgflags : *const PKA_FLAGS, rgpropvar : *const core::mem::MaybeUninit < super::super::super::System::Com::StructuredStorage:: PROPVARIANT >, cchanges : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - PSCreatePropertyChangeArray(core::mem::transmute(rgpropkey.unwrap_or(std::ptr::null())), core::mem::transmute(rgflags.unwrap_or(std::ptr::null())), core::mem::transmute(rgpropvar.unwrap_or(std::ptr::null())), cchanges, riid, ppv).ok() + PSCreatePropertyChangeArray(core::mem::transmute(rgpropkey.unwrap_or(core::ptr::null())), core::mem::transmute(rgflags.unwrap_or(core::ptr::null())), core::mem::transmute(rgpropvar.unwrap_or(core::ptr::null())), cchanges, riid, ppv).ok() } #[inline] pub unsafe fn PSCreatePropertyStoreFromObject(punk: P0, grfmode: u32, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> @@ -601,7 +601,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn PifMgr_GetProperties(hprops : super::super::super::Foundation:: HANDLE, pszgroup : windows_core::PCSTR, lpprops : *mut core::ffi::c_void, cbprops : i32, flopt : u32) -> i32); - PifMgr_GetProperties(hprops.param().abi(), pszgroup.param().abi(), core::mem::transmute(lpprops.unwrap_or(std::ptr::null_mut())), cbprops, flopt) + PifMgr_GetProperties(hprops.param().abi(), pszgroup.param().abi(), core::mem::transmute(lpprops.unwrap_or(core::ptr::null_mut())), cbprops, flopt) } #[inline] pub unsafe fn PifMgr_OpenProperties(pszapp: P0, pszpif: P1, hinf: u32, flopt: u32) -> super::super::super::Foundation::HANDLE @@ -665,7 +665,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHPropStgCreate(psstg : * mut core::ffi::c_void, fmtid : *const windows_core::GUID, pclsid : *const windows_core::GUID, grfflags : u32, grfmode : u32, dwdisposition : u32, ppstg : *mut * mut core::ffi::c_void, pucodepage : *mut u32) -> windows_core::HRESULT); - SHPropStgCreate(psstg.param().abi(), fmtid, core::mem::transmute(pclsid.unwrap_or(std::ptr::null())), grfflags, grfmode, dwdisposition, core::mem::transmute(ppstg), core::mem::transmute(pucodepage.unwrap_or(std::ptr::null_mut()))).ok() + SHPropStgCreate(psstg.param().abi(), fmtid, core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), grfflags, grfmode, dwdisposition, core::mem::transmute(ppstg), core::mem::transmute(pucodepage.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant"))] #[inline] @@ -683,7 +683,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHPropStgWriteMultiple(pps : * mut core::ffi::c_void, pucodepage : *mut u32, cpspec : u32, rgpspec : *const super::super::super::System::Com::StructuredStorage:: PROPSPEC, rgvar : *mut core::mem::MaybeUninit < super::super::super::System::Com::StructuredStorage:: PROPVARIANT >, propidnamefirst : u32) -> windows_core::HRESULT); - SHPropStgWriteMultiple(pps.param().abi(), core::mem::transmute(pucodepage.unwrap_or(std::ptr::null_mut())), cpspec, rgpspec, core::mem::transmute(rgvar), propidnamefirst).ok() + SHPropStgWriteMultiple(pps.param().abi(), core::mem::transmute(pucodepage.unwrap_or(core::ptr::null_mut())), cpspec, rgpspec, core::mem::transmute(rgvar), propidnamefirst).ok() } windows_core::imp::define_interface!(ICreateObject, ICreateObject_Vtbl, 0x75121952_e0d0_43e5_9380_1d80483acf72); impl core::ops::Deref for ICreateObject { 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 a674ed68c7..5437000e30 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/Shell/mod.rs @@ -28,7 +28,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn AssocGetDetailsOfPropKey(psf : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, pkey : *const PropertiesSystem:: PROPERTYKEY, pv : *mut core::mem::MaybeUninit < super::super::System::Variant:: VARIANT >, pffoundpropkey : *mut super::super::Foundation:: BOOL) -> windows_core::HRESULT); - AssocGetDetailsOfPropKey(psf.param().abi(), pidl, pkey, core::mem::transmute(pv), core::mem::transmute(pffoundpropkey.unwrap_or(std::ptr::null_mut()))).ok() + AssocGetDetailsOfPropKey(psf.param().abi(), pidl, pkey, core::mem::transmute(pv), core::mem::transmute(pffoundpropkey.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -37,7 +37,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn AssocGetPerceivedType(pszext : windows_core::PCWSTR, ptype : *mut Common:: PERCEIVED, pflag : *mut u32, ppsztype : *mut windows_core::PWSTR) -> windows_core::HRESULT); - AssocGetPerceivedType(pszext.param().abi(), ptype, pflag, core::mem::transmute(ppsztype.unwrap_or(std::ptr::null_mut()))).ok() + AssocGetPerceivedType(pszext.param().abi(), ptype, pflag, core::mem::transmute(ppsztype.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn AssocIsDangerous(pszassoc: P0) -> super::super::Foundation::BOOL @@ -116,7 +116,7 @@ where { windows_targets::link!("shell32.dll" "system" fn CDefFolderMenu_Create2(pidlfolder : *const Common:: ITEMIDLIST, hwnd : super::super::Foundation:: HWND, cidl : u32, apidl : *const *const Common:: ITEMIDLIST, psf : * mut core::ffi::c_void, pfn : LPFNDFMCALLBACK, nkeys : u32, ahkeys : *const super::super::System::Registry:: HKEY, ppcm : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - CDefFolderMenu_Create2(core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), hwnd.param().abi(), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(apidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psf.param().abi(), pfn, ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ahkeys.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + CDefFolderMenu_Create2(core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), hwnd.param().abi(), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(apidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), psf.param().abi(), pfn, ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ahkeys.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -174,7 +174,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn ConnectToConnectionPoint(punk : * mut core::ffi::c_void, riidevent : *const windows_core::GUID, fconnect : super::super::Foundation:: BOOL, punktarget : * mut core::ffi::c_void, pdwcookie : *mut u32, ppcpout : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); - ConnectToConnectionPoint(punk.param().abi(), riidevent, fconnect.param().abi(), punktarget.param().abi(), pdwcookie, core::mem::transmute(ppcpout.unwrap_or(std::ptr::null_mut()))).ok() + ConnectToConnectionPoint(punk.param().abi(), riidevent, fconnect.param().abi(), punktarget.param().abi(), pdwcookie, core::mem::transmute(ppcpout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CreateProfile(pszusersid: P0, pszusername: P1, pszprofilepath: &mut [u16]) -> windows_core::Result<()> @@ -387,7 +387,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ExtractIconExA(lpszfile : windows_core::PCSTR, niconindex : i32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, nicons : u32) -> u32); - ExtractIconExA(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), nicons) + ExtractIconExA(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), nicons) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -396,7 +396,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ExtractIconExW(lpszfile : windows_core::PCWSTR, niconindex : i32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, nicons : u32) -> u32); - ExtractIconExW(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), nicons) + ExtractIconExW(lpszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), nicons) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -558,7 +558,7 @@ where P0: windows_core::Param, { windows_targets::link!("comctl32.dll" "system" fn GetWindowSubclass(hwnd : super::super::Foundation:: HWND, pfnsubclass : SUBCLASSPROC, uidsubclass : usize, pdwrefdata : *mut usize) -> super::super::Foundation:: BOOL); - GetWindowSubclass(hwnd.param().abi(), pfnsubclass, uidsubclass, core::mem::transmute(pdwrefdata.unwrap_or(std::ptr::null_mut()))) + GetWindowSubclass(hwnd.param().abi(), pfnsubclass, uidsubclass, core::mem::transmute(pdwrefdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -918,7 +918,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn ILAppendID(pidl : *const Common:: ITEMIDLIST, pmkid : *const Common:: SHITEMID, fappend : super::super::Foundation:: BOOL) -> *mut Common:: ITEMIDLIST); - ILAppendID(core::mem::transmute(pidl.unwrap_or(std::ptr::null())), pmkid, fappend.param().abi()) + ILAppendID(core::mem::transmute(pidl.unwrap_or(core::ptr::null())), pmkid, fappend.param().abi()) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -936,7 +936,7 @@ pub unsafe fn ILCloneFirst(pidl: *const Common::ITEMIDLIST) -> *mut Common::ITEM #[inline] pub unsafe fn ILCombine(pidl1: Option<*const Common::ITEMIDLIST>, pidl2: Option<*const Common::ITEMIDLIST>) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn ILCombine(pidl1 : *const Common:: ITEMIDLIST, pidl2 : *const Common:: ITEMIDLIST) -> *mut Common:: ITEMIDLIST); - ILCombine(core::mem::transmute(pidl1.unwrap_or(std::ptr::null())), core::mem::transmute(pidl2.unwrap_or(std::ptr::null()))) + ILCombine(core::mem::transmute(pidl1.unwrap_or(core::ptr::null())), core::mem::transmute(pidl2.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -972,19 +972,19 @@ pub unsafe fn ILFindLastID(pidl: *const Common::ITEMIDLIST) -> *mut Common::ITEM #[inline] pub unsafe fn ILFree(pidl: Option<*const Common::ITEMIDLIST>) { windows_targets::link!("shell32.dll" "system" fn ILFree(pidl : *const Common:: ITEMIDLIST)); - ILFree(core::mem::transmute(pidl.unwrap_or(std::ptr::null()))) + ILFree(core::mem::transmute(pidl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn ILGetNext(pidl: Option<*const Common::ITEMIDLIST>) -> *mut Common::ITEMIDLIST { windows_targets::link!("shell32.dll" "system" fn ILGetNext(pidl : *const Common:: ITEMIDLIST) -> *mut Common:: ITEMIDLIST); - ILGetNext(core::mem::transmute(pidl.unwrap_or(std::ptr::null()))) + ILGetNext(core::mem::transmute(pidl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn ILGetSize(pidl: Option<*const Common::ITEMIDLIST>) -> u32 { windows_targets::link!("shell32.dll" "system" fn ILGetSize(pidl : *const Common:: ITEMIDLIST) -> u32); - ILGetSize(core::mem::transmute(pidl.unwrap_or(std::ptr::null()))) + ILGetSize(core::mem::transmute(pidl.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -1015,7 +1015,7 @@ where #[inline] pub unsafe fn ILRemoveLastID(pidl: Option<*mut Common::ITEMIDLIST>) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn ILRemoveLastID(pidl : *mut Common:: ITEMIDLIST) -> super::super::Foundation:: BOOL); - ILRemoveLastID(core::mem::transmute(pidl.unwrap_or(std::ptr::null_mut()))) + ILRemoveLastID(core::mem::transmute(pidl.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -1115,7 +1115,7 @@ where #[inline] pub unsafe fn IUnknown_AtomicRelease(ppunk: Option<*mut *mut core::ffi::c_void>) { windows_targets::link!("shlwapi.dll" "system" fn IUnknown_AtomicRelease(ppunk : *mut *mut core::ffi::c_void)); - IUnknown_AtomicRelease(core::mem::transmute(ppunk.unwrap_or(std::ptr::null_mut()))) + IUnknown_AtomicRelease(core::mem::transmute(ppunk.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn IUnknown_GetSite(punk: P0) -> windows_core::Result @@ -1180,7 +1180,7 @@ pub unsafe fn InitNetworkAddressControl() -> super::super::Foundation::BOOL { #[inline] pub unsafe fn InitPropVariantFromStrRet(pstrret: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, ppropvar: *mut super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { windows_targets::link!("propsys.dll" "system" fn InitPropVariantFromStrRet(pstrret : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, ppropvar : *mut core::mem::MaybeUninit < super::super::System::Com::StructuredStorage:: PROPVARIANT >) -> windows_core::HRESULT); - InitPropVariantFromStrRet(pstrret, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), core::mem::transmute(ppropvar)).ok() + InitPropVariantFromStrRet(pstrret, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(ppropvar)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -1404,7 +1404,7 @@ pub unsafe fn PathCchAddBackslash(pszpath: &mut [u16]) -> windows_core::HRESULT #[inline] pub unsafe fn PathCchAddBackslashEx(pszpath: &mut [u16], ppszend: Option<*mut windows_core::PWSTR>, pcchremaining: Option<*mut usize>) -> windows_core::HRESULT { windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchAddBackslashEx(pszpath : windows_core::PWSTR, cchpath : usize, ppszend : *mut windows_core::PWSTR, pcchremaining : *mut usize) -> windows_core::HRESULT); - PathCchAddBackslashEx(core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), core::mem::transmute(ppszend.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(std::ptr::null_mut()))) + PathCchAddBackslashEx(core::mem::transmute(pszpath.as_ptr()), pszpath.len().try_into().unwrap(), core::mem::transmute(ppszend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PathCchAddExtension(pszpath: &mut [u16], pszext: P0) -> windows_core::Result<()> @@ -1489,7 +1489,7 @@ pub unsafe fn PathCchRemoveBackslash(pszpath: &mut [u16]) -> windows_core::HRESU #[inline] pub unsafe fn PathCchRemoveBackslashEx(pszpath: windows_core::PWSTR, cchpath: usize, ppszend: Option<*mut windows_core::PWSTR>, pcchremaining: Option<*mut usize>) -> windows_core::Result<()> { windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathCchRemoveBackslashEx(pszpath : windows_core::PWSTR, cchpath : usize, ppszend : *mut windows_core::PWSTR, pcchremaining : *mut usize) -> windows_core::HRESULT); - PathCchRemoveBackslashEx(core::mem::transmute(pszpath), cchpath, core::mem::transmute(ppszend.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(std::ptr::null_mut()))).ok() + PathCchRemoveBackslashEx(core::mem::transmute(pszpath), cchpath, core::mem::transmute(ppszend.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchremaining.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn PathCchRemoveExtension(pszpath: windows_core::PWSTR, cchpath: usize) -> windows_core::Result<()> { @@ -1697,12 +1697,12 @@ where #[inline] pub unsafe fn PathFindOnPathA(pszpath: &mut [u8; 260], ppszotherdirs: Option<*const *const i8>) -> super::super::Foundation::BOOL { windows_targets::link!("shlwapi.dll" "system" fn PathFindOnPathA(pszpath : windows_core::PSTR, ppszotherdirs : *const *const i8) -> super::super::Foundation:: BOOL); - PathFindOnPathA(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(std::ptr::null()))) + PathFindOnPathA(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PathFindOnPathW(pszpath: &mut [u16; 260], ppszotherdirs: Option<*const *const u16>) -> super::super::Foundation::BOOL { windows_targets::link!("shlwapi.dll" "system" fn PathFindOnPathW(pszpath : windows_core::PWSTR, ppszotherdirs : *const *const u16) -> super::super::Foundation:: BOOL); - PathFindOnPathW(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(std::ptr::null()))) + PathFindOnPathW(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(ppszotherdirs.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn PathFindSuffixArrayA(pszpath: P0, apszsuffix: &[windows_core::PCSTR]) -> windows_core::PCSTR @@ -1987,7 +1987,7 @@ where P0: windows_core::Param, { windows_targets::link!("api-ms-win-core-path-l1-1-0.dll" "system" fn PathIsUNCEx(pszpath : windows_core::PCWSTR, ppszserver : *mut windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - PathIsUNCEx(pszpath.param().abi(), core::mem::transmute(ppszserver.unwrap_or(std::ptr::null_mut()))) + PathIsUNCEx(pszpath.param().abi(), core::mem::transmute(ppszserver.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn PathIsUNCServerA(pszpath: P0) -> super::super::Foundation::BOOL @@ -2229,7 +2229,7 @@ where #[inline] pub unsafe fn PathResolve(pszpath: &mut [u16; 260], dirs: Option<*const *const u16>, fflags: PRF_FLAGS) -> i32 { windows_targets::link!("shell32.dll" "system" fn PathResolve(pszpath : windows_core::PWSTR, dirs : *const *const u16, fflags : u32) -> i32); - PathResolve(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dirs.unwrap_or(std::ptr::null())), fflags.0 as _) + PathResolve(core::mem::transmute(pszpath.as_ptr()), core::mem::transmute(dirs.unwrap_or(core::ptr::null())), fflags.0 as _) } #[inline] pub unsafe fn PathSearchAndQualifyA(pszpath: P0, pszbuf: &mut [u8]) -> super::super::Foundation::BOOL @@ -2369,7 +2369,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn PickIconDlg(hwnd : super::super::Foundation:: HWND, psziconpath : windows_core::PWSTR, cchiconpath : u32, piiconindex : *mut i32) -> i32); - PickIconDlg(hwnd.param().abi(), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), core::mem::transmute(piiconindex.unwrap_or(std::ptr::null_mut()))) + PickIconDlg(hwnd.param().abi(), core::mem::transmute(psziconpath.as_ptr()), psziconpath.len().try_into().unwrap(), core::mem::transmute(piiconindex.unwrap_or(core::ptr::null_mut()))) } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2402,12 +2402,12 @@ where #[inline] pub unsafe fn RegisterAppConstrainedChangeNotification(routine: PAPPCONSTRAIN_CHANGE_ROUTINE, context: Option<*const core::ffi::c_void>, registration: *mut PAPPCONSTRAIN_REGISTRATION) -> u32 { windows_targets::link!("api-ms-win-core-psm-appnotify-l1-1-1.dll" "system" fn RegisterAppConstrainedChangeNotification(routine : PAPPCONSTRAIN_CHANGE_ROUTINE, context : *const core::ffi::c_void, registration : *mut PAPPCONSTRAIN_REGISTRATION) -> u32); - RegisterAppConstrainedChangeNotification(routine, core::mem::transmute(context.unwrap_or(std::ptr::null())), registration) + RegisterAppConstrainedChangeNotification(routine, core::mem::transmute(context.unwrap_or(core::ptr::null())), registration) } #[inline] pub unsafe fn RegisterAppStateChangeNotification(routine: PAPPSTATE_CHANGE_ROUTINE, context: Option<*const core::ffi::c_void>, registration: *mut PAPPSTATE_REGISTRATION) -> u32 { windows_targets::link!("api-ms-win-core-psm-appnotify-l1-1-0.dll" "system" fn RegisterAppStateChangeNotification(routine : PAPPSTATE_CHANGE_ROUTINE, context : *const core::ffi::c_void, registration : *mut PAPPSTATE_REGISTRATION) -> u32); - RegisterAppStateChangeNotification(routine, core::mem::transmute(context.unwrap_or(std::ptr::null())), registration) + RegisterAppStateChangeNotification(routine, core::mem::transmute(context.unwrap_or(core::ptr::null())), registration) } #[inline] pub unsafe fn RegisterScaleChangeEvent(hevent: P0) -> windows_core::Result @@ -2471,7 +2471,7 @@ where #[inline] pub unsafe fn SHAddToRecentDocs(uflags: u32, pv: Option<*const core::ffi::c_void>) { windows_targets::link!("shell32.dll" "system" fn SHAddToRecentDocs(uflags : u32, pv : *const core::ffi::c_void)); - SHAddToRecentDocs(uflags, core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + SHAddToRecentDocs(uflags, core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SHAlloc(cb: usize) -> *mut core::ffi::c_void { @@ -2481,7 +2481,7 @@ pub unsafe fn SHAlloc(cb: usize) -> *mut core::ffi::c_void { #[inline] pub unsafe fn SHAllocShared(pvdata: Option<*const core::ffi::c_void>, dwsize: u32, dwprocessid: u32) -> super::super::Foundation::HANDLE { windows_targets::link!("shlwapi.dll" "system" fn SHAllocShared(pvdata : *const core::ffi::c_void, dwsize : u32, dwprocessid : u32) -> super::super::Foundation:: HANDLE); - SHAllocShared(core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), dwsize, dwprocessid) + SHAllocShared(core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), dwsize, dwprocessid) } #[inline] pub unsafe fn SHAnsiToAnsi(pszsrc: P0, pszdst: &mut [u8]) -> i32 @@ -2540,7 +2540,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHBindToFolderIDListParent(psfroot : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void, ppidllast : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHBindToFolderIDListParent(psfroot.param().abi(), pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(std::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) + SHBindToFolderIDListParent(psfroot.param().abi(), pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2552,7 +2552,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHBindToFolderIDListParentEx(psfroot : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, ppbc : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void, ppidllast : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHBindToFolderIDListParentEx(psfroot.param().abi(), pidl, ppbc.param().abi(), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(std::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) + SHBindToFolderIDListParentEx(psfroot.param().abi(), pidl, ppbc.param().abi(), &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2574,7 +2574,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHBindToParent(pidl : *const Common:: ITEMIDLIST, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void, ppidllast : *mut *mut Common:: ITEMIDLIST) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHBindToParent(pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(std::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) + SHBindToParent(pidl, &T::IID, &mut result__, core::mem::transmute(ppidllast.unwrap_or(core::ptr::null_mut()))).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2604,7 +2604,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHChangeNotification_Lock(hchange : super::super::Foundation:: HANDLE, dwprocid : u32, pppidl : *mut *mut *mut Common:: ITEMIDLIST, plevent : *mut i32) -> super::super::Foundation:: HANDLE); - SHChangeNotification_Lock(hchange.param().abi(), dwprocid, core::mem::transmute(pppidl.unwrap_or(std::ptr::null_mut())), core::mem::transmute(plevent.unwrap_or(std::ptr::null_mut()))) + SHChangeNotification_Lock(hchange.param().abi(), dwprocid, core::mem::transmute(pppidl.unwrap_or(core::ptr::null_mut())), core::mem::transmute(plevent.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHChangeNotification_Unlock(hlock: P0) -> super::super::Foundation::BOOL @@ -2617,7 +2617,7 @@ where #[inline] pub unsafe fn SHChangeNotify(weventid: SHCNE_ID, uflags: SHCNF_FLAGS, dwitem1: Option<*const core::ffi::c_void>, dwitem2: Option<*const core::ffi::c_void>) { windows_targets::link!("shell32.dll" "system" fn SHChangeNotify(weventid : i32, uflags : SHCNF_FLAGS, dwitem1 : *const core::ffi::c_void, dwitem2 : *const core::ffi::c_void)); - SHChangeNotify(weventid.0 as _, uflags, core::mem::transmute(dwitem1.unwrap_or(std::ptr::null())), core::mem::transmute(dwitem2.unwrap_or(std::ptr::null()))) + SHChangeNotify(weventid.0 as _, uflags, core::mem::transmute(dwitem1.unwrap_or(core::ptr::null())), core::mem::transmute(dwitem2.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SHChangeNotifyDeregister(ulid: u32) -> super::super::Foundation::BOOL { @@ -2657,7 +2657,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCoCreateInstance(pszclsid : windows_core::PCWSTR, pclsid : *const windows_core::GUID, punkouter : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHCoCreateInstance(pszclsid.param().abi(), core::mem::transmute(pclsid.unwrap_or(std::ptr::null())), punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCoCreateInstance(pszclsid.param().abi(), core::mem::transmute(pclsid.unwrap_or(core::ptr::null())), punkouter.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -2699,7 +2699,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCreateDataObject(pidlfolder : *const Common:: ITEMIDLIST, cidl : u32, apidl : *const *const Common:: ITEMIDLIST, pdtinner : * mut core::ffi::c_void, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHCreateDataObject(core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(apidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdtinner.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateDataObject(core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), apidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(apidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdtinner.param().abi(), &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -2746,7 +2746,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectoryExA(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCSTR, psa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> i32); - SHCreateDirectoryExA(hwnd.param().abi(), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(std::ptr::null()))) + SHCreateDirectoryExA(hwnd.param().abi(), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_Security")] #[inline] @@ -2756,7 +2756,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHCreateDirectoryExW(hwnd : super::super::Foundation:: HWND, pszpath : windows_core::PCWSTR, psa : *const super::super::Security:: SECURITY_ATTRIBUTES) -> i32); - SHCreateDirectoryExW(hwnd.param().abi(), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(std::ptr::null()))) + SHCreateDirectoryExW(hwnd.param().abi(), pszpath.param().abi(), core::mem::transmute(psa.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SHCreateFileExtractIconW(pszfile: P0, dwfileattributes: u32) -> windows_core::Result @@ -2822,7 +2822,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCreateItemWithParent(pidlparent : *const Common:: ITEMIDLIST, psfparent : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, riid : *const windows_core::GUID, ppvitem : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHCreateItemWithParent(core::mem::transmute(pidlparent.unwrap_or(std::ptr::null())), psfparent.param().abi(), pidl, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateItemWithParent(core::mem::transmute(pidlparent.unwrap_or(core::ptr::null())), psfparent.param().abi(), pidl, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2875,7 +2875,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCreateShellItem(pidlparent : *const Common:: ITEMIDLIST, psfparent : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, ppsi : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHCreateShellItem(core::mem::transmute(pidlparent.unwrap_or(std::ptr::null())), psfparent.param().abi(), pidl, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateShellItem(core::mem::transmute(pidlparent.unwrap_or(core::ptr::null())), psfparent.param().abi(), pidl, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -2885,7 +2885,7 @@ where { windows_targets::link!("shell32.dll" "system" fn SHCreateShellItemArray(pidlparent : *const Common:: ITEMIDLIST, psf : * mut core::ffi::c_void, cidl : u32, ppidl : *const *const Common:: ITEMIDLIST, ppsiitemarray : *mut * mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::mem::zeroed(); - SHCreateShellItemArray(core::mem::transmute(pidlparent.unwrap_or(std::ptr::null())), psf.param().abi(), ppidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHCreateShellItemArray(core::mem::transmute(pidlparent.unwrap_or(core::ptr::null())), psf.param().abi(), ppidl.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppidl.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_System_Com")] #[inline] @@ -2967,7 +2967,7 @@ where #[inline] pub unsafe fn SHCreateThread(pfnthreadproc: super::super::System::Threading::LPTHREAD_START_ROUTINE, pdata: 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).ok() + SHCreateThread(pfnthreadproc, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), flags, pfncallback).ok() } #[inline] pub unsafe fn SHCreateThreadRef(pcref: *mut i32, ppunk: *mut Option) -> windows_core::Result<()> { @@ -2978,7 +2978,7 @@ pub unsafe fn SHCreateThreadRef(pcref: *mut i32, ppunk: *mut Option, flags: u32, pfncallback: super::super::System::Threading::LPTHREAD_START_ROUTINE, phandle: 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()))).ok() + SHCreateThreadWithHandle(pfnthreadproc, core::mem::transmute(pdata.unwrap_or(core::ptr::null())), flags, pfncallback, core::mem::transmute(phandle.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2987,7 +2987,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHDefExtractIconA(psziconfile : windows_core::PCSTR, iindex : i32, uflags : u32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, niconsize : u32) -> windows_core::HRESULT); - SHDefExtractIconA(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), niconsize) + SHDefExtractIconA(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), niconsize) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -2996,7 +2996,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHDefExtractIconW(psziconfile : windows_core::PCWSTR, iindex : i32, uflags : u32, phiconlarge : *mut super::WindowsAndMessaging:: HICON, phiconsmall : *mut super::WindowsAndMessaging:: HICON, niconsize : u32) -> windows_core::HRESULT); - SHDefExtractIconW(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), niconsize) + SHDefExtractIconW(psziconfile.param().abi(), iindex, uflags, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), niconsize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3123,7 +3123,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(pszvaluename), core::mem::transmute(pcchvaluename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3132,7 +3132,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), dwindex, core::mem::transmute(pszvaluename), core::mem::transmute(pcchvaluename.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3149,7 +3149,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHEvaluateSystemCommandTemplate(pszcmdtemplate : windows_core::PCWSTR, ppszapplication : *mut windows_core::PWSTR, ppszcommandline : *mut windows_core::PWSTR, ppszparameters : *mut windows_core::PWSTR) -> windows_core::HRESULT); - SHEvaluateSystemCommandTemplate(pszcmdtemplate.param().abi(), ppszapplication, core::mem::transmute(ppszcommandline.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppszparameters.unwrap_or(std::ptr::null_mut()))).ok() + SHEvaluateSystemCommandTemplate(pszcmdtemplate.param().abi(), ppszapplication, core::mem::transmute(ppszcommandline.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppszparameters.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SHFileOperationA(lpfileop: *mut SHFILEOPSTRUCTA) -> i32 { @@ -3165,7 +3165,7 @@ pub unsafe fn SHFileOperationW(lpfileop: *mut SHFILEOPSTRUCTW) -> i32 { #[inline] pub unsafe fn SHFindFiles(pidlfolder: Option<*const Common::ITEMIDLIST>, pidlsavefile: Option<*const Common::ITEMIDLIST>) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn SHFindFiles(pidlfolder : *const Common:: ITEMIDLIST, pidlsavefile : *const Common:: ITEMIDLIST) -> super::super::Foundation:: BOOL); - SHFindFiles(core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), core::mem::transmute(pidlsavefile.unwrap_or(std::ptr::null()))) + SHFindFiles(core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), core::mem::transmute(pidlsavefile.unwrap_or(core::ptr::null()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -3185,12 +3185,12 @@ pub unsafe fn SHFlushSFCache() { #[inline] pub unsafe fn SHFormatDateTimeA(pft: *const super::super::Foundation::FILETIME, pdwflags: Option<*mut u32>, pszbuf: &mut [u8]) -> i32 { windows_targets::link!("shlwapi.dll" "system" fn SHFormatDateTimeA(pft : *const super::super::Foundation:: FILETIME, pdwflags : *mut u32, pszbuf : windows_core::PSTR, cchbuf : u32) -> i32); - SHFormatDateTimeA(pft, core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) + SHFormatDateTimeA(pft, core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn SHFormatDateTimeW(pft: *const super::super::Foundation::FILETIME, pdwflags: Option<*mut u32>, pszbuf: &mut [u16]) -> i32 { windows_targets::link!("shlwapi.dll" "system" fn SHFormatDateTimeW(pft : *const super::super::Foundation:: FILETIME, pdwflags : *mut u32, pszbuf : windows_core::PWSTR, cchbuf : u32) -> i32); - SHFormatDateTimeW(pft, core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) + SHFormatDateTimeW(pft, core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()) } #[inline] pub unsafe fn SHFormatDrive(hwnd: P0, drive: u32, fmtid: SHFMT_ID, options: SHFMT_OPT) -> u32 @@ -3203,7 +3203,7 @@ where #[inline] pub unsafe fn SHFree(pv: Option<*const core::ffi::c_void>) { windows_targets::link!("shell32.dll" "system" fn SHFree(pv : *const core::ffi::c_void)); - SHFree(core::mem::transmute(pv.unwrap_or(std::ptr::null()))) + SHFree(core::mem::transmute(pv.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn SHFreeNameMappings(hnamemappings: P0) @@ -3228,7 +3228,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetAttributesFromDataObject(pdo : * mut core::ffi::c_void, dwattributemask : u32, pdwattributes : *mut u32, pcitems : *mut u32) -> windows_core::HRESULT); - SHGetAttributesFromDataObject(pdo.param().abi(), dwattributemask, core::mem::transmute(pdwattributes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcitems.unwrap_or(std::ptr::null_mut()))) + SHGetAttributesFromDataObject(pdo.param().abi(), dwattributemask, core::mem::transmute(pdwattributes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcitems.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3260,7 +3260,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetDiskFreeSpaceExA(pszdirectoryname : windows_core::PCSTR, pulfreebytesavailabletocaller : *mut u64, pultotalnumberofbytes : *mut u64, pultotalnumberoffreebytes : *mut u64) -> super::super::Foundation:: BOOL); - SHGetDiskFreeSpaceExA(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(std::ptr::null_mut()))) + SHGetDiskFreeSpaceExA(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHGetDiskFreeSpaceExW(pszdirectoryname: P0, pulfreebytesavailabletocaller: Option<*mut u64>, pultotalnumberofbytes: Option<*mut u64>, pultotalnumberoffreebytes: Option<*mut u64>) -> super::super::Foundation::BOOL @@ -3268,7 +3268,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetDiskFreeSpaceExW(pszdirectoryname : windows_core::PCWSTR, pulfreebytesavailabletocaller : *mut u64, pultotalnumberofbytes : *mut u64, pultotalnumberoffreebytes : *mut u64) -> super::super::Foundation:: BOOL); - SHGetDiskFreeSpaceExW(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(std::ptr::null_mut()))) + SHGetDiskFreeSpaceExW(pszdirectoryname.param().abi(), core::mem::transmute(pulfreebytesavailabletocaller.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberofbytes.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pultotalnumberoffreebytes.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHGetDriveMedia(pszdrive: P0) -> windows_core::Result @@ -3286,7 +3286,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetFileInfoA(pszpath : windows_core::PCSTR, dwfileattributes : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, psfi : *mut SHFILEINFOA, cbfileinfo : u32, uflags : SHGFI_FLAGS) -> usize); - SHGetFileInfoA(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(std::ptr::null_mut())), cbfileinfo, uflags) + SHGetFileInfoA(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(core::ptr::null_mut())), cbfileinfo, uflags) } #[cfg(all(feature = "Win32_Storage_FileSystem", feature = "Win32_UI_WindowsAndMessaging"))] #[inline] @@ -3295,7 +3295,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetFileInfoW(pszpath : windows_core::PCWSTR, dwfileattributes : super::super::Storage::FileSystem:: FILE_FLAGS_AND_ATTRIBUTES, psfi : *mut SHFILEINFOW, cbfileinfo : u32, uflags : SHGFI_FLAGS) -> usize); - SHGetFileInfoW(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(std::ptr::null_mut())), cbfileinfo, uflags) + SHGetFileInfoW(pszpath.param().abi(), dwfileattributes, core::mem::transmute(psfi.unwrap_or(core::ptr::null_mut())), cbfileinfo, uflags) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3524,7 +3524,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetSetSettings(lpss : *mut SHELLSTATEA, dwmask : SSF_MASK, bset : super::super::Foundation:: BOOL)); - SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(std::ptr::null_mut())), dwmask, bset.param().abi()) + SHGetSetSettings(core::mem::transmute(lpss.unwrap_or(core::ptr::null_mut())), dwmask, bset.param().abi()) } #[inline] pub unsafe fn SHGetSettings(psfs: *mut SHELLFLAGSTATE, dwmask: u32) { @@ -3589,7 +3589,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHGetUnreadMailCountW(hkeyuser : super::super::System::Registry:: HKEY, pszmailaddress : windows_core::PCWSTR, pdwcount : *mut u32, pfiletime : *mut super::super::Foundation:: FILETIME, pszshellexecutecommand : windows_core::PWSTR, cchshellexecutecommand : i32) -> windows_core::HRESULT); - SHGetUnreadMailCountW(hkeyuser.param().abi(), pszmailaddress.param().abi(), core::mem::transmute(pdwcount.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfiletime.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszshellexecutecommand.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszshellexecutecommand.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + SHGetUnreadMailCountW(hkeyuser.param().abi(), pszmailaddress.param().abi(), core::mem::transmute(pdwcount.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfiletime.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszshellexecutecommand.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszshellexecutecommand.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3600,7 +3600,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszsubkey.param().abi(), pszvalue.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.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3611,7 +3611,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszsubkey.param().abi(), pszvalue.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.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] @@ -3622,7 +3622,7 @@ where { windows_targets::link!("shlwapi.dll" "system" fn SHGetViewStatePropertyBag(pidl : *const Common:: ITEMIDLIST, pszbagname : windows_core::PCWSTR, dwflags : u32, riid : *const windows_core::GUID, ppv : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); let mut result__ = core::ptr::null_mut(); - SHGetViewStatePropertyBag(core::mem::transmute(pidl.unwrap_or(std::ptr::null())), pszbagname.param().abi(), dwflags, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + SHGetViewStatePropertyBag(core::mem::transmute(pidl.unwrap_or(core::ptr::null())), pszbagname.param().abi(), dwflags, &T::IID, &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[inline] pub unsafe fn SHGlobalCounterDecrement(id: SHGLOBALCOUNTER) -> i32 { @@ -3652,7 +3652,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHILCreateFromPath(pszpath : windows_core::PCWSTR, ppidl : *mut *mut Common:: ITEMIDLIST, rgfinout : *mut u32) -> windows_core::HRESULT); - SHILCreateFromPath(pszpath.param().abi(), ppidl, core::mem::transmute(rgfinout.unwrap_or(std::ptr::null_mut()))).ok() + SHILCreateFromPath(pszpath.param().abi(), ppidl, core::mem::transmute(rgfinout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SHInvokePrinterCommandA(hwnd: P0, uaction: u32, lpbuf1: P1, lpbuf2: P2, fmodal: P3) -> super::super::Foundation::BOOL @@ -3682,7 +3682,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHIsFileAvailableOffline(pwszpath : windows_core::PCWSTR, pdwstatus : *mut u32) -> windows_core::HRESULT); - SHIsFileAvailableOffline(pwszpath.param().abi(), core::mem::transmute(pdwstatus.unwrap_or(std::ptr::null_mut()))).ok() + SHIsFileAvailableOffline(pwszpath.param().abi(), core::mem::transmute(pdwstatus.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SHIsLowMemoryMachine(dwtype: u32) -> super::super::Foundation::BOOL { @@ -3709,7 +3709,7 @@ where P0: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHLoadIndirectString(pszsource : windows_core::PCWSTR, pszoutbuf : windows_core::PWSTR, cchoutbuf : u32, ppvreserved : *const *const core::ffi::c_void) -> windows_core::HRESULT); - SHLoadIndirectString(pszsource.param().abi(), core::mem::transmute(pszoutbuf.as_ptr()), pszoutbuf.len().try_into().unwrap(), core::mem::transmute(ppvreserved.unwrap_or(std::ptr::null()))).ok() + SHLoadIndirectString(pszsource.param().abi(), core::mem::transmute(pszoutbuf.as_ptr()), pszoutbuf.len().try_into().unwrap(), core::mem::transmute(ppvreserved.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn SHLoadNonloadedIconOverlayIdentifiers() -> windows_core::Result<()> { @@ -3731,7 +3731,7 @@ where P0: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHMapPIDLToSystemImageListIndex(pshf : * mut core::ffi::c_void, pidl : *const Common:: ITEMIDLIST, piindexsel : *mut i32) -> i32); - SHMapPIDLToSystemImageListIndex(pshf.param().abi(), pidl, core::mem::transmute(piindexsel.unwrap_or(std::ptr::null_mut()))) + SHMapPIDLToSystemImageListIndex(pshf.param().abi(), pidl, core::mem::transmute(piindexsel.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHMessageBoxCheckA(hwnd: P0, psztext: P1, pszcaption: P2, utype: u32, idefault: i32, pszregval: P3) -> i32 @@ -3790,7 +3790,7 @@ where P3: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHOpenPropSheetW(pszcaption : windows_core::PCWSTR, ahkeys : *const super::super::System::Registry:: HKEY, ckeys : u32, pclsiddefault : *const windows_core::GUID, pdtobj : * mut core::ffi::c_void, psb : * mut core::ffi::c_void, pstartpage : windows_core::PCWSTR) -> super::super::Foundation:: BOOL); - SHOpenPropSheetW(pszcaption.param().abi(), core::mem::transmute(ahkeys.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pclsiddefault.unwrap_or(std::ptr::null())), pdtobj.param().abi(), psb.param().abi(), pstartpage.param().abi()) + SHOpenPropSheetW(pszcaption.param().abi(), core::mem::transmute(ahkeys.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), ahkeys.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pclsiddefault.unwrap_or(core::ptr::null())), pdtobj.param().abi(), psb.param().abi(), pstartpage.param().abi()) } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Registry"))] #[inline] @@ -3852,7 +3852,7 @@ where P1: windows_core::Param, { windows_targets::link!("shell32.dll" "system" fn SHParseDisplayName(pszname : windows_core::PCWSTR, pbc : * mut core::ffi::c_void, ppidl : *mut *mut Common:: ITEMIDLIST, sfgaoin : u32, psfgaoout : *mut u32) -> windows_core::HRESULT); - SHParseDisplayName(pszname.param().abi(), pbc.param().abi(), ppidl, sfgaoin, core::mem::transmute(psfgaoout.unwrap_or(std::ptr::null_mut()))).ok() + SHParseDisplayName(pszname.param().abi(), pbc.param().abi(), ppidl, sfgaoin, core::mem::transmute(psfgaoout.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn SHPathPrepareForWriteA(hwnd: P0, punkenablemodless: P1, pszpath: P2, dwflags: u32) -> windows_core::Result<()> @@ -3881,7 +3881,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(pcsubkeys.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcvalues.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3890,7 +3890,7 @@ where P0: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(pcsubkeys.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcvalues.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHQueryRecycleBinA(pszrootpath: P0, pshqueryrbinfo: *mut SHQUERYRBINFO) -> windows_core::Result<()> @@ -3922,7 +3922,7 @@ where P1: windows_core::Param, { 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.param().abi(), pszvalue.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.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -3932,7 +3932,7 @@ where P1: windows_core::Param, { 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.param().abi(), pszvalue.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.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwreserved.unwrap_or(core::ptr::null())), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHRegCloseUSKey(huskey: isize) -> super::super::Foundation::WIN32_ERROR { @@ -4009,12 +4009,12 @@ pub unsafe fn SHRegEnumUSKeyW(huskey: isize, dwindex: u32, pwzname: windows_core #[inline] pub unsafe fn SHRegEnumUSValueA(huskey: isize, dwindex: u32, pszvaluename: windows_core::PSTR, pcchvaluename: *mut u32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), enumregflags) } #[inline] pub unsafe fn SHRegEnumUSValueW(huskey: isize, dwindex: u32, pszvaluename: windows_core::PWSTR, pcchvaluename: *mut u32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), enumregflags) } #[inline] pub unsafe fn SHRegGetBoolUSValueA(pszsubkey: P0, pszvalue: P1, fignorehkcu: P2, fdefault: P3) -> super::super::Foundation::BOOL @@ -4078,7 +4078,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszvalue.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.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(std::ptr::null())), dwdefaultdatasize) + SHRegGetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::ptr::null())), dwdefaultdatasize) } #[inline] pub unsafe fn SHRegGetUSValueW(pszsubkey: P0, pszvalue: P1, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P2, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -4088,7 +4088,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszvalue.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.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(std::ptr::null())), dwdefaultdatasize) + SHRegGetUSValueW(pszsubkey.param().abi(), pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::ptr::null())), dwdefaultdatasize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4099,7 +4099,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszsubkey.param().abi(), pszvalue.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.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), srrfflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHRegGetValueFromHKCUHKLM(pwszkey: P0, pwszvalue: P1, srrfflags: i32, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>) -> super::super::Foundation::WIN32_ERROR @@ -4108,7 +4108,7 @@ where P1: windows_core::Param, { 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.param().abi(), pwszvalue.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.param().abi(), pwszvalue.param().abi(), srrfflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4119,7 +4119,7 @@ where P2: windows_core::Param, { 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.param().abi(), pszsubkey.param().abi(), pszvalue.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.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), srrfflags, core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SHRegOpenUSKeyA(pszpath: P0, samdesired: u32, hrelativeuskey: isize, phnewuskey: *mut isize, fignorehkcu: P1) -> super::super::Foundation::WIN32_ERROR @@ -4142,12 +4142,12 @@ where #[inline] pub unsafe fn SHRegQueryInfoUSKeyA(huskey: isize, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcvalues.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::ptr::null_mut())), enumregflags) } #[inline] pub unsafe fn SHRegQueryInfoUSKeyW(huskey: isize, pcsubkeys: Option<*mut u32>, pcchmaxsubkeylen: Option<*mut u32>, pcvalues: Option<*mut u32>, pcchmaxvaluenamelen: Option<*mut u32>, enumregflags: SHREGENUM_FLAGS) -> super::super::Foundation::WIN32_ERROR { 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(core::ptr::null_mut())), core::mem::transmute(pcchmaxsubkeylen.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcvalues.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcchmaxvaluenamelen.unwrap_or(core::ptr::null_mut())), enumregflags) } #[inline] pub unsafe fn SHRegQueryUSValueA(huskey: isize, pszvalue: P0, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -4156,7 +4156,7 @@ where P1: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(std::ptr::null())), dwdefaultdatasize) + SHRegQueryUSValueA(huskey, pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::ptr::null())), dwdefaultdatasize) } #[inline] pub unsafe fn SHRegQueryUSValueW(huskey: isize, pszvalue: P0, pdwtype: Option<*mut u32>, pvdata: Option<*mut core::ffi::c_void>, pcbdata: Option<*mut u32>, fignorehkcu: P1, pvdefaultdata: Option<*const core::ffi::c_void>, dwdefaultdatasize: u32) -> super::super::Foundation::WIN32_ERROR @@ -4165,7 +4165,7 @@ where P1: windows_core::Param, { 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.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.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(std::ptr::null())), dwdefaultdatasize) + SHRegQueryUSValueW(huskey, pszvalue.param().abi(), core::mem::transmute(pdwtype.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pvdata.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbdata.unwrap_or(core::ptr::null_mut())), fignorehkcu.param().abi(), core::mem::transmute(pvdefaultdata.unwrap_or(core::ptr::null())), dwdefaultdatasize) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4198,7 +4198,7 @@ where P1: windows_core::Param, { 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.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata, dwflags) + SHRegSetUSValueA(pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata, dwflags) } #[inline] pub unsafe fn SHRegSetUSValueW(pwzsubkey: P0, pwzvalue: P1, dwtype: u32, pvdata: Option<*const core::ffi::c_void>, cbdata: u32, dwflags: u32) -> super::super::Foundation::WIN32_ERROR @@ -4207,7 +4207,7 @@ where P1: windows_core::Param, { 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.param().abi(), pwzvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata, dwflags) + SHRegSetUSValueW(pwzsubkey.param().abi(), pwzvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata, dwflags) } #[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 @@ -4368,7 +4368,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHSetValueA(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCSTR, pszvalue : windows_core::PCSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32) -> i32); - SHSetValueA(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata) + SHSetValueA(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata) } #[cfg(feature = "Win32_System_Registry")] #[inline] @@ -4379,7 +4379,7 @@ where P2: windows_core::Param, { windows_targets::link!("shlwapi.dll" "system" fn SHSetValueW(hkey : super::super::System::Registry:: HKEY, pszsubkey : windows_core::PCWSTR, pszvalue : windows_core::PCWSTR, dwtype : u32, pvdata : *const core::ffi::c_void, cbdata : u32) -> i32); - SHSetValueW(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(std::ptr::null())), cbdata) + SHSetValueW(hkey.param().abi(), pszsubkey.param().abi(), pszvalue.param().abi(), dwtype, core::mem::transmute(pvdata.unwrap_or(core::ptr::null())), cbdata) } #[inline] pub unsafe fn SHShellFolderView_Message(hwndmain: P0, umsg: u32, lparam: P1) -> super::super::Foundation::LRESULT @@ -4656,7 +4656,7 @@ where #[inline] pub unsafe fn Shell_GetImageLists(phiml: Option<*mut super::Controls::HIMAGELIST>, phimlsmall: Option<*mut super::Controls::HIMAGELIST>) -> super::super::Foundation::BOOL { windows_targets::link!("shell32.dll" "system" fn Shell_GetImageLists(phiml : *mut super::Controls:: HIMAGELIST, phimlsmall : *mut super::Controls:: HIMAGELIST) -> super::super::Foundation:: BOOL); - Shell_GetImageLists(core::mem::transmute(phiml.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phimlsmall.unwrap_or(std::ptr::null_mut()))) + Shell_GetImageLists(core::mem::transmute(phiml.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phimlsmall.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] #[inline] @@ -4700,7 +4700,7 @@ where P1: windows_core::Param, { windows_targets::link!("shdocvw.dll" "system" fn SoftwareUpdateMessageBox(hwnd : super::super::Foundation:: HWND, pszdistunit : windows_core::PCWSTR, dwflags : u32, psdi : *mut super::super::System::Com::Urlmon:: SOFTDISTINFO) -> u32); - SoftwareUpdateMessageBox(hwnd.param().abi(), pszdistunit.param().abi(), dwflags, core::mem::transmute(psdi.unwrap_or(std::ptr::null_mut()))) + SoftwareUpdateMessageBox(hwnd.param().abi(), pszdistunit.param().abi(), dwflags, core::mem::transmute(psdi.unwrap_or(core::ptr::null_mut()))) } #[cfg(feature = "Win32_System_Com_StructuredStorage")] #[inline] @@ -5151,31 +5151,31 @@ where #[inline] pub unsafe fn StrRetToBSTR(pstr: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, pbstr: *mut windows_core::BSTR) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn StrRetToBSTR(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, pbstr : *mut core::mem::MaybeUninit < windows_core::BSTR >) -> windows_core::HRESULT); - StrRetToBSTR(pstr, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), core::mem::transmute(pbstr)).ok() + StrRetToBSTR(pstr, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pbstr)).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn StrRetToBufA(pstr: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, pszbuf: &mut [u8]) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn StrRetToBufA(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, pszbuf : windows_core::PSTR, cchbuf : u32) -> windows_core::HRESULT); - StrRetToBufA(pstr, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() + StrRetToBufA(pstr, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn StrRetToBufW(pstr: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, pszbuf: &mut [u16]) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn StrRetToBufW(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, pszbuf : windows_core::PWSTR, cchbuf : u32) -> windows_core::HRESULT); - StrRetToBufW(pstr, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() + StrRetToBufW(pstr, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), core::mem::transmute(pszbuf.as_ptr()), pszbuf.len().try_into().unwrap()).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn StrRetToStrA(pstr: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, ppsz: *mut windows_core::PSTR) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn StrRetToStrA(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, ppsz : *mut windows_core::PSTR) -> windows_core::HRESULT); - StrRetToStrA(pstr, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), ppsz).ok() + StrRetToStrA(pstr, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), ppsz).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] #[inline] pub unsafe fn StrRetToStrW(pstr: *mut Common::STRRET, pidl: Option<*const Common::ITEMIDLIST>, ppsz: *mut windows_core::PWSTR) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn StrRetToStrW(pstr : *mut Common:: STRRET, pidl : *const Common:: ITEMIDLIST, ppsz : *mut windows_core::PWSTR) -> windows_core::HRESULT); - StrRetToStrW(pstr, core::mem::transmute(pidl.unwrap_or(std::ptr::null())), ppsz).ok() + StrRetToStrW(pstr, core::mem::transmute(pidl.unwrap_or(core::ptr::null())), ppsz).ok() } #[inline] pub unsafe fn StrSpnA(psz: P0, pszset: P1) -> i32 @@ -5552,12 +5552,12 @@ where #[inline] pub unsafe fn UrlUnescapeA(pszurl: windows_core::PSTR, pszunescaped: windows_core::PSTR, pcchunescaped: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn UrlUnescapeA(pszurl : windows_core::PSTR, pszunescaped : windows_core::PSTR, pcchunescaped : *mut u32, dwflags : u32) -> windows_core::HRESULT); - UrlUnescapeA(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped), core::mem::transmute(pcchunescaped.unwrap_or(std::ptr::null_mut())), dwflags).ok() + UrlUnescapeA(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped), core::mem::transmute(pcchunescaped.unwrap_or(core::ptr::null_mut())), dwflags).ok() } #[inline] pub unsafe fn UrlUnescapeW(pszurl: windows_core::PWSTR, pszunescaped: windows_core::PWSTR, pcchunescaped: Option<*mut u32>, dwflags: u32) -> windows_core::Result<()> { windows_targets::link!("shlwapi.dll" "system" fn UrlUnescapeW(pszurl : windows_core::PWSTR, pszunescaped : windows_core::PWSTR, pcchunescaped : *mut u32, dwflags : u32) -> windows_core::HRESULT); - UrlUnescapeW(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped), core::mem::transmute(pcchunescaped.unwrap_or(std::ptr::null_mut())), dwflags).ok() + UrlUnescapeW(core::mem::transmute(pszurl), core::mem::transmute(pszunescaped), core::mem::transmute(pcchunescaped.unwrap_or(core::ptr::null_mut())), dwflags).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common"))] #[inline] @@ -7164,7 +7164,7 @@ impl IAttachmentExecute { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pszverb.param().abi(), core::mem::transmute(phprocess.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Execute)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pszverb.param().abi(), core::mem::transmute(phprocess.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SaveWithUI(&self, hwnd: P0) -> windows_core::Result<()> where @@ -7324,7 +7324,7 @@ impl IBandSite { } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryBand(&self, dwbandid: u32, ppstb: Option<*mut Option>, pdwstate: Option<*mut u32>, pszname: Option<&mut [u16]>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).QueryBand)(windows_core::Interface::as_raw(self), dwbandid, core::mem::transmute(ppstb.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pszname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() + (windows_core::Interface::vtable(self).QueryBand)(windows_core::Interface::as_raw(self), dwbandid, core::mem::transmute(ppstb.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwstate.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pszname.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pszname.as_deref().map_or(0, |slice| slice.len().try_into().unwrap())).ok() } pub unsafe fn SetBandState(&self, dwbandid: u32, dwmask: u32, dwstate: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetBandState)(windows_core::Interface::as_raw(self), dwbandid, dwmask, dwstate).ok() @@ -7848,7 +7848,7 @@ impl IBrowserService2 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.param().abi(), core::mem::transmute(pguidcmdgroup.unwrap_or(std::ptr::null())), ncmdid, ncmdexecopt, core::mem::transmute(pvarargin.unwrap_or(std::ptr::null())), core::mem::transmute(pvarargout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self)._ExecChildren)(windows_core::Interface::as_raw(self), punkbar.param().abi(), fbroadcast.param().abi(), core::mem::transmute(pguidcmdgroup.unwrap_or(core::ptr::null())), ncmdid, ncmdexecopt, core::mem::transmute(pvarargin.unwrap_or(core::ptr::null())), core::mem::transmute(pvarargout.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn _SendChildren(&self, hwndbar: P0, fbroadcast: P1, umsg: u32, wparam: P2, lparam: P3) -> windows_core::Result<()> where @@ -8610,7 +8610,7 @@ impl IContextMenu { (windows_core::Interface::vtable(self).InvokeCommand)(windows_core::Interface::as_raw(self), pici).ok() } pub unsafe fn GetCommandString(&self, idcmd: usize, utype: u32, preserved: Option<*const u32>, pszname: windows_core::PSTR, cchmax: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCommandString)(windows_core::Interface::as_raw(self), idcmd, utype, core::mem::transmute(preserved.unwrap_or(std::ptr::null())), core::mem::transmute(pszname), cchmax).ok() + (windows_core::Interface::vtable(self).GetCommandString)(windows_core::Interface::as_raw(self), idcmd, utype, core::mem::transmute(preserved.unwrap_or(core::ptr::null())), core::mem::transmute(pszname), cchmax).ok() } } #[repr(C)] @@ -8659,7 +8659,7 @@ impl IContextMenu3 { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), umsg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresult.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).HandleMenuMsg2)(windows_core::Interface::as_raw(self), umsg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(plresult.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -9592,7 +9592,7 @@ impl IDefaultFolderMenuInitialize { P2: windows_core::Param, P3: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pcmcb.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), psf.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), punkassociation.param().abi(), ckeys, core::mem::transmute(akeys.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pcmcb.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), psf.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), punkassociation.param().abi(), ckeys, core::mem::transmute(akeys.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetMenuRestrictions(&self, dfmrvalues: DEFAULT_FOLDER_MENU_RESTRICTIONS) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).SetMenuRestrictions)(windows_core::Interface::as_raw(self), dfmrvalues).ok() @@ -10135,7 +10135,7 @@ impl IDragSourceHelper { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeFromWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(ppt.unwrap_or(std::ptr::null())), pdataobject.param().abi()).ok() + (windows_core::Interface::vtable(self).InitializeFromWindow)(windows_core::Interface::as_raw(self), hwnd.param().abi(), core::mem::transmute(ppt.unwrap_or(core::ptr::null())), pdataobject.param().abi()).ok() } } #[repr(C)] @@ -10288,7 +10288,7 @@ impl core::ops::Deref for IEnumAssocHandlers { windows_core::imp::interface_hierarchy!(IEnumAssocHandlers, windows_core::IUnknown); impl IEnumAssocHandlers { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -10306,7 +10306,7 @@ impl core::ops::Deref for IEnumExplorerCommand { windows_core::imp::interface_hierarchy!(IEnumExplorerCommand, windows_core::IUnknown); impl IEnumExplorerCommand { pub unsafe fn Next(&self, puicommand: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), puicommand.len().try_into().unwrap(), core::mem::transmute(puicommand.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), puicommand.len().try_into().unwrap(), core::mem::transmute(puicommand.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -10369,7 +10369,7 @@ windows_core::imp::interface_hierarchy!(IEnumFullIDList, windows_core::IUnknown) impl IEnumFullIDList { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn Next(&self, rgelt: &mut [*mut Common::ITEMIDLIST], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -10435,7 +10435,7 @@ windows_core::imp::interface_hierarchy!(IEnumIDList, windows_core::IUnknown); impl IEnumIDList { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn Next(&self, rgelt: &mut [*mut Common::ITEMIDLIST], pceltfetched: Option<*mut u32>) -> windows_core::HRESULT { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))) + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))) } pub unsafe fn Skip(&self, celt: u32) -> windows_core::HRESULT { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt) @@ -10468,7 +10468,7 @@ impl core::ops::Deref for IEnumObjects { windows_core::imp::interface_hierarchy!(IEnumObjects, windows_core::IUnknown); impl IEnumObjects { pub unsafe fn Next(&self, riid: *const windows_core::GUID, rgelt: &mut [*mut core::ffi::c_void], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), riid, core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), riid, core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -10571,7 +10571,7 @@ impl core::ops::Deref for IEnumShellItems { windows_core::imp::interface_hierarchy!(IEnumShellItems, windows_core::IUnknown); impl IEnumShellItems { pub unsafe fn Next(&self, rgelt: &mut [Option], pceltfetched: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Next)(windows_core::Interface::as_raw(self), rgelt.len().try_into().unwrap(), core::mem::transmute(rgelt.as_ptr()), core::mem::transmute(pceltfetched.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn Skip(&self, celt: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Skip)(windows_core::Interface::as_raw(self), celt).ok() @@ -10926,14 +10926,14 @@ impl IExplorerBrowser { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), prc, core::mem::transmute(pfs.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), prc, core::mem::transmute(pfs.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Destroy(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Destroy)(windows_core::Interface::as_raw(self)).ok() } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn SetRect(&self, phdwp: Option<*mut super::WindowsAndMessaging::HDWP>, rcbrowser: super::super::Foundation::RECT) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SetRect)(windows_core::Interface::as_raw(self), core::mem::transmute(phdwp.unwrap_or(std::ptr::null_mut())), core::mem::transmute(rcbrowser)).ok() + (windows_core::Interface::vtable(self).SetRect)(windows_core::Interface::as_raw(self), core::mem::transmute(phdwp.unwrap_or(core::ptr::null_mut())), core::mem::transmute(rcbrowser)).ok() } pub unsafe fn SetPropertyBag(&self, pszpropertybag: P0) -> windows_core::Result<()> where @@ -11262,7 +11262,7 @@ impl IExtractIconA { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), niconsize).ok() + (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), niconsize).ok() } } #[repr(C)] @@ -11291,7 +11291,7 @@ impl IExtractIconW { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(std::ptr::null_mut())), niconsize).ok() + (windows_core::Interface::vtable(self).Extract)(windows_core::Interface::as_raw(self), pszfile.param().abi(), niconindex, core::mem::transmute(phiconlarge.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phiconsmall.unwrap_or(core::ptr::null_mut())), niconsize).ok() } } #[repr(C)] @@ -12552,7 +12552,7 @@ impl IFolderView { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SelectAndPositionItems(&self, cidl: u32, apidl: *const *const Common::ITEMIDLIST, apt: Option<*const super::super::Foundation::POINT>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).SelectAndPositionItems)(windows_core::Interface::as_raw(self), cidl, apidl, core::mem::transmute(apt.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).SelectAndPositionItems)(windows_core::Interface::as_raw(self), cidl, apidl, core::mem::transmute(apt.unwrap_or(core::ptr::null())), dwflags).ok() } } #[repr(C)] @@ -12600,7 +12600,7 @@ impl IFolderView2 { } #[cfg(feature = "Win32_UI_Shell_PropertiesSystem")] pub unsafe fn GetGroupBy(&self, pkey: *mut PropertiesSystem::PROPERTYKEY, pfascending: Option<*mut super::super::Foundation::BOOL>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), pkey, core::mem::transmute(pfascending.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetGroupBy)(windows_core::Interface::as_raw(self), pkey, core::mem::transmute(pfascending.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com_StructuredStorage", feature = "Win32_System_Variant", feature = "Win32_UI_Shell_Common", feature = "Win32_UI_Shell_PropertiesSystem"))] pub unsafe fn SetViewProperty(&self, pidl: *const Common::ITEMIDLIST, propkey: *const PropertiesSystem::PROPERTYKEY, propvar: *const super::super::System::Com::StructuredStorage::PROPVARIANT) -> windows_core::Result<()> { @@ -13167,7 +13167,7 @@ impl IHlink { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn GetMonikerReference(&self, dwwhichref: u32, ppimktarget: Option<*mut Option>, ppwzlocation: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMonikerReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppimktarget.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetMonikerReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppimktarget.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetStringReference(&self, grfhlsetf: u32, pwztarget: P0, pwzlocation: P1) -> windows_core::Result<()> where @@ -13177,7 +13177,7 @@ impl IHlink { (windows_core::Interface::vtable(self).SetStringReference)(windows_core::Interface::as_raw(self), grfhlsetf, pwztarget.param().abi(), pwzlocation.param().abi()).ok() } pub unsafe fn GetStringReference(&self, dwwhichref: u32, ppwztarget: Option<*mut windows_core::PWSTR>, ppwzlocation: Option<*mut windows_core::PWSTR>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetStringReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppwztarget.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetStringReference)(windows_core::Interface::as_raw(self), dwwhichref, core::mem::transmute(ppwztarget.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppwzlocation.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn SetFriendlyName(&self, pwzfriendlyname: P0) -> windows_core::Result<()> where @@ -13569,7 +13569,7 @@ impl IIOCancelInformation { (windows_core::Interface::vtable(self).SetCancelInformation)(windows_core::Interface::as_raw(self), dwthreadid, umsgcancel).ok() } pub unsafe fn GetCancelInformation(&self, pdwthreadid: Option<*mut u32>, pumsgcancel: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetCancelInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pumsgcancel.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetCancelInformation)(windows_core::Interface::as_raw(self), core::mem::transmute(pdwthreadid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pumsgcancel.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -14092,7 +14092,7 @@ impl IKnownFolderManager { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), rfid, hwnd.param().abi(), flags, psztargetpath.param().abi(), pexclusion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pexclusion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppszerror.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).Redirect)(windows_core::Interface::as_raw(self), rfid, hwnd.param().abi(), flags, psztargetpath.param().abi(), pexclusion.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(pexclusion.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(ppszerror.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -14287,7 +14287,7 @@ windows_core::imp::interface_hierarchy!(IMenuPopup, windows_core::IUnknown, supe #[cfg(feature = "Win32_System_Ole")] impl IMenuPopup { pub unsafe fn Popup(&self, ppt: *const super::super::Foundation::POINTL, prcexclude: Option<*const super::super::Foundation::RECTL>, dwflags: i32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), ppt, core::mem::transmute(prcexclude.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).Popup)(windows_core::Interface::as_raw(self), ppt, core::mem::transmute(prcexclude.unwrap_or(core::ptr::null())), dwflags).ok() } pub unsafe fn OnSelect(&self, dwselecttype: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).OnSelect)(windows_core::Interface::as_raw(self), dwselecttype).ok() @@ -15697,7 +15697,7 @@ impl IParentAndItem { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetParentAndItem(&self, ppidlparent: Option<*mut *mut Common::ITEMIDLIST>, ppsf: Option<*mut Option>, ppidlchild: Option<*mut *mut Common::ITEMIDLIST>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetParentAndItem)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidlparent.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppsf.unwrap_or(std::ptr::null_mut())), core::mem::transmute(ppidlchild.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetParentAndItem)(windows_core::Interface::as_raw(self), core::mem::transmute(ppidlparent.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppsf.unwrap_or(core::ptr::null_mut())), core::mem::transmute(ppidlchild.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -16067,7 +16067,7 @@ impl IProgressDialog { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), punkenablemodless.param().abi(), dwflags, core::mem::transmute(pvresevered.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).StartProgressDialog)(windows_core::Interface::as_raw(self), hwndparent.param().abi(), punkenablemodless.param().abi(), dwflags, core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn StopProgressDialog(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).StopProgressDialog)(windows_core::Interface::as_raw(self)).ok() @@ -16098,16 +16098,16 @@ impl IProgressDialog { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), dwlinenum, pwzstring.param().abi(), fcompactpath.param().abi(), core::mem::transmute(pvresevered.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetLine)(windows_core::Interface::as_raw(self), dwlinenum, pwzstring.param().abi(), fcompactpath.param().abi(), core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn SetCancelMsg(&self, pwzcancelmsg: P0, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).SetCancelMsg)(windows_core::Interface::as_raw(self), pwzcancelmsg.param().abi(), core::mem::transmute(pvresevered.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).SetCancelMsg)(windows_core::Interface::as_raw(self), pwzcancelmsg.param().abi(), core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Timer(&self, dwtimeraction: u32, pvresevered: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Timer)(windows_core::Interface::as_raw(self), dwtimeraction, core::mem::transmute(pvresevered.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Timer)(windows_core::Interface::as_raw(self), dwtimeraction, core::mem::transmute(pvresevered.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -16245,7 +16245,7 @@ impl IPublishingWizard { } #[cfg(all(feature = "Win32_Data_Xml_MsXml", feature = "Win32_System_Com"))] pub unsafe fn GetTransferManifest(&self, phrfromtransfer: Option<*mut windows_core::HRESULT>, pdocmanifest: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetTransferManifest)(windows_core::Interface::as_raw(self), core::mem::transmute(phrfromtransfer.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdocmanifest.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTransferManifest)(windows_core::Interface::as_raw(self), core::mem::transmute(phrfromtransfer.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdocmanifest.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -16296,7 +16296,7 @@ impl IQueryAssociations { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), flags, data, pszextra.param().abi(), core::mem::transmute(pvout.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pcbout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetData)(windows_core::Interface::as_raw(self), flags, data, pszextra.param().abi(), core::mem::transmute(pvout.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pcbout.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetEnum(&self, flags: ASSOCF, assocenum: ASSOCENUM, pszextra: P0, riid: *const windows_core::GUID, ppvout: *mut *mut core::ffi::c_void) -> windows_core::Result<()> where @@ -16543,7 +16543,7 @@ impl IResultsFolder { } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn AddIDList(&self, pidl: *const Common::ITEMIDLIST, ppidladded: Option<*mut *mut Common::ITEMIDLIST>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AddIDList)(windows_core::Interface::as_raw(self), pidl, core::mem::transmute(ppidladded.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).AddIDList)(windows_core::Interface::as_raw(self), pidl, core::mem::transmute(ppidladded.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn RemoveItem(&self, psi: P0) -> windows_core::Result<()> where @@ -17058,7 +17058,7 @@ impl IShellBrowser { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), id, umsg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pret.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SendControlMsg)(windows_core::Interface::as_raw(self), id, umsg, wparam.param().abi(), lparam.param().abi(), core::mem::transmute(pret.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryActiveShellView(&self) -> windows_core::Result { @@ -17133,7 +17133,7 @@ windows_core::imp::interface_hierarchy!(IShellChangeNotify, windows_core::IUnkno impl IShellChangeNotify { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn OnChange(&self, levent: i32, pidl1: Option<*const Common::ITEMIDLIST>, pidl2: Option<*const Common::ITEMIDLIST>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), levent, core::mem::transmute(pidl1.unwrap_or(std::ptr::null())), core::mem::transmute(pidl2.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).OnChange)(windows_core::Interface::as_raw(self), levent, core::mem::transmute(pidl1.unwrap_or(core::ptr::null())), core::mem::transmute(pidl2.unwrap_or(core::ptr::null()))).ok() } } #[repr(C)] @@ -17155,7 +17155,7 @@ windows_core::imp::interface_hierarchy!(IShellDetails, windows_core::IUnknown); impl IShellDetails { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetDetailsOf(&self, pidl: Option<*const Common::ITEMIDLIST>, icolumn: u32, pdetails: *mut Common::SHELLDETAILS) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(std::ptr::null())), icolumn, pdetails).ok() + (windows_core::Interface::vtable(self).GetDetailsOf)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), icolumn, pdetails).ok() } pub unsafe fn ColumnClick(&self, icolumn: u32) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).ColumnClick)(windows_core::Interface::as_raw(self), icolumn).ok() @@ -17593,7 +17593,7 @@ impl IShellExtInit { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), pdtobj.param().abi(), hkeyprogid.param().abi()).ok() + (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), pdtobj.param().abi(), hkeyprogid.param().abi()).ok() } } #[repr(C)] @@ -17700,7 +17700,7 @@ impl IShellFolder { P1: windows_core::Param, P2: windows_core::Param, { - (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pbc.param().abi(), pszdisplayname.param().abi(), core::mem::transmute(pcheaten.unwrap_or(std::ptr::null())), ppidl, pdwattributes).ok() + (windows_core::Interface::vtable(self).ParseDisplayName)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pbc.param().abi(), pszdisplayname.param().abi(), core::mem::transmute(pcheaten.unwrap_or(core::ptr::null())), ppidl, pdwattributes).ok() } pub unsafe fn EnumObjects(&self, hwnd: P0, grfflags: u32, ppenumidlist: *mut Option) -> windows_core::HRESULT where @@ -17752,7 +17752,7 @@ impl IShellFolder { T: windows_core::Interface, { let mut result__ = core::ptr::null_mut(); - (windows_core::Interface::vtable(self).GetUIObjectOf)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), &T::IID, core::mem::transmute(rgfreserved.unwrap_or(std::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) + (windows_core::Interface::vtable(self).GetUIObjectOf)(windows_core::Interface::as_raw(self), hwndowner.param().abi(), apidl.len().try_into().unwrap(), core::mem::transmute(apidl.as_ptr()), &T::IID, core::mem::transmute(rgfreserved.unwrap_or(core::ptr::null())), &mut result__).and_then(|| windows_core::Type::from_abi(result__)) } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetDisplayNameOf(&self, pidl: *const Common::ITEMIDLIST, uflags: SHGDNF, pname: *mut Common::STRRET) -> windows_core::Result<()> { @@ -17764,7 +17764,7 @@ impl IShellFolder { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pidl, pszname.param().abi(), uflags, core::mem::transmute(ppidlout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).SetNameOf)(windows_core::Interface::as_raw(self), hwnd.param().abi(), pidl, pszname.param().abi(), uflags, core::mem::transmute(ppidlout.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -17881,7 +17881,7 @@ impl IShellFolderBand { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).InitializeSFB)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(pidl.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).InitializeSFB)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(pidl.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn SetBandInfoSFB(&self, pbi: *const BANDINFOSFB) -> windows_core::Result<()> { @@ -17948,7 +17948,7 @@ impl IShellFolderView { #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn RemoveObject(&self, pidl: Option<*const Common::ITEMIDLIST>) -> windows_core::Result { let mut result__ = core::mem::zeroed(); - (windows_core::Interface::vtable(self).RemoveObject)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(std::ptr::null())), &mut result__).map(|| result__) + (windows_core::Interface::vtable(self).RemoveObject)(windows_core::Interface::as_raw(self), core::mem::transmute(pidl.unwrap_or(core::ptr::null())), &mut result__).map(|| result__) } pub unsafe fn GetObjectCount(&self) -> windows_core::Result { let mut result__ = core::mem::zeroed(); @@ -19663,7 +19663,7 @@ impl IShellMenu { (windows_core::Interface::vtable(self).Initialize)(windows_core::Interface::as_raw(self), psmc.param().abi(), uid, uidancestor, dwflags).ok() } pub unsafe fn GetMenuInfo(&self, ppsmc: Option<*mut Option>, puid: Option<*mut u32>, puidancestor: Option<*mut u32>, pdwflags: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMenuInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsmc.unwrap_or(std::ptr::null_mut())), core::mem::transmute(puid.unwrap_or(std::ptr::null_mut())), core::mem::transmute(puidancestor.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetMenuInfo)(windows_core::Interface::as_raw(self), core::mem::transmute(ppsmc.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puid.unwrap_or(core::ptr::null_mut())), core::mem::transmute(puidancestor.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Registry", feature = "Win32_UI_Shell_Common"))] pub unsafe fn SetShellFolder(&self, psf: P0, pidlfolder: Option<*const Common::ITEMIDLIST>, hkey: P1, dwflags: u32) -> windows_core::Result<()> @@ -19671,7 +19671,7 @@ impl IShellMenu { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).SetShellFolder)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(std::ptr::null())), hkey.param().abi(), dwflags).ok() + (windows_core::Interface::vtable(self).SetShellFolder)(windows_core::Interface::as_raw(self), psf.param().abi(), core::mem::transmute(pidlfolder.unwrap_or(core::ptr::null())), hkey.param().abi(), dwflags).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn GetShellFolder(&self, pdwflags: *mut u32, ppidl: *mut *mut Common::ITEMIDLIST, riid: *const windows_core::GUID, ppv: *mut *mut core::ffi::c_void) -> windows_core::Result<()> { @@ -19687,11 +19687,11 @@ impl IShellMenu { } #[cfg(feature = "Win32_UI_WindowsAndMessaging")] pub unsafe fn GetMenu(&self, phmenu: Option<*mut super::WindowsAndMessaging::HMENU>, phwnd: Option<*mut super::super::Foundation::HWND>, pdwflags: Option<*mut u32>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(phmenu.unwrap_or(std::ptr::null_mut())), core::mem::transmute(phwnd.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetMenu)(windows_core::Interface::as_raw(self), core::mem::transmute(phmenu.unwrap_or(core::ptr::null_mut())), core::mem::transmute(phwnd.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn InvalidateItem(&self, psmd: Option<*const SMDATA>, dwflags: u32) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).InvalidateItem)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd.unwrap_or(std::ptr::null())), dwflags).ok() + (windows_core::Interface::vtable(self).InvalidateItem)(windows_core::Interface::as_raw(self), core::mem::transmute(psmd.unwrap_or(core::ptr::null())), dwflags).ok() } #[cfg(all(feature = "Win32_UI_Shell_Common", feature = "Win32_UI_WindowsAndMessaging"))] pub unsafe fn GetState(&self, psmd: *mut SMDATA) -> windows_core::Result<()> { @@ -20051,7 +20051,7 @@ impl IShellUIHelper { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).AddFavorite)(windows_core::Interface::as_raw(self), url.param().abi(), core::mem::transmute(title.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AddFavorite)(windows_core::Interface::as_raw(self), url.param().abi(), core::mem::transmute(title.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn AddChannel(&self, url: P0) -> windows_core::Result<()> where @@ -20065,7 +20065,7 @@ impl IShellUIHelper { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AddDesktopComponent)(windows_core::Interface::as_raw(self), url.param().abi(), r#type.param().abi(), core::mem::transmute(left.unwrap_or(std::ptr::null())), core::mem::transmute(top.unwrap_or(std::ptr::null())), core::mem::transmute(width.unwrap_or(std::ptr::null())), core::mem::transmute(height.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AddDesktopComponent)(windows_core::Interface::as_raw(self), url.param().abi(), r#type.param().abi(), core::mem::transmute(left.unwrap_or(core::ptr::null())), core::mem::transmute(top.unwrap_or(core::ptr::null())), core::mem::transmute(width.unwrap_or(core::ptr::null())), core::mem::transmute(height.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn IsSubscribed(&self, url: P0) -> windows_core::Result where @@ -20091,7 +20091,7 @@ impl IShellUIHelper { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AutoCompleteSaveForm(&self, form: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AutoCompleteSaveForm)(windows_core::Interface::as_raw(self), core::mem::transmute(form.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoCompleteSaveForm)(windows_core::Interface::as_raw(self), core::mem::transmute(form.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AutoScan(&self, strsearch: P0, strfailureurl: P1, pvartargetframe: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> @@ -20099,11 +20099,11 @@ impl IShellUIHelper { P0: windows_core::Param, P1: windows_core::Param, { - (windows_core::Interface::vtable(self).AutoScan)(windows_core::Interface::as_raw(self), strsearch.param().abi(), strfailureurl.param().abi(), core::mem::transmute(pvartargetframe.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoScan)(windows_core::Interface::as_raw(self), strsearch.param().abi(), strfailureurl.param().abi(), core::mem::transmute(pvartargetframe.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn AutoCompleteAttach(&self, reserved: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).AutoCompleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).AutoCompleteAttach)(windows_core::Interface::as_raw(self), core::mem::transmute(reserved.unwrap_or(core::ptr::null()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ShowBrowserUI(&self, bstrname: P0, pvarin: *const super::super::System::Variant::VARIANT) -> windows_core::Result @@ -21367,11 +21367,11 @@ windows_core::imp::interface_hierarchy!(IStreamAsync, windows_core::IUnknown, su impl IStreamAsync { #[cfg(feature = "Win32_System_IO")] pub unsafe fn ReadAsync(&self, pv: *mut core::ffi::c_void, cb: u32, pcbread: Option<*mut u32>, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ReadAsync)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbread.unwrap_or(std::ptr::null_mut())), lpoverlapped).ok() + (windows_core::Interface::vtable(self).ReadAsync)(windows_core::Interface::as_raw(self), pv, cb, core::mem::transmute(pcbread.unwrap_or(core::ptr::null_mut())), lpoverlapped).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn WriteAsync(&self, lpbuffer: *const core::ffi::c_void, cb: u32, pcbwritten: Option<*mut u32>, lpoverlapped: *const super::super::System::IO::OVERLAPPED) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), lpbuffer, cb, core::mem::transmute(pcbwritten.unwrap_or(std::ptr::null_mut())), lpoverlapped).ok() + (windows_core::Interface::vtable(self).WriteAsync)(windows_core::Interface::as_raw(self), lpbuffer, cb, core::mem::transmute(pcbwritten.unwrap_or(core::ptr::null_mut())), lpoverlapped).ok() } #[cfg(feature = "Win32_System_IO")] pub unsafe fn OverlappedResult(&self, lpoverlapped: *const super::super::System::IO::OVERLAPPED, lpnumberofbytestransferred: *mut u32, bwait: P0) -> windows_core::Result<()> @@ -22894,10 +22894,10 @@ impl IThumbnailCache { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), cxyrequestedthumbsize, flags, core::mem::transmute(ppvthumb.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutflags.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pthumbnailid.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThumbnail)(windows_core::Interface::as_raw(self), pshellitem.param().abi(), cxyrequestedthumbsize, flags, core::mem::transmute(ppvthumb.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutflags.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pthumbnailid.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn GetThumbnailByID(&self, thumbnailid: WTS_THUMBNAILID, cxyrequestedthumbsize: u32, ppvthumb: Option<*mut Option>, poutflags: Option<*mut WTS_CACHEFLAGS>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetThumbnailByID)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbnailid), cxyrequestedthumbsize, core::mem::transmute(ppvthumb.unwrap_or(std::ptr::null_mut())), core::mem::transmute(poutflags.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetThumbnailByID)(windows_core::Interface::as_raw(self), core::mem::transmute(thumbnailid), cxyrequestedthumbsize, core::mem::transmute(ppvthumb.unwrap_or(core::ptr::null_mut())), core::mem::transmute(poutflags.unwrap_or(core::ptr::null_mut()))).ok() } } #[repr(C)] @@ -23421,7 +23421,7 @@ impl ITravelLog { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), ioffset, core::mem::transmute(ppte.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).GetTravelEntry)(windows_core::Interface::as_raw(self), punk.param().abi(), ioffset, core::mem::transmute(ppte.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(feature = "Win32_UI_Shell_Common")] pub unsafe fn FindTravelEntry(&self, punk: P0, pidl: *const Common::ITEMIDLIST) -> windows_core::Result @@ -24076,14 +24076,14 @@ impl IWebBrowser { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).Navigate)(windows_core::Interface::as_raw(self), url.param().abi(), core::mem::transmute(flags.unwrap_or(std::ptr::null())), core::mem::transmute(targetframename.unwrap_or(std::ptr::null())), core::mem::transmute(postdata.unwrap_or(std::ptr::null())), core::mem::transmute(headers.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Navigate)(windows_core::Interface::as_raw(self), url.param().abi(), core::mem::transmute(flags.unwrap_or(core::ptr::null())), core::mem::transmute(targetframename.unwrap_or(core::ptr::null())), core::mem::transmute(postdata.unwrap_or(core::ptr::null())), core::mem::transmute(headers.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Refresh(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Refresh)(windows_core::Interface::as_raw(self)).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Refresh2(&self, level: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Refresh2)(windows_core::Interface::as_raw(self), core::mem::transmute(level.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Refresh2)(windows_core::Interface::as_raw(self), core::mem::transmute(level.unwrap_or(core::ptr::null()))).ok() } pub unsafe fn Stop(&self) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok() @@ -24220,7 +24220,7 @@ windows_core::imp::interface_hierarchy!(IWebBrowser2, windows_core::IUnknown, su impl IWebBrowser2 { #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn Navigate2(&self, url: *const super::super::System::Variant::VARIANT, flags: Option<*const super::super::System::Variant::VARIANT>, targetframename: Option<*const super::super::System::Variant::VARIANT>, postdata: Option<*const super::super::System::Variant::VARIANT>, headers: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).Navigate2)(windows_core::Interface::as_raw(self), core::mem::transmute(url), core::mem::transmute(flags.unwrap_or(std::ptr::null())), core::mem::transmute(targetframename.unwrap_or(std::ptr::null())), core::mem::transmute(postdata.unwrap_or(std::ptr::null())), core::mem::transmute(headers.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).Navigate2)(windows_core::Interface::as_raw(self), core::mem::transmute(url), core::mem::transmute(flags.unwrap_or(core::ptr::null())), core::mem::transmute(targetframename.unwrap_or(core::ptr::null())), core::mem::transmute(postdata.unwrap_or(core::ptr::null())), core::mem::transmute(headers.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn QueryStatusWB(&self, cmdid: super::super::System::Ole::OLECMDID) -> windows_core::Result { @@ -24229,11 +24229,11 @@ impl IWebBrowser2 { } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ExecWB(&self, cmdid: super::super::System::Ole::OLECMDID, cmdexecopt: super::super::System::Ole::OLECMDEXECOPT, pvain: Option<*const super::super::System::Variant::VARIANT>, pvaout: Option<*mut super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ExecWB)(windows_core::Interface::as_raw(self), cmdid, cmdexecopt, core::mem::transmute(pvain.unwrap_or(std::ptr::null())), core::mem::transmute(pvaout.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).ExecWB)(windows_core::Interface::as_raw(self), cmdid, cmdexecopt, core::mem::transmute(pvain.unwrap_or(core::ptr::null())), core::mem::transmute(pvaout.unwrap_or(core::ptr::null_mut()))).ok() } #[cfg(all(feature = "Win32_System_Com", feature = "Win32_System_Ole", feature = "Win32_System_Variant"))] pub unsafe fn ShowBrowserBar(&self, pvaclsid: *const super::super::System::Variant::VARIANT, pvarshow: Option<*const super::super::System::Variant::VARIANT>, pvarsize: Option<*const super::super::System::Variant::VARIANT>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).ShowBrowserBar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvaclsid), core::mem::transmute(pvarshow.unwrap_or(std::ptr::null())), core::mem::transmute(pvarsize.unwrap_or(std::ptr::null()))).ok() + (windows_core::Interface::vtable(self).ShowBrowserBar)(windows_core::Interface::as_raw(self), core::mem::transmute(pvaclsid), core::mem::transmute(pvarshow.unwrap_or(core::ptr::null())), core::mem::transmute(pvarsize.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_System_Ole")] pub unsafe fn ReadyState(&self) -> windows_core::Result { diff --git a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs index d20dd2c471..8e315f54b2 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/TabletPC/mod.rs @@ -1079,7 +1079,7 @@ impl IInkDisp { where P0: windows_core::Param, { - (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), points.param().abi(), intersectpercent, core::mem::transmute(lassopoints.unwrap_or(std::ptr::null_mut())), core::mem::transmute(strokes)).ok() + (windows_core::Interface::vtable(self).HitTestWithLasso)(windows_core::Interface::as_raw(self), points.param().abi(), intersectpercent, core::mem::transmute(lassopoints.unwrap_or(core::ptr::null_mut())), core::mem::transmute(strokes)).ok() } #[cfg(feature = "Win32_System_Com")] pub unsafe fn NearestPoint(&self, x: i32, y: i32, pointonstroke: *mut f32, distancefrompacket: *mut f32, stroke: *mut Option) -> windows_core::Result<()> { @@ -5393,7 +5393,7 @@ impl IRealTimeStylus { (windows_core::Interface::vtable(self).GetDesiredPacketDescription)(windows_core::Interface::as_raw(self), pcproperties, pppropertyguids).ok() } pub unsafe fn GetPacketDescriptionData(&self, tcid: u32, pfinktodevicescalex: Option<*mut f32>, pfinktodevicescaley: Option<*mut f32>, pcpacketproperties: *mut u32, pppacketproperties: *mut *mut PACKET_PROPERTY) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).GetPacketDescriptionData)(windows_core::Interface::as_raw(self), tcid, core::mem::transmute(pfinktodevicescalex.unwrap_or(std::ptr::null_mut())), core::mem::transmute(pfinktodevicescaley.unwrap_or(std::ptr::null_mut())), pcpacketproperties, pppacketproperties).ok() + (windows_core::Interface::vtable(self).GetPacketDescriptionData)(windows_core::Interface::as_raw(self), tcid, core::mem::transmute(pfinktodevicescalex.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pfinktodevicescaley.unwrap_or(core::ptr::null_mut())), pcpacketproperties, pppacketproperties).ok() } } #[repr(C)] @@ -5556,7 +5556,7 @@ impl IStrokeBuilder { } #[cfg(feature = "Win32_System_Com")] pub unsafe fn BeginStroke(&self, tcid: u32, sid: u32, ppacket: *const i32, ppacketproperties: &[PACKET_PROPERTY], finktodevicescalex: f32, finktodevicescaley: f32, ppiinkstroke: Option<*mut Option>) -> windows_core::Result<()> { - (windows_core::Interface::vtable(self).BeginStroke)(windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, core::mem::transmute(ppiinkstroke.unwrap_or(std::ptr::null_mut()))).ok() + (windows_core::Interface::vtable(self).BeginStroke)(windows_core::Interface::as_raw(self), tcid, sid, ppacket, ppacketproperties.len().try_into().unwrap(), core::mem::transmute(ppacketproperties.as_ptr()), finktodevicescalex, finktodevicescaley, core::mem::transmute(ppiinkstroke.unwrap_or(core::ptr::null_mut()))).ok() } pub unsafe fn AppendPackets(&self, tcid: u32, sid: u32, ppackets: &[i32]) -> windows_core::Result<()> { (windows_core::Interface::vtable(self).AppendPackets)(windows_core::Interface::as_raw(self), tcid, sid, ppackets.len().try_into().unwrap(), core::mem::transmute(ppackets.as_ptr())).ok() 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 3c9ed3b423..f17b8dc06c 100644 --- a/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/UI/WindowsAndMessaging/mod.rs @@ -75,7 +75,7 @@ where #[inline] pub unsafe fn CalculatePopupWindowPosition(anchorpoint: *const super::super::Foundation::POINT, windowsize: *const super::super::Foundation::SIZE, flags: u32, excluderect: 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).ok() + CalculatePopupWindowPosition(anchorpoint, windowsize, flags, core::mem::transmute(excluderect.unwrap_or(core::ptr::null())), popupwindowposition).ok() } #[inline] pub unsafe fn CallMsgFilterA(lpmsg: *const MSG, ncode: i32) -> super::super::Foundation::BOOL { @@ -128,7 +128,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CascadeWindows(hwndparent : super::super::Foundation:: HWND, whow : CASCADE_WINDOWS_HOW, lprect : *const super::super::Foundation:: RECT, ckids : u32, lpkids : *const super::super::Foundation:: HWND) -> u16); - CascadeWindows(hwndparent.param().abi(), whow, core::mem::transmute(lprect.unwrap_or(std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + CascadeWindows(hwndparent.param().abi(), whow, core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn ChangeMenuA(hmenu: P0, cmd: u32, lpsznewitem: P1, cmdinsert: u32, flags: u32) -> super::super::Foundation::BOOL @@ -159,7 +159,7 @@ where P0: windows_core::Param, { 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.param().abi(), message, action, core::mem::transmute(pchangefilterstruct.unwrap_or(std::ptr::null_mut()))).ok() + ChangeWindowMessageFilterEx(hwnd.param().abi(), message, action, core::mem::transmute(pchangefilterstruct.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn CharLowerA(lpsz: windows_core::PSTR) -> windows_core::PSTR { @@ -319,7 +319,7 @@ where #[inline] pub unsafe fn ClipCursor(lprect: 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()))).ok() + ClipCursor(core::mem::transmute(lprect.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn CloseWindow(hwnd: P0) -> windows_core::Result<()> @@ -531,7 +531,7 @@ where P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateWindowExA(dwexstyle : WINDOW_EX_STYLE, lpclassname : windows_core::PCSTR, lpwindowname : windows_core::PCSTR, dwstyle : WINDOW_STYLE, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, hmenu : HMENU, hinstance : super::super::Foundation:: HINSTANCE, lpparam : *const core::ffi::c_void) -> super::super::Foundation:: HWND); - let result__ = CreateWindowExA(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(std::ptr::null()))); + let result__ = CreateWindowExA(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -544,7 +544,7 @@ where P4: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn CreateWindowExW(dwexstyle : WINDOW_EX_STYLE, lpclassname : windows_core::PCWSTR, lpwindowname : windows_core::PCWSTR, dwstyle : WINDOW_STYLE, x : i32, y : i32, nwidth : i32, nheight : i32, hwndparent : super::super::Foundation:: HWND, hmenu : HMENU, hinstance : super::super::Foundation:: HINSTANCE, lpparam : *const core::ffi::c_void) -> super::super::Foundation:: HWND); - let result__ = CreateWindowExW(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(std::ptr::null()))); + let result__ = CreateWindowExW(dwexstyle, lpclassname.param().abi(), lpwindowname.param().abi(), dwstyle, x, y, nwidth, nheight, hwndparent.param().abi(), hmenu.param().abi(), hinstance.param().abi(), core::mem::transmute(lpparam.unwrap_or(core::ptr::null()))); (!result__.is_invalid()).then_some(result__).ok_or_else(windows_core::Error::from_win32) } #[inline] @@ -704,7 +704,7 @@ where #[inline] pub unsafe fn DestroyResourceIndexer(resourceindexer: Option<*const core::ffi::c_void>) { windows_targets::link!("mrmsupport.dll" "system" fn DestroyResourceIndexer(resourceindexer : *const core::ffi::c_void)); - DestroyResourceIndexer(core::mem::transmute(resourceindexer.unwrap_or(std::ptr::null()))) + DestroyResourceIndexer(core::mem::transmute(resourceindexer.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn DestroyWindow(hwnd: P0) -> windows_core::Result<()> @@ -1150,7 +1150,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetDlgItemInt(hdlg : super::super::Foundation:: HWND, niddlgitem : i32, lptranslated : *mut super::super::Foundation:: BOOL, bsigned : super::super::Foundation:: BOOL) -> u32); - GetDlgItemInt(hdlg.param().abi(), niddlgitem, core::mem::transmute(lptranslated.unwrap_or(std::ptr::null_mut())), bsigned.param().abi()) + GetDlgItemInt(hdlg.param().abi(), niddlgitem, core::mem::transmute(lptranslated.unwrap_or(core::ptr::null_mut())), bsigned.param().abi()) } #[inline] pub unsafe fn GetDlgItemTextA(hdlg: P0, niddlgitem: i32, lpstring: &mut [u8]) -> u32 @@ -1224,7 +1224,7 @@ where P0: windows_core::Param, { 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.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() + GetLayeredWindowAttributes(hwnd.param().abi(), core::mem::transmute(pcrkey.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pbalpha.unwrap_or(core::ptr::null_mut())), core::mem::transmute(pdwflags.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn GetMenu(hwnd: P0) -> HMENU @@ -1633,7 +1633,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn GetWindowThreadProcessId(hwnd : super::super::Foundation:: HWND, lpdwprocessid : *mut u32) -> u32); - GetWindowThreadProcessId(hwnd.param().abi(), core::mem::transmute(lpdwprocessid.unwrap_or(std::ptr::null_mut()))) + GetWindowThreadProcessId(hwnd.param().abi(), core::mem::transmute(lpdwprocessid.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn GetWindowWord(hwnd: P0, nindex: i32) -> u16 @@ -1668,7 +1668,7 @@ pub unsafe fn InSendMessage() -> super::super::Foundation::BOOL { #[inline] pub unsafe fn InSendMessageEx(lpreserved: Option<*const core::ffi::c_void>) -> u32 { windows_targets::link!("user32.dll" "system" fn InSendMessageEx(lpreserved : *const core::ffi::c_void) -> u32); - InSendMessageEx(core::mem::transmute(lpreserved.unwrap_or(std::ptr::null()))) + InSendMessageEx(core::mem::transmute(lpreserved.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn IndexFilePath(resourceindexer: *const core::ffi::c_void, filepath: P0, ppresourceuri: *mut windows_core::PWSTR, pqualifiercount: *mut u32, ppqualifiers: *mut *mut IndexedResourceQualifier) -> windows_core::Result<()> @@ -2466,12 +2466,12 @@ where #[inline] pub unsafe fn PrivateExtractIconsA(szfilename: &[u8; 260], niconindex: i32, cxicon: i32, cyicon: i32, phicon: Option<&mut [HICON]>, piconid: Option<*mut u32>, flags: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn PrivateExtractIconsA(szfilename : windows_core::PCSTR, niconindex : i32, cxicon : i32, cyicon : i32, phicon : *mut HICON, piconid : *mut u32, nicons : u32, flags : u32) -> u32); - PrivateExtractIconsA(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) + PrivateExtractIconsA(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[inline] pub unsafe fn PrivateExtractIconsW(szfilename: &[u16; 260], niconindex: i32, cxicon: i32, cyicon: i32, phicon: Option<&mut [HICON]>, piconid: Option<*mut u32>, flags: u32) -> u32 { windows_targets::link!("user32.dll" "system" fn PrivateExtractIconsW(szfilename : windows_core::PCWSTR, niconindex : i32, cxicon : i32, cyicon : i32, phicon : *mut HICON, piconid : *mut u32, nicons : u32, flags : u32) -> u32); - PrivateExtractIconsW(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(std::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) + PrivateExtractIconsW(core::mem::transmute(szfilename.as_ptr()), niconindex, cxicon, cyicon, core::mem::transmute(phicon.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), core::mem::transmute(piconid.unwrap_or(core::ptr::null_mut())), phicon.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), flags) } #[inline] pub unsafe fn RealChildWindowFromPoint(hwndparent: P0, ptparentclientcoords: super::super::Foundation::POINT) -> super::super::Foundation::HWND @@ -2615,7 +2615,7 @@ where P1: windows_core::Param, { 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.param().abi(), dx, dy, core::mem::transmute(lprcscroll.unwrap_or(std::ptr::null())), core::mem::transmute(lprcclip.unwrap_or(std::ptr::null())), hrgnupdate.param().abi(), core::mem::transmute(lprcupdate.unwrap_or(std::ptr::null_mut()))).ok() + ScrollDC(hdc.param().abi(), dx, dy, core::mem::transmute(lprcscroll.unwrap_or(core::ptr::null())), core::mem::transmute(lprcclip.unwrap_or(core::ptr::null())), hrgnupdate.param().abi(), core::mem::transmute(lprcupdate.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn ScrollWindow(hwnd: P0, xamount: i32, yamount: i32, lprect: Option<*const super::super::Foundation::RECT>, lpcliprect: Option<*const super::super::Foundation::RECT>) -> windows_core::Result<()> @@ -2623,7 +2623,7 @@ where P0: windows_core::Param, { 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.param().abi(), xamount, yamount, core::mem::transmute(lprect.unwrap_or(std::ptr::null())), core::mem::transmute(lpcliprect.unwrap_or(std::ptr::null()))).ok() + ScrollWindow(hwnd.param().abi(), xamount, yamount, core::mem::transmute(lprect.unwrap_or(core::ptr::null())), core::mem::transmute(lpcliprect.unwrap_or(core::ptr::null()))).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] @@ -2633,7 +2633,7 @@ where P1: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn ScrollWindowEx(hwnd : super::super::Foundation:: HWND, dx : i32, dy : i32, prcscroll : *const super::super::Foundation:: RECT, prcclip : *const super::super::Foundation:: RECT, hrgnupdate : super::super::Graphics::Gdi:: HRGN, prcupdate : *mut super::super::Foundation:: RECT, flags : SCROLL_WINDOW_FLAGS) -> i32); - ScrollWindowEx(hwnd.param().abi(), dx, dy, core::mem::transmute(prcscroll.unwrap_or(std::ptr::null())), core::mem::transmute(prcclip.unwrap_or(std::ptr::null())), hrgnupdate.param().abi(), core::mem::transmute(prcupdate.unwrap_or(std::ptr::null_mut())), flags) + ScrollWindowEx(hwnd.param().abi(), dx, dy, core::mem::transmute(prcscroll.unwrap_or(core::ptr::null())), core::mem::transmute(prcclip.unwrap_or(core::ptr::null())), hrgnupdate.param().abi(), core::mem::transmute(prcupdate.unwrap_or(core::ptr::null_mut())), flags) } #[inline] pub unsafe fn SendDlgItemMessageA(hdlg: P0, niddlgitem: i32, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::LRESULT @@ -2693,7 +2693,7 @@ where P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SendMessageTimeoutA(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, fuflags : SEND_MESSAGE_TIMEOUT_FLAGS, utimeout : u32, lpdwresult : *mut usize) -> super::super::Foundation:: LRESULT); - SendMessageTimeoutA(hwnd.param().abi(), msg, wparam.param().abi(), lparam.param().abi(), fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(std::ptr::null_mut()))) + SendMessageTimeoutA(hwnd.param().abi(), msg, wparam.param().abi(), lparam.param().abi(), fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SendMessageTimeoutW(hwnd: P0, msg: u32, wparam: P1, lparam: P2, fuflags: SEND_MESSAGE_TIMEOUT_FLAGS, utimeout: u32, lpdwresult: Option<*mut usize>) -> super::super::Foundation::LRESULT @@ -2703,7 +2703,7 @@ where P2: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn SendMessageTimeoutW(hwnd : super::super::Foundation:: HWND, msg : u32, wparam : super::super::Foundation:: WPARAM, lparam : super::super::Foundation:: LPARAM, fuflags : SEND_MESSAGE_TIMEOUT_FLAGS, utimeout : u32, lpdwresult : *mut usize) -> super::super::Foundation:: LRESULT); - SendMessageTimeoutW(hwnd.param().abi(), msg, wparam.param().abi(), lparam.param().abi(), fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(std::ptr::null_mut()))) + SendMessageTimeoutW(hwnd.param().abi(), msg, wparam.param().abi(), lparam.param().abi(), fuflags, utimeout, core::mem::transmute(lpdwresult.unwrap_or(core::ptr::null_mut()))) } #[inline] pub unsafe fn SendMessageW(hwnd: P0, msg: u32, wparam: P1, lparam: P2) -> super::super::Foundation::LRESULT @@ -3167,12 +3167,12 @@ where #[inline] pub unsafe fn SystemParametersInfoA(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: 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).ok() + SystemParametersInfoA(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), fwinini).ok() } #[inline] pub unsafe fn SystemParametersInfoW(uiaction: SYSTEM_PARAMETERS_INFO_ACTION, uiparam: u32, pvparam: 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).ok() + SystemParametersInfoW(uiaction, uiparam, core::mem::transmute(pvparam.unwrap_or(core::ptr::null_mut())), fwinini).ok() } #[inline] pub unsafe fn TileWindows(hwndparent: P0, whow: TILE_WINDOWS_HOW, lprect: Option<*const super::super::Foundation::RECT>, lpkids: Option<&[super::super::Foundation::HWND]>) -> u16 @@ -3180,7 +3180,7 @@ where P0: windows_core::Param, { windows_targets::link!("user32.dll" "system" fn TileWindows(hwndparent : super::super::Foundation:: HWND, whow : TILE_WINDOWS_HOW, lprect : *const super::super::Foundation:: RECT, ckids : u32, lpkids : *const super::super::Foundation:: HWND) -> u16); - TileWindows(hwndparent.param().abi(), whow, core::mem::transmute(lprect.unwrap_or(std::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) + TileWindows(hwndparent.param().abi(), whow, core::mem::transmute(lprect.unwrap_or(core::ptr::null())), lpkids.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(lpkids.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr()))) } #[inline] pub unsafe fn TrackPopupMenu(hmenu: P0, uflags: TRACK_POPUP_MENU_FLAGS, x: i32, y: i32, nreserved: i32, hwnd: P1, prcrect: Option<*const super::super::Foundation::RECT>) -> super::super::Foundation::BOOL @@ -3189,7 +3189,7 @@ where P1: windows_core::Param, { 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.param().abi(), uflags, x, y, nreserved, hwnd.param().abi(), core::mem::transmute(prcrect.unwrap_or(std::ptr::null()))) + TrackPopupMenu(hmenu.param().abi(), uflags, x, y, nreserved, hwnd.param().abi(), core::mem::transmute(prcrect.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TrackPopupMenuEx(hmenu: P0, uflags: u32, x: i32, y: i32, hwnd: P1, lptpm: Option<*const TPMPARAMS>) -> super::super::Foundation::BOOL @@ -3198,7 +3198,7 @@ where P1: windows_core::Param, { 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.param().abi(), uflags, x, y, hwnd.param().abi(), core::mem::transmute(lptpm.unwrap_or(std::ptr::null()))) + TrackPopupMenuEx(hmenu.param().abi(), uflags, x, y, hwnd.param().abi(), core::mem::transmute(lptpm.unwrap_or(core::ptr::null()))) } #[inline] pub unsafe fn TranslateAcceleratorA(hwnd: P0, hacctable: P1, lpmsg: *const MSG) -> i32 @@ -3280,7 +3280,7 @@ where P3: windows_core::Param, { 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.param().abi(), hdcdst.param().abi(), core::mem::transmute(pptdst.unwrap_or(std::ptr::null())), core::mem::transmute(psize.unwrap_or(std::ptr::null())), hdcsrc.param().abi(), core::mem::transmute(pptsrc.unwrap_or(std::ptr::null())), crkey.param().abi(), core::mem::transmute(pblend.unwrap_or(std::ptr::null())), dwflags).ok() + UpdateLayeredWindow(hwnd.param().abi(), hdcdst.param().abi(), core::mem::transmute(pptdst.unwrap_or(core::ptr::null())), core::mem::transmute(psize.unwrap_or(core::ptr::null())), hdcsrc.param().abi(), core::mem::transmute(pptsrc.unwrap_or(core::ptr::null())), crkey.param().abi(), core::mem::transmute(pblend.unwrap_or(core::ptr::null())), dwflags).ok() } #[cfg(feature = "Win32_Graphics_Gdi")] #[inline] diff --git a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs index 265c809dc3..3d039ebd6e 100644 --- a/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs +++ b/crates/libs/windows/src/Windows/Win32/Web/InternetExplorer/mod.rs @@ -170,7 +170,7 @@ where P0: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IELaunchURL(lpwstrurl : windows_core::PCWSTR, lpprocinfo : *mut super::super::System::Threading:: PROCESS_INFORMATION, lpinfo : *const core::ffi::c_void) -> windows_core::HRESULT); - IELaunchURL(lpwstrurl.param().abi(), lpprocinfo, core::mem::transmute(lpinfo.unwrap_or(std::ptr::null()))).ok() + IELaunchURL(lpwstrurl.param().abi(), lpprocinfo, core::mem::transmute(lpinfo.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn IEMoveFileEx(lpexistingfilename: P0, lpnewfilename: P1, dwflags: u32) -> super::super::Foundation::BOOL @@ -194,7 +194,7 @@ where P1: windows_core::Param, { windows_targets::link!("ieframe.dll" "system" fn IERegCreateKeyEx(lpsubkey : windows_core::PCWSTR, reserved : u32, lpclass : windows_core::PCWSTR, dwoptions : u32, samdesired : u32, lpsecurityattributes : *const super::super::Security:: SECURITY_ATTRIBUTES, phkresult : *mut super::super::System::Registry:: HKEY, lpdwdisposition : *mut u32) -> windows_core::HRESULT); - IERegCreateKeyEx(lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(std::ptr::null())), phkresult, lpdwdisposition).ok() + IERegCreateKeyEx(lpsubkey.param().abi(), reserved, lpclass.param().abi(), dwoptions, samdesired, core::mem::transmute(lpsecurityattributes.unwrap_or(core::ptr::null())), phkresult, lpdwdisposition).ok() } #[inline] pub unsafe fn IERegSetValueEx(lpsubkey: P0, lpvaluename: P1, reserved: u32, dwtype: u32, lpdata: &[u8]) -> windows_core::Result<()> @@ -346,7 +346,7 @@ where P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingCheckUserAccess(pszusername : windows_core::PCSTR, pszurl : windows_core::PCSTR, pszratinginfo : windows_core::PCSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingCheckUserAccess(pszusername.param().abi(), pszurl.param().abi(), pszratinginfo.param().abi(), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppratingdetails.unwrap_or(std::ptr::null_mut()))).ok() + RatingCheckUserAccess(pszusername.param().abi(), pszurl.param().abi(), pszratinginfo.param().abi(), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppratingdetails.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RatingCheckUserAccessW(pszusername: P0, pszurl: P1, pszratinginfo: P2, pdata: Option<&[u8]>, ppratingdetails: Option<*mut *mut core::ffi::c_void>) -> windows_core::Result<()> @@ -356,7 +356,7 @@ where P2: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingCheckUserAccessW(pszusername : windows_core::PCWSTR, pszurl : windows_core::PCWSTR, pszratinginfo : windows_core::PCWSTR, pdata : *const u8, cbdata : u32, ppratingdetails : *mut *mut core::ffi::c_void) -> windows_core::HRESULT); - RatingCheckUserAccessW(pszusername.param().abi(), pszurl.param().abi(), pszratinginfo.param().abi(), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppratingdetails.unwrap_or(std::ptr::null_mut()))).ok() + RatingCheckUserAccessW(pszusername.param().abi(), pszurl.param().abi(), pszratinginfo.param().abi(), core::mem::transmute(pdata.as_deref().map_or(core::ptr::null(), |slice| slice.as_ptr())), pdata.as_deref().map_or(0, |slice| slice.len().try_into().unwrap()), core::mem::transmute(ppratingdetails.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RatingClickedOnPRFInternal(hwndowner: P0, param1: P1, lpszfilename: P2, nshow: i32) -> windows_core::Result<()> @@ -406,7 +406,7 @@ pub unsafe fn RatingEnabledQuery() -> windows_core::Result<()> { #[inline] pub unsafe fn RatingFreeDetails(pratingdetails: Option<*const core::ffi::c_void>) -> windows_core::Result<()> { windows_targets::link!("msrating.dll" "system" fn RatingFreeDetails(pratingdetails : *const core::ffi::c_void) -> windows_core::HRESULT); - RatingFreeDetails(core::mem::transmute(pratingdetails.unwrap_or(std::ptr::null()))).ok() + RatingFreeDetails(core::mem::transmute(pratingdetails.unwrap_or(core::ptr::null()))).ok() } #[inline] pub unsafe fn RatingInit() -> windows_core::Result<()> { @@ -427,7 +427,7 @@ where P0: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingObtainQuery(psztargeturl : windows_core::PCSTR, dwuserdata : u32, fcallback : isize, phratingobtainquery : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RatingObtainQuery(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(std::ptr::null_mut()))).ok() + RatingObtainQuery(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RatingObtainQueryW(psztargeturl: P0, dwuserdata: u32, fcallback: isize, phratingobtainquery: Option<*mut super::super::Foundation::HANDLE>) -> windows_core::Result<()> @@ -435,7 +435,7 @@ where P0: windows_core::Param, { windows_targets::link!("msrating.dll" "system" fn RatingObtainQueryW(psztargeturl : windows_core::PCWSTR, dwuserdata : u32, fcallback : isize, phratingobtainquery : *mut super::super::Foundation:: HANDLE) -> windows_core::HRESULT); - RatingObtainQueryW(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(std::ptr::null_mut()))).ok() + RatingObtainQueryW(psztargeturl.param().abi(), dwuserdata, fcallback, core::mem::transmute(phratingobtainquery.unwrap_or(core::ptr::null_mut()))).ok() } #[inline] pub unsafe fn RatingSetupUI(hdlg: P0, pszusername: P1) -> windows_core::Result<()> From 09b164c49b18171de9333d9c8dc679d5d70ea585 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 9 Oct 2024 10:12:04 -0500 Subject: [PATCH 4/5] sample --- crates/samples/windows/direct3d12/Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/samples/windows/direct3d12/Cargo.toml b/crates/samples/windows/direct3d12/Cargo.toml index dce77f0d1f..3dc83a6334 100644 --- a/crates/samples/windows/direct3d12/Cargo.toml +++ b/crates/samples/windows/direct3d12/Cargo.toml @@ -8,7 +8,8 @@ publish = false array-init = "2.0.0" [dependencies.windows] -workspace = true +path = "../../../libs/windows" +default-features = false features = [ "Win32_Graphics_Direct3D_Fxc", "Win32_Graphics_Direct3D12", From 3339974c1fdcf2d4b9ac5394c95e97302d008500 Mon Sep 17 00:00:00 2001 From: Kenny Kerr Date: Wed, 9 Oct 2024 10:18:35 -0500 Subject: [PATCH 5/5] standalone --- crates/tests/misc/standalone/src/b_vtbl_2.rs | 8 ++++---- crates/tests/misc/standalone/src/b_vtbl_3.rs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/crates/tests/misc/standalone/src/b_vtbl_2.rs b/crates/tests/misc/standalone/src/b_vtbl_2.rs index f130be025f..df1e8d9126 100644 --- a/crates/tests/misc/standalone/src/b_vtbl_2.rs +++ b/crates/tests/misc/standalone/src/b_vtbl_2.rs @@ -36,16 +36,16 @@ pub const IID_IInspectable: GUID = GUID::from_u128(0xaf86e2e0_b12d_4c6a_9c5a_d7a pub struct IInspectable_Vtbl { pub base: IUnknown_Vtbl, pub GetIids: unsafe extern "system" fn( - this: *mut std::ffi::c_void, + this: *mut core::ffi::c_void, count: *mut u32, values: *mut *mut GUID, ) -> HRESULT, pub GetRuntimeClassName: unsafe extern "system" fn( - this: *mut std::ffi::c_void, - value: *mut *mut std::ffi::c_void, + this: *mut core::ffi::c_void, + value: *mut *mut core::ffi::c_void, ) -> HRESULT, pub GetTrustLevel: - unsafe extern "system" fn(this: *mut std::ffi::c_void, value: *mut i32) -> HRESULT, + unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut i32) -> HRESULT, } pub const IID_IUnknown: GUID = GUID::from_u128(0x00000000_0000_0000_c000_000000000046); #[repr(C)] diff --git a/crates/tests/misc/standalone/src/b_vtbl_3.rs b/crates/tests/misc/standalone/src/b_vtbl_3.rs index fdb87ff8cb..4358417b32 100644 --- a/crates/tests/misc/standalone/src/b_vtbl_3.rs +++ b/crates/tests/misc/standalone/src/b_vtbl_3.rs @@ -29,16 +29,16 @@ pub const IID_IInspectable: GUID = GUID::from_u128(0xaf86e2e0_b12d_4c6a_9c5a_d7a pub struct IInspectable_Vtbl { pub base: IUnknown_Vtbl, pub GetIids: unsafe extern "system" fn( - this: *mut std::ffi::c_void, + this: *mut core::ffi::c_void, count: *mut u32, values: *mut *mut GUID, ) -> HRESULT, pub GetRuntimeClassName: unsafe extern "system" fn( - this: *mut std::ffi::c_void, - value: *mut *mut std::ffi::c_void, + this: *mut core::ffi::c_void, + value: *mut *mut core::ffi::c_void, ) -> HRESULT, pub GetTrustLevel: - unsafe extern "system" fn(this: *mut std::ffi::c_void, value: *mut i32) -> HRESULT, + unsafe extern "system" fn(this: *mut core::ffi::c_void, value: *mut i32) -> HRESULT, } pub const IID_IStringable: GUID = GUID::from_u128(0x96369f54_8eb6_48f0_abce_c1b211e627c3); #[repr(C)]